diff options
author | Tom Tromey <tromey@redhat.com> | 2013-08-14 18:07:45 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2013-08-14 18:07:45 +0000 |
commit | 280ceea3097a78df559b4709ed8775d81e159b57 (patch) | |
tree | cfa0233b13eb9eaef550ed1fb4152a72e4e62a04 /gdb | |
parent | b73be47123a5c052f638953a4936579c119bac20 (diff) | |
download | fsf-binutils-gdb-280ceea3097a78df559b4709ed8775d81e159b57.zip fsf-binutils-gdb-280ceea3097a78df559b4709ed8775d81e159b57.tar.gz fsf-binutils-gdb-280ceea3097a78df559b4709ed8775d81e159b57.tar.bz2 |
push last_sent_step into struct remote_state
This moves the global last_sent_step into remote_state.
* remote.c (struct remote_state) <last_sent_step>:
New field.
(last_sent_step): Remove.
(remote_resume, remote_wait_as): Update.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 7 | ||||
-rw-r--r-- | gdb/remote.c | 8 |
2 files changed, 11 insertions, 4 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 423552e..a881236 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,12 @@ 2013-08-14 Tom Tromey <tromey@redhat.com> + * remote.c (struct remote_state) <last_sent_step>: + New field. + (last_sent_step): Remove. + (remote_resume, remote_wait_as): Update. + +2013-08-14 Tom Tromey <tromey@redhat.com> + * remote.c (struct remote_state) <last_sent_signal>: New field. (last_sent_signal): Remove. diff --git a/gdb/remote.c b/gdb/remote.c index e76996e..33fc8ec 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -385,6 +385,8 @@ struct remote_state char *last_program_signals_packet; enum gdb_signal last_sent_signal; + + int last_sent_step; }; /* Private data that we'll store in (struct thread_info)->private. */ @@ -4910,8 +4912,6 @@ remote_vcont_resume (ptid_t ptid, int step, enum gdb_signal siggnal) /* Tell the remote machine to resume. */ -static int last_sent_step; - static void remote_resume (struct target_ops *ops, ptid_t ptid, int step, enum gdb_signal siggnal) @@ -4929,7 +4929,7 @@ remote_resume (struct target_ops *ops, remote_notif_process (¬if_client_stop); rs->last_sent_signal = siggnal; - last_sent_step = step; + rs->last_sent_step = step; /* The vCont packet doesn't need to specify threads via Hc. */ /* No reverse support (yet) for vCont. */ @@ -6031,7 +6031,7 @@ remote_wait_as (ptid_t ptid, struct target_waitstatus *status, int options) rs->last_sent_signal = GDB_SIGNAL_0; target_terminal_inferior (); - strcpy ((char *) buf, last_sent_step ? "s" : "c"); + strcpy ((char *) buf, rs->last_sent_step ? "s" : "c"); putpkt ((char *) buf); /* We just told the target to resume, so a stop reply is in |