This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Use software watchpoints if hardware watchpoints are not available when testing gdb.base/watch-bitfields.exp.
- From: Yao Qi <qiyaoltc at gmail dot com>
- To: Luis Machado <lgustavo at codesourcery dot com>
- Cc: <gdb-patches at sourceware dot org>
- Date: Tue, 14 Apr 2015 09:50:15 +0100
- Subject: Re: [PATCH] Use software watchpoints if hardware watchpoints are not available when testing gdb.base/watch-bitfields.exp.
- Authentication-results: sourceware.org; auth=none
- References: <1428950158-15872-1-git-send-email-lgustavo at codesourcery dot com>
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 (éå)