aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2013-08-14 18:06:49 +0000
committerTom Tromey <tromey@redhat.com>2013-08-14 18:06:49 +0000
commitb73be47123a5c052f638953a4936579c119bac20 (patch)
treeacd0d0e04b460b1139507833419050567ac61160 /gdb
parent5e4a05c43186b73c3b4b79cc117ce65f140dbc11 (diff)
downloadfsf-binutils-gdb-b73be47123a5c052f638953a4936579c119bac20.zip
fsf-binutils-gdb-b73be47123a5c052f638953a4936579c119bac20.tar.gz
fsf-binutils-gdb-b73be47123a5c052f638953a4936579c119bac20.tar.bz2
push last_sent_signal into struct remote_state
This moves the global last_sent_signal into remote_state. * remote.c (struct remote_state) <last_sent_signal>: New field. (last_sent_signal): Remove. (new_remote_state, remote_resume, remote_wait_as): Update.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog7
-rw-r--r--gdb/remote.c13
2 files changed, 14 insertions, 6 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 5252078..423552e 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_signal>:
+ New field.
+ (last_sent_signal): Remove.
+ (new_remote_state, remote_resume, remote_wait_as): Update.
+
+2013-08-14 Tom Tromey <tromey@redhat.com>
+
* remote.c (struct remote_state) <last_program_signals_packet>:
New field.
(last_program_signals_packet): Remove.
diff --git a/gdb/remote.c b/gdb/remote.c
index ad32e76..e76996e 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -383,6 +383,8 @@ struct remote_state
packet is exactly the same as the last we sent. IOW, we only let
the target know about program signals list changes. */
char *last_program_signals_packet;
+
+ enum gdb_signal last_sent_signal;
};
/* Private data that we'll store in (struct thread_info)->private. */
@@ -431,6 +433,7 @@ new_remote_state (void)
result->buf_size = 400;
result->buf = xmalloc (result->buf_size);
result->remote_traceframe_number = -1;
+ result->last_sent_signal = GDB_SIGNAL_0;
return result;
}
@@ -4907,8 +4910,6 @@ remote_vcont_resume (ptid_t ptid, int step, enum gdb_signal siggnal)
/* Tell the remote machine to resume. */
-static enum gdb_signal last_sent_signal = GDB_SIGNAL_0;
-
static int last_sent_step;
static void
@@ -4927,7 +4928,7 @@ remote_resume (struct target_ops *ops,
if (!non_stop)
remote_notif_process (&notif_client_stop);
- last_sent_signal = siggnal;
+ rs->last_sent_signal = siggnal;
last_sent_step = step;
/* The vCont packet doesn't need to specify threads via Hc. */
@@ -6019,15 +6020,15 @@ remote_wait_as (ptid_t ptid, struct target_waitstatus *status, int options)
break;
case '\0':
- if (last_sent_signal != GDB_SIGNAL_0)
+ if (rs->last_sent_signal != GDB_SIGNAL_0)
{
/* Zero length reply means that we tried 'S' or 'C' and the
remote system doesn't support it. */
target_terminal_ours_for_output ();
printf_filtered
("Can't send signals to this remote system. %s not sent.\n",
- gdb_signal_to_name (last_sent_signal));
- last_sent_signal = GDB_SIGNAL_0;
+ gdb_signal_to_name (rs->last_sent_signal));
+ rs->last_sent_signal = GDB_SIGNAL_0;
target_terminal_inferior ();
strcpy ((char *) buf, last_sent_step ? "s" : "c");