Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom de Vries <tdevries@suse.de>
To: gdb-patches@sourceware.org
Subject: [PATCH][gdb/testsuite] Fix regexp for reg value in jit-reader.exp
Date: Thu, 10 Oct 2019 08:38:00 -0000	[thread overview]
Message-ID: <20191010083819.GA31962@delia> (raw)

Hi,

On openSUSE Leap 15.1 (as well as on Fedora-x86_64-m64 buildbot) I see:
...
FAIL: gdb.base/jit-reader.exp: with jit-reader: after mangling: current frame: info registers
...

The problem is that r10 is printed signed:
...
r10            0xffffffffffffffb0  -80^M
...
but the regexp expects a signed value:
...
            "r10            $hex +$decimal" \
...

Fix this by allowing signed values.

Tested on x86_64-linux.

OK for trunk?

Thanks,
- Tom

[gdb/testsuite] Fix regexp for reg value in jit-reader.exp

gdb/testsuite/ChangeLog:

2019-10-10  Tom de Vries  <tdevries@suse.de>

	* gdb.base/jit-reader.exp: Allow non-pointer registers to be printed
	as signed.

---
 gdb/testsuite/gdb.base/jit-reader.exp | 41 ++++++++++++++++++-----------------
 1 file changed, 21 insertions(+), 20 deletions(-)

diff --git a/gdb/testsuite/gdb.base/jit-reader.exp b/gdb/testsuite/gdb.base/jit-reader.exp
index 7c07c16363d..1ef3341bd25 100644
--- a/gdb/testsuite/gdb.base/jit-reader.exp
+++ b/gdb/testsuite/gdb.base/jit-reader.exp
@@ -65,32 +65,33 @@ proc info_registers_current_frame {sp} {
 
     set any "\[^\r\n\]*"
 
+    set neg_decimal "-?$decimal"
     gdb_test "info registers" \
 	[multi_line \
-	     "rax            $hex +$decimal" \
-	     "rbx            $hex +$decimal" \
-	     "rcx            $hex +$decimal" \
-	     "rdx            $hex +$decimal" \
-	     "rsi            $hex +$decimal" \
-	     "rdi            $hex +$decimal" \
+	     "rax            $hex +$neg_decimal" \
+	     "rbx            $hex +$neg_decimal" \
+	     "rcx            $hex +$neg_decimal" \
+	     "rdx            $hex +$neg_decimal" \
+	     "rsi            $hex +$neg_decimal" \
+	     "rdi            $hex +$neg_decimal" \
 	     "rbp            $hex +$hex" \
 	     "rsp            $sp +$sp" \
-	     "r8             $hex +$decimal" \
-	     "r9             $hex +$decimal" \
-	     "r10            $hex +$decimal" \
-	     "r11            $hex +$decimal" \
-	     "r12            $hex +$decimal" \
-	     "r13            $hex +$decimal" \
-	     "r14            $hex +$decimal" \
-	     "r15            $hex +$decimal" \
+	     "r8             $hex +$neg_decimal" \
+	     "r9             $hex +$neg_decimal" \
+	     "r10            $hex +$neg_decimal" \
+	     "r11            $hex +$neg_decimal" \
+	     "r12            $hex +$neg_decimal" \
+	     "r13            $hex +$neg_decimal" \
+	     "r14            $hex +$neg_decimal" \
+	     "r15            $hex +$neg_decimal" \
 	     "rip            $hex +$hex$any" \
 	     "eflags         $hex +\\\[$any\\\]" \
-	     "cs             $hex +$decimal" \
-	     "ss             $hex +$decimal" \
-	     "ds             $hex +$decimal" \
-	     "es             $hex +$decimal" \
-	     "fs             $hex +$decimal" \
-	     "gs             $hex +$decimal" \
+	     "cs             $hex +$neg_decimal" \
+	     "ss             $hex +$neg_decimal" \
+	     "ds             $hex +$neg_decimal" \
+	     "es             $hex +$neg_decimal" \
+	     "fs             $hex +$neg_decimal" \
+	     "gs             $hex +$neg_decimal" \
 	    ]
 }
 


                 reply	other threads:[~2019-10-10  8:38 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191010083819.GA31962@delia \
    --to=tdevries@suse.de \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox