diff options
author | Stephane Carrez <stcarrez@nerim.fr> | 2000-09-05 20:57:25 +0000 |
---|---|---|
committer | Stephane Carrez <stcarrez@nerim.fr> | 2000-09-05 20:57:25 +0000 |
commit | 6148eca7f8449c429fb737d714f1e3a9030c76ce (patch) | |
tree | c990adaf5c2cd634ac9ae1175268b938be7c6140 /gdb | |
parent | 4d72d17a49970a6b6fe3e8c9da3b7509cd564672 (diff) | |
download | gdb-6148eca7f8449c429fb737d714f1e3a9030c76ce.zip gdb-6148eca7f8449c429fb737d714f1e3a9030c76ce.tar.gz gdb-6148eca7f8449c429fb737d714f1e3a9030c76ce.tar.bz2 |
Fix frame unwinding for 68hc11
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/m68hc11-tdep.c | 10 |
2 files changed, 16 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 3575217..583bf6b 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2000-09-06 Stephane Carrez <Stephane.Carrez@worldnet.fr> + + * m68hc11-tdep.c (m68hc11_frame_chain): Check for pc in call dummy. + (m68hc11_guess_from_prologue): 'des' instruction to allocate 1 byte + on the stack can appear in the prologue. + 2000-09-05 Michael Snyder <msnyder@cleaver.cygnus.com> * sol-thread.c (ps_pdmodel): Protect with an ifdef. diff --git a/gdb/m68hc11-tdep.c b/gdb/m68hc11-tdep.c index 7b19979..611fb3e 100644 --- a/gdb/m68hc11-tdep.c +++ b/gdb/m68hc11-tdep.c @@ -378,6 +378,7 @@ m68hc11_guess_from_prologue (CORE_ADDR pc, CORE_ADDR fp, #define OP_ADDD (0xc3) #define OP_TXS (0x35) #define OP_TYS (0x35) +#define OP_DES (0x34) /* The 68hc11 stack is as follows: @@ -469,6 +470,12 @@ m68hc11_guess_from_prologue (CORE_ADDR pc, CORE_ADDR fp, add_sp_mode = 1; pc += 2; } + /* des to allocate 1 byte on the stack */ + else if (op0 == OP_DES) + { + pc += 1; + size += 1; + } else if (op0 == OP_PAGE2 && op1 == OP_TSY && op2 == OP_PAGE2) { op0 = read_memory_unsigned_integer (pc + 3, 1); @@ -615,6 +622,9 @@ m68hc11_frame_chain (struct frame_info *frame) { CORE_ADDR addr; + if (PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame)) + return frame->frame; /* dummy frame same as caller's frame */ + if (frame->extra_info->return_pc == 0 || inside_entry_file (frame->extra_info->return_pc)) return (CORE_ADDR) 0; |