On 12/09/2011 10:33 PM, Pedro Alves wrote: > I think this is overkill. It's just impossible to be absolutely > certain a trace run is currently ongoing. If you do "tstatus;tstart", > the trace can still stop between the two commands. Is there This is a very good example. > anything that we benefit from clearing the inserted flag > on tstatus? I think that if we clear them only, and No, I don't think we benefit from clearing `inserted' flag on tstatus. The intention of patch v2 is trying to make gdb's trace status as closed to remote stub's as possible. Your example above prove that it may make no sense. > always, at "tstart" time, we're good. We already clear all > the inserted flag of all breakpoints and tracepoints on target > open ("target remote ...", etc.), from within > breakpoint.c:breakpoint_init_inferior -- that's why you don't > see this assertion if you disconnect and reconnect, and find > the target was tracing. > > So I think we should just clear the inserted flag of all > tracepoints in start_tracing, right after the target_trace_init > call. Possibly even merge the new loop with the existing loop > that downloads tracepoints. This sounds right, and makes patch quite simpler :) -- Yao (齐尧)