This next patch realizes a long-anticipated advantage of tracepoints, namely that it should be possible to disconnect GDB from the target but leave the trace experiment running, then reconnect later to see if anything interesting turned up. While conceptually simple, there are a couple wrinkles; we need to tell the target what to do if GDB goes away without warning, and we also have to decide what should happen when we reconnect and find that the target's list of tracepoints is different from GDB's list. The first is easily handled with a new boolean setshow, disconnected-tracing. The second is much more complicated, and basically requires uploading tracepoints from the target, and keeping track of tracepoint numbers that differ between host and target. I need to beg a little indulgence for this right now, because the code in this patch is very lame, and a later patch does it right; but that version depends heavily on the upcoming target vector changes. (In fact, the big target vector change will be my very next patch!) Stan 2010-01-05 Stan Shebs Support disconnected tracing. * infcmd.c (detach_command): Ask whether to stop tracing. * cli/cli-cmds.c (quit_command): Ditto. * breakpoint.h (struct breakpoint): New field number_on_target. * breakpoint.c (create_tracepoint_from_upload): New function. (get_tracepoint_by_number_on_target): New function. * remote.c (struct remote): New field disconnected_tracing. (remote_disconnected_tracing_feature): New function. (remote_protocol_features): Add DisconnectedTracing. (struct uploaded_tp): New struct. (uploaded_tps): New global. (get_uploaded_tp): New function. (find_matching_tracepoint): New function. (remote_get_tracing_state): New function. (remote_start_remote): Call it. * tracepoint.c (disconnected_tracing): New global. (trace_start_command): Initialize number_on_target. (stop_tracing): New function, split out from... (trace_stop_command): Call stop_tracing. (get_trace_status): New function, split out from... (trace_status_command): Call get_trace_status, add info on disconnection behavior. (disconnect_or_stop_tracing): New function. (finish_tfind_command): Translate from number on target. (trace_find_tracepoint_command): Translate to number on target. (send_disconnected_tracing_value): New function. (set_disconnected_tracing): New function. (_initialize_tracepoint): Add disconnected-tracing variable. * NEWS: Mention disconnected tracing. * gdb.texinfo (Starting and Stopping Trace Experiments): Document disconnected tracing. (Tracepoint Packets): Document new protocol.