aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2025-08-23 08:15:51 +0200
committerTom de Vries <tdevries@suse.de>2025-08-23 08:15:51 +0200
commitd40413bdfc32e87ca6d4436b164ee870811e6cc1 (patch)
tree5a1a512a9bff60fd0eb3f5382c3e8884c114b14f
parent20676c004435b93feee78ca37171aa0eb85c5484 (diff)
downloadbinutils-d40413bdfc32e87ca6d4436b164ee870811e6cc1.zip
binutils-d40413bdfc32e87ca6d4436b164ee870811e6cc1.tar.gz
binutils-d40413bdfc32e87ca6d4436b164ee870811e6cc1.tar.bz2
[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.
-rw-r--r--gdb/dwarf2/read-gdb-index.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/gdb/dwarf2/read-gdb-index.c b/gdb/dwarf2/read-gdb-index.c
index 79d19a3..f2686e3 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;
}