From d674a7090f3ae01552e9df5044acc2df1127a7c0 Mon Sep 17 00:00:00 2001 From: Andreas Arnez Date: Wed, 22 Jan 2014 15:37:41 +0000 Subject: [PATCH] Fix regression on s390x with entry-values.exp. The trace-specific test case 'entry-values' concludes fairly late in the process that this platform doesn't support trace. Before that, there are some platform specifics that don't work on s390x. The fix addresses two aspects: (1) Removal of an excess space character in the regex for the disassembly. This is needed when there is a function alignment gap, because then the hex address is immediately followed by a colon, like in the first 'nopr' line below: (gdb) disassemble foo+50,+10 Dump of assembler code from 0x32 to 0x3c: 0x0000000000000032 : br %r4 0x0000000000000034: nopr %r7 0x0000000000000036: nopr %r7 0x0000000000000038 : stmg %r11,%r15,88(%r15) End of assembler dump. (2) Handling for the s390-specific call instruction. gdb/testsuite/ChangeLog: * gdb.trace/entry-values.exp: Remove excess space character from regex patterns. Handle s390 call instruction. --- gdb/testsuite/ChangeLog | 5 +++++ gdb/testsuite/gdb.trace/entry-values.exp | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 5e02b7ac820..dbbd0ec2a76 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2014-01-22 Andreas Arnez + + * gdb.trace/entry-values.exp: Remove excess space character from + regex patterns. Handle s390 call instruction. + 2014-01-22 Andreas Arnez * gdb.dwarf2/dw2-dir-file-name.c (FUNC): Insert alignment and diff --git a/gdb/testsuite/gdb.trace/entry-values.exp b/gdb/testsuite/gdb.trace/entry-values.exp index 0fb35a06406..f10ffa6b6e0 100644 --- a/gdb/testsuite/gdb.trace/entry-values.exp +++ b/gdb/testsuite/gdb.trace/entry-values.exp @@ -57,7 +57,7 @@ gdb_test_multiple $test $test { set test "disassemble foo+$foo_length,+10" gdb_test_multiple $test $test { - -re ".*($hex) :\[^\r\n\]+\r\n\[ \]+($hex) .*\.\r\n$gdb_prompt $" { + -re ".*($hex) :\[^\r\n\]+\r\n\[ \]+($hex).*\.\r\n$gdb_prompt $" { set start $expect_out(1,string) set end $expect_out(2,string) @@ -77,6 +77,8 @@ set bar_call_foo "" if { [istarget "arm*-*-*"] || [istarget "aarch64*-*-*"] } { set call_insn "bl" +} elseif { [istarget "s390*-*-*"] } { + set call_insn "brasl" } else { set call_insn "call" } @@ -109,7 +111,7 @@ if { [string equal $bar_call_foo ""] || [string equal $bar_length ""] } { set test "disassemble bar+$bar_length,+10" gdb_test_multiple $test $test { - -re ".*($hex) :\[^\r\n\]+\r\n\[ \]+($hex) .*\.\r\n$gdb_prompt $" { + -re ".*($hex) :\[^\r\n\]+\r\n\[ \]+($hex).*\.\r\n$gdb_prompt $" { set start $expect_out(1,string) set end $expect_out(2,string) -- 2.30.2