diff options
author | Orjan Friberg <orjanf@axis.com> | 2005-05-12 12:14:23 +0000 |
---|---|---|
committer | Orjan Friberg <orjanf@axis.com> | 2005-05-12 12:14:23 +0000 |
commit | e013ee27c925f173a7e402fce26a2c75f78f9f40 (patch) | |
tree | b4791156d9d0694fda9746c7c550ba420ebcc427 /gdb/gdbserver/target.h | |
parent | 119b882a3d5bbb167438b2020cbadd17ba4a9202 (diff) | |
download | gdb-e013ee27c925f173a7e402fce26a2c75f78f9f40.zip gdb-e013ee27c925f173a7e402fce26a2c75f78f9f40.tar.gz gdb-e013ee27c925f173a7e402fce26a2c75f78f9f40.tar.bz2 |
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.
Diffstat (limited to 'gdb/gdbserver/target.h')
-rw-r--r-- | gdb/gdbserver/target.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/gdb/gdbserver/target.h b/gdb/gdbserver/target.h index f1e0d6e..38708fd 100644 --- a/gdb/gdbserver/target.h +++ b/gdb/gdbserver/target.h @@ -133,6 +133,27 @@ struct target_ops Read LEN bytes at OFFSET into a buffer at MYADDR. */ int (*read_auxv) (CORE_ADDR offset, char *myaddr, unsigned int len); + + /* Insert and remove a hardware watchpoint. + Returns 0 on success, -1 on failure and 1 on unsupported. + The type is coded as follows: + 2 = write watchpoint + 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); + + /* Returns 1 if target was stopped due to a watchpoint hit, 0 otherwise. */ + + int (*stopped_by_watchpoint) (void); + + /* Returns the address associated with the watchpoint that hit, if any; + returns 0 otherwise. */ + + CORE_ADDR (*stopped_data_address) (void); + }; extern struct target_ops *the_target; |