comparison packages/kernel/current/src/debug/dbg_gdb.cxx @ 10:d3fbcdfa1b2f ecos-sw-1999-05-29

Merge from eCos master repository on 1999-05-29-00:13:11-BST
author jlarmour
date Fri, 28 May 1999 16:43:09 +0000
parents 443894e2e912
children 01ce82f3e11a
comparison
equal deleted inserted replaced
9:95cc44ea0068 10:d3fbcdfa1b2f
97 97
98 //-------------------------------------------------------------------------- 98 //--------------------------------------------------------------------------
99 99
100 static void dbg_make_threadref(Cyg_Thread *thread, threadref *ref ) 100 static void dbg_make_threadref(Cyg_Thread *thread, threadref *ref )
101 { 101 {
102 cyg_uint16 id = thread->get_unique_id(); 102 if( thread == NULL )
103 {
104 ((unsigned long *)ref)[0] = 0;
105 ((unsigned long *)ref)[1] = 0;
106 }
107 else
108 {
109 cyg_uint16 id = thread->get_unique_id();
103 110
104 #if USE_ID 111 #if USE_ID
105 ((unsigned long *)ref)[0] = (unsigned long)thread; 112 ((unsigned long *)ref)[0] = (unsigned long)thread;
106 ((unsigned long *)ref)[1] = (unsigned long)swap32(id); 113 ((unsigned long *)ref)[1] = (unsigned long)swap32(id);
107 #else 114 #else
108 ((unsigned long *)ref)[1] = (unsigned long)thread; 115 ((unsigned long *)ref)[1] = (unsigned long)thread;
109 ((unsigned long *)ref)[0] = (unsigned long)id; 116 ((unsigned long *)ref)[0] = (unsigned long)id;
110 #endif 117 #endif
111 118 }
112 } 119 }
113 120
114 static Cyg_Thread *dbg_get_thread( threadref *ref) 121 static Cyg_Thread *dbg_get_thread( threadref *ref)
115 { 122 {
116 #if USE_ID 123 #if USE_ID