diff options
Diffstat (limited to 'gdb/arm-tdep.c')
-rw-r--r-- | gdb/arm-tdep.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c index c3e9b5d..725b07a 100644 --- a/gdb/arm-tdep.c +++ b/gdb/arm-tdep.c @@ -270,9 +270,15 @@ int arm_pc_is_thumb_dummy (bfd_vma memaddr) { CORE_ADDR sp = read_sp (); - CORE_ADDR fp = read_fp (); - if (PC_IN_CALL_DUMMY (memaddr, sp, fp)) + /* FIXME: Until we switch for the new call dummy macros, this heuristic + is the best we can do. We are trying to determine if the pc is on + the stack, which (hopefully) will only happen in a call dummy. + We hope the current stack pointer is not so far alway from the dummy + frame location (true if we have not pushed large data structures or + gone too many levels deep) and that our 1024 is not enough to consider + code regions as part of the stack (true for most practical purposes) */ + if (PC_IN_CALL_DUMMY (memaddr, sp, sp + 1024)) return caller_is_thumb; else return 0; |