]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - gdb/ChangeLog
gdb: add names to unwinders, add debug messages when looking for unwinder
authorSimon Marchi <simon.marchi@polymtl.ca>
Tue, 29 Jun 2021 16:05:03 +0000 (12:05 -0400)
committerSimon Marchi <simon.marchi@polymtl.ca>
Tue, 29 Jun 2021 16:05:03 +0000 (12:05 -0400)
commita154d838a70e96d888620c072e2d6ea8bdf044ca
treee6e92b666415df522f365f6673357193c0e50f12
parenta05a883fbaba69d0f80806e46a9457727fcbe74c
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
78 files changed:
gdb/ChangeLog
gdb/aarch64-tdep.c
gdb/alpha-mdebug-tdep.c
gdb/alpha-tdep.c
gdb/amd64-obsd-tdep.c
gdb/amd64-tdep.c
gdb/amd64-windows-tdep.c
gdb/arc-tdep.c
gdb/arm-tdep.c
gdb/avr-tdep.c
gdb/bfin-tdep.c
gdb/bpf-tdep.c
gdb/cris-tdep.c
gdb/csky-tdep.c
gdb/dummy-frame.c
gdb/dwarf2/frame-tailcall.c
gdb/dwarf2/frame.c
gdb/frame-unwind.c
gdb/frame-unwind.h
gdb/frv-linux-tdep.c
gdb/frv-tdep.c
gdb/ft32-tdep.c
gdb/h8300-tdep.c
gdb/hppa-linux-tdep.c
gdb/hppa-tdep.c
gdb/i386-obsd-tdep.c
gdb/i386-tdep.c
gdb/ia64-tdep.c
gdb/inline-frame.c
gdb/iq2000-tdep.c
gdb/jit.c
gdb/lm32-tdep.c
gdb/m32c-tdep.c
gdb/m32r-linux-tdep.c
gdb/m32r-tdep.c
gdb/m68hc11-tdep.c
gdb/m68k-linux-tdep.c
gdb/m68k-tdep.c
gdb/mep-tdep.c
gdb/microblaze-tdep.c
gdb/mips-sde-tdep.c
gdb/mips-tdep.c
gdb/mn10300-tdep.c
gdb/moxie-tdep.c
gdb/msp430-tdep.c
gdb/nds32-tdep.c
gdb/nios2-tdep.c
gdb/or1k-tdep.c
gdb/ppc-fbsd-tdep.c
gdb/ppc-obsd-tdep.c
gdb/python/py-unwind.c
gdb/record-btrace.c
gdb/riscv-tdep.c
gdb/rl78-tdep.c
gdb/rs6000-aix-tdep.c
gdb/rs6000-tdep.c
gdb/rx-tdep.c
gdb/s12z-tdep.c
gdb/s390-linux-tdep.c
gdb/s390-tdep.c
gdb/score-tdep.c
gdb/sentinel-frame.c
gdb/sh-tdep.c
gdb/sparc-netbsd-tdep.c
gdb/sparc-obsd-tdep.c
gdb/sparc-sol2-tdep.c
gdb/sparc-tdep.c
gdb/sparc64-fbsd-tdep.c
gdb/sparc64-netbsd-tdep.c
gdb/sparc64-obsd-tdep.c
gdb/sparc64-sol2-tdep.c
gdb/sparc64-tdep.c
gdb/tic6x-tdep.c
gdb/tilegx-tdep.c
gdb/v850-tdep.c
gdb/vax-tdep.c
gdb/xstormy16-tdep.c
gdb/xtensa-tdep.c