diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c index b2aecf2..3d5606d 100644 --- a/gdb/dwarf2loc.c +++ b/gdb/dwarf2loc.c @@ -108,6 +108,9 @@ find_location_expression (struct dwarf2_loclist_baton *baton, low += base_address; high += base_address; + if (high < base_address) + high = base_mask; + length = extract_unsigned_integer (loc_ptr, 2, byte_order); loc_ptr += 2; @@ -2550,6 +2553,9 @@ loclist_describe_location (struct symbol *symbol, CORE_ADDR addr, low += base_address; high += base_address; + if (high < base_address) + high = base_mask; + length = extract_unsigned_integer (loc_ptr, 2, byte_order); loc_ptr += 2;