2005-05-12 Orjan Friberg <orjanf@axis.com>
* target.h (struct target_ops): Add insert_watchpoint, remove_watchpoint, stopped_by_watchpoint, stopped_data_address function pointers for hardware watchpoint support. * linux-low.h (struct linux_target_ops): Ditto. * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint) (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add to linux_target_ops. * remote-utils.c (prepare_resume_reply): Add watchpoint information to reply packet. * server.c (main): Recognize 'Z' and 'z' packets.
This commit is contained in:
parent
119b882a3d
commit
e013ee27c9
6 changed files with 168 additions and 1 deletions
|
@ -1467,7 +1467,47 @@ linux_read_auxv (CORE_ADDR offset, 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. */
|
||||
|
||||
static int
|
||||
linux_insert_watchpoint (char type, CORE_ADDR addr, int len)
|
||||
{
|
||||
if (the_low_target.insert_watchpoint != NULL)
|
||||
return the_low_target.insert_watchpoint (type, addr, len);
|
||||
else
|
||||
/* Unsupported (see target.h). */
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int
|
||||
linux_remove_watchpoint (char type, CORE_ADDR addr, int len)
|
||||
{
|
||||
if (the_low_target.remove_watchpoint != NULL)
|
||||
return the_low_target.remove_watchpoint (type, addr, len);
|
||||
else
|
||||
/* Unsupported (see target.h). */
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int
|
||||
linux_stopped_by_watchpoint (void)
|
||||
{
|
||||
if (the_low_target.stopped_by_watchpoint != NULL)
|
||||
return the_low_target.stopped_by_watchpoint ();
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
static CORE_ADDR
|
||||
linux_stopped_data_address (void)
|
||||
{
|
||||
if (the_low_target.stopped_data_address != NULL)
|
||||
return the_low_target.stopped_data_address ();
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct target_ops linux_target_ops = {
|
||||
linux_create_inferior,
|
||||
linux_attach,
|
||||
|
@ -1483,6 +1523,10 @@ static struct target_ops linux_target_ops = {
|
|||
linux_look_up_symbols,
|
||||
linux_send_signal,
|
||||
linux_read_auxv,
|
||||
linux_insert_watchpoint,
|
||||
linux_remove_watchpoint,
|
||||
linux_stopped_by_watchpoint,
|
||||
linux_stopped_data_address,
|
||||
};
|
||||
|
||||
static void
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue