gdb: make gdbarch.sh write gdbarch.{c,h} directly
It was suggested in this thread [1] that gdbarch.sh should write to
gdbarch.h and gdbarch.c directly. This patch implements that.
When running gdbarch.sh, we currently need to move new-gdbarch.c over
gdbarch.c and new-gdbarch.h over gdbarch.h. It might have been useful
at some point to not have gdbarch.sh overwrite gdbarch.h and gdbarch.c,
but with git it's really unnecessary. Any changes to gdbarch.sh can be
inspected using `git diff`.
A next step would be to have the Makefile automatically run gdbarch.sh
if it sees that gdbarch.c and gdbarch.h are out of date. Or maybe even
remove gdbarch.c and gdbarch.h from the tree and generate them in the
build directory when building. But that requires more thinking and
discussions, and I think that this change is already useful in itself.
[1] https://sourceware.org/pipermail/gdb-patches/2020-May/168265.html
gdb/ChangeLog;
* gdbarch.sh: Write to gdbarch.c/gdbarch.h directly. Don't
compare old and new versions.
(compare_new): Remove.
Change-Id: I7970a9e8af0afc0145cb5a28e73d94fbaa1e25b9