* gdb.stabs/{ecoff.mt,wierd-ecoff.S,wierd-ecoff.sed}: New files
authorPeter Schauer <Peter.Schauer@mytum.de>
Sun, 18 Jul 1993 15:47:51 +0000 (15:47 +0000)
committerPeter Schauer <Peter.Schauer@mytum.de>
Sun, 18 Jul 1993 15:47:51 +0000 (15:47 +0000)
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.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.stabs/.Sanitize
gdb/testsuite/gdb.stabs/aout.mt
gdb/testsuite/gdb.stabs/configure.in
gdb/testsuite/gdb.stabs/ecoff.mt [new file with mode: 0644]
gdb/testsuite/gdb.stabs/wierd-ecoff.S [new file with mode: 0644]
gdb/testsuite/gdb.stabs/wierd-ecoff.sed [new file with mode: 0644]
gdb/testsuite/gdb.stabs/xcoff.mt

index f5d34a93232fbe953b2202be59f7dcf2c6f3a2eb..c19e7116bcf3f4f7a2edc2cc334775a233e5aef8 100644 (file)
@@ -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.
index f8dc4158f948f5762f67472ab80f9d93fef11534..9cda8ca22ab2c2d26eea29957a3e861ec9a6c4ed 100644 (file)
@@ -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
index a6963580604b0eb8697c7977b39d9afd6f6888a5..5a9b8ff287af4c9450025a9b69367efdee79f4e3 100644 (file)
@@ -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
index 7327327924740709a6be792629b044276c9b39e3..815afa4c7a4fa4819812ce79d8929b9805cefeb8 100644 (file)
@@ -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 (file)
index 0000000..fa261fd
--- /dev/null
@@ -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 <tmp.s >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 (file)
index 0000000..4560b99
--- /dev/null
@@ -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 (file)
index 0000000..c3fa0f1
--- /dev/null
@@ -0,0 +1,6 @@
+s/\.stabs/ #.stabs/
+s/@stabs/ #@stabs/
+s/" *, */",/g
+s/\([0-9]\) *, */\1,/g
+s/  *$//
+s/\.long/.word/
index c4cf0a68464e9ac61838624b0ad9a46775cb409b..6d575bfe085d75942b740691c06dbd055ae10b7d 100644 (file)
@@ -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