Time spent on elfutils: 70%
Work on output.
* Drop DWARF4 bits that I've had in before for experimenting (e.g.
DW_FORM_flag_present, to check that the optimal form selection works for
* Emit short strings inline. All strings that are shorter than the
reference size are "short strings".
* Several passes of simplifying code and moving stuff to more
private (i.e. more writer-specific) places. Certain pieces of code may
have to be reintroduced later, but now they are overkill and just
obfuscate the code.
* dwarf_64 is used throughout. If value doesn't fit into form that
could be expanded by having dwarf_64==true, an exception is thrown.
* Found a bug that causes that DW_AT_sibling would be emitted
superfluously or omitted. It turned out that my understanding of
_m_with_sibling was wrong, and that _m_w_s[true] and _m_w_s[false] can
be true simultaneously. Well, that explains the data type used.
Somehow I managed to get lost in the code for the rest of Friday, unable
to get it right, hitting obscure errors.
It's all on pmachata/dwarf-writer.
* Fix that stupid problem from Friday. I just scratched and
rewrote it and it worked basically on the first try. Don't know what
the big deal was.
* Merge in dwarf branch.
Rest of the week:
We now emit strings and numbers with optimal forms.
- Implement duplicate pruning, right now each die gets its own abbrev.
- FYI, no computation is done whether it is advantageous to emit the
abbrev in the first place (i.e. whether the savings of extra form
outweigh price of the abbrev itself). That problem won't be tackled on
When the above is done, next thing might be optimizing references. For
things we can't optimize, references including, we now pick the biggest
form available. We can shrink these fields afterwards. But the
codebase is not ready for this, e.g. gaps have to be able to move, size
of ElfData has to be patched, etc. So perhaps work on preparing these
bits, they will be useful later.
Another option is work on making the produced data complete and
well-defined enough for consumption by libdw. That may require emitting
some tables in addition to .debug_info, .debug_abbrev and .debug_str.
Show replies by date