Testcases for .file and .loc?

Hans-Peter Nilsson hans-peter.nilsson@axis.com
Tue Nov 28 08:05:00 GMT 2000


Hi.

It seems testcases for the dwarf2 directives .file and .loc will
be very target-specific, if you want to use assembly code only.

But if anyone knows or has an idea how to test it only talking
in general terms, that would probably help maintainers who want
to add such tests.

I'm thinking of something along the line: "Make a file with each
insn that can be of a different length, including combinations
of varying-length insns (and pseudo-insn expansions).  Add a
.file and .loc directive with different FIXME before each insn.
Assemble and dump using objdump -FIXME.  Inspect for
correctness; compare to testcases for the machine FIXME;
alternatively expect different FIXME:s linear to the FIXMEs.
Add the .s and dump files to assembler tests, with a test that
runs run_dump_test or equivalent."

If there was such a testcase for any machine that would go a
long way.  I'd write one if I only knew how.

Thanks.
brgds, H-P


More information about the Binutils mailing list