2011-07-26 Pedro Alves <pedro@codesourcery.com>

gdb/
	* breakpoint.c (works_in_software_mode_watchpoint): Also return
	true for software watchpoints.

	gdb/testsuite/
	* gdb.base/watchpoint.exp
	(test_disable_enable_software_watchpoint): New procedure.
	(top level): Run it.
This commit is contained in:
Pedro Alves
2011-07-26 19:39:59 +00:00
parent ffdd6afc60
commit efa80663c6
4 changed files with 32 additions and 1 deletions

View File

@@ -8637,7 +8637,8 @@ resources_needed_watchpoint (const struct bp_location *bl)
static int
works_in_software_mode_watchpoint (const struct breakpoint *b)
{
return b->type == bp_hardware_watchpoint;
/* Read and access watchpoints only work with hardware support. */
return b->type == bp_watchpoint || b->type == bp_hardware_watchpoint;
}
static enum print_stop_action