This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[review] [gdb/testsuite] Fix regexp for reg value in jit-reader.exp
- From: "Sourceware to Gerrit sync (Code Review)" <gerrit at gnutoolchain-gerrit dot osci dot io>
- To: Tom de Vries <tdevries at suse dot de>, gdb-patches at sourceware dot org
- Cc: Tom Tromey <tromey at sourceware dot org>
- Date: Wed, 16 Oct 2019 10:54:04 -0400
- Subject: [review] [gdb/testsuite] Fix regexp for reg value in jit-reader.exp
- Auto-submitted: auto-generated
- References: <gerrit.1571148134000.Ie494d24fad7a9af7ac6bfaf731c4aa04f1333830@gnutoolchain-gerrit.osci.io>
- Reply-to: noreply at gnutoolchain-gerrit dot osci dot io, tdevries at suse dot de, tromey at sourceware dot org, gdb-patches at sourceware dot org
Sourceware to Gerrit sync has submitted this change.
Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/81
......................................................................
[gdb/testsuite] Fix regexp for reg value in jit-reader.exp
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.
gdb/testsuite/ChangeLog:
2019-10-16 Tom de Vries <tdevries@suse.de>
* gdb.base/jit-reader.exp: Allow non-pointer registers to be printed
as signed.
Change-Id: Ie494d24fad7a9af7ac6bfaf731c4aa04f1333830
---
M gdb/testsuite/ChangeLog
M gdb/testsuite/gdb.base/jit-reader.exp
2 files changed, 26 insertions(+), 20 deletions(-)
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index ce6e0f2..c9e2457 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2019-10-16 Tom de Vries <tdevries@suse.de>
+
+ * gdb.base/jit-reader.exp: Allow non-pointer registers to be printed
+ as signed.
+
2019-10-14 Simon Marchi <simon.marchi@polymtl.ca>
* gdb.mi/list-thread-groups-available.exp: Read entries one by
diff --git a/gdb/testsuite/gdb.base/jit-reader.exp b/gdb/testsuite/gdb.base/jit-reader.exp
index 7c07c16..1ef3341 100644
--- a/gdb/testsuite/gdb.base/jit-reader.exp
+++ b/gdb/testsuite/gdb.base/jit-reader.exp
@@ -65,32 +65,33 @@
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" \
]
}