From d40413bdfc32e87ca6d4436b164ee870811e6cc1 Mon Sep 17 00:00:00 2001 From: Tom de Vries Date: Sat, 23 Aug 2025 08:15:51 +0200 Subject: [PATCH] [gdb/symtab] Turn complaints in create_addrmap_from_gdb_index into warnings Rather than issuing a complaint, which is off by default, warn when returning false in create_addrmap_from_gdb_index, informing the user that the .gdb_index was ignored, and why. Tested on aarch64-linux. --- gdb/dwarf2/read-gdb-index.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/gdb/dwarf2/read-gdb-index.c b/gdb/dwarf2/read-gdb-index.c index 79d19a3abaa..f2686e30efe 100644 --- a/gdb/dwarf2/read-gdb-index.c +++ b/gdb/dwarf2/read-gdb-index.c @@ -1422,15 +1422,17 @@ create_addrmap_from_gdb_index (dwarf2_per_objfile *per_objfile, if (lo >= hi) { - complaint (_(".gdb_index address table has invalid range (%s - %s)"), - hex_string (lo), hex_string (hi)); + warning (_(".gdb_index address table has invalid range (%s - %s)," + " ignoring .gdb_index"), + hex_string (lo), hex_string (hi)); return false; } if (cu_index >= index->units.size ()) { - complaint (_(".gdb_index address table has invalid CU number %u"), - (unsigned) cu_index); + warning (_(".gdb_index address table has invalid CU number %u," + " ignoring .gdb_index"), + (unsigned) cu_index); return false; } @@ -1438,8 +1440,8 @@ create_addrmap_from_gdb_index (dwarf2_per_objfile *per_objfile, = mutable_map.set_empty (lo, hi - 1, index->units[cu_index]); if (!full_range_p) { - complaint (_(".gdb_index address table has a range (%s - %s) that" - " overlaps with an earlier range"), + warning (_(".gdb_index address table has a range (%s - %s) that" + " overlaps with an earlier range, ignoring .gdb_index"), hex_string (lo), hex_string (hi)); return false; } -- 2.47.3