Mercurial > ecos
comparison packages/kernel/current/src/debug/dbg_gdb.cxx @ 30:641b639be825 ecos-sw-1999-08-16
Merge from eCos master repository on 1999-08-16-22:01:37-BST
| author | jlarmour |
|---|---|
| date | Mon, 16 Aug 1999 22:10:49 +0000 |
| parents | 01ce82f3e11a |
| children | c38311975d4f |
comparison
equal
deleted
inserted
replaced
| 29:093762bd6ba9 | 30:641b639be825 |
|---|---|
| 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 if( thread == NULL ) | 102 // The following test tries to avoid accessing uninitialized pointers. |
| 103 // This can happen if we take a breakpoint before the data is copied | |
| 104 // or the BSS zeroed. We currently assume that RAM will reset to zero | |
| 105 // or 0xff. If it is random, we have no hope. | |
| 106 | |
| 107 if( (CYG_ADDRWORD)thread == 0 || (CYG_ADDRWORD)thread == 0xffffffff ) | |
| 103 { | 108 { |
| 104 ((unsigned long *)ref)[0] = 0; | 109 ((unsigned long *)ref)[0] = 0; |
| 105 ((unsigned long *)ref)[1] = 0; | 110 ((unsigned long *)ref)[1] = 0; |
| 106 } | 111 } |
| 107 else | 112 else |
