Pedro Alves wrote: > On Monday 05 April 2010 02:07:56, Stan Shebs wrote: > >> I'm thinking that this is in some ways like the circular trace buffer >> flag, and could be reasonably made accessible via the trace_status >> structure. Unless you're just dying to do this yourself :-) , I'll take >> care of the two together. >> > > Please, be my guest. :-) > Here's my suggested changes, and of course it implies some target-side changes as well. Turns out that I generated some confusion for myself by auto-generating tstop commands, which I realized when I was unable to write a code comment that justified it. :-) So the new behavior is that GDB always simply drops the connection. If the target can do disconnected tracing, it just keeps going. If it can't, or the query answer instructs it to not keep tracing, it stops, and records the stop reason as "tdisconnection"; you'll then see that when you reconnect to the target and do a tstatus. Since tstatus reports the target's state consistently now, you'll also see that in a trace file. Ditto for circularity of trace buffer. If this behavior seems reasonable, I'll add appropriate bits to the manual and repost/commit. As for multi-process, I can see reasons to make these kinds of flags either per-process or global to the target, so didn't try to guess at the final decision here. :-) 2010-04-06 Stan Shebs Pedro Alves * tracepoint.h (struct trace_status): New fields disconnected_tracing and circular_buffer. * tracepoint.c (trace_status_command): Display target's status for disconnected tracing and circular buffer. (disconnect_or_stop_tracing): Add query for non-disconnected-tracing case, remove the stop_tracing call. (tfile_open): Clear disconnected and circular buffer status. (trace_save): Save disconnected and circular buffer status. (parse_trace_status): Parse disconnected and circular buffer status, also recognize disconnected as a stop reason. * remote.c (remote_set_disconnected_tracing): Only set QTDisconnected if the remote end supports disconnected tracing. Warn otherwise, if trying to enable disconnected tracing.