I think the CFI support is about ready to merge in.
I did a single-commit version on the new branch roland/merge-cfi.
This has some recent fixups for reloc support, and I dropped
dwfl_addrframe for now since I'm not real sure about it.
Please give it a good eyeball and tell me if you think it is OK to merge.
I fiddled dwarf_output on roland/dwarf-collector some more on Monday,
but forgot to post about it. I did the value_dispatch stuff to get the
constructors passed the collector pointer. I did one attr_value flavor
(strings) in the collector to maybe indicate how others would go.
But then it occurred to me that perhaps the collector's sets should contain
the value_foobar objects that value_dispatch points to, rather than have a
"new value_foobar" for each that actually just holds a pointer/reference
into a collector value_set. I started hacking for that on top of
roland/dwarf-collector (0206412) but did not get it to the point of compiling.
Non-compiling unfinished patch below.
The concept is that dwarf_output::value_wrapper::make can
be defined with a separate overload for each flavor, and
those will return a pointer into a collector value_set.
diff --git a/libdw/c++/dwarf_output b/libdw/c++/dwarf_output
index 6c5fe51..f1a0128 100644
@@ -271,6 +271,8 @@ namespace elfutils
+ friend class dwarf_output_collector;
typedef dwarf_data::source_file source_file;
typedef dwarf_data::directory_table directory_table;
@@ -288,10 +290,6 @@ namespace elfutils
- static inline const std::string &
- collect_string (dwarf_output_collector *, const input &);
- template<typename input>
static inline const range_list &
collect (dwarf_output_collector *, const typename input::range_list &);
@@ -334,28 +332,18 @@ namespace elfutils
: public dwarf_data::value<dwarf_output, dwarf_output_collector *>
- struct value_string : public value_dispatch
+ // XXX Generic case, goes away when all types complete(?)
+ template<typename flavor, typename input>
+ static inline value_dispatch *
+ make (flavor *&result, const input &x, dwarf_output_collector *c)
- const std::string &_m_str;
- template<typename string>
- inline value_string (const string &s, dwarf_output_collector *c)
- : _m_str (collect_string (c, s))
+ return result = new flavor (x, c);
- inline operator const std::string & () const
- return _m_str;
- std::string to_string () const
- std::string result ("\"");
- result += _m_str;
- result += "\"";
- return result;
+ template<typename input>
+ static inline value_dispatch *make (value_string *result,
+ const input &x,
+ dwarf_output_collector *);
@@ -580,16 +568,18 @@ namespace elfutils
friend class dwarf_output;
- subr::value_set<std::string> _m_strings;
+ subr::value_set<dwarf_output::value_wrapper::value_string> _m_strings;
- inline const std::string &
- dwarf_output::collect_string (dwarf_output_collector *c, const input &s)
+ inline dwarf_output::value_wrapper::value_dispatch *
+ (dwarf_output::value_wrapper::value_string *result,
+ const input &x, dwarf_output_collector *c)
- return c->_m_strings.add (s);
+ return c->_m_strings.add (x);
My new plan is to post this by midnight Sunday my time, which is 9am
Monday CET. (That means I'll post on Friday if I'm not expecting to
do any work on the weekend.) This should let Petr see what my state
is from the previous week/weekend as soon as he starts on Monday.
I'd then like Petr to post by 9am Monday my time, which is 6pm CET.
This should let me see as soon as I start on Monday what Petr's
state is and what plans for the week he formed after seeing my report.
Much done since last report, far too little reporting:
Recent trunk work:
* 0.141 release including various fixes
* some nit fixes on trunk since 0.141
* eu-readelf -N to speed up DWARF output back to pre-fancy levels
Recent dwarf branch work:
* reference tracker
** looked done-ish, but "two nits" Petr fixed were bugs that actually
short-circuited all the fancy code ever running at all (I knew that
was too easy!) With those fixed, it has a nice infinite recursion
for circular reference chains.
** I've pushed some of the changes for getting smarter.
** Still working on it, unfinished changes on roland/tracker branch.
** I took a different tack on getting it from zero to limping.
More unfinished work on roland/dwarf-collector branch.
Expected time spent on elfutils: 77%
* reference tracker
** make it right for dwarfcmp tests: fix circular refs
** optimize forward references
** Get to limping, then build collector from leaf types up.