Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH v2 0/5] [gdb/symtab] Handle invalid .gdb_index better
@ 2025-08-21 13:31 Tom de Vries
  2025-08-21 13:31 ` [PATCH v2 1/5] [gdb/symtab] Bail out of create_addrmap_from_gdb_index on error Tom de Vries
                   ` (4 more replies)
  0 siblings, 5 replies; 17+ messages in thread
From: Tom de Vries @ 2025-08-21 13:31 UTC (permalink / raw)
  To: gdb-patches

I ran into a failure with test-case gdb.tui/tui-missing-src.exp and target
board gold-gdb-index on aarch64-linux.

Investigation showed that this was due to an incorrect address table entry in
the .gdb_index section, with the start of the entry positioned in a hole
between two sections.

The fourth patch detects such entries.

The third patch detects overlapping entries, and the second patch adds some
infrastructure for that patch.

The first patch rejects any .gdb_index with an incorrect adress table.

The last patch changes the related complaints into warnings, making sure that
rejecting the .gdb_index is reported to the user.

The first and fourth patch fix aforementioned test-case.

A v1 was submitted here [1].

New in v2:
- moved the approved patch to be the first patch
- added approved-by tag in first patch
- rewrite commit messages to not refer to other patches, to better allow
  committing patches independently
- add two patches for detecting overlapping entries
- add missing function comment update for create_addrmap_from_gdb_index
- fixed fourth patch to use relocated addresses, after review comment by Simon

[1] https://sourceware.org/pipermail/gdb-patches/2025-August/220087.html

Tom de Vries (5):
  [gdb/symtab] Bail out of create_addrmap_from_gdb_index on error
  [gdb] Make addrmap_mutable::insert_empty return bool
  [gdb/symtab] Detect overlapping ranges in
    create_addrmap_from_gdb_index
  [gdb/symtab] Improve invalid range check in
    create_addrmap_from_gdb_index
  [gdb/symtab] Turn complaints in create_addrmap_from_gdb_index into
    warnings

 gdb/addrmap.c               | 23 +++++++++++----
 gdb/addrmap.h               |  4 +--
 gdb/dwarf2/read-gdb-index.c | 57 +++++++++++++++++++++++++++++--------
 3 files changed, 65 insertions(+), 19 deletions(-)


base-commit: 8186f0d31ddf339ba6803cde97ef6a6310ca2587
-- 
2.43.0


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2025-08-29  8:28 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-08-21 13:31 [PATCH v2 0/5] [gdb/symtab] Handle invalid .gdb_index better Tom de Vries
2025-08-21 13:31 ` [PATCH v2 1/5] [gdb/symtab] Bail out of create_addrmap_from_gdb_index on error Tom de Vries
2025-08-21 13:31 ` [PATCH v2 2/5] [gdb] Make addrmap_mutable::insert_empty return bool Tom de Vries
2025-08-22 14:54   ` Simon Marchi
2025-08-22 18:51   ` Tom Tromey
2025-08-23  4:20     ` Tom de Vries
2025-08-23 17:53       ` Simon Marchi
2025-08-29  0:20         ` Tom Tromey
2025-08-29  8:28           ` Tom de Vries
2025-08-21 13:31 ` [PATCH v2 3/5] [gdb/symtab] Detect overlapping ranges in create_addrmap_from_gdb_index Tom de Vries
2025-08-22 14:57   ` Simon Marchi
2025-08-21 13:31 ` [PATCH v2 4/5] [gdb/symtab] Improve invalid range check " Tom de Vries
2025-08-22 14:56   ` Tom de Vries
2025-08-22 15:17   ` Simon Marchi
2025-08-22 18:53   ` Tom Tromey
2025-08-23  4:33     ` Tom de Vries
2025-08-21 13:31 ` [PATCH v2 5/5] [gdb/symtab] Turn complaints in create_addrmap_from_gdb_index into warnings Tom de Vries

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox