aboutsummaryrefslogtreecommitdiff
path: root/gdb/make-init-c
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2025-05-23 18:54:43 +0200
committerTom de Vries <tdevries@suse.de>2025-05-23 18:54:43 +0200
commit514a857f4329cb5c3d0e61d69edf9bcf114cec4b (patch)
treed0992b49857b128beb5a52880ba795778b8cb17d /gdb/make-init-c
parent8cfde4a0187376f9631b6b0cb90a258b33726ae0 (diff)
downloadbinutils-514a857f4329cb5c3d0e61d69edf9bcf114cec4b.zip
binutils-514a857f4329cb5c3d0e61d69edf9bcf114cec4b.tar.gz
binutils-514a857f4329cb5c3d0e61d69edf9bcf114cec4b.tar.bz2
[gdb] Make make-init-c more robust
In commit 2711e4754fc ("Ensure cooked_index_entry self-tests are run"), we rewrite the function definition of _initialize_dwarf2_entry into a normal form that allows the make-init-c script to detect it: ... void _initialize_dwarf2_entry (); -void _initialize_dwarf2_entry () +void +_initialize_dwarf2_entry () ... Update make-init-c to also detect the "void _initialize_dwarf2_entry ()" variant. Tested on x86_64-linux, by reverting commit 2711e4754fc, rebuilding and checking that build/gdb/init.c doesn't change.
Diffstat (limited to 'gdb/make-init-c')
-rwxr-xr-xgdb/make-init-c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/make-init-c b/gdb/make-init-c
index 4f0185c..5ea6df5 100755
--- a/gdb/make-init-c
+++ b/gdb/make-init-c
@@ -43,7 +43,7 @@ echo "/* Do not modify this file. */"
echo "/* It is created automatically by the Makefile. */"
echo "#include <algorithm>"
echo ""
-sed -n -e 's/^\(_initialize_[a-zA-Z0-9_]*\) ()$/\1/p' "$@" | while read -r name; do
+sed -n -e 's/^\(void \|\)\(_initialize_[a-zA-Z0-9_]*\) ()$/\2/p' "$@" | while read -r name; do
echo "extern initialize_file_ftype $name;"
done
echo ""
@@ -53,7 +53,7 @@ echo "initialize_all_files ()"
echo "{"
echo " std::vector<initialize_file_ftype *> functions ="
echo " {"
-sed -n -e 's/^\(_initialize_[a-zA-Z0-9_]*\) ()$/\1/p' "$@" | while read -r name; do
+sed -n -e 's/^\(void \|\)\(_initialize_[a-zA-Z0-9_]*\) ()$/\2/p' "$@" | while read -r name; do
echo " $name,"
done
echo " };"