diff options
author | gdb-3.1 <gdb@fsf.org> | 1989-01-31 17:56:40 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2012-06-03 15:36:31 +0100 |
commit | e91b87a36830d061ef87d67be5f309e4d4ed918f (patch) | |
tree | 3408ea913a9cccd51c9b7d0b3bc7d7897cac8a5b /gdb/munch | |
parent | bb7592f01006b09c846831a9fb9c306307ba34f6 (diff) | |
download | gdb-e91b87a36830d061ef87d67be5f309e4d4ed918f.zip gdb-e91b87a36830d061ef87d67be5f309e4d4ed918f.tar.gz gdb-e91b87a36830d061ef87d67be5f309e4d4ed918f.tar.bz2 |
gdb-3.1
Diffstat (limited to 'gdb/munch')
-rwxr-xr-x | gdb/munch | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gdb/munch b/gdb/munch new file mode 100755 index 0000000..daecee4 --- /dev/null +++ b/gdb/munch @@ -0,0 +1,14 @@ +#! /bin/sh + +# create an initialization procedure from a list of .o files +# Look in object files, find symbols including the string _initialize_, +# and call each one as a function. + +echo '/* Do not modify this file. It is created automatically by "munch". */' +echo 'void init_all_files () {' + +nm $* | egrep '_initialize_' | \ + sed -e 's/^.*\(initialize_[a-zA-Z_0-9]*\).*$/ _\1 ();/' | \ + sort -u + +echo '}' |