aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog8
-rw-r--r--gdb/remote.c18
2 files changed, 18 insertions, 8 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 70caa65..50d1495 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,13 @@
2013-08-14 Tom Tromey <tromey@redhat.com>
+ * remote.c (struct remote_state) <remote_traceframe_number>:
+ New field.
+ (remote_traceframe_number): Remove.
+ (new_remote_state, remote_open_1, set_remote_traceframe)
+ (remote_trace_find): Update.
+
+2013-08-14 Tom Tromey <tromey@redhat.com>
+
* remote.c (struct remote_state) <general_thread, continue_thread>:
New fields.
(general_thread, continue_thread): Remove.
diff --git a/gdb/remote.c b/gdb/remote.c
index 1672b77..de74d81 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -371,6 +371,10 @@ struct remote_state
TID member will be -1 for all or -2 for not sent yet. */
ptid_t general_thread;
ptid_t continue_thread;
+
+ /* This is the traceframe which we last selected on the remote system.
+ It will be -1 if no traceframe is selected. */
+ int remote_traceframe_number;
};
/* Private data that we'll store in (struct thread_info)->private. */
@@ -418,6 +422,7 @@ new_remote_state (void)
whenever a larger buffer is needed. */
result->buf_size = 400;
result->buf = xmalloc (result->buf_size);
+ result->remote_traceframe_number = -1;
return result;
}
@@ -1439,10 +1444,6 @@ static ptid_t magic_null_ptid;
static ptid_t not_sent_ptid;
static ptid_t any_thread_ptid;
-/* This is the traceframe which we last selected on the remote system.
- It will be -1 if no traceframe is selected. */
-static int remote_traceframe_number = -1;
-
/* Find out if the stub attached to PID (and hence GDB should offer to
detach instead of killing it when bailing out). */
@@ -4343,7 +4344,7 @@ remote_open_1 (char *name, int from_tty,
rs->general_thread = not_sent_ptid;
rs->continue_thread = not_sent_ptid;
- remote_traceframe_number = -1;
+ rs->remote_traceframe_number = -1;
/* Probe for ability to use "ThreadInfo" query, as required. */
use_threadinfo_query = 1;
@@ -6293,12 +6294,13 @@ static void
set_remote_traceframe (void)
{
int newnum;
+ struct remote_state *rs = get_remote_state ();
- if (remote_traceframe_number == get_traceframe_number ())
+ if (rs->remote_traceframe_number == get_traceframe_number ())
return;
/* Avoid recursion, remote_trace_find calls us again. */
- remote_traceframe_number = get_traceframe_number ();
+ rs->remote_traceframe_number = get_traceframe_number ();
newnum = target_trace_find (tfind_number,
get_traceframe_number (), 0, 0, NULL);
@@ -11005,7 +11007,7 @@ remote_trace_find (enum trace_find_type type, int num,
if (tpp)
*tpp = target_tracept;
- remote_traceframe_number = target_frameno;
+ rs->remote_traceframe_number = target_frameno;
return target_frameno;
}