* gdb.stabs: Re-write weird.def and configuration to use sed
authorJim Kingdon <jkingdon@engr.sgi.com>
Sun, 14 Nov 1993 05:57:47 +0000 (05:57 +0000)
committerJim Kingdon <jkingdon@engr.sgi.com>
Sun, 14 Nov 1993 05:57:47 +0000 (05:57 +0000)
instead of cpp.  sed is portable and POSIX; cpp is neither.

gdb/testsuite/gdb.stabs/.Sanitize
gdb/testsuite/gdb.stabs/aout.mt
gdb/testsuite/gdb.stabs/weird-aout.S [deleted file]
gdb/testsuite/gdb.stabs/weird-aout.sed [new file with mode: 0644]
gdb/testsuite/gdb.stabs/weird-ecoff.S [deleted file]
gdb/testsuite/gdb.stabs/weird-ecoff.sed
gdb/testsuite/gdb.stabs/weird-xcoff.S [deleted file]
gdb/testsuite/gdb.stabs/weird-xcoff.sed [new file with mode: 0644]
gdb/testsuite/gdb.stabs/xcoff.mt

index 59a767dd7af293d2a6a41275ad23ebb28918f758..bf31687e7bbd3e02827712295a774eaf2c2439b0 100644 (file)
@@ -1,5 +1,3 @@
-# .Sanitize for deja-gnu.
-
 # Each directory to survive it's way into a release will need a file
 # like this one called "./.Sanitize".  All keyword lines must exist,
 # and must exist in the order specified by this file.  Each directory
@@ -28,10 +26,9 @@ alpha.mt
 aout.mt
 configure.in
 ecoff.mt
-weird-aout.S
+weird-aout.sed
 weird-ecoff.sed
-weird-ecoff.S
-weird-xcoff.S
+weird-xcoff.sed
 weird.def
 weird.exp
 xcoff.mt
index f1eb7efa981eb3d2307cbc318d7e1a763895a09d..7eb9f0650d1ece44348e7048372477f1c5871924 100644 (file)
@@ -1,3 +1,3 @@
-weird.o: $(srcdir)/weird.def $(srcdir)/weird-aout.S
-       sed -f $(srcdir)/weird-aout.S <$(srcdir)/weird.def >weird.s
+weird.o: $(srcdir)/weird.def $(srcdir)/weird-aout.sed
+       sed -f $(srcdir)/weird-aout.sed <$(srcdir)/weird.def >weird.s
        $(CC) -c weird.s
diff --git a/gdb/testsuite/gdb.stabs/weird-aout.S b/gdb/testsuite/gdb.stabs/weird-aout.S
deleted file mode 100644 (file)
index 0ed3a5e..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-# GDB legitimately expects a file name.
-# The sun3 assembler bogusly requires that the value of this stab be a
-# label.  Placate it.
-1i\
-       .stabs "weird.c",0x64,0,0,Label0\
-Label0:
-#
-s/N_LSYM/0x80/
-s/N_GSYM/0x20/
-# Replace a single backslash with a doubled backslash
-/\.stabs/s/\\/\\\\/
-s/\.begin_common\(.*\)/.stabs \1,0xe2,0,0,0/
-s/\.end_common\(.*\)/.stabs \1,0xe4,0,0,0/
-s/\.align_it/.align 2/
-/^#/d
-/.if alpha/,/.endif alpha/d
-/.if/d
-/.endif/d
diff --git a/gdb/testsuite/gdb.stabs/weird-aout.sed b/gdb/testsuite/gdb.stabs/weird-aout.sed
new file mode 100644 (file)
index 0000000..0ed3a5e
--- /dev/null
@@ -0,0 +1,18 @@
+# GDB legitimately expects a file name.
+# The sun3 assembler bogusly requires that the value of this stab be a
+# label.  Placate it.
+1i\
+       .stabs "weird.c",0x64,0,0,Label0\
+Label0:
+#
+s/N_LSYM/0x80/
+s/N_GSYM/0x20/
+# Replace a single backslash with a doubled backslash
+/\.stabs/s/\\/\\\\/
+s/\.begin_common\(.*\)/.stabs \1,0xe2,0,0,0/
+s/\.end_common\(.*\)/.stabs \1,0xe4,0,0,0/
+s/\.align_it/.align 2/
+/^#/d
+/.if alpha/,/.endif alpha/d
+/.if/d
+/.endif/d
diff --git a/gdb/testsuite/gdb.stabs/weird-ecoff.S b/gdb/testsuite/gdb.stabs/weird-ecoff.S
deleted file mode 100644 (file)
index 1892539..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-# GDB legitimately expects a file name.
-1i\
- .file 1 "weird.c"\
- #@stabs\
- #.stabs "weird.c",0x64,0,0,0
-/^#/d
-# Remove whitespace from various places.
-s/" *, */",/g
-s/\([0-9]\) *, */\1,/g
-s/  *$//
-#
-s/N_LSYM/0x80/
-s/N_GSYM/0x20/
-s/\.begin_common\(.*\)/.stabs \1,0xe2,0,0,0/
-s/\.end_common\(.*\)/.stabs \1,0xe4,0,0,0/
-s/\.align_it/.align 2/
-/.if/d
-/.endif/d
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..18925394ff497999f658c9b46bd9cab178e9f3f3 100644 (file)
@@ -0,0 +1,18 @@
+# GDB legitimately expects a file name.
+1i\
+ .file 1 "weird.c"\
+ #@stabs\
+ #.stabs "weird.c",0x64,0,0,0
+/^#/d
+# Remove whitespace from various places.
+s/" *, */",/g
+s/\([0-9]\) *, */\1,/g
+s/  *$//
+#
+s/N_LSYM/0x80/
+s/N_GSYM/0x20/
+s/\.begin_common\(.*\)/.stabs \1,0xe2,0,0,0/
+s/\.end_common\(.*\)/.stabs \1,0xe4,0,0,0/
+s/\.align_it/.align 2/
+/.if/d
+/.endif/d
diff --git a/gdb/testsuite/gdb.stabs/weird-xcoff.S b/gdb/testsuite/gdb.stabs/weird-xcoff.S
deleted file mode 100644 (file)
index a84e94f..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-# Put everything in this csect, which seems to make things work.
-# The compiler actually puts the stabs in .csect [PR], but that didn't
-# work here (I guess because there is no text section).
-1i\
-       .csect .data[RW]
-# .stabs string,type,0,0,value  ->  .stabx string,value,type,0
-s/^[   ]*\.stabs[      ]*\("[^"]*"\),[         ]*\([^,]*\),[   ]*0,0,[         ]*\(.*\)$/.stabx \1,\3,\2,0/
-s/N_GSYM/128/
-s/N_LSYM/129/
-s/\.begin_common/.bc/
-# The AIX assembler doesn't want the name in a .ec directive
-s/\.end_common.*/.ec/
-s/\.align_it/.align 1/
-/^#/d
-/.if alpha/,/.endif alpha/d
-/.if/d
-/.endif/d
diff --git a/gdb/testsuite/gdb.stabs/weird-xcoff.sed b/gdb/testsuite/gdb.stabs/weird-xcoff.sed
new file mode 100644 (file)
index 0000000..0dbcf5c
--- /dev/null
@@ -0,0 +1,18 @@
+# Put everything in this csect, which seems to make things work.
+# The compiler actually puts the stabs in .csect [PR], but that didn't
+# work here (I guess because there is no text section).
+1i\
+       .csect .data[RW]
+# .stabs string,type,0,0,value  ->  .stabx string,value,type,0
+s/^[   ]*\.stabs[      ]*\("[^"]*"\),[         ]*\([^,]*\),[   ]*0,0,[         ]*\(.*\)$/.stabx \1,\3,\2,0/
+s/N_GSYM/128/
+s/N_LSYM/129/
+s/\.begin_common/.bc/
+# The AIX assembler doesn't want the name in a .ec directive
+s/\.end_common.*/.ec/
+s/\.align_it/.align 1/
+/\.data/d
+/^#/d
+/\.if alpha/,/\.endif alpha/d
+/\.if/d
+/\.endif/d
index 314d0ec4393fd2832d1c7b07b7494a91beb26955..95d867d3a2c3dc27bedc472e425b56a52c2e5623 100644 (file)
@@ -1,6 +1,3 @@
-WEIRDSTABS_S=weird-xcoff.S
-
-weird.o: ${srcdir}/${WEIRDSTABS_S} ${srcdir}/weird.def
-       cp ${srcdir}/${WEIRDSTABS_S} tmp.c
-       $(CC) -I${srcdir} -E tmp.c >weird.s
+weird.o: $(srcdir)/weird.def $(srcdir)/weird-xcoff.sed
+       sed -f $(srcdir)/weird-xcoff.sed <$(srcdir)/weird.def >weird.s
        $(CC) -c weird.s
This page took 0.027041 seconds and 4 git commands to generate.