Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] Fix regression on s390x with entry-values.exp
@ 2014-01-13 16:43 Andreas Arnez
  2014-01-13 16:57 ` Pedro Alves
  2014-01-22 16:15 ` Andreas Krebbel
  0 siblings, 2 replies; 3+ messages in thread
From: Andreas Arnez @ 2014-01-13 16:43 UTC (permalink / raw)
  To: gdb-patches
  Cc: Sergio Durigan Junior, Ulrich Weigand, Andreas Krebbel, Yao Qi

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 below
addresses two aspects:

* 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.

* Handling for the s390-specific call instruction.

--
testsuite/ChangeLog
2014-01-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>

	* gdb.trace/entry-values.exp: Remove excess space character from
	regex patterns.  Handle s390 call instruction.


Modified gdb/testsuite/gdb.trace/entry-values.exp
diff --git a/gdb/testsuite/gdb.trace/entry-values.exp b/gdb/testsuite/gdb.trace/entry-values.exp
index 0fb35a0..f10ffa6 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) <foo\\+$foo_length>:\[^\r\n\]+\r\n\[ \]+($hex) .*\.\r\n$gdb_prompt $" {
+    -re ".*($hex) <foo\\+$foo_length>:\[^\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) <bar\\+$bar_length>:\[^\r\n\]+\r\n\[ \]+($hex) .*\.\r\n$gdb_prompt $" {
+    -re ".*($hex) <bar\\+$bar_length>:\[^\r\n\]+\r\n\[ \]+($hex).*\.\r\n$gdb_prompt $" {
 	set start $expect_out(1,string)
 	set end $expect_out(2,string)
 


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Fix regression on s390x with entry-values.exp
  2014-01-13 16:43 [PATCH] Fix regression on s390x with entry-values.exp Andreas Arnez
@ 2014-01-13 16:57 ` Pedro Alves
  2014-01-22 16:15 ` Andreas Krebbel
  1 sibling, 0 replies; 3+ messages in thread
From: Pedro Alves @ 2014-01-13 16:57 UTC (permalink / raw)
  To: Andreas Arnez
  Cc: gdb-patches, Sergio Durigan Junior, Ulrich Weigand,
	Andreas Krebbel, Yao Qi

On 01/13/2014 04:43 PM, Andreas Arnez wrote:
> 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 below
> addresses two aspects:
> 
> * 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.

Looks good to me, but can you paste/add the relevant disassemble
snippet from the gdb.log, in the commit log?  A picture is worth a
thousand words.

> * Handling for the s390-specific call instruction.
> 
> --
> testsuite/ChangeLog
> 2014-01-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
> 
> 	* gdb.trace/entry-values.exp: Remove excess space character from
> 	regex patterns.  Handle s390 call instruction.
> 
> 
> Modified gdb/testsuite/gdb.trace/entry-values.exp
> diff --git a/gdb/testsuite/gdb.trace/entry-values.exp b/gdb/testsuite/gdb.trace/entry-values.exp
> index 0fb35a0..f10ffa6 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) <foo\\+$foo_length>:\[^\r\n\]+\r\n\[ \]+($hex) .*\.\r\n$gdb_prompt $" {
> +    -re ".*($hex) <foo\\+$foo_length>:\[^\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) <bar\\+$bar_length>:\[^\r\n\]+\r\n\[ \]+($hex) .*\.\r\n$gdb_prompt $" {
> +    -re ".*($hex) <bar\\+$bar_length>:\[^\r\n\]+\r\n\[ \]+($hex).*\.\r\n$gdb_prompt $" {
>  	set start $expect_out(1,string)
>  	set end $expect_out(2,string)
>  
> 


-- 
Pedro Alves


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Fix regression on s390x with entry-values.exp
  2014-01-13 16:43 [PATCH] Fix regression on s390x with entry-values.exp Andreas Arnez
  2014-01-13 16:57 ` Pedro Alves
@ 2014-01-22 16:15 ` Andreas Krebbel
  1 sibling, 0 replies; 3+ messages in thread
From: Andreas Krebbel @ 2014-01-22 16:15 UTC (permalink / raw)
  To: Andreas Arnez; +Cc: gdb-patches

> testsuite/ChangeLog
> 2014-01-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
> 
> 	* gdb.trace/entry-values.exp: Remove excess space character from
> 	regex patterns.  Handle s390 call instruction.

Applied. Thanks!

-Andreas-


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-01-22 16:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-13 16:43 [PATCH] Fix regression on s390x with entry-values.exp Andreas Arnez
2014-01-13 16:57 ` Pedro Alves
2014-01-22 16:15 ` Andreas Krebbel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox