diff options
author | gdb-3.3 <gdb@fsf.org> | 1989-09-30 00:00:00 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2012-06-03 15:36:32 +0100 |
commit | 4187119d59afd156703cfcbc6be287c5085f1867 (patch) | |
tree | 8ea0d77175611df1eeec928858f629d410dd6e05 /gdb/munch | |
parent | e91b87a36830d061ef87d67be5f309e4d4ed918f (diff) | |
download | gdb-4187119d59afd156703cfcbc6be287c5085f1867.zip gdb-4187119d59afd156703cfcbc6be287c5085f1867.tar.gz gdb-4187119d59afd156703cfcbc6be287c5085f1867.tar.bz2 |
gdb-3.3
Diffstat (limited to 'gdb/munch')
-rwxr-xr-x | gdb/munch | 15 |
1 files changed, 9 insertions, 6 deletions
@@ -1,14 +1,17 @@ #! /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 () {' +echo 'void initialize_all_files () {' -nm $* | egrep '_initialize_' | \ - sed -e 's/^.*\(initialize_[a-zA-Z_0-9]*\).*$/ _\1 ();/' | \ - sort -u +if test "$1" = "-DSYSV" ; then + shift; + nm $* | egrep '^(.*[^a-zA-Z_]_|_)initialize_' | \ + sed -e 's/^.*\(_initialize_[a-zA-Z0-9_]*\)[^a-zA-Z0-9_].*$/ \1 ();/' +else + nm -p $* | egrep 'T *__initialize_' | \ + sed -e 's/^.*T *_*\(.*\)/ _\1 ();/' +fi echo '}' |