diff options
author | Jason Molenda <jmolenda@apple.com> | 1999-07-05 17:58:44 +0000 |
---|---|---|
committer | Jason Molenda <jmolenda@apple.com> | 1999-07-05 17:58:44 +0000 |
commit | 43ff13b4182f3853e19e9100c84313a6e9302b70 (patch) | |
tree | a546b011131cdb9e4d6200dd1f2b9432ffa01539 /gdb/blockframe.c | |
parent | f11523b01363bac4f0b7384c30fee355e9943b99 (diff) | |
download | gdb-43ff13b4182f3853e19e9100c84313a6e9302b70.zip gdb-43ff13b4182f3853e19e9100c84313a6e9302b70.tar.gz gdb-43ff13b4182f3853e19e9100c84313a6e9302b70.tar.bz2 |
import gdb-1999-07-05 snapshot
Diffstat (limited to 'gdb/blockframe.c')
-rw-r--r-- | gdb/blockframe.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/gdb/blockframe.c b/gdb/blockframe.c index 8f93d6e..87ce8bf 100644 --- a/gdb/blockframe.c +++ b/gdb/blockframe.c @@ -1121,6 +1121,7 @@ struct dummy_frame CORE_ADDR pc; CORE_ADDR fp; CORE_ADDR sp; + CORE_ADDR top; char *registers; }; @@ -1142,7 +1143,9 @@ generic_find_dummy_frame (pc, fp) for (dummyframe = dummy_frame_stack; dummyframe != NULL; dummyframe = dummyframe->next) - if (fp == dummyframe->fp || fp == dummyframe->sp) + if (fp == dummyframe->fp + || fp == dummyframe->sp + || fp == dummyframe->top) /* The frame in question lies between the saved fp and sp, inclusive */ return dummyframe->registers; @@ -1203,6 +1206,7 @@ generic_push_dummy_frame () if (INNER_THAN (dummy_frame->fp, fp)) /* stale -- destroy! */ { dummy_frame_stack = dummy_frame->next; + free (dummy_frame->registers); free (dummy_frame); dummy_frame = dummy_frame_stack; } @@ -1214,12 +1218,20 @@ generic_push_dummy_frame () dummy_frame->pc = read_register (PC_REGNUM); dummy_frame->sp = read_register (SP_REGNUM); + dummy_frame->top = dummy_frame->sp; dummy_frame->fp = fp; read_register_bytes (0, dummy_frame->registers, REGISTER_BYTES); dummy_frame->next = dummy_frame_stack; dummy_frame_stack = dummy_frame; } +void +generic_save_dummy_frame_tos (sp) + CORE_ADDR sp; +{ + dummy_frame_stack->top = sp; +} + /* Function: pop_frame Restore the machine state from either the saved dummy stack or a real stack frame. */ |