From cb17dfb1c0dcf0ac153b00c0694d28b08c5ce9aa Mon Sep 17 00:00:00 2001 From: Fred Fish Date: Thu, 24 Oct 1991 08:54:58 +0000 Subject: [PATCH] Add support for SVR4 style nm output. Not claimed to be optimal, I'm not a sed hacker. It does seem to work fine. --- gdb/ChangeLog | 2 ++ gdb/munch | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 9429f38fdb..56141df123 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,7 @@ Thu Oct 24 01:32:51 1991 Fred Fish (fnf at cygnus.com) + * munch: Add support for SVR4 style nm output. + * dbxread.c, mipsread.c symmisc.c, symtab.c: Remove the object file specific fields from the partial symbol table structure and replace them with a pointer to private data for each different diff --git a/gdb/munch b/gdb/munch index 6bffb88fa0..7b1202f32e 100755 --- a/gdb/munch +++ b/gdb/munch @@ -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' | \ -- 2.34.1