diff options
author | Tom Tromey <tromey@adacore.com> | 2023-09-19 11:02:27 -0600 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2023-09-22 07:15:37 -0600 |
commit | e7bb5090cb094ab9d9d13c1852a7cd7e65128b66 (patch) | |
tree | 9867974e1509647f19f00c115503abccd810d927 /gdb/make-target-delegates.py | |
parent | 7434de7ef9aef6307de8cb8244ca27a67dc99245 (diff) | |
download | binutils-e7bb5090cb094ab9d9d13c1852a7cd7e65128b66.zip binutils-e7bb5090cb094ab9d9d13c1852a7cd7e65128b66.tar.gz binutils-e7bb5090cb094ab9d9d13c1852a7cd7e65128b66.tar.bz2 |
Remove keywords from target debug printer names
I recently checked in a patch that removed the use of the "struct"
keyword in some spots. Doing this pointed out that the target
delegate code preserves this keyword -- but, with C++, it does not
really need to. This patch changes make-target-delegates.py to remove
these keywords, and updates target-debug.h to follow. This pointed
out that there was already one redudancy: both
target_debug_print_struct_inferior_p and target_debug_print_inferior_p
existed.
Tested by rebuilding.
Reviewed-by: Kevin Buettner <kevinb@redhat.com>
Diffstat (limited to 'gdb/make-target-delegates.py')
-rwxr-xr-x | gdb/make-target-delegates.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gdb/make-target-delegates.py b/gdb/make-target-delegates.py index 3bc5c84..5bbe7c0 100755 --- a/gdb/make-target-delegates.py +++ b/gdb/make-target-delegates.py @@ -248,6 +248,9 @@ def munge_type(typename: str): if m: return m.group("arg") typename = typename.rstrip() + # There's no reason to have these keywords in the name, and their + # presence makes it harder to change styles. + typename = re.sub("\\b(struct|enum|class|union) ", "", typename) typename = re.sub("[ ()<>:]", "_", typename) typename = re.sub("[*]", "p", typename) typename = re.sub("&", "r", typename) |