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 1/2] watchpoint-reuse-slot.exp: skip some tests on targets have different wp and bp registers


On 03/13/2015 02:41 PM, Yao Qi wrote:
> From: Yao Qi <yao.qi@linaro.org>
> 
> watchpoint-reuse-slot.exp sets two hardware breakpoint and/or watchpoint,
> to test the same debugging register can be used correctly.  However,
> on some targets, such as arm and aarch64, hardware has different
> registers for breakpoint and watchpoint, so don't have to do test
> if one breakpoint and one watchpoint are requested and target hardware
> has different debugging registers for breakpoint and watchpoint.

Hmm, is this just to save test time?  If so, I'd prefer not skipping,
as it may always catch other bugs, in the target backends or
the kernel.

Despite the test's file name, the test doesn't actually create two
breakpoints/watchpoints at the same time, as mentioned at the top
of the file.

In any case:

> +# Return true if the same debugging register can be used for both

s/can be/is/

> +# watchpoint and breakpoint.
> +
> +proc dbg_registers_for_watch_and_break {} {

I think "same" should be in the proc name:

 same_dbg_registers_for_watch_and_break

> +    if { [istarget "arm*-linux*"] || [istarget "aarch64*-*-linux*"] } {
> +	# arm and aarch64 has different registers for watchpoint and

s/has/have/

Thanks,
Pedro Alves


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