diff options
author | Fred Fish <fnf@specifix.com> | 1991-10-24 08:54:58 +0000 |
---|---|---|
committer | Fred Fish <fnf@specifix.com> | 1991-10-24 08:54:58 +0000 |
commit | cb17dfb1c0dcf0ac153b00c0694d28b08c5ce9aa (patch) | |
tree | 770f25cdbe4200ca5b48f14c403a216d4bcccace /gdb/munch | |
parent | 4a35d6e91b6d8b0f9c7577943dbc8fb453065e60 (diff) | |
download | gdb-cb17dfb1c0dcf0ac153b00c0694d28b08c5ce9aa.zip gdb-cb17dfb1c0dcf0ac153b00c0694d28b08c5ce9aa.tar.gz gdb-cb17dfb1c0dcf0ac153b00c0694d28b08c5ce9aa.tar.bz2 |
Add support for SVR4 style nm output. Not claimed to be optimal, I'm not
a sed hacker. It does seem to work fine.
Diffstat (limited to 'gdb/munch')
-rwxr-xr-x | gdb/munch | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -16,7 +16,11 @@ esac # make it easy to use a different nm, e.g. for cross-developing MUNCH_NM="${MUNCH_NM-nm} $NMOPT" -if test "`$MUNCH_NM main.o | egrep 'T _?main$'`" = "" ; then +if test "`$MUNCH_NM main.o | egrep main | egrep FUNC | egrep GLOB`" != "" ; then + # System V Release 4 style nm + $MUNCH_NM $* | egrep '|__?initialize_' | egrep FUNC | \ + sed -e 's/^.*\(_initialize_[a-zA-Z0-9_]*\).*$/ {extern void \1 (); \1 ();}/' +elif test "`$MUNCH_NM main.o | egrep 'T _?main$'`" = "" ; then # System V style nm shift; $MUNCH_NM $* | egrep '^(.*[^a-zA-Z_]_|_)_?initialize_.*\.text' | \ |