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] Use software watchpoints if hardware watchpoints are not available when testing gdb.base/watch-bitfields.exp.


Luis Machado <lgustavo@codesourcery.com> writes:

Hi Luis,

> +# Disable hardware watchpoints if the target does not support it.
> +if [target_info exists gdb,no_hardware_watchpoints] {
> +    gdb_test_no_output "set can-use-hw-watchpoints 0"
> +}
> +
>  test_watch_location
>  test_regular_watch

The fix looks right to me, but why don't we invoke test_watch_location
and test_regular_watch twice? if [target_info exists gdb,no_hardware_watchpoints]
is false, set can-use-hw-watchpoints 1, and run them.  Then,
"set can-use-hw-watchpoints 0" and run them again.  Similar to what we
are doing in gdb.base/watch-vfork.exp.  In this way, we can exercise
software watchpoint on targets have hardware watchpoints too.

-- 
Yao (éå)


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