binutils-gdb/gdb/dwarf2
Simon Marchi a154d838a7 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
2021-06-29 12:05:03 -04:00
..
abbrev.c
abbrev.h
attribute.c
attribute.h
comp-unit-head.c
comp-unit-head.h
cu.c Remove dwarf2_cu::language 2021-06-25 12:23:05 -06:00
cu.h Remove dwarf2_cu::language 2021-06-25 12:23:05 -06:00
die.h
dwz.c
dwz.h
expr.c
expr.h
frame-tailcall.c gdb: add names to unwinders, add debug messages when looking for unwinder 2021-06-29 12:05:03 -04:00
frame-tailcall.h
frame.c gdb: add names to unwinders, add debug messages when looking for unwinder 2021-06-29 12:05:03 -04:00
frame.h
index-cache.c
index-cache.h
index-common.c
index-common.h
index-write.c Use gdb::function_view in addrmap_foreach 2021-06-25 08:40:37 -06:00
index-write.h
leb.c
leb.h
line-header.c
line-header.h
loc.c gdb: Support DW_LLE_start_end 2021-06-22 16:39:01 +02:00
loc.h gdb: remove unused struct call_site_stuff forward declaration 2021-06-11 11:36:48 -04:00
macro.c
macro.h
public.h
read.c gdb: add new function quick_symbol_functions::has_unexpanded_symbols 2021-06-25 20:54:28 +01:00
read.h [gdb/symtab] Fix infinite recursion in dwarf2_cu::get_builder(), again 2021-06-16 12:44:30 +02:00
sect-names.h
section.c
section.h
stringify.c
stringify.h