diff options
author | sergiodj <sergiodj> | 2013-06-04 15:12:52 +0000 |
---|---|---|
committer | sergiodj <sergiodj> | 2013-06-04 15:12:52 +0000 |
commit | 41a566af394703a0b789ecb07e11e37e7cb66e6b (patch) | |
tree | 74ec7876df9b85e92904192da7f2e23478bdbb4d /gdb/remote.c | |
parent | 9af2e33ee9c2b585453e72ff7e30eda8c5a7283c (diff) | |
download | gdb-41a566af394703a0b789ecb07e11e37e7cb66e6b.tar.gz |
GDB was not restoring the signal handler before returning when a notification
was received. This patch fixes it.
2013-06-04 Sergio Durigan Junior <sergiodj@redhat.com>
Pedro Alves <palves@redhat.com>
* remote.c (remote_wait_as): Restore signal handler before returning
when GDB gets a notification.
Diffstat (limited to 'gdb/remote.c')
-rw-r--r-- | gdb/remote.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/remote.c b/gdb/remote.c index 7d98bc1432e..24d10f26cc0 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -5951,13 +5951,13 @@ remote_wait_as (ptid_t ptid, struct target_waitstatus *status, int options) ret = getpkt_or_notif_sane (&rs->buf, &rs->buf_size, wait_forever_enabled_p, &is_notif); + if (!target_is_async_p ()) + signal (SIGINT, ofunc); + /* GDB gets a notification. Return to core as this event is not interesting. */ if (ret != -1 && is_notif) return minus_one_ptid; - - if (!target_is_async_p ()) - signal (SIGINT, ofunc); } buf = rs->buf; |