Fixed a couple of bugs (silent backtrace not totally silent, crashes
when the stack is corrupted or similar).
This commit is contained in:
parent
1e1eb509ea
commit
c6c04836e8
|
@ -189,6 +189,7 @@ static void DEBUG_DoBackTrace(int noisy)
|
|||
nframe = 1;
|
||||
if (frames) DBG_free( frames );
|
||||
frames = (struct bt_info *) DBG_alloc( sizeof(struct bt_info) );
|
||||
if (noisy)
|
||||
fprintf(stderr,"%s%d ",(curr_frame == 0 ? "=>" : " "), frameno);
|
||||
|
||||
if (IS_SELECTOR_SYSTEM(ss)) ss = 0;
|
||||
|
@ -232,6 +233,10 @@ static void DEBUG_DoBackTrace(int noisy)
|
|||
sw_addr.seg = ss;
|
||||
sw_addr.off = cur_switch;
|
||||
}
|
||||
if (DEBUG_IsBadReadPtr(&sw_addr,1)) {
|
||||
sw_addr.seg = (DWORD)-1;
|
||||
sw_addr.off = (DWORD)-1;
|
||||
}
|
||||
|
||||
for (ok = TRUE; ok;) {
|
||||
if ((frames[frameno].ss == sw_addr.seg) &&
|
||||
|
@ -269,6 +274,10 @@ static void DEBUG_DoBackTrace(int noisy)
|
|||
|
||||
is16 = TRUE;
|
||||
}
|
||||
if (DEBUG_IsBadReadPtr(&sw_addr,1)) {
|
||||
sw_addr.seg = (DWORD)-1;
|
||||
sw_addr.off = (DWORD)-1;
|
||||
}
|
||||
} else {
|
||||
/* ordinary stack frame */
|
||||
ok = is16 ? DEBUG_Frame16( &addr, &cs, ++frameno, noisy)
|
||||
|
|
Loading…
Reference in New Issue