[gdb/symtab,v2,0/7] Compute DWARF entry parents across CUs

Message ID 20240408-die-map-madness-v2-0-6741626d544d@tromey.com
Headers
Series Compute DWARF entry parents across CUs |

Message

Tom Tromey April 8, 2024, 9:11 p.m. UTC
  This is a different approach to a patch series that Tom de Vries sent.
The bug here is that gdb won't always correctly compute the parent of
an entry in some cross-CU reference cases.

I've included a few of Tom's patches in this series.  The main
difference overall is that this one incorporates the parent
computation into the finalization loop, so the work is parallelized.

Regression tested on x86-64 Fedora 38 with the cc-with-dwz board.
There is still one bug (the inlining one), but I believe that one
requires a different fix.

---
Changes in v2:
- Rebased; some minor changes were required
- Link to v1: https://inbox.sourceware.org/gdb-patches/20240117-die-map-madness-v1-0-42fb435ad1ed@tromey.com

---
Tom Tromey (4):
      Change handling of DW_TAG_enumeration_type in DWARF scanner
      Add move operators for addrmap
      Introduce class parent_map for DIE range map
      Correctly handle DIE parent computations

Tom de Vries (3):
      [gdb/symtab] Refactor condition in scan_attributes
      [gdb/testsuite] Add gdb.dwarf2/forward-spec-inter-cu.exp
      [gdb/testsuite] Add gdb.dwarf2/backward-spec-inter-cu.exp

 gdb/addrmap.c                                      |  12 +-
 gdb/addrmap.h                                      |  19 ++-
 gdb/dwarf2/cooked-index.c                          |  14 ++-
 gdb/dwarf2/cooked-index.h                          |  56 ++++++---
 gdb/dwarf2/parent-map.h                            | 132 +++++++++++++++++++++
 gdb/dwarf2/read-debug-names.c                      |   7 +-
 gdb/dwarf2/read.c                                  | 112 ++++++++---------
 .../gdb.dwarf2/backward-spec-inter-cu.exp          | 103 ++++++++++++++++
 gdb/testsuite/gdb.dwarf2/forward-spec-inter-cu.exp | 103 ++++++++++++++++
 9 files changed, 468 insertions(+), 90 deletions(-)
---
base-commit: d05e1a4a6d438c11af5a2b9b0ac88a74727b5f0f
change-id: 20240117-die-map-madness-b84a75473c85

Best regards,
  

Comments

Tom Tromey April 16, 2024, 5:54 p.m. UTC | #1
>>>>> "Tom" == Tom Tromey <tom@tromey.com> writes:

Tom> This is a different approach to a patch series that Tom de Vries sent.
Tom> The bug here is that gdb won't always correctly compute the parent of
Tom> an entry in some cross-CU reference cases.

Tom> I've included a few of Tom's patches in this series.  The main
Tom> difference overall is that this one incorporates the parent
Tom> computation into the finalization loop, so the work is parallelized.

Tom> Regression tested on x86-64 Fedora 38 with the cc-with-dwz board.
Tom> There is still one bug (the inlining one), but I believe that one
Tom> requires a different fix.

I rebased this and re-regression tested it, and now I am checking it in.

Tom