2011-12-08 Hui Zhu Yao Qi * tracepoint.c (trace_start_command): Call sto_tracing. (stop_tracing): Clear `inserted' flag in each location. --- gdb/tracepoint.c | 15 +++++++++++++++ 1 files changed, 15 insertions(+), 0 deletions(-) diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c index e00538c..ac6d112 100644 --- a/gdb/tracepoint.c +++ b/gdb/tracepoint.c @@ -1824,6 +1824,8 @@ trace_start_command (char *args, int from_tty) if (from_tty && !query (_("A trace is running already. Start a new run? "))) error (_("New trace run not started.")); + + stop_tracing (NULL); } start_tracing (args); @@ -1847,6 +1849,9 @@ void stop_tracing (char *note) { int ret; + VEC(breakpoint_p) *tp_vec = NULL; + int ix; + struct breakpoint *b; target_trace_stop (); @@ -1859,6 +1864,16 @@ stop_tracing (char *note) /* Should change in response to reply? */ current_trace_status ()->running = 0; + + tp_vec = all_tracepoints (); + for (ix = 0; VEC_iterate (breakpoint_p, tp_vec, ix, b); ix++) + { + struct bp_location *loc; + + for (loc = b->loc; loc; loc = loc->next) + loc->inserted = 0; + } + VEC_free (breakpoint_p, tp_vec); } /* tstatus command */ -- 1.7.0.4