diff options
author | Yao Qi <yao@codesourcery.com> | 2012-03-03 03:32:46 +0000 |
---|---|---|
committer | Yao Qi <yao@codesourcery.com> | 2012-03-03 03:32:46 +0000 |
commit | d1feda864e0b17c5757197ba1b421e25dac6afd1 (patch) | |
tree | 6756fdf97eb2d1aeabf2bbf05fa495960c04f061 /gdb/target.h | |
parent | 2fa291aca43cb851ba4e108cb64c7844a257df4f (diff) | |
download | gdb-d1feda864e0b17c5757197ba1b421e25dac6afd1.zip gdb-d1feda864e0b17c5757197ba1b421e25dac6afd1.tar.gz gdb-d1feda864e0b17c5757197ba1b421e25dac6afd1.tar.bz2 |
gdb:
* target.h (struct target_ops) <to_use_agent>: New field.
(struct target_ops) <to_can_use_agent>: New field.
(target_use_agent, target_can_use_agent): New macro.
* target.c (update_current_target): Update.
* remote.c: New enum `PACKET_QAgent'.
(remote_protocol_features): Add a new element.
(remote_use_agent, remote_can_use_agent): New.
(init_remote_ops): Initialize field `can_use_agent' with
remote_can_use_agent. Intiailize field `use_agent' with
remote_use_agent.
* common/agent.c (use_agent): New global.
* common/agent.h: Declare it.
* tracepoint.c (info_static_tracepoint_markers_command): Add
comment.
* Makefile.in (SFILES): Add common/agent.c and agent.c.
(COMMON_OBS): Add common/agent.o and agent.o
(common-agent.o): New rule.
* agent.c: New.
gdb/doc:
* gdb.texinfo (In-Process Agent): New node.
Document new commands.
(General Query Packets): Add packet `QAgent'.
gdb/gdbserver:
* linux-low.c (linux_supports_agent): New.
(linux_target_ops): Initialize field `supports_agent' with
linux_supports_agent.
* target.h (struct target_ops) <supports_agent>: New.
(target_supports_agent): New macro.
* server.c (handle_general_set): Handle packet 'QAgent'.
(handle_query): Send `QAgent+'.
* Makefile.in (server.o): Depends on agent.h.
Diffstat (limited to 'gdb/target.h')
-rw-r--r-- | gdb/target.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gdb/target.h b/gdb/target.h index e5679b1..850cb38 100644 --- a/gdb/target.h +++ b/gdb/target.h @@ -836,6 +836,13 @@ struct target_ops re-fetching when necessary. */ struct traceframe_info *(*to_traceframe_info) (void); + /* Ask the target to use or not to use agent according to USE. Return 1 + successful, 0 otherwise. */ + int (*to_use_agent) (int use); + + /* Is the target able to use agent in current state? */ + int (*to_can_use_agent) (void); + int to_magic; /* Need sub-structure for target machine related rather than comm related? */ @@ -1675,6 +1682,12 @@ extern char *target_fileio_read_stralloc (const char *filename); #define target_traceframe_info() \ (*current_target.to_traceframe_info) () +#define target_use_agent(use) \ + (*current_target.to_use_agent) (use) + +#define target_can_use_agent() \ + (*current_target.to_can_use_agent) () + /* Command logging facility. */ #define target_log_command(p) \ |