On 17 October 2012 21:09, Eric Christopher <echristo at gmail.com> wrote:>> 1) What level of interest is there in Dwarf backward compatibility; > > I don't have a lot of interest in keeping dwarf backward compatibility > past my ability to test things, hence the option for darwin's gdb.Very few people have, and Dwarf is not an easy target, so the cost of having a fully compatible Dwarf (2 and 3) is not low. Also, as Eric mentions, the GDB test suite is not the most gracious thing to setup and keep tidy for the many platforms LLVM supports. 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. And I don't think you'll be able to recruit too many people for that crusade, either... ;) 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. Eric, What about the LLDB, does it support Dwarf? Is it good enough for C *and* C++? -- cheers, --renato systemcall.org
> 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.> 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.> Eric, > > What about the LLDB, does it support Dwarf? Is it good enough for C *and* C++? >As a quality suite? Probably not. There are so many more tests in the gdb suite that it's hard to top as a first cut for quality. lldb is another good testsuite when we try to push the boundaries though so using both test suites is good. Unfortunately I'm not quite sure what the state of the lldb testsuite is on elf targets these days and haven't had time to play with figuring out how to build it. -eric
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!) --paulr