From dd06d920c86bf450011ccc7b964627eb02031bc5 Mon Sep 17 00:00:00 2001 From: Jim Kingdon Date: Sun, 14 Nov 1993 06:50:42 +0000 Subject: * gdb.stabs: Re-write weird.def and configuration to use sed instead of cpp. sed is portable and POSIX; cpp is neither. --- gdb/testsuite/gdb.stabs/.Sanitize | 6 +++--- gdb/testsuite/gdb.stabs/alpha.mt | 4 ++-- gdb/testsuite/gdb.stabs/aout.mt | 4 ++-- gdb/testsuite/gdb.stabs/aout.sed | 18 ++++++++++++++++++ gdb/testsuite/gdb.stabs/ecoff.mt | 4 ++-- gdb/testsuite/gdb.stabs/ecoff.sed | 18 ++++++++++++++++++ gdb/testsuite/gdb.stabs/weird-aout.sed | 18 ------------------ gdb/testsuite/gdb.stabs/weird-ecoff.sed | 18 ------------------ gdb/testsuite/gdb.stabs/weird-xcoff.sed | 18 ------------------ gdb/testsuite/gdb.stabs/xcoff.mt | 4 ++-- gdb/testsuite/gdb.stabs/xcoff.sed | 18 ++++++++++++++++++ 11 files changed, 65 insertions(+), 65 deletions(-) create mode 100644 gdb/testsuite/gdb.stabs/aout.sed create mode 100644 gdb/testsuite/gdb.stabs/ecoff.sed delete mode 100644 gdb/testsuite/gdb.stabs/weird-aout.sed delete mode 100644 gdb/testsuite/gdb.stabs/weird-ecoff.sed delete mode 100644 gdb/testsuite/gdb.stabs/weird-xcoff.sed create mode 100644 gdb/testsuite/gdb.stabs/xcoff.sed (limited to 'gdb') diff --git a/gdb/testsuite/gdb.stabs/.Sanitize b/gdb/testsuite/gdb.stabs/.Sanitize index bf31687..e6fa102 100644 --- a/gdb/testsuite/gdb.stabs/.Sanitize +++ b/gdb/testsuite/gdb.stabs/.Sanitize @@ -26,9 +26,9 @@ alpha.mt aout.mt configure.in ecoff.mt -weird-aout.sed -weird-ecoff.sed -weird-xcoff.sed +aout.sed +ecoff.sed +xcoff.sed weird.def weird.exp xcoff.mt diff --git a/gdb/testsuite/gdb.stabs/alpha.mt b/gdb/testsuite/gdb.stabs/alpha.mt index 4863b4d..4ebce02 100644 --- a/gdb/testsuite/gdb.stabs/alpha.mt +++ b/gdb/testsuite/gdb.stabs/alpha.mt @@ -1,7 +1,7 @@ # This configuration is for a gcc that uses mips-tfile. If your gcc # uses gas, you should configure gdb --with-gnu-as. # -weird.o: $(srcdir)/weird.def $(srcdir)/weird-ecoff.sed +weird.o: $(srcdir)/weird.def $(srcdir)/ecoff.sed sed -e '/.if notalpha/,/.endif notalpha/d' <$(srcdir)/weird.def | \ - sed -f $(srcdir)/weird-ecoff.sed >weird.s + sed -f $(srcdir)/ecoff.sed >weird.s $(CC) -c weird.s diff --git a/gdb/testsuite/gdb.stabs/aout.mt b/gdb/testsuite/gdb.stabs/aout.mt index 7eb9f06..1648ae5 100644 --- a/gdb/testsuite/gdb.stabs/aout.mt +++ b/gdb/testsuite/gdb.stabs/aout.mt @@ -1,3 +1,3 @@ -weird.o: $(srcdir)/weird.def $(srcdir)/weird-aout.sed - sed -f $(srcdir)/weird-aout.sed <$(srcdir)/weird.def >weird.s +weird.o: $(srcdir)/weird.def $(srcdir)/aout.sed + sed -f $(srcdir)/aout.sed <$(srcdir)/weird.def >weird.s $(CC) -c weird.s diff --git a/gdb/testsuite/gdb.stabs/aout.sed b/gdb/testsuite/gdb.stabs/aout.sed new file mode 100644 index 0000000..0ed3a5e --- /dev/null +++ b/gdb/testsuite/gdb.stabs/aout.sed @@ -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/ecoff.mt b/gdb/testsuite/gdb.stabs/ecoff.mt index 93bf7b2..ceb2a99 100644 --- a/gdb/testsuite/gdb.stabs/ecoff.mt +++ b/gdb/testsuite/gdb.stabs/ecoff.mt @@ -1,7 +1,7 @@ # This configuration is for a gcc that uses mips-tfile. If your gcc # uses gas, you should configure gdb --with-gnu-as. # -weird.o: $(srcdir)/weird.def $(srcdir)/weird-ecoff.sed +weird.o: $(srcdir)/weird.def $(srcdir)/ecoff.sed sed -e '/.long/.word/' <$(srcdir)/weird.def | \ - sed -f $(srcdir)/weird-ecoff.sed >weird.s + sed -f $(srcdir)/ecoff.sed >weird.s $(CC) -c weird.s diff --git a/gdb/testsuite/gdb.stabs/ecoff.sed b/gdb/testsuite/gdb.stabs/ecoff.sed new file mode 100644 index 0000000..1892539 --- /dev/null +++ b/gdb/testsuite/gdb.stabs/ecoff.sed @@ -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-aout.sed b/gdb/testsuite/gdb.stabs/weird-aout.sed deleted file mode 100644 index 0ed3a5e..0000000 --- a/gdb/testsuite/gdb.stabs/weird-aout.sed +++ /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-ecoff.sed b/gdb/testsuite/gdb.stabs/weird-ecoff.sed deleted file mode 100644 index 1892539..0000000 --- a/gdb/testsuite/gdb.stabs/weird-ecoff.sed +++ /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 diff --git a/gdb/testsuite/gdb.stabs/weird-xcoff.sed b/gdb/testsuite/gdb.stabs/weird-xcoff.sed deleted file mode 100644 index 0dbcf5c..0000000 --- a/gdb/testsuite/gdb.stabs/weird-xcoff.sed +++ /dev/null @@ -1,18 +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/ -/\.data/d -/^#/d -/\.if alpha/,/\.endif alpha/d -/\.if/d -/\.endif/d diff --git a/gdb/testsuite/gdb.stabs/xcoff.mt b/gdb/testsuite/gdb.stabs/xcoff.mt index 95d867d..85ef9bb 100644 --- a/gdb/testsuite/gdb.stabs/xcoff.mt +++ b/gdb/testsuite/gdb.stabs/xcoff.mt @@ -1,3 +1,3 @@ -weird.o: $(srcdir)/weird.def $(srcdir)/weird-xcoff.sed - sed -f $(srcdir)/weird-xcoff.sed <$(srcdir)/weird.def >weird.s +weird.o: $(srcdir)/weird.def $(srcdir)/xcoff.sed + sed -f $(srcdir)/xcoff.sed <$(srcdir)/weird.def >weird.s $(CC) -c weird.s diff --git a/gdb/testsuite/gdb.stabs/xcoff.sed b/gdb/testsuite/gdb.stabs/xcoff.sed new file mode 100644 index 0000000..0dbcf5c --- /dev/null +++ b/gdb/testsuite/gdb.stabs/xcoff.sed @@ -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 -- cgit v1.1