This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [rfa] Dwarf2 testsuite


Daniel Jacobowitz wrote:
This patch adds a sample test for DWARF-2 unit testing.  It requires:
  - gas, for the .uleb128/.sleb128 directives among other things
  - ELF; it could probably be made to work on non-ELF dwarf2 systems
    but I don't know what changes would be necessary.  Perhaps those
    should be tested separately.

I haven't tried, but I wrote it with the intent that it would not care about
the host beyond that; it should run on 64-bit ELF targets OK.

It just includes a trivial test containing hand-written DIEs for a single
CU.  This one file I annotated exhaustively, and let me tell you, it was
exhausting; for future tests I will allow them to be self-documenting (the
comments don't say anything that compiling the file and running readelf
won't tell you).

The test itself just demonstrates that the dwarf2 reader isn't completely
busted.  But more interesting tests could be easily added.

Look OK? Suggestions?


Looks exhausting. I'm glad you're doing this.


Dan, what would you think about (somebody) writing a tool
that could read some sort of description (eg. what's in
your comments), and generate the dwarf2 recs?  Sort of a
simple compiler that accepts, in effect, the dwarf2 spec
as input?  Would that be, perhaps, less of an effort than
writing a sufficiently large subset of tests by hand?



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]