>>>>> William Ferreira <wqferr@gmail.com> writes:
> PR testsuite/32261 requests a script that could convert old .S-based
> tests (that were made before dwarf.exp existed) into the new
> Dwarf::assemble calls in Tcl. This commit is an initial implementation
> of such a script. Python was chosen for convenience, and only relies on
> a single external library.
Thank you for doing this.
> The following .exp files have been tried in this way and their outputs
> highly resemble the original:
> - gdb.dwarf2/dynarr-ptr
> - gdb.dwarf2/void-type
> - gdb.dwarf2/ada-thick-pointer
> - gdb.dwarf2/atomic-type
> - gdb.dwarf2/dw2-entry-points (*)
> - gdb.dwarf2/main-subprogram
Are you planning to try to convert these tests? If so that would be
fantastic. If not, that's totally fine, maybe we should file a bug for
this. It'd be nice to get rid of the old .s tests. Anyway let me know.
> Currently the script has the following known limitations:
[...]
FWIW I think basically any limitations are fine. The DWARF assembler
itself had many at the start, people tend to add things as needed.
> + s = lbrace
> + s += self.name + " "
> + s += self._format_value(offset_die_lookup)
I somewhat suspect this output will not work now, because there were
some recent changes to make attributes Tcl code rather than
specially-parsed data.
However that's yet another thing we can fix in situ.
Approved-By: Tom Tromey <tom@tromey.com>
I forget what your copyright situation is. If you are all set up, we
can land this. If you plan to submit more gdb contributions, let me
know and we can set up write-after-approval access for you.
Tom