[PATCH 0/7] Make gdbarch.sh shellcheck-clean
Pedro Alves
palves@redhat.com
Sun May 10 18:57:09 GMT 2020
On 4/29/20 10:08 PM, Tom Tromey wrote:
>>>>>> "Simon" == Simon Marchi via Gdb-patches <gdb-patches@sourceware.org> writes:
>
> Simon> I ran shellcheck on gdbarch.sh and addressed all the warnings. It
> Simon> didn't catch anything serious, but I think it's good to have it clean
> Simon> anyway, so we can catch potential problems in future changes we do to
> Simon> this file.
>
> These all seemed fine to me.
>
> I'd like to see gdbarch.sh eventually go away entirely.
> Most of it could be ordinary C++ code. I don't have a concrete plan for
> this though. Mostly I've been reluctant to do it due to the amount of
> reindentation that will probably be involved, though I guess maybe I
> could write an emacs lisp script to handle this.
My main gripe with gdbarch.sh is that the function/variable/method definitions
and the generator code is all in the same file.
If those were split to separate files, like, the definitions inside function_list()
were moved to a separate gdbarch.def file, which would be read by gdbarch.sh,
that'd already be a large win, IMHO.
Also, I would like it to be able to generate the gdbarch.h/c files in place,
instead of generating new "new-gdbarch.h/c" files.
Thanks,
Pedro Alves
More information about the Gdb-patches
mailing list