]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
push last_sent_step into struct remote_state
authorTom Tromey <tromey@redhat.com>
Wed, 14 Aug 2013 18:07:45 +0000 (18:07 +0000)
committerTom Tromey <tromey@redhat.com>
Wed, 14 Aug 2013 18:07:45 +0000 (18:07 +0000)
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.

gdb/ChangeLog
gdb/remote.c

index 423552eea49a4484a72e390dc8397f325bd116d7..a88123617df0916f52040a09598af57382ba5053 100644 (file)
@@ -1,3 +1,10 @@
+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>:
index e76996e1940dff2af2ae38d53ccd67b3ed5af330..33fc8eca18cbdca5a735faa6a7c663150538a692 100644 (file)
@@ -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 (&notif_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