summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libdw/ChangeLog5
-rw-r--r--libdw/c++/dwarf_data9
2 files changed, 13 insertions, 1 deletions
diff --git a/libdw/ChangeLog b/libdw/ChangeLog
index 3d234088..67bb22a7 100644
--- a/libdw/ChangeLog
+++ b/libdw/ChangeLog
@@ -1,3 +1,8 @@
+2010-08-19 Mark Wielaard <[email protected]>
+
+ * c++/dwarf_data (dwarf_data::directory_table::directory_table):
+ Treat first entry "special", can be NULL/empty.
+
2010-08-18 Roland McGrath <[email protected]>
* c++/subr.hh (subr::container_tail_equal): New function.
diff --git a/libdw/c++/dwarf_data b/libdw/c++/dwarf_data
index daf0aa2c..4de17d2d 100644
--- a/libdw/c++/dwarf_data
+++ b/libdw/c++/dwarf_data
@@ -311,7 +311,14 @@ namespace elfutils
template<typename table>
directory_table (const table &other)
- : _base (other.begin (), other.end ()) {}
+ {
+ /* The first entry is "special". It can be NULL/empty.
+ This is not encoded in the .debug_line table, but in
+ the DW_AT_comp_dir attribute of the referring CU. */
+ typename table::const_iterator first = other.begin ();
+ _base::push_back (*first != NULL ? std::string (*first) : "");
+ _base::insert (_base::end (), ++first, other.end ());
+ }
std::string to_string () const;