gdb: remove trailing empty line in target-delegates.c

In a review [1], I pointed out that applying the patch, git would say:

    .git/rebase-apply/patch:147: new blank line at EOF.

However, since the empty line is in target-delegates.c (a generated
file), there's nothing the author can do about it.  To avoid this
comment coming up again in the future, change make-target-delegates.py
to avoid the trailing empty line.  Do this by making it output empty
lines before each entity, not after.

Since this needs removing a newline output in gdbcopyright, adjust
ada-unicode.py and gdbarch.py to avoid changes in the files they
generate.

[1] https://inbox.sourceware.org/gdb-patches/20230427210113.45380-1-jhb@FreeBSD.org/T/#m083598405bef19157f67c9d97846d3dd90dc7d1c

Change-Id: Ic4c648f06443b432168cb76603402c918aa6e5d2
Approved-By: Tom Tromey <tom@tromey.com>
This commit is contained in:
Simon Marchi
2023-07-27 13:32:38 -04:00
parent 2f01a2b9ea
commit b871f5ee33
5 changed files with 12 additions and 7 deletions

View File

@@ -91,5 +91,6 @@ with open("ada-casefold.h", "w") as f:
gdbcopyright.copyright("ada-unicode.py", "UTF-32 case-folding for GDB"),
file=f,
)
print("", file=f)
for r in all_ranges:
print(f" {{{r[0]}, {r[1]}, {r[2]}, {r[3]}}},", file=f)