diff options
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/remote.c | 7 |
2 files changed, 7 insertions, 5 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 657e707..a7c8b77 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,10 @@ 2021-01-18 Simon Marchi <simon.marchi@polymtl.ca> + * remote.c (remote_target::start_remote): Move wait_status to + narrower scope. + +2021-01-18 Simon Marchi <simon.marchi@polymtl.ca> + * remote.c (class remote_target): <add_current_inferior_and_thread>: Constify parameter. (stop_reply_extract_thread): Likewise. diff --git a/gdb/remote.c b/gdb/remote.c index 49181d3..17b0cab 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -4636,7 +4636,6 @@ remote_target::start_remote (int from_tty, int extended_p) { struct remote_state *rs = get_remote_state (); struct packet_config *noack_config; - char *wait_status = NULL; /* Signal other parts that we're going through the initial setup, and so things may not be stable yet. E.g., we don't try to @@ -4776,6 +4775,8 @@ remote_target::start_remote (int from_tty, int extended_p) if (!target_is_non_stop_p ()) { + char *wait_status = NULL; + if (rs->buf[0] == 'W' || rs->buf[0] == 'X') { if (!extended_p) @@ -4903,10 +4904,6 @@ remote_target::start_remote (int from_tty, int extended_p) return; } - /* In non-stop mode, any cached wait status will be stored in - the stop reply queue. */ - gdb_assert (wait_status == NULL); - /* Report all signals during attach/startup. */ pass_signals ({}); |