From 5fc3827b43780e2e38e409c4ac844982e1e08f91 Mon Sep 17 00:00:00 2001 From: Jan Kratochvil Date: Sun, 17 Oct 2010 18:55:09 +0000 Subject: [PATCH] gdb/testsuite/ Fix s390x compatibility. * gdb.dwarf2/pr11465.S (DW_TAG_pointer_type): Use PTRBITS. Twice. * gdb.dwarf2/pr11465.exp: Set ptrbits, use it for -DPTRBITS. --- gdb/testsuite/ChangeLog | 6 ++++++ gdb/testsuite/gdb.dwarf2/pr11465.S | 4 ++-- gdb/testsuite/gdb.dwarf2/pr11465.exp | 8 +++++++- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index d48b6d08d7c..9254c5ded24 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2010-10-17 Jan Kratochvil + + Fix s390x compatibility. + * gdb.dwarf2/pr11465.S (DW_TAG_pointer_type): Use PTRBITS. Twice. + * gdb.dwarf2/pr11465.exp: Set ptrbits, use it for -DPTRBITS. + 2010-10-17 Jan Kratochvil * gdb.threads/sigstep-threads.exp: New file. diff --git a/gdb/testsuite/gdb.dwarf2/pr11465.S b/gdb/testsuite/gdb.dwarf2/pr11465.S index 8d805ddf83b..83396bf5bed 100644 --- a/gdb/testsuite/gdb.dwarf2/pr11465.S +++ b/gdb/testsuite/gdb.dwarf2/pr11465.S @@ -88,14 +88,14 @@ die77: .uleb128 0x9 /* DW_TAG_formal_parameter */ .byte 0x0 .byte 0x0 die7e: .uleb128 0xa /* DW_TAG_pointer_type */ - .byte 0x4 /* DW_AT_byte_size */ + .byte PTRBITS / 8 /* DW_AT_byte_size */ .long die84-d /* DW_AT_type */ die84: .uleb128 0xb /* DW_TAG_subroutine_type */ die89: .uleb128 0x9 /* DW_TAG_formal_parameter */ .long die5e-d /* DW_AT_type */ .byte 0x0 die8f: .uleb128 0xa /* DW_TAG_pointer_type */ - .byte 0x4 /* DW_AT_byte_size */ + .byte PTRBITS / 8 /* DW_AT_byte_size */ .long die5e-d /* DW_AT_type */ die95: .uleb128 0xc /* DW_TAG_subprogram */ .long die6a-d /* DW_AT_specification */ diff --git a/gdb/testsuite/gdb.dwarf2/pr11465.exp b/gdb/testsuite/gdb.dwarf2/pr11465.exp index c5bc2f1a679..d2d659697e2 100644 --- a/gdb/testsuite/gdb.dwarf2/pr11465.exp +++ b/gdb/testsuite/gdb.dwarf2/pr11465.exp @@ -29,8 +29,14 @@ set srcfile "$testfile.S" set executable "$testfile.x" set binfile [file join $objdir $subdir $executable] +if [is_ilp32_target] { + set ptrbits 32 +} else { + set ptrbits 64 +} + if { [gdb_compile [file join $srcdir $subdir $srcfile] \ - $binfile object {}] != "" } { + $binfile object [list additional_flags=-DPTRBITS=$ptrbits]] != "" } { return -1 } -- 2.30.2