Unwind across intrframes as well. While here, better handle bottom of
stack by claiming the frame when the IP is 0. It's a bit of a kluge, but avoids screens full of bogus frames. MFC after: 1 week
This commit is contained in:
parent
5c551253ea
commit
afc227eedb
@ -150,12 +150,15 @@ kgdb_trgt_trapframe_prev_register(struct frame_info *next_frame,
|
||||
*lvalp = not_lval;
|
||||
*realnump = -1;
|
||||
|
||||
cache = kgdb_trgt_frame_cache(next_frame, this_cache);
|
||||
if (cache->pc == 0)
|
||||
return;
|
||||
|
||||
ofs = (regnum >= AMD64_RAX_REGNUM && regnum <= AMD64_EFLAGS_REGNUM + 2)
|
||||
? kgdb_trgt_frame_offset[regnum] : -1;
|
||||
if (ofs == -1)
|
||||
return;
|
||||
|
||||
cache = kgdb_trgt_frame_cache(next_frame, this_cache);
|
||||
*addrp = cache->sp + ofs;
|
||||
*lvalp = lval_memory;
|
||||
target_read_memory(*addrp, valuep, regsz);
|
||||
@ -174,11 +177,14 @@ kgdb_trgt_trapframe_sniffer(struct frame_info *next_frame)
|
||||
CORE_ADDR pc;
|
||||
|
||||
pc = frame_pc_unwind(next_frame);
|
||||
if (pc == 0)
|
||||
return (&kgdb_trgt_trapframe_unwind);
|
||||
pname = NULL;
|
||||
find_pc_partial_function(pc, &pname, NULL, NULL);
|
||||
if (pname == NULL)
|
||||
return (NULL);
|
||||
if (strcmp(pname, "calltrap") == 0)
|
||||
if (strcmp(pname, "calltrap") == 0 ||
|
||||
(pname[0] == 'X' && pname[1] != '_'))
|
||||
return (&kgdb_trgt_trapframe_unwind);
|
||||
/* printf("%s: %lx =%s\n", __func__, pc, pname); */
|
||||
return (NULL);
|
||||
|
Loading…
Reference in New Issue
Block a user