From: Tom de Vries Date: Sat, 23 Aug 2025 06:15:51 +0000 (+0200) Subject: [gdb/symtab] Turn complaints in create_addrmap_from_gdb_index into warnings X-Git-Tag: gdb-17-branchpoint~199 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d40413bdfc32e87ca6d4436b164ee870811e6cc1;p=thirdparty%2Fbinutils-gdb.git [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. --- 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; }