aboutsummaryrefslogtreecommitdiff
path: root/gdb/arm-tdep.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2021-06-29 12:05:03 -0400
committerSimon Marchi <simon.marchi@polymtl.ca>2021-06-29 12:05:03 -0400
commita154d838a70e96d888620c072e2d6ea8bdf044ca (patch)
treee6e92b666415df522f365f6673357193c0e50f12 /gdb/arm-tdep.c
parenta05a883fbaba69d0f80806e46a9457727fcbe74c (diff)
downloadgdb-a154d838a70e96d888620c072e2d6ea8bdf044ca.zip
gdb-a154d838a70e96d888620c072e2d6ea8bdf044ca.tar.gz
gdb-a154d838a70e96d888620c072e2d6ea8bdf044ca.tar.bz2
gdb: add names to unwinders, add debug messages when looking for unwinder
I wrote this while debugging a problem where the expected unwinder for a frame wasn't used. It adds messages to show which unwinders are considered for a frame, why they are not selected (if an exception is thrown), and finally which unwinder is selected in the end. To be able to show a meaningful, human-readable name for the unwinders, add a "name" field to struct frame_unwind, and update all instances to include a name. Here's an example of the output: [frame] frame_unwind_find_by_frame: this_frame=0 [frame] frame_unwind_try_unwinder: trying unwinder "dummy" [frame] frame_unwind_try_unwinder: no [frame] frame_unwind_try_unwinder: trying unwinder "dwarf2 tailcall" [frame] frame_unwind_try_unwinder: no [frame] frame_unwind_try_unwinder: trying unwinder "inline" [frame] frame_unwind_try_unwinder: no [frame] frame_unwind_try_unwinder: trying unwinder "jit" [frame] frame_unwind_try_unwinder: no [frame] frame_unwind_try_unwinder: trying unwinder "python" [frame] frame_unwind_try_unwinder: no [frame] frame_unwind_try_unwinder: trying unwinder "amd64 epilogue" [frame] frame_unwind_try_unwinder: no [frame] frame_unwind_try_unwinder: trying unwinder "i386 epilogue" [frame] frame_unwind_try_unwinder: no [frame] frame_unwind_try_unwinder: trying unwinder "dwarf2" [frame] frame_unwind_try_unwinder: yes gdb/ChangeLog: * frame-unwind.h (struct frame_unwind) <name>: New. Update instances everywhere to include this field. * frame-unwind.c (frame_unwind_try_unwinder, frame_unwind_find_by_frame): Add debug messages. Change-Id: I813f17777422425f0d08b22499817b23922e8ddb
Diffstat (limited to 'gdb/arm-tdep.c')
-rw-r--r--gdb/arm-tdep.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c
index 09b38e5..e4e7aec 100644
--- a/gdb/arm-tdep.c
+++ b/gdb/arm-tdep.c
@@ -2027,6 +2027,7 @@ arm_prologue_prev_register (struct frame_info *this_frame,
}
static frame_unwind arm_prologue_unwind = {
+ "arm prologue",
NORMAL_FRAME,
arm_prologue_unwind_stop_reason,
arm_prologue_this_id,
@@ -2736,6 +2737,7 @@ arm_exidx_unwind_sniffer (const struct frame_unwind *self,
}
struct frame_unwind arm_exidx_unwind = {
+ "arm exidx",
NORMAL_FRAME,
default_frame_unwind_stop_reason,
arm_prologue_this_id,
@@ -2839,6 +2841,7 @@ arm_epilogue_frame_sniffer (const struct frame_unwind *self,
static const struct frame_unwind arm_epilogue_frame_unwind =
{
+ "arm epilogue",
NORMAL_FRAME,
default_frame_unwind_stop_reason,
arm_epilogue_frame_this_id,
@@ -2960,6 +2963,7 @@ arm_stub_unwind_sniffer (const struct frame_unwind *self,
}
struct frame_unwind arm_stub_unwind = {
+ "arm stub",
NORMAL_FRAME,
default_frame_unwind_stop_reason,
arm_stub_this_id,
@@ -3171,6 +3175,7 @@ arm_m_exception_unwind_sniffer (const struct frame_unwind *self,
struct frame_unwind arm_m_exception_unwind =
{
+ "arm m exception",
SIGTRAMP_FRAME,
default_frame_unwind_stop_reason,
arm_m_exception_this_id,