Add '_' in the pattern for reggroup

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Add '_' in the pattern for reggroup

Hafiz Abid Qadeer
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  <[hidden email]>

        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


--
Hafiz Abid Qadeer
Mentor Embedded/CodeSourcery
Reply | Threaded
Open this post in threaded view
|

Re: Add '_' in the pattern for reggroup

Simon Marchi
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  <[hidden email]>
>
> 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