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: [PATCH 3/3] gdb/testsuite: Handle targets with lots of registers


On Fri, 13 Apr 2018, Pedro Alves wrote:

> So I'd suggest something like this:
> 
> set saw_registers 0
> set test "maint print registers"
> gdb_test_multiple $test $test {
>     -re "^\[^\r\n\]+\[0-9\]+\[^\r\n\]+\[0-9\]+\[^\r\n\]+\[0-9\]+\[^\r\n\]+\[0-9\]+\[^\r\n\]+\[\r\n\]+" {
>         set saw_registers 1
> 	exp_continue
>     }
>     -re "$gdb_prompt $" {
> 	gdb_assert $saw_registers $test
>     }
> }
> 
> The "saw_registers" bit ends up serving as replacement for
> seeing the heading, though you can also add a pattern to 
> match the heading and check it in the gdb_assert instead if
> you'd like.

 FWIW I think we should keep the heading check.

  Maciej


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