aboutsummaryrefslogtreecommitdiff
path: root/gdb/tracepoint.c
diff options
context:
space:
mode:
authorYao Qi <yao@codesourcery.com>2012-03-03 09:51:29 +0000
committerYao Qi <yao@codesourcery.com>2012-03-03 09:51:29 +0000
commit5808517f9a2a8588228bd760c9e6a3a231f4f292 (patch)
treeec158109b2b63424bdc368877dd4e0fd74e2847a /gdb/tracepoint.c
parentdfe2ac14962dac8aaf1484dac1419c0bc88de3a7 (diff)
downloadgdb-5808517f9a2a8588228bd760c9e6a3a231f4f292.zip
gdb-5808517f9a2a8588228bd760c9e6a3a231f4f292.tar.gz
gdb-5808517f9a2a8588228bd760c9e6a3a231f4f292.tar.bz2
gdb:
* common/agent.c (agent_look_up_symbols): Add one parameter 'arg'. * common/agent.h: Update declaration. * inf-child.c (inf_child_use_agent): New. (inf_child_can_use_agent): New. (inf_child_target): Initialize fields `to_use_agent' and `to_can_use_agent'. * agent.c (agent_new_objfile): New. (_initialize_agent): Add agent_new_objfile to new_objfile observer. * linux-nat.c (linux_child_static_tracepoint_markers_by_strid): New. (linux_target_install_ops): Initialize field `to_static_tracepoint_markers_by_strid'. * remote.c (free_current_marker): Move it to ... * tracepoint.c (free_current_marker): ... here. New. (cleanup_target_stop): New. * tracepoint.h: Declare free_current_marker. * NEWS: Add one entry about `info static-tracepoint-marker'. gdb/gdbserver: * tracepoint.c (tracepoint_look_up_symbols): Update call to agent_look_up_symbols. gdb/testsuite: * gdb.trace/strace.exp: run strace_info_marker in linux native gdb.
Diffstat (limited to 'gdb/tracepoint.c')
-rw-r--r--gdb/tracepoint.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c
index a519ed3..89f75b6 100644
--- a/gdb/tracepoint.c
+++ b/gdb/tracepoint.c
@@ -4701,6 +4701,20 @@ init_tfile_ops (void)
tfile_ops.to_magic = OPS_MAGIC;
}
+void
+free_current_marker (void *arg)
+{
+ struct static_tracepoint_marker **marker_p = arg;
+
+ if (*marker_p != NULL)
+ {
+ release_static_tracepoint_marker (*marker_p);
+ xfree (*marker_p);
+ }
+ else
+ *marker_p = NULL;
+}
+
/* Given a line of text defining a static tracepoint marker, parse it
into a "static tracepoint marker" object. Throws an error is
parsing fails. If PP is non-null, it points to one past the end of