summaryrefslogtreecommitdiff
path: root/gdb/target.c
diff options
context:
space:
mode:
authorqiyao <qiyao>2012-03-03 03:32:44 +0000
committerqiyao <qiyao>2012-03-03 03:32:44 +0000
commitffbc94801174ce3aef0e5815ea2b2ea9274d2377 (patch)
tree3931d381343a7e1e133f4843e889cc9e0d7a5683 /gdb/target.c
parent301206930e821439956367a4e898b31d6627b5eb (diff)
downloadgdb-ffbc94801174ce3aef0e5815ea2b2ea9274d2377.tar.gz
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.c')
-rw-r--r--gdb/target.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gdb/target.c b/gdb/target.c
index d29d37a1f0d..87ecf79fe5c 100644
--- a/gdb/target.c
+++ b/gdb/target.c
@@ -698,6 +698,8 @@ update_current_target (void)
INHERIT (to_static_tracepoint_marker_at, t);
INHERIT (to_static_tracepoint_markers_by_strid, t);
INHERIT (to_traceframe_info, t);
+ INHERIT (to_use_agent, t);
+ INHERIT (to_can_use_agent, t);
INHERIT (to_magic, t);
INHERIT (to_supports_evaluation_of_breakpoint_conditions, t);
/* Do not inherit to_memory_map. */
@@ -929,6 +931,12 @@ update_current_target (void)
de_fault (to_supports_evaluation_of_breakpoint_conditions,
(int (*) (void))
return_zero);
+ de_fault (to_use_agent,
+ (int (*) (int))
+ tcomplain);
+ de_fault (to_can_use_agent,
+ (int (*) (void))
+ return_zero);
de_fault (to_execution_direction, default_execution_direction);
#undef de_fault