@@ -9923,7 +9923,7 @@ handle_member_location (struct die_info *die, struct dwarf2_cu *cu,
99239923 so if we see it, we can assume that a constant form is really
99249924 a constant and not a section offset. */
99259925 if (attr->form_is_constant ())
9926- *offset = attr->constant_value (0);
9926+ *offset = attr->unsigned_constant ().value_or (0);
99279927 else if (attr->form_is_section_offset ())
99289928 dwarf2_complex_location_expr_complaint ();
99299929 else if (attr->form_is_block ()
@@ -9963,7 +9963,7 @@ handle_member_location (struct die_info *die, struct dwarf2_cu *cu,
99639963 {
99649964 if (attr->form_is_constant ())
99659965 {
9966- LONGEST offset = attr->constant_value (0);
9966+ LONGEST offset = attr->unsigned_constant ().value_or (0);
99679967
99689968 /* Work around this GCC 11 bug, where it would erroneously use -1
99699969 data member locations, instead of 0:
@@ -12288,7 +12288,7 @@ mark_common_block_symbol_computed (struct symbol *sym,
1228812288
1228912289 if (member_loc->form_is_constant ())
1229012290 {
12291- offset = member_loc->constant_value (0);
12291+ offset = member_loc->unsigned_constant ().value_or (0);
1229212292 baton->size += 1 /* DW_OP_addr */ + cu->header.addr_size;
1229312293 }
1229412294 else
0 commit comments