gdb/
* tracepoint.c (start_tracing): Move code to ... (trace_reset_local_state): ... here. New. (disconnect_tracing): Don't call set_current_traceframe, set_tracepoint_num, and set_traceframe_context. Call trace_reset_local_state instead. (tfile_close): Call trace_reset_local_state. * ctf.c (ctf_close): Likewise. * remote.c (remote_close): Likewise. * tracepoint.h (trace_reset_local_state): Declare.
This commit is contained in:
parent
21d6c799a7
commit
aef525cb15
5 changed files with 31 additions and 7 deletions
|
@ -1,3 +1,15 @@
|
||||||
|
2013-06-07 Yao Qi <yao@codesourcery.com>
|
||||||
|
|
||||||
|
* tracepoint.c (start_tracing): Move code to ...
|
||||||
|
(trace_reset_local_state): ... here. New.
|
||||||
|
(disconnect_tracing): Don't call set_current_traceframe,
|
||||||
|
set_tracepoint_num, and set_traceframe_context. Call
|
||||||
|
trace_reset_local_state instead.
|
||||||
|
(tfile_close): Call trace_reset_local_state.
|
||||||
|
* ctf.c (ctf_close): Likewise.
|
||||||
|
* remote.c (remote_close): Likewise.
|
||||||
|
* tracepoint.h (trace_reset_local_state): Declare.
|
||||||
|
|
||||||
2013-06-06 Doug Evans <dje@google.com>
|
2013-06-06 Doug Evans <dje@google.com>
|
||||||
|
|
||||||
* dwarf2read.c: Whitespace fixes for DWP file format documentation,
|
* dwarf2read.c: Whitespace fixes for DWP file format documentation,
|
||||||
|
|
|
@ -1212,6 +1212,8 @@ ctf_close (void)
|
||||||
ctf_destroy ();
|
ctf_destroy ();
|
||||||
xfree (trace_dirname);
|
xfree (trace_dirname);
|
||||||
trace_dirname = NULL;
|
trace_dirname = NULL;
|
||||||
|
|
||||||
|
trace_reset_local_state ();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* This is the implementation of target_ops method to_files_info.
|
/* This is the implementation of target_ops method to_files_info.
|
||||||
|
|
|
@ -3054,6 +3054,8 @@ remote_close (void)
|
||||||
delete_async_event_handler (&remote_async_inferior_event_token);
|
delete_async_event_handler (&remote_async_inferior_event_token);
|
||||||
|
|
||||||
remote_notif_unregister_async_event_handler ();
|
remote_notif_unregister_async_event_handler ();
|
||||||
|
|
||||||
|
trace_reset_local_state ();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Query the remote side for the text, data and bss offsets. */
|
/* Query the remote side for the text, data and bss offsets. */
|
||||||
|
|
|
@ -1700,6 +1700,16 @@ process_tracepoint_on_disconnect (void)
|
||||||
" GDB is disconnected\n"));
|
" GDB is disconnected\n"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Reset local state of tracing. */
|
||||||
|
|
||||||
|
void
|
||||||
|
trace_reset_local_state (void)
|
||||||
|
{
|
||||||
|
set_traceframe_num (-1);
|
||||||
|
set_tracepoint_num (-1);
|
||||||
|
set_traceframe_context (NULL);
|
||||||
|
clear_traceframe_info ();
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
start_tracing (char *notes)
|
start_tracing (char *notes)
|
||||||
|
@ -1822,11 +1832,8 @@ start_tracing (char *notes)
|
||||||
target_trace_start ();
|
target_trace_start ();
|
||||||
|
|
||||||
/* Reset our local state. */
|
/* Reset our local state. */
|
||||||
set_traceframe_num (-1);
|
trace_reset_local_state ();
|
||||||
set_tracepoint_num (-1);
|
|
||||||
set_traceframe_context (NULL);
|
|
||||||
current_trace_status()->running = 1;
|
current_trace_status()->running = 1;
|
||||||
clear_traceframe_info ();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* The tstart command requests the target to start a new trace run.
|
/* The tstart command requests the target to start a new trace run.
|
||||||
|
@ -2234,9 +2241,7 @@ disconnect_tracing (void)
|
||||||
confusing upon reconnection. Just use these calls instead of
|
confusing upon reconnection. Just use these calls instead of
|
||||||
full tfind_1 behavior because we're in the middle of detaching,
|
full tfind_1 behavior because we're in the middle of detaching,
|
||||||
and there's no point to updating current stack frame etc. */
|
and there's no point to updating current stack frame etc. */
|
||||||
set_current_traceframe (-1);
|
trace_reset_local_state ();
|
||||||
set_tracepoint_num (-1);
|
|
||||||
set_traceframe_context (NULL);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Worker function for the various flavors of the tfind command. */
|
/* Worker function for the various flavors of the tfind command. */
|
||||||
|
@ -4657,6 +4662,8 @@ tfile_close (void)
|
||||||
trace_fd = -1;
|
trace_fd = -1;
|
||||||
xfree (trace_filename);
|
xfree (trace_filename);
|
||||||
trace_filename = NULL;
|
trace_filename = NULL;
|
||||||
|
|
||||||
|
trace_reset_local_state ();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
@ -389,6 +389,7 @@ extern void merge_uploaded_trace_state_variables (struct uploaded_tsv **utsvp);
|
||||||
|
|
||||||
extern void query_if_trace_running (int from_tty);
|
extern void query_if_trace_running (int from_tty);
|
||||||
extern void disconnect_tracing (void);
|
extern void disconnect_tracing (void);
|
||||||
|
extern void trace_reset_local_state (void);
|
||||||
|
|
||||||
extern void start_tracing (char *notes);
|
extern void start_tracing (char *notes);
|
||||||
extern void stop_tracing (char *notes);
|
extern void stop_tracing (char *notes);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue