* 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

@ -2671,24 +2671,25 @@ linux_read_auxv (CORE_ADDR offset, unsigned char *myaddr, unsigned int len)
return n;
}
/* These watchpoint related wrapper functions simply pass on the function call
if the target has registered a corresponding function. */
/* These breakpoint and watchpoint related wrapper functions simply
pass on the function call if the target has registered a
corresponding function. */
static int
linux_insert_watchpoint (char type, CORE_ADDR addr, int len)
linux_insert_point (char type, CORE_ADDR addr, int len)
{
if (the_low_target.insert_watchpoint != NULL)
return the_low_target.insert_watchpoint (type, addr, len);
if (the_low_target.insert_point != NULL)
return the_low_target.insert_point (type, addr, len);
else
/* Unsupported (see target.h). */
return 1;
}
static int
linux_remove_watchpoint (char type, CORE_ADDR addr, int len)
linux_remove_point (char type, CORE_ADDR addr, int len)
{
if (the_low_target.remove_watchpoint != NULL)
return the_low_target.remove_watchpoint (type, addr, len);
if (the_low_target.remove_point != NULL)
return the_low_target.remove_point (type, addr, len);
else
/* Unsupported (see target.h). */
return 1;
@ -3030,8 +3031,8 @@ static struct target_ops linux_target_ops = {
linux_look_up_symbols,
linux_request_interrupt,
linux_read_auxv,
linux_insert_watchpoint,
linux_remove_watchpoint,
linux_insert_point,
linux_remove_point,
linux_stopped_by_watchpoint,
linux_stopped_data_address,
#if defined(__UCLIBC__) && defined(HAS_NOMMU)