diff options
author | Doug Evans <dje@google.com> | 2013-01-28 18:02:48 +0000 |
---|---|---|
committer | Doug Evans <dje@google.com> | 2013-01-28 18:02:48 +0000 |
commit | bed911e5410fd997b9b8ad9ec25a942dd5bba7bc (patch) | |
tree | 77fc9a5f03a8be6f45abc99de3aba17bc4902107 /gdb/dwarf2loc.c | |
parent | aa1707204662f78a2ef55e65430bc3b3a239e2b1 (diff) | |
download | gdb-bed911e5410fd997b9b8ad9ec25a942dd5bba7bc.zip gdb-bed911e5410fd997b9b8ad9ec25a942dd5bba7bc.tar.gz gdb-bed911e5410fd997b9b8ad9ec25a942dd5bba7bc.tar.bz2 |
* dwarf2loc.c (dwarf2_find_location_expression): Don't add base address
to addresses from dwo files.
testsuite/
* gdb.dwarf2/fission-loclists.exp: New file.
* gdb.dwarf2/fission-loclists.S: New file.
Diffstat (limited to 'gdb/dwarf2loc.c')
-rw-r--r-- | gdb/dwarf2loc.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c index 3688425..62d0098 100644 --- a/gdb/dwarf2loc.c +++ b/gdb/dwarf2loc.c @@ -252,9 +252,14 @@ dwarf2_find_location_expression (struct dwarf2_loclist_baton *baton, gdb_assert_not_reached ("bad debug_loc_kind"); } - /* Otherwise, a location expression entry. */ - low += base_address; - high += base_address; + /* Otherwise, a location expression entry. + If the entry is from a DWO, don't add base address: the entry is + from .debug_addr which has absolute addresses. */ + if (! baton->from_dwo) + { + low += base_address; + high += base_address; + } length = extract_unsigned_integer (loc_ptr, 2, byte_order); loc_ptr += 2; |