From: Tom Tromey Date: Thu, 17 Apr 2025 20:48:24 +0000 (-0600) Subject: Clean up handle_member_location X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b6acdd724dde54ac74fec2edbbeaf9c4a4c44f0f;p=thirdparty%2Fbinutils-gdb.git Clean up handle_member_location 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. --- diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c index 6f380acbd34..24aa85773f6 100644 --- a/gdb/dwarf2/read.c +++ b/gdb/dwarf2/read.c @@ -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 {