public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH v2] gdb: testsuite: show print array-indexes after set in arrayidx.exp
@ 2021-11-25  1:49 Tiezhu Yang
  2021-11-27  6:24 ` Joel Brobecker
  0 siblings, 1 reply; 4+ messages in thread
From: Tiezhu Yang @ 2021-11-25  1:49 UTC (permalink / raw)
  To: gdb-patches; +Cc: Andrew Burgess

Add "show print array-indexes" testcases after set print array-indexes
to off or on.

Without this patch:

    PASS: gdb.base/arrayidx.exp: set print array-indexes to off
    PASS: gdb.base/arrayidx.exp: print array with array-indexes off
    PASS: gdb.base/arrayidx.exp: set print array-indexes to on
    PASS: gdb.base/arrayidx.exp: print array with array-indexes on

With this patch:

    PASS: gdb.base/arrayidx.exp: set print array-indexes to off
    PASS: gdb.base/arrayidx.exp: show print array-indexes is off
    PASS: gdb.base/arrayidx.exp: print array with array-indexes off
    PASS: gdb.base/arrayidx.exp: set print array-indexes to on
    PASS: gdb.base/arrayidx.exp: show print array-indexes is on
    PASS: gdb.base/arrayidx.exp: print array with array-indexes on

Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
---

v2: use \\. instead of . suggested by Andrew Burgess, thank you.

 gdb/testsuite/gdb.base/arrayidx.exp | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/gdb/testsuite/gdb.base/arrayidx.exp b/gdb/testsuite/gdb.base/arrayidx.exp
index af792ed..b235828 100644
--- a/gdb/testsuite/gdb.base/arrayidx.exp
+++ b/gdb/testsuite/gdb.base/arrayidx.exp
@@ -36,6 +36,10 @@ if ![runto_main] then {
 gdb_test_no_output "set print array-indexes off" \
          "set print array-indexes to off"
 
+gdb_test "show print array-indexes" \
+         "Printing of array indexes is off\\." \
+         "show print array-indexes is off"
+
 gdb_test "print array" \
          "\\{1, 2, 3, 4\\}" \
          "print array with array-indexes off"
@@ -45,6 +49,10 @@ gdb_test "print array" \
 gdb_test_no_output "set print array-indexes on" \
          "set print array-indexes to on"
 
+gdb_test "show print array-indexes" \
+         "Printing of array indexes is on\\." \
+         "show print array-indexes is on"
+
 gdb_test "print array" \
          "\\{\\\[0\\\] = 1, \\\[1\\\] = 2, \\\[2\\\] = 3, \\\[3\\\] = 4\\}" \
          "print array with array-indexes on"
-- 
2.1.0


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

* Re: [PATCH v2] gdb: testsuite: show print array-indexes after set in arrayidx.exp
  2021-11-25  1:49 [PATCH v2] gdb: testsuite: show print array-indexes after set in arrayidx.exp Tiezhu Yang
@ 2021-11-27  6:24 ` Joel Brobecker
  2022-01-05  6:07   ` Tiezhu Yang
  0 siblings, 1 reply; 4+ messages in thread
From: Joel Brobecker @ 2021-11-27  6:24 UTC (permalink / raw)
  To: Tiezhu Yang; +Cc: gdb-patches, Andrew Burgess, Joel Brobecker

Hello,

On Thu, Nov 25, 2021 at 09:49:47AM +0800, Tiezhu Yang wrote:
> Add "show print array-indexes" testcases after set print array-indexes
> to off or on.
> 
> Without this patch:
> 
>     PASS: gdb.base/arrayidx.exp: set print array-indexes to off
>     PASS: gdb.base/arrayidx.exp: print array with array-indexes off
>     PASS: gdb.base/arrayidx.exp: set print array-indexes to on
>     PASS: gdb.base/arrayidx.exp: print array with array-indexes on
> 
> With this patch:
> 
>     PASS: gdb.base/arrayidx.exp: set print array-indexes to off
>     PASS: gdb.base/arrayidx.exp: show print array-indexes is off
>     PASS: gdb.base/arrayidx.exp: print array with array-indexes off
>     PASS: gdb.base/arrayidx.exp: set print array-indexes to on
>     PASS: gdb.base/arrayidx.exp: show print array-indexes is on
>     PASS: gdb.base/arrayidx.exp: print array with array-indexes on
> 
> Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
> ---
> 
> v2: use \\. instead of . suggested by Andrew Burgess, thank you.
> 
>  gdb/testsuite/gdb.base/arrayidx.exp | 8 ++++++++
>  1 file changed, 8 insertions(+)

Thanks for this patch.

OK to push to master.

> diff --git a/gdb/testsuite/gdb.base/arrayidx.exp b/gdb/testsuite/gdb.base/arrayidx.exp
> index af792ed..b235828 100644
> --- a/gdb/testsuite/gdb.base/arrayidx.exp
> +++ b/gdb/testsuite/gdb.base/arrayidx.exp
> @@ -36,6 +36,10 @@ if ![runto_main] then {
>  gdb_test_no_output "set print array-indexes off" \
>           "set print array-indexes to off"
>  
> +gdb_test "show print array-indexes" \
> +         "Printing of array indexes is off\\." \
> +         "show print array-indexes is off"
> +
>  gdb_test "print array" \
>           "\\{1, 2, 3, 4\\}" \
>           "print array with array-indexes off"
> @@ -45,6 +49,10 @@ gdb_test "print array" \
>  gdb_test_no_output "set print array-indexes on" \
>           "set print array-indexes to on"
>  
> +gdb_test "show print array-indexes" \
> +         "Printing of array indexes is on\\." \
> +         "show print array-indexes is on"
> +
>  gdb_test "print array" \
>           "\\{\\\[0\\\] = 1, \\\[1\\\] = 2, \\\[2\\\] = 3, \\\[3\\\] = 4\\}" \
>           "print array with array-indexes on"
> -- 
> 2.1.0
> 

-- 
Joel

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

* Re: [PATCH v2] gdb: testsuite: show print array-indexes after set in arrayidx.exp
  2021-11-27  6:24 ` Joel Brobecker
@ 2022-01-05  6:07   ` Tiezhu Yang
  2022-01-08 10:45     ` Joel Brobecker
  0 siblings, 1 reply; 4+ messages in thread
From: Tiezhu Yang @ 2022-01-05  6:07 UTC (permalink / raw)
  To: Joel Brobecker; +Cc: gdb-patches, Andrew Burgess

On 11/27/21 14:24, Joel Brobecker wrote:
> Hello,
> 
> On Thu, Nov 25, 2021 at 09:49:47AM +0800, Tiezhu Yang wrote:
>> Add "show print array-indexes" testcases after set print array-indexes
>> to off or on.
>>
>> Without this patch:
>>
>>      PASS: gdb.base/arrayidx.exp: set print array-indexes to off
>>      PASS: gdb.base/arrayidx.exp: print array with array-indexes off
>>      PASS: gdb.base/arrayidx.exp: set print array-indexes to on
>>      PASS: gdb.base/arrayidx.exp: print array with array-indexes on
>>
>> With this patch:
>>
>>      PASS: gdb.base/arrayidx.exp: set print array-indexes to off
>>      PASS: gdb.base/arrayidx.exp: show print array-indexes is off
>>      PASS: gdb.base/arrayidx.exp: print array with array-indexes off
>>      PASS: gdb.base/arrayidx.exp: set print array-indexes to on
>>      PASS: gdb.base/arrayidx.exp: show print array-indexes is on
>>      PASS: gdb.base/arrayidx.exp: print array with array-indexes on
>>
>> Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
>> ---
>>
>> v2: use \\. instead of . suggested by Andrew Burgess, thank you.
>>
>>   gdb/testsuite/gdb.base/arrayidx.exp | 8 ++++++++
>>   1 file changed, 8 insertions(+)
> 
> Thanks for this patch.
> 
> OK to push to master.

Gentle ping.

Thanks,
Tiezhu

> 
>> diff --git a/gdb/testsuite/gdb.base/arrayidx.exp b/gdb/testsuite/gdb.base/arrayidx.exp
>> index af792ed..b235828 100644
>> --- a/gdb/testsuite/gdb.base/arrayidx.exp
>> +++ b/gdb/testsuite/gdb.base/arrayidx.exp
>> @@ -36,6 +36,10 @@ if ![runto_main] then {
>>   gdb_test_no_output "set print array-indexes off" \
>>            "set print array-indexes to off"
>>   
>> +gdb_test "show print array-indexes" \
>> +         "Printing of array indexes is off\\." \
>> +         "show print array-indexes is off"
>> +
>>   gdb_test "print array" \
>>            "\\{1, 2, 3, 4\\}" \
>>            "print array with array-indexes off"
>> @@ -45,6 +49,10 @@ gdb_test "print array" \
>>   gdb_test_no_output "set print array-indexes on" \
>>            "set print array-indexes to on"
>>   
>> +gdb_test "show print array-indexes" \
>> +         "Printing of array indexes is on\\." \
>> +         "show print array-indexes is on"
>> +
>>   gdb_test "print array" \
>>            "\\{\\\[0\\\] = 1, \\\[1\\\] = 2, \\\[2\\\] = 3, \\\[3\\\] = 4\\}" \
>>            "print array with array-indexes on"
>> -- 
>> 2.1.0
>>
> 


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

* Re: [PATCH v2] gdb: testsuite: show print array-indexes after set in arrayidx.exp
  2022-01-05  6:07   ` Tiezhu Yang
@ 2022-01-08 10:45     ` Joel Brobecker
  0 siblings, 0 replies; 4+ messages in thread
From: Joel Brobecker @ 2022-01-08 10:45 UTC (permalink / raw)
  To: Tiezhu Yang; +Cc: Joel Brobecker, gdb-patches, Andrew Burgess

> > On Thu, Nov 25, 2021 at 09:49:47AM +0800, Tiezhu Yang wrote:
> > > Add "show print array-indexes" testcases after set print array-indexes
> > > to off or on.
> > > 
> > > Without this patch:
> > > 
> > >      PASS: gdb.base/arrayidx.exp: set print array-indexes to off
> > >      PASS: gdb.base/arrayidx.exp: print array with array-indexes off
> > >      PASS: gdb.base/arrayidx.exp: set print array-indexes to on
> > >      PASS: gdb.base/arrayidx.exp: print array with array-indexes on
> > > 
> > > With this patch:
> > > 
> > >      PASS: gdb.base/arrayidx.exp: set print array-indexes to off
> > >      PASS: gdb.base/arrayidx.exp: show print array-indexes is off
> > >      PASS: gdb.base/arrayidx.exp: print array with array-indexes off
> > >      PASS: gdb.base/arrayidx.exp: set print array-indexes to on
> > >      PASS: gdb.base/arrayidx.exp: show print array-indexes is on
> > >      PASS: gdb.base/arrayidx.exp: print array with array-indexes on
> > > 
> > > Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
> > > ---
> > > 
> > > v2: use \\. instead of . suggested by Andrew Burgess, thank you.
> > > 
> > >   gdb/testsuite/gdb.base/arrayidx.exp | 8 ++++++++
> > >   1 file changed, 8 insertions(+)
> > 
> > Thanks for this patch.
> > 
> > OK to push to master.
> 
> Gentle ping.

There was actually a misunderstanding. I was giving you the OK to
push the patch to master yourself.

In any case, the patch has now been pushed to master for you.

-- 
Joel

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

end of thread, other threads:[~2022-01-08 10:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-25  1:49 [PATCH v2] gdb: testsuite: show print array-indexes after set in arrayidx.exp Tiezhu Yang
2021-11-27  6:24 ` Joel Brobecker
2022-01-05  6:07   ` Tiezhu Yang
2022-01-08 10:45     ` Joel Brobecker

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).