aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorLancelot SIX <lsix@lancelotsix.com>2021-08-01 15:47:29 +0000
committerLancelot SIX <lsix@lancelotsix.com>2021-08-04 23:12:06 +0000
commit8085fa01a57e356aa1b91d30f89f6146ee1928c1 (patch)
tree2333fe98508839422280098d4bf784f6cb079546 /gdb
parent06b80590fbe63875e8e7a6c97622675b8ac099bc (diff)
downloadbinutils-8085fa01a57e356aa1b91d30f89f6146ee1928c1.zip
binutils-8085fa01a57e356aa1b91d30f89f6146ee1928c1.tar.gz
binutils-8085fa01a57e356aa1b91d30f89f6146ee1928c1.tar.bz2
gdb: Use unwinder name in frame_info::to_string
While working on a stack unwinding issue using 'set debug frame on', I noticed the frame_info::to_string method could be slightly improved. Unwinders have been given a name in a154d838a70e96d888620c072e2d6ea8bdf044ca. Before this patch, frame_info debug output prints the host address of the used unwinder, which is not easy to interpret. This patch proposes to use the unwinder name instead since we now have it. Before the patch: {level=1,type=NORMAL_FRAME,unwind=0x2ac1763ec0,pc=0x3ff7fc3460,id={stack=0x3ff7ea79b0,code=0x0000003ff7fc33ac,!special},func=0x3ff7fc33ac} With the patch: {level=1,type=NORMAL_FRAME,unwinder="riscv prologue",pc=0x3ff7fc3460,id={stack=0x3ff7ea79b0,code=0x0000003ff7fc33ac,!special},func=0x3ff7fc33ac} Tested on riscv64-linux-gnu.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/frame.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/frame.c b/gdb/frame.c
index 2332418..4d7505f 100644
--- a/gdb/frame.c
+++ b/gdb/frame.c
@@ -467,9 +467,9 @@ frame_info::to_string () const
res += "type=<unknown>,";
if (fi->unwind != NULL)
- res += string_printf ("unwind=%p,", host_address_to_string (fi->unwind));
+ res += string_printf ("unwinder=\"%s\",", fi->unwind->name);
else
- res += "unwind=<unknown>,";
+ res += "unwinder=<unknown>,";
if (fi->next == NULL || fi->next->prev_pc.status == CC_UNKNOWN)
res += "pc=<unknown>,";