* server.c (process_serial_event): Re-return unsupported, not

error, if the type isn't recognized.  Re-allow supporting only
	insert or remove packets.  Also call require_running for
	breakpoints.  Add missing break statement to default case.  Tidy.
	* target.h (struct target_ops): Rename insert_watchpoint to
	insert_point, and remove_watchpoint to remove_point.

	* linux-low.h (struct linux_target_ops): Likewise.
	* linux-low.c (linux_insert_watchpoint): Rename to ...
	(linux_insert_point): ... this.  Adjust.
	(linux_remove_watchpoint): Rename to ...
	(linux_remove_point): ... this.  Adjust.
	(linux_target_ops): Adjust.
	* linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
	(cris_insert_point): ... this.
	(cris_remove_watchpoint): Rename to ...
	(cris_remove_point): ... this.
	(the_low_target): Adjust.
This commit is contained in:
Pedro Alves
2009-06-25 22:13:53 +00:00
parent f3a5f1de54
commit d993e290c9
6 changed files with 62 additions and 51 deletions

View File

@@ -213,7 +213,7 @@ struct target_ops
int (*read_auxv) (CORE_ADDR offset, unsigned char *myaddr,
unsigned int len);
/* Insert and remove a hardware watchpoint.
/* Insert and remove a break or watchpoint.
Returns 0 on success, -1 on failure and 1 on unsupported.
The type is coded as follows:
'0' - software-breakpoint
@@ -222,8 +222,8 @@ struct target_ops
'3' - read watchpoint
'4' - access watchpoint */
int (*insert_watchpoint) (char type, CORE_ADDR addr, int len);
int (*remove_watchpoint) (char type, CORE_ADDR addr, int len);
int (*insert_point) (char type, CORE_ADDR addr, int len);
int (*remove_point) (char type, CORE_ADDR addr, int len);
/* Returns 1 if target was stopped due to a watchpoint hit, 0 otherwise. */