CTF vs dwarf4

Robert Mustacchi rm at joyent.com
Thu Jan 9 19:38:04 UTC 2014


On 1/9/14 10:45 , Pedro Giffuni wrote:
> Hello;
> 
> Just thought I'd point out, for those not following toolchain@, that
> there are issues with newer compilers using dwarf4 by default[1].
> 
> It looks like instead of waiting for the elftoolchain project to catch
> up with the dwarf standard we could be using dwarf support from  LLVM
> instead though [2].
> 
> Apparently the linux dtrace port is having similar issues.  Another task
> for the Dtrace TODO list I guess, but perhaps the Illumos guys following
> the list may have some input.

As one of the illumos folk following the list, I can kind of describe
what at least some of us would like to do with CTF. It's worth
mentioning that we're still using gcc4.4 so we're not in a realm where
DWARF4 is a concern for us yet. I'm not familiar with all the
differences yet, so I'm not sure how useful the rest of this e-mail will be.

Currently I've been retooling ctfconvert + ctfmerge to be actually
implemented in terms of libctf to make it easier for other things to
actually consume, such as more long term illumos ld(1) and ideally the
compilers themselves. None of this code is finished or in illumos yet.
That really means that I have a slightly more useful merge (and as a
result diff) written, and convert is kind of a work in progress.

Probably the simplest way forward that we can all leverage is writing a
new ctfconvert in terms of DWARF4 that can exist side by side the old
one. eg. if you have an older compiler with dwarf2 (or you're still
stuck with stabs or some other language has its own exquisite format),
that'll still work. illumos last updated libdwarf in 2011. If there's a
newer libdwarf that has better DWARF4 support or we need to come up with
something else, let's make sure not to duplicate effort.

Robert


More information about the freebsd-dtrace mailing list