This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Add '_' in the pattern for reggroup


On 2018-09-18 06:40, Hafiz Abid Qadeer wrote:
Hi,
I was looking at GDB testcase results for arm-eabi target with qemu, I
noticed that register groups returned by the qemu can have '_' in the
name e.g. 'cp_regs'. The reggroups.exp fails to recognize that as group
name. Fixed by adding '_' in the pattern. OK?

gdb/testsuite/ChangeLog:

2018-09-18  Hafiz Abid Qadeer  <abidh@codesourcery.com>

	gdb.base/reggroups.exp (fetch_reggroups): Add '_' in match pattern for
group name.

---
 gdb/testsuite/ChangeLog              | 4 ++++
 gdb/testsuite/gdb.base/reggroups.exp | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/gdb/testsuite/gdb.base/reggroups.exp
b/gdb/testsuite/gdb.base/reggroups.exp
index 294f90931f..036c97b844 100644
--- a/gdb/testsuite/gdb.base/reggroups.exp
+++ b/gdb/testsuite/gdb.base/reggroups.exp
@@ -43,7 +43,7 @@ proc fetch_reggroups {test} {
 	-re "^ Group\[ \t\]+Type\[ \t\]+\r\n" {
 	    exp_continue
 	}
-	-re "^ (\[0-9a-zA-Z-\]+)\[ \t\]+(user|internal)\[ \t\]+\r\n" {
+	-re "^ (\[_0-9a-zA-Z-\]+)\[ \t\]+(user|internal)\[ \t\]+\r\n" {
 	    lappend reggroups $expect_out(1,string)
 	    exp_continue
 	}
--
2.11.0

Thanks, this LGTM.

Simon


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]