diff options
author | Petr Machata <pmachata@redhat.com> | 2009-10-01 18:25:13 +0200 |
---|---|---|
committer | Petr Machata <pmachata@redhat.com> | 2009-10-01 18:25:13 +0200 |
commit | 471aa9e821d3677a6b46214cd65ee9cf18b79ef3 (patch) | |
tree | fb296600b2b9c67bc70b87e2762d313c8bc9177c | |
parent | 717d22d56fbed22d83ad9d65cdae19991a1e8faa (diff) |
Don't emit base address selection entry when it doesn't change base addressupstream/pmachata/dwarf-writer
-rw-r--r-- | libdw/c++/emit-other.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libdw/c++/emit-other.cc b/libdw/c++/emit-other.cc index a626be5a..8d0ac5a7 100644 --- a/libdw/c++/emit-other.cc +++ b/libdw/c++/emit-other.cc @@ -123,8 +123,11 @@ dwarf_output::writer::output_debug_loc (section_appender &appender) // xxx When this is being fixed, duplicate selection has to take // base address into account. So the set above will be set of // (location attr, base address) pairs. - write_form (inserter, DW_FORM_addr, (uint64_t)-1); - write_form (inserter, DW_FORM_addr, 0); + if (loc.begin ()->first.first > 0) + { + write_form (inserter, DW_FORM_addr, (uint64_t)-1); + write_form (inserter, DW_FORM_addr, 0); + } for (dwarf_output::location_attr::const_iterator jt = loc.begin (); jt != loc.end (); ++jt) |