This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] watchpoint-reuse-slot.exp: Correctly skip unsupported commands.
- From: Pedro Alves <palves at redhat dot com>
- To: Andreas Arnez <arnez at linux dot vnet dot ibm dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Thu, 26 Jun 2014 15:15:02 +0100
- Subject: Re: [PATCH] watchpoint-reuse-slot.exp: Correctly skip unsupported commands.
- Authentication-results: sourceware.org; auth=none
- References: <87pphvhj6i dot fsf at br87z6lw dot de dot ibm dot com>
On 06/26/2014 02:52 PM, Andreas Arnez wrote:
> The test case "watchpoint-reuse-slot.exp" yields a lot of failures on
> s390/s390x: all instances of awatch, rwatch, and hbreak are performed
> even though they aren't supported on these targets. This is because
> the test case ignores non-support error messages when probing for
> support of these commands, like:
>
> (gdb) rwatch buf.byte[0]
> Target does not support this type of hardware watchpoint.
>
> The patch adds handling for this case in the appropriate
> gdb_test_multiple invocations.
Thank you.
Looks like I only hacked out target_insert_watchpoint/hw_breakpoint
in my testing to return unsupported, which is what leads to the
"You may have requested too many" regexs in place:
(top-gdb) awatch args.argc
Hardware access (read/write) watchpoint 4: args.argc
Warning:
Could not insert hardware watchpoint 4.
Could not insert hardware breakpoints:
You may have requested too many hardware breakpoints/watchpoints.
We get that that error too when debugging against gdbserver with
Z packets disabled, which I also tested.
We get that alternative error if the target_can_use_hw_breakpoint
method returns false, which I forgot to hack/test.
>
> gdb/testsuite/
> * gdb.base/watchpoint-reuse-slot.exp: Handle the case that the
> target lacks support for watch, awatch, rwatch, or hbreak.
s/watch, // , I think, as "watch" falls back to software
watchpoints.
Patch is OK.
Thanks!
--
Pedro Alves