summaryrefslogtreecommitdiffstats
path: root/gdb/testsuite/gdb.stabs
diff options
context:
space:
mode:
authorJim Kingdon <jkingdon@engr.sgi.com>1993-06-26 03:30:24 +0000
committerJim Kingdon <jkingdon@engr.sgi.com>1993-06-26 03:30:24 +0000
commit2de1aa1cc95556ade5e1d15ec756b2b98241fe8c (patch)
tree7042e51393e7279eb41bd8ec468b7e5ff8e34353 /gdb/testsuite/gdb.stabs
parent11d1934593e60d030e06995a190ba4a3c3c9caea (diff)
downloadppe42-binutils-2de1aa1cc95556ade5e1d15ec756b2b98241fe8c.tar.gz
ppe42-binutils-2de1aa1cc95556ade5e1d15ec756b2b98241fe8c.zip
* gdb.stabs/wierd{.def,.exp,-aout.S,-xcoff.S}: Add common block test.
Diffstat (limited to 'gdb/testsuite/gdb.stabs')
-rw-r--r--gdb/testsuite/gdb.stabs/wierd-aout.S2
-rw-r--r--gdb/testsuite/gdb.stabs/wierd-xcoff.S6
-rw-r--r--gdb/testsuite/gdb.stabs/wierd.def15
-rw-r--r--gdb/testsuite/gdb.stabs/wierd.exp11
4 files changed, 32 insertions, 2 deletions
diff --git a/gdb/testsuite/gdb.stabs/wierd-aout.S b/gdb/testsuite/gdb.stabs/wierd-aout.S
index e188185a11..08878b62a1 100644
--- a/gdb/testsuite/gdb.stabs/wierd-aout.S
+++ b/gdb/testsuite/gdb.stabs/wierd-aout.S
@@ -3,6 +3,8 @@
#define N_LSYM 0x80
#define N_GSYM 0x20
+#define N_BCOMM 0xe2
+#define N_ECOMM 0xe4
#define VAR(name) \
.globl name; \
diff --git a/gdb/testsuite/gdb.stabs/wierd-xcoff.S b/gdb/testsuite/gdb.stabs/wierd-xcoff.S
index b4d3a24d9d..f0aed3118a 100644
--- a/gdb/testsuite/gdb.stabs/wierd-xcoff.S
+++ b/gdb/testsuite/gdb.stabs/wierd-xcoff.S
@@ -1,5 +1,7 @@
-#define N_LSYM 0x81
-#define N_GSYM 0x80
+#define N_GSYM 128
+#define N_LSYM 129
+#define N_BCOMM 135
+#define N_ECOMM 137
#define VAR(name) \
.globl name; \
diff --git a/gdb/testsuite/gdb.stabs/wierd.def b/gdb/testsuite/gdb.stabs/wierd.def
index 81a384c65c..4de0d9f2a8 100644
--- a/gdb/testsuite/gdb.stabs/wierd.def
+++ b/gdb/testsuite/gdb.stabs/wierd.def
@@ -306,6 +306,21 @@ STAB("attr90:G390=@Z !#$%&'()*+,-./0123456789:<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]
STAB("attr91:G391=@[ !#$%&'()*+,-./0123456789:<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~;1",N_GSYM,attr91)
STAB("attr92:G392=@\ !#$%&'()*+,-./0123456789:<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~;1",N_GSYM,attr92)
STAB("attr93:G393=@] !#$%&'()*+,-./0123456789:<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~;1",N_GSYM,attr93)
+
+/* Provide one of each, so this wins regardless of whether names have
+ underscores. */
+VAR (_common0)
+ .long 24
+ .long 22
+VAR (common0)
+ .long 24
+ .long 22
+STAB ("common0", N_BCOMM, 0)
+STAB ("common0var0:S1", N_GSYM, 0)
+STAB ("common0var1:S1", N_GSYM, 4)
+STAB ("common0var2:S1", N_GSYM, 8)
+STAB ("common0", N_ECOMM, 0)
+
STAB("attr94:G394=@^ !#$%&'()*+,-./0123456789:<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~;1",N_GSYM,attr94)
STAB("attr95:G395=@_ !#$%&'()*+,-./0123456789:<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~;1",N_GSYM,attr95)
STAB("attr100:G400=@d !#$%&'()*+,-./0123456789:<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~;1",N_GSYM,attr100)
diff --git a/gdb/testsuite/gdb.stabs/wierd.exp b/gdb/testsuite/gdb.stabs/wierd.exp
index a8afcecebf..a734a057c2 100644
--- a/gdb/testsuite/gdb.stabs/wierd.exp
+++ b/gdb/testsuite/gdb.stabs/wierd.exp
@@ -157,6 +157,17 @@ field3 = 0x77888877\}" "print struct constant"
gdb_test "whatis pointer_to_int_var" "type = int \*" "whatis p t i v"
setup_xfail "*-*-*"
gdb_test "whatis intp_var" "type = intp" "whatis intp_var"
+
+ gdb_test "p common0var0" "= 42"
+ # GDB seems to only understand common blocks local to a function.
+ # These variables never get relocated to be relative to the common
+ # block.
+ # I'm not sure whether it is valid to have a common block which
+ # is not local to a function.
+ setup_xfail "*-*-*"
+ gdb_test "p common0var1" "= 24"
+ setup_xfail "*-*-*"
+ gdb_test "p common0var2" "= 22"
}
proc print_wierd_var { var } {
OpenPOWER on IntegriCloud