aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Weigand <uweigand@de.ibm.com>2012-08-02 15:57:49 +0000
committerUlrich Weigand <uweigand@de.ibm.com>2012-08-02 15:57:49 +0000
commit0547eeed14bf30f5777ce334f51b400269c3bbac (patch)
tree13b01725a4f233ea5446df8873d2519dfeeeb50b
parentbdddb4dec8340fcf738d014fe772c059eaf06053 (diff)
downloadgdb-0547eeed14bf30f5777ce334f51b400269c3bbac.zip
gdb-0547eeed14bf30f5777ce334f51b400269c3bbac.tar.gz
gdb-0547eeed14bf30f5777ce334f51b400269c3bbac.tar.bz2
* gdb.dwarf2/dw2-icc-opaque.S: Remove .align directives.
Fix wrong output on big-endian systems. * gdb.dwarf2/dw2-icc-opaque.exp: Expect @mode32 attribute on 4-byte pointer types on 64-bit s390x.
-rw-r--r--gdb/testsuite/ChangeLog7
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-icc-opaque.S14
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-icc-opaque.exp8
3 files changed, 19 insertions, 10 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 6e75966..0d86bb1 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,5 +1,12 @@
2012-08-02 Ulrich Weigand <uweigand@de.ibm.com>
+ * gdb.dwarf2/dw2-icc-opaque.S: Remove .align directives.
+ Fix wrong output on big-endian systems.
+ * gdb.dwarf2/dw2-icc-opaque.exp: Expect @mode32 attribute on
+ 4-byte pointer types on 64-bit s390x.
+
+2012-08-02 Ulrich Weigand <uweigand@de.ibm.com>
+
* gdb.base/watchpoint.c (func2): Initialize local_a. Add
marker comment at the beginning (after intialization).
* gdb.base/watchpoint.exp (test_complex_watchpoint): Set func2
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-icc-opaque.S b/gdb/testsuite/gdb.dwarf2/dw2-icc-opaque.S
index 117866d..47b017b 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-icc-opaque.S
+++ b/gdb/testsuite/gdb.dwarf2/dw2-icc-opaque.S
@@ -38,7 +38,6 @@
.global p_struct#
.section .debug_info
- .align 1
debug_info_seg1:
.4byte debug_info_seg1_end - 1f /* Length of compilation unit info. */
1:
@@ -57,7 +56,8 @@ debug_info_seg1:
.byte 0x01 /* DW_AT_accessibility. */
.asciz "p_struct" /* DW_AT_name. */
.4byte 3f - debug_info_seg1 /* DW_AT_type. */
- .2byte 0x0305 /* DW_AT_location: 5 bytes, DW_OP_addr */
+ .byte 0x05 /* DW_AT_location: 5 bytes ... */
+ .byte 0x03 /* DW_OP_addr ... */
.4byte p_struct /* followed by the address of p_struct. */
.byte 0x01 /* DW_AT_external. */
@@ -76,7 +76,6 @@ debug_info_seg1_end:
.section .debug_abbrev
.debug_abbrev_seg1:
- .align 1
.byte 0x01 /* Abbrev 1. */
.byte 0x11 /* DW_TAG_compile_unit. */
.byte 0x01 /* DW_CHILDREN_yes. */
@@ -123,7 +122,6 @@ debug_info_seg1_end:
.file "opaque-struct.c"
.section .debug_info
- .align 1
debug_info_seg2:
.4byte debug_info_seg2_end - 1f /* Length of compilation unit info. */
1:
@@ -145,8 +143,9 @@ debug_info_seg2:
.byte 0x03 /* DIE 3: DW_TAG_member. */
- .2byte 0x2302 /* DW_AT_data_member_location, 2 bytes, */
- .byte 0x00 /* DW_OP_plus_uconst followed by zero. */
+ .byte 0x02 /* DW_AT_data_member_location: 2 bytes ... */
+ .byte 0x23 /* DW_OP_plus_uconst ... */
+ .byte 0x00 /* followed by zero. */
.asciz "wrapped_value" /* DW_AT_name. */
.4byte 4f - debug_info_seg2 /* DW_AT_type. */
.byte 0x00
@@ -162,7 +161,6 @@ debug_info_seg2_end:
.section .debug_abbrev
.debug_abbrev_seg2:
- .align 1
.byte 0x01 /* Abbrev 1. */
.byte 0x11 /* DW_TAG_compile_unit. */
.byte 0x01 /* DW_CHILDREN_yes. */
@@ -210,7 +208,6 @@ debug_info_seg2_end:
.file "opaque-pointer2.c"
.section .debug_info
- .align 1
debug_info_seg3:
.4byte debug_info_seg3_end - 1f /* Length of compilation unit info. */
1:
@@ -235,7 +232,6 @@ debug_info_seg3_end:
.section .debug_abbrev
.debug_abbrev_seg3:
- .align 1
.byte 0x01 /* Abbrev 1. */
.byte 0x11 /* DW_TAG_compile_unit. */
.byte 0x01 /* DW_CHILDREN_yes. */
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-icc-opaque.exp b/gdb/testsuite/gdb.dwarf2/dw2-icc-opaque.exp
index db78006..fe7d7e8 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-icc-opaque.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-icc-opaque.exp
@@ -36,4 +36,10 @@ clean_restart $executable
# type = struct opaque_struct_t {
# <no data fields>
# } *
-gdb_test "ptype p_struct" "type = struct opaque_struct_t {\r\n *int wrapped_value;\r\n} \\*"
+if { [istarget s390x-*-*] && [is_lp64_target] } {
+ # The hand-coded DWARF info hard-codes a pointer size of 4 bytes,
+ # which is represented as @mode32 on s390x.
+ gdb_test "ptype p_struct" "type = struct opaque_struct_t {\r\n *int wrapped_value;\r\n} \\* @mode32"
+} else {
+ gdb_test "ptype p_struct" "type = struct opaque_struct_t {\r\n *int wrapped_value;\r\n} \\*"
+}