[LLVMdev] DWARF 2/3 backwards compatibility?
Paul.Robinson at am.sony.com
Wed Oct 17 18:53:27 PDT 2012
Rick Foos wrote:
> The error we are getting is:
> “Undefined Form Value: 25”
> DW_FORM_flag_present caused the problem. The old DW_FORM_flag works for us.
I see this error from GDB 7.0 but GDB 7.2 is okay with it.
Now you know as much as I do. :-)
Eric Christopher wrote:
> [in reply to what Renato Golin wrote:]
> > With time, you might get to a point where Dwarf is a first-class
> > citizen and there will be basic compatibility checks in "make check"
> > and a build bot for GDB test suite on some platforms, but to get
> > there, you'll go through a lot of pain.
> Hopefully not too much. Paul has been helping and I add tests whenever
> I fix something, but a quality suite is something else. Unfortunately
> as the biggest consumer debugger testsuites have a tendency to be the
> primary quality test for debug info.
I have thought that a GDB bot would be a good idea, but then it would be
a specific version of GDB, and opinions differ on what would be the
"right" version. I suppose any version is better than nothing...
I had a "quality suite" at a previous job; it was the result of many PY
of effort. It was also debugger-based, which is a mixed blessing; you
get a lot of DWARF-parsing code for free, but then you get a lot of
debugger bugs for free too! And you don't get to test the DWARF
directly, you get to test how the debugger uses the DWARF. Not really
optimal, but still--a whole lot better than nothing.
> > Dwarf implementation in LLVM, as far as I know, is ad-hoc, so you'll
> > have to do some refactoring (for good) on the debug emission code.
> I've tried to formally implement a few things, but in general it was
> ad-hoc for so long this is true.
Yeah, clearly some DWARF 3 bits are creeping in, and more will come.
(I have some UTF-8 work waiting for a chance to be cleaned up and
submitted, for example. DW_AT_use_UTF8 is a DWARF 3 attribute.)
But if some people really are stuck in DWARF 2 land, we might have to
do something intelligent about it. (I'd rather not, I'd rather have
LLVM assert that DWARF 3 is where it's at. I mean really, DWARF 3
was published in 2005!)
More information about the llvm-dev