diff options
author | Sergio Durigan Junior <sergiodj@redhat.com> | 2013-06-04 15:12:52 +0000 |
---|---|---|
committer | Sergio Durigan Junior <sergiodj@redhat.com> | 2013-06-04 15:12:52 +0000 |
commit | 5e1b953b8c0c8bad6c73e144776d859273e31a77 (patch) | |
tree | 8b73be55a493090e146a651a50d3bf3daaae089c /gdb/remote.c | |
parent | afacd7f34ae5f4d74b0220089c2798d332422f6a (diff) | |
download | gdb-5e1b953b8c0c8bad6c73e144776d859273e31a77.zip gdb-5e1b953b8c0c8bad6c73e144776d859273e31a77.tar.gz gdb-5e1b953b8c0c8bad6c73e144776d859273e31a77.tar.bz2 |
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 7d98bc1..24d10f2 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; |