]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Clean up handle_member_location
authorTom Tromey <tromey@adacore.com>
Thu, 17 Apr 2025 20:48:24 +0000 (14:48 -0600)
committerTom Tromey <tromey@adacore.com>
Tue, 6 May 2025 15:01:54 +0000 (09:01 -0600)
This removes a redundant check from handle_member_location, and also
changes the complaint -- currently it will issue the "complex
location" complaint, but really what is happening here is an
unrecognized form.

gdb/dwarf2/read.c

index 6f380acbd345fbd16d8dfddf3ec230a99ce90874..24aa85773f6e9a83610faa37f60a41ff9369cc8c 100644 (file)
@@ -9897,8 +9897,6 @@ handle_member_location (struct die_info *die, struct dwarf2_cu *cu,
 
          field->set_loc_bitpos (offset * bits_per_byte);
        }
-      else if (attr->form_is_section_offset ())
-       dwarf2_complex_location_expr_complaint ();
       else if (attr->form_is_block ())
        {
          CORE_ADDR offset;
@@ -9924,7 +9922,8 @@ handle_member_location (struct die_info *die, struct dwarf2_cu *cu,
            }
        }
       else
-       dwarf2_complex_location_expr_complaint ();
+       complaint (_("Unsupported form %s for DW_AT_data_member_location"),
+                  dwarf_form_name (attr->form));
     }
   else
     {