[Dwarf-Discuss] Testing debug information
Tue Aug 30 17:03:54 GMT 2011
Thanks. Comparing "before" (or "reference") and "after" is something I came up with as well. And I certainly understand looking at the diffs manually can be unfun (I guess that makes it "real work" ;-)
My main interest is verifying the compiler output, that the DWARF it emits does indeed describe the code it emitted in terms of the source it was given.
Ideally, I was hoping someone had an "automatic" debugger, that "knew" - out-of-band - the 'correct' single-step sequence and variable values at each point (the reference) that could be compared to the values obtained through a trusted debugger to confirm that the DWARF and the code 'matched'.
Having to manually validate DWARF against generated code because the compiler chose to put a variable in this register instead of that one just doesn't sound productive. Especially if the compiler is undergoing rapid change.
Of course, to be truly valuable, the debugger would have to be platform, language, and target independent. And while gdb comes closest to that ideal, there's not much hope of getting it working against, oh, say OpenCL on an AMD GPU. ;-)
> -----Original Message-----
> From: dwarf-discuss-bounces at lists.dwarfstd.org [mailto:dwarf-discuss-
> bounces at lists.dwarfstd.org] On Behalf Of David Anderson
> Sent: Monday, August 29, 2011 1:07 PM
> To: dwarf-discuss at lists.dwarfstd.org
> Subject: Re: [Dwarf-Discuss] Testing debug information
> On 08/29/2011 11:54 AM, Relph, Richard wrote:
> > Does anyone know of any way to test the accuracy of debug information
> > automatically?
> > Any comments at all on how people test debug information quality
> > be greatly appreciated.
> I have a decently large set of objects (collected over rather a lot of
> years) and I run each
> libdwarf change through the 'latest' and 'changed' version of
> libdwarf/dwarfdump and verify
> that differences in the text output are appropriate (verify by looking
> at them). Sometimes
> looking at the differences is...pretty hard.
> I (when at SGI some years ago) and others (recently) have provided
> of problematic DWARF and some additional correctness tests in
> I considered keeping 'correct' text of dwarfdump output for comparison,
> but the size
> was...overwhelming. So I run all tests twice, using (to the best of
> ability) all options.
> Scripted, of course.
> It is all in the source and the regression tests (see
> reality.sgiweb.org/davea/dwarf.html and
> the links to git repositories of all this).
> David Anderson
> The secret of eternal youth is arrested development. -- Alice
> Roosevelt Longworth
> Dwarf-Discuss mailing list
> Dwarf-Discuss at lists.dwarfstd.org
More information about the Dwarf-discuss