From b6acdd724dde54ac74fec2edbbeaf9c4a4c44f0f Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Thu, 17 Apr 2025 14:48:24 -0600 Subject: 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. --- gdb/dwarf2/read.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c index 6f380ac..24aa857 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 { -- cgit v1.1