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
a154d838a7
. 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.
This commit is contained in:
parent
06b80590fb
commit
8085fa01a5
1 changed files with 2 additions and 2 deletions
|
@ -467,9 +467,9 @@ frame_info::to_string () const
|
||||||
res += "type=<unknown>,";
|
res += "type=<unknown>,";
|
||||||
|
|
||||||
if (fi->unwind != NULL)
|
if (fi->unwind != NULL)
|
||||||
res += string_printf ("unwind=%p,", host_address_to_string (fi->unwind));
|
res += string_printf ("unwinder=\"%s\",", fi->unwind->name);
|
||||||
else
|
else
|
||||||
res += "unwind=<unknown>,";
|
res += "unwinder=<unknown>,";
|
||||||
|
|
||||||
if (fi->next == NULL || fi->next->prev_pc.status == CC_UNKNOWN)
|
if (fi->next == NULL || fi->next->prev_pc.status == CC_UNKNOWN)
|
||||||
res += "pc=<unknown>,";
|
res += "pc=<unknown>,";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue