mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-24 02:24:46 +08:00
* dwarf2loc.c (find_location_expression): Retrieve beginning and
ending address offsets in location list entries as integers, not as addresses.
This commit is contained in:
parent
ec9499be38
commit
b5758fe446
@ -1,3 +1,9 @@
|
||||
2009-07-20 Ulrich Weigand <uweigand@de.ibm.com>
|
||||
|
||||
* dwarf2loc.c (find_location_expression): Retrieve beginning and
|
||||
ending address offsets in location list entries as integers,
|
||||
not as addresses.
|
||||
|
||||
2009-07-20 Ulrich Weigand <uweigand@de.ibm.com>
|
||||
|
||||
* infrun.c (wait_for_inferior): Invalidate registers and overlay
|
||||
|
@ -70,22 +70,28 @@ find_location_expression (struct dwarf2_loclist_baton *baton,
|
||||
|
||||
while (1)
|
||||
{
|
||||
low = dwarf2_read_address (gdbarch, loc_ptr, buf_end, addr_size);
|
||||
if (buf_end - loc_ptr < 2 * addr_size)
|
||||
error (_("find_location_expression: Corrupted DWARF expression."));
|
||||
|
||||
low = extract_unsigned_integer (loc_ptr, addr_size, byte_order);
|
||||
loc_ptr += addr_size;
|
||||
high = dwarf2_read_address (gdbarch, loc_ptr, buf_end, addr_size);
|
||||
|
||||
/* A base-address-selection entry. */
|
||||
if (low == base_mask)
|
||||
{
|
||||
base_address = dwarf2_read_address (gdbarch,
|
||||
loc_ptr, buf_end, addr_size);
|
||||
loc_ptr += addr_size;
|
||||
continue;
|
||||
}
|
||||
|
||||
high = extract_unsigned_integer (loc_ptr, addr_size, byte_order);
|
||||
loc_ptr += addr_size;
|
||||
|
||||
/* An end-of-list entry. */
|
||||
if (low == 0 && high == 0)
|
||||
return NULL;
|
||||
|
||||
/* A base-address-selection entry. */
|
||||
if ((low & base_mask) == base_mask)
|
||||
{
|
||||
base_address = high;
|
||||
continue;
|
||||
}
|
||||
|
||||
/* Otherwise, a location expression entry. */
|
||||
low += base_address;
|
||||
high += base_address;
|
||||
|
Loading…
Reference in New Issue
Block a user