From: Peter Schauer Date: Sun, 18 Jul 1993 15:47:51 +0000 (+0000) Subject: * gdb.stabs/{ecoff.mt,wierd-ecoff.S,wierd-ecoff.sed}: New files X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=76b098d175f07d9d8635e5b603945a4497a6e09b;p=binutils-gdb.git * gdb.stabs/{ecoff.mt,wierd-ecoff.S,wierd-ecoff.sed}: New files to make the stabs test work on ecoff systems using gcc and -with-stabs. * gdb.stabs/{Makefile.in,configure.in,aout.mt,xcoff.mt}: Modify to enable ecoff configuration. --- diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index f5d34a93232..c19e7116bcf 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,10 @@ +Sun Jul 18 08:40:45 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de) + + * gdb.stabs/{ecoff.mt,wierd-ecoff.S,wierd-ecoff.sed}: New files + to make the stabs test work on ecoff systems using gcc and -with-stabs. + * gdb.stabs/{Makefile.in,configure.in,aout.mt,xcoff.mt}: Modify to + enable ecoff configuration. + Thu Jul 15 11:54:58 1993 Jim Kingdon (kingdon@lioth.cygnus.com) * gdb.t15/funcargs.exp (localvars_in_indirect_call): New test. diff --git a/gdb/testsuite/gdb.stabs/.Sanitize b/gdb/testsuite/gdb.stabs/.Sanitize index f8dc4158f94..9cda8ca22ab 100644 --- a/gdb/testsuite/gdb.stabs/.Sanitize +++ b/gdb/testsuite/gdb.stabs/.Sanitize @@ -26,7 +26,10 @@ Things-to-keep: Makefile.in aout.mt configure.in +ecoff.mt wierd-aout.S +wierd-ecoff.sed +wierd-ecoff.S wierd-xcoff.S wierd.def wierd.exp diff --git a/gdb/testsuite/gdb.stabs/aout.mt b/gdb/testsuite/gdb.stabs/aout.mt index a6963580604..5a9b8ff287a 100644 --- a/gdb/testsuite/gdb.stabs/aout.mt +++ b/gdb/testsuite/gdb.stabs/aout.mt @@ -1 +1,6 @@ WIERDSTABS_S=wierd-aout.S + +wierd.o: ${srcdir}/${WIERDSTABS_S} ${srcdir}/wierd.def + cp ${srcdir}/${WIERDSTABS_S} tmp.c + $(CC) -I${srcdir} -E tmp.c >wierd.s + $(CC) -c wierd.s diff --git a/gdb/testsuite/gdb.stabs/configure.in b/gdb/testsuite/gdb.stabs/configure.in index 73273279247..815afa4c7a4 100644 --- a/gdb/testsuite/gdb.stabs/configure.in +++ b/gdb/testsuite/gdb.stabs/configure.in @@ -15,6 +15,9 @@ case "${target}" in # Do any other machines use .stabx? What about i386-*-aix*? rs6000-*-aix*) target_makefile_frag=xcoff.mt ;; +mips-*-bsd*) target_makefile_frag=aout.mt ;; +mips-*-*) target_makefile_frag=ecoff.mt ;; + *-*-*) target_makefile_frag=aout.mt ;; esac diff --git a/gdb/testsuite/gdb.stabs/ecoff.mt b/gdb/testsuite/gdb.stabs/ecoff.mt new file mode 100644 index 00000000000..fa261fd39bd --- /dev/null +++ b/gdb/testsuite/gdb.stabs/ecoff.mt @@ -0,0 +1,14 @@ +# The mips as doesn't grok #line directives, suppress them via -P during +# preprocessing. +# The sed script removes blanks that mips-tfile doesn't like, +# embedds stabs in comments and changes .long to .word +# +WIERDSTABS_S=wierd-ecoff.S +# Only gcc knows about stabs-in-ecoff +STABSCC=gcc + +wierd.o: ${srcdir}/${WIERDSTABS_S} ${srcdir}/wierd.def ${srcdir}/wierd-ecoff.sed + cp ${srcdir}/${WIERDSTABS_S} tmp.c + $(STABSCC) -I${srcdir} -E -P tmp.c >tmp.s + sed -f ${srcdir}/wierd-ecoff.sed wierd.s + $(STABSCC) -c wierd.s diff --git a/gdb/testsuite/gdb.stabs/wierd-ecoff.S b/gdb/testsuite/gdb.stabs/wierd-ecoff.S new file mode 100644 index 00000000000..4560b993da2 --- /dev/null +++ b/gdb/testsuite/gdb.stabs/wierd-ecoff.S @@ -0,0 +1,29 @@ +/* GDB legitimately expects a file name. */ + .file 1 "wierd.c" + @stabs + .stabs "wierd.c",0x64,0,0,0 + +#define N_LSYM 0x80 +#define N_GSYM 0x20 + +#define N_BCOMM 0xe2 +#define N_ECOMM 0xe4 +#define BEGIN_COMMON(name) .stabs name,N_BCOMM,0,0,0 +#define END_COMMON(name) .stabs name,N_ECOMM,0,0,0 + +#define VAR(name) \ + .globl name; \ +.data; \ + .align 2; \ +name:; \ + .word 42 + +#define STAB(string,type,value) .stabs string,type,0,0,value +#include "wierd.def" + +/* Stuff with backslashes needs to go here, since gcc with stabs treats + them differently. */ + +STAB("sym92:\ !#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuvwxyz{|}~",N_LSYM,0) +STAB("type92:t92=\ !#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuvwxyz{|}~",N_LSYM,0) +STAB("attr92:G392=@\ !#$%&'()*+,-./0123456789:<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuvwxyz{|}~;1",N_GSYM, 0) diff --git a/gdb/testsuite/gdb.stabs/wierd-ecoff.sed b/gdb/testsuite/gdb.stabs/wierd-ecoff.sed new file mode 100644 index 00000000000..c3fa0f18903 --- /dev/null +++ b/gdb/testsuite/gdb.stabs/wierd-ecoff.sed @@ -0,0 +1,6 @@ +s/\.stabs/ #.stabs/ +s/@stabs/ #@stabs/ +s/" *, */",/g +s/\([0-9]\) *, */\1,/g +s/ *$// +s/\.long/.word/ diff --git a/gdb/testsuite/gdb.stabs/xcoff.mt b/gdb/testsuite/gdb.stabs/xcoff.mt index c4cf0a68464..6d575bfe085 100644 --- a/gdb/testsuite/gdb.stabs/xcoff.mt +++ b/gdb/testsuite/gdb.stabs/xcoff.mt @@ -1 +1,6 @@ WIERDSTABS_S=wierd-xcoff.S + +wierd.o: ${srcdir}/${WIERDSTABS_S} ${srcdir}/wierd.def + cp ${srcdir}/${WIERDSTABS_S} tmp.c + $(CC) -I${srcdir} -E tmp.c >wierd.s + $(CC) -c wierd.s