[PING*3][PATCH v4 0/5] Modernize frame unwinders and add disable feature

Michael Eager eager@eagerm.com
Wed Jul 31 14:40:22 GMT 2024


With respect to microblaze, approved.

On 7/31/24 5:06 AM, Guinevere Larsen wrote:
> Ping!
> 
> I think this patch should be merged as early as possible in a release 
> cycle so we can ensure I didn't miss anything important.
> 
> Docs changes have already been approved by Eli.
> On 7/24/24 9:04 AM, Guinevere Larsen wrote:
>> Ping!
>>
>> Eli has already approved the changes, I just need code reviews :)
>>
>> On 7/17/24 9:19 AM, Guinevere Larsen wrote:
>>> Ping!
>>>
>>> On 7/3/24 2:08 PM, Guinevere Larsen wrote:
>>>> This patch series started with me trying to make it easier to test 
>>>> GDB's
>>>> ability to unwind using CFI data, to improve a previous patch I sent to
>>>> the list.
>>>>
>>>> The first patch is just a minor change, storing frame unwinders in a
>>>> vector instead of through an unwinder table accessible using the
>>>> registry system. This isn't required (like I originally thought it 
>>>> was),
>>>> but it does make the whole system more readable in my opinion.
>>>>
>>>> Patch 3 has the real meat of the modernization, making GDB use
>>>> polymorphism to handle frame unwinders. This is slightly slower than
>>>> using function pointers, but much more readable in my opinion.
>>>>
>>>> As for the unwinder classes, they were chosen somewhat arbitrarily,
>>>> mostly based on where I found an unwinder and its name.
>>>>
>>>> Changes for v4:
>>>> * Rebase on current master (No changes needed)
>>>> * improved documentation of unwinder classes follow Eli feedback
>>>> * added KFAIL to new test on patch 5 if running on 32 bit arm
>>>>
>>>> Changes for v3:
>>>> * Fixed Linaro CI issue in 32 bit arm
>>>> * Fixed the few comments from Eli.
>>>> * Documented addition of unwinder class in the patch that adds it.
>>>>
>>>> Changes for v2:
>>>> * Added back the test that checks if GDB can handle a mix of CUs with
>>>>    and without debuginfo in a single backtrace.
>>>> * Fixed all the nitpicks for style.
>>>> * Removed FRAME_UNWIND_ prefix when talking about classes
>>>> * Thoroughly changed the documentation, to be more readable
>>>>
>>>> Guinevere Larsen (5):
>>>>    gdb: make gdbarch store a vector of frame unwinders
>>>>    gdb: add "unwinder class" to frame unwinders
>>>>    gdb: Migrate frame unwinders to use C++ classes
>>>>    gdb: introduce ability to disable frame unwinders
>>>>    gdb/testsuite: Test for a backtrace through object without debuginfo
>>>>
>>>>   gdb/NEWS                                      |  11 +
>>>>   gdb/aarch64-tdep.c                            |  12 +-
>>>>   gdb/alpha-mdebug-tdep.c                       |   6 +-
>>>>   gdb/alpha-tdep.c                              |  12 +-
>>>>   gdb/amd64-obsd-tdep.c                         |   6 +-
>>>>   gdb/amd64-tdep.c                              |  24 +-
>>>>   gdb/amd64-windows-tdep.c                      |   6 +-
>>>>   gdb/amdgpu-tdep.c                             |   7 +-
>>>>   gdb/arc-tdep.c                                |  10 +-
>>>>   gdb/arch-utils.c                              |   8 +
>>>>   gdb/arm-tdep.c                                |  29 +-
>>>>   gdb/avr-tdep.c                                |   5 +-
>>>>   gdb/bfin-tdep.c                               |   6 +-
>>>>   gdb/bpf-tdep.c                                |   6 +-
>>>>   gdb/cris-tdep.c                               |  12 +-
>>>>   gdb/csky-tdep.c                               |  10 +-
>>>>   gdb/doc/gdb.texinfo                           |  39 +-
>>>>   gdb/dummy-frame.c                             |   8 +-
>>>>   gdb/dummy-frame.h                             |   2 +-
>>>>   gdb/dwarf2/frame-tailcall.c                   |   6 +-
>>>>   gdb/dwarf2/frame-tailcall.h                   |   2 +-
>>>>   gdb/dwarf2/frame.c                            |  16 +-
>>>>   gdb/frame-unwind.c                            | 335 
>>>> ++++++++++++++----
>>>>   gdb/frame-unwind.h                            | 178 +++++++++-
>>>>   gdb/frame.c                                   |  28 +-
>>>>   gdb/frv-linux-tdep.c                          |   6 +-
>>>>   gdb/frv-tdep.c                                |   5 +-
>>>>   gdb/ft32-tdep.c                               |   6 +-
>>>>   gdb/gdbarch.c                                 |   3 +
>>>>   gdb/gdbarch.h                                 |   5 +
>>>>   gdb/gdbarch.py                                |   3 +
>>>>   gdb/h8300-tdep.c                              |   5 +-
>>>>   gdb/hppa-linux-tdep.c                         |   5 +-
>>>>   gdb/hppa-tdep.c                               |  17 +-
>>>>   gdb/i386-obsd-tdep.c                          |   5 +-
>>>>   gdb/i386-tdep.c                               |  30 +-
>>>>   gdb/ia64-tdep.c                               |  24 +-
>>>>   gdb/inline-frame.c                            |   5 +-
>>>>   gdb/inline-frame.h                            |   2 +-
>>>>   gdb/iq2000-tdep.c                             |   5 +-
>>>>   gdb/jit.c                                     |   6 +-
>>>>   gdb/lm32-tdep.c                               |   5 +-
>>>>   gdb/loongarch-tdep.c                          |   7 +-
>>>>   gdb/m32c-tdep.c                               |   5 +-
>>>>   gdb/m32r-linux-tdep.c                         |   5 +-
>>>>   gdb/m32r-tdep.c                               |   5 +-
>>>>   gdb/m68hc11-tdep.c                            |   5 +-
>>>>   gdb/m68k-linux-tdep.c                         |   6 +-
>>>>   gdb/m68k-tdep.c                               |   6 +-
>>>>   gdb/mep-tdep.c                                |   5 +-
>>>>   gdb/microblaze-tdep.c                         |   6 +-
>>>>   gdb/mips-sde-tdep.c                           |   6 +-
>>>>   gdb/mips-tdep.c                               |  24 +-
>>>>   gdb/mn10300-tdep.c                            |   5 +-
>>>>   gdb/moxie-tdep.c                              |   5 +-
>>>>   gdb/msp430-tdep.c                             |   5 +-
>>>>   gdb/nds32-tdep.c                              |  14 +-
>>>>   gdb/nios2-tdep.c                              |  12 +-
>>>>   gdb/or1k-tdep.c                               |   7 +-
>>>>   gdb/ppc-fbsd-tdep.c                           |   5 +-
>>>>   gdb/ppc-obsd-tdep.c                           |   5 +-
>>>>   gdb/python/py-unwind.c                        |  50 ++-
>>>>   gdb/record-btrace.c                           |  12 +-
>>>>   gdb/record.h                                  |   4 +-
>>>>   gdb/riscv-tdep.c                              |   8 +-
>>>>   gdb/rl78-tdep.c                               |   6 +-
>>>>   gdb/rs6000-aix-tdep.c                         |   5 +-
>>>>   gdb/rs6000-tdep.c                             |  12 +-
>>>>   gdb/rx-tdep.c                                 |  10 +-
>>>>   gdb/s12z-tdep.c                               |   7 +-
>>>>   gdb/s390-linux-tdep.c                         |   5 +-
>>>>   gdb/s390-tdep.c                               |  10 +-
>>>>   gdb/sentinel-frame.c                          |   8 +-
>>>>   gdb/sentinel-frame.h                          |   2 +-
>>>>   gdb/sh-tdep.c                                 |  11 +-
>>>>   gdb/sparc-netbsd-tdep.c                       |   6 +-
>>>>   gdb/sparc-obsd-tdep.c                         |   6 +-
>>>>   gdb/sparc-sol2-tdep.c                         |   6 +-
>>>>   gdb/sparc-tdep.c                              |   6 +-
>>>>   gdb/sparc64-fbsd-tdep.c                       |   6 +-
>>>>   gdb/sparc64-netbsd-tdep.c                     |   6 +-
>>>>   gdb/sparc64-obsd-tdep.c                       |  12 +-
>>>>   gdb/sparc64-sol2-tdep.c                       |   6 +-
>>>>   gdb/sparc64-tdep.c                            |   6 +-
>>>>   .../backtrace-through-cu-nodebug-caller.c     |  28 ++
>>>>   .../backtrace-through-cu-nodebug-main.c       |  32 ++
>>>>   .../gdb.base/backtrace-through-cu-nodebug.exp |  90 +++++
>>>>   gdb/testsuite/gdb.base/frame-unwind-disable.c |  21 ++
>>>>   .../gdb.base/frame-unwind-disable.exp         | 114 ++++++
>>>>   gdb/tic6x-tdep.c                              |  12 +-
>>>>   gdb/tilegx-tdep.c                             |   5 +-
>>>>   gdb/tramp-frame.c                             |  58 ++-
>>>>   gdb/v850-tdep.c                               |   5 +-
>>>>   gdb/vax-tdep.c                                |   6 +-
>>>>   gdb/windows-tdep.c                            |  33 +-
>>>>   gdb/windows-tdep.h                            |  16 +-
>>>>   gdb/xstormy16-tdep.c                          |   5 +-
>>>>   gdb/xtensa-tdep.c                             |   7 +-
>>>>   gdb/z80-tdep.c                                |   7 +-
>>>>   99 files changed, 1263 insertions(+), 445 deletions(-)
>>>>   create mode 100644 
>>>> gdb/testsuite/gdb.base/backtrace-through-cu-nodebug-caller.c
>>>>   create mode 100644 
>>>> gdb/testsuite/gdb.base/backtrace-through-cu-nodebug-main.c
>>>>   create mode 100644 
>>>> gdb/testsuite/gdb.base/backtrace-through-cu-nodebug.exp
>>>>   create mode 100644 gdb/testsuite/gdb.base/frame-unwind-disable.c
>>>>   create mode 100644 gdb/testsuite/gdb.base/frame-unwind-disable.exp
>>>>
>>>
>>
> 



More information about the Gdb-patches mailing list