]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
[gdb/symtab] Turn complaints in create_addrmap_from_gdb_index into warnings
authorTom de Vries <tdevries@suse.de>
Sat, 23 Aug 2025 06:15:51 +0000 (08:15 +0200)
committerTom de Vries <tdevries@suse.de>
Sat, 23 Aug 2025 06:15:51 +0000 (08:15 +0200)
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

index 79d19a3abaa361a1811ab5d00e50e1ca41e44848..f2686e30efe33b9db75e34f8b367f76a593073f2 100644 (file)
@@ -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;
        }