This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 5/6] gdb: mark remote_async_get_pending_events_token in non-stop mode


Hi,
remote_async_get_pending_events_token is added for supporting non-stop
mode in remote target.  As we generalizing notification to support
both non-stop and all-stop, we have to do a check on 'non_stop' and
only call mark_async_event_handler in non-stop mode.

gdb:

2012-09-23  Yao Qi  <yao@codesourcery.com>

	* remote-notif.c (remote_async_get_pending_events_handler):
	Assert tat 'non_stop' is true.
	(handle_notification): Call mark_async_event_handler only
	if 'non_stop' is true.
---
 gdb/remote-notif.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/gdb/remote-notif.c b/gdb/remote-notif.c
index 6bc804d..ff22d1e 100644
--- a/gdb/remote-notif.c
+++ b/gdb/remote-notif.c
@@ -113,6 +113,7 @@ remote_notif_process (struct notif *except)
 static void
 remote_async_get_pending_events_handler (gdb_client_data data)
 {
+  gdb_assert (non_stop);
   remote_notif_process (NULL);
 }
 
@@ -182,7 +183,8 @@ handle_notification (char *buf)
       /* Notify the event loop there's a stop reply to acknowledge
 	 and that there may be more events to fetch.  */
       QUEUE_enque (notif_p, notif_queue, np);
-      mark_async_event_handler (remote_async_get_pending_events_token);
+      if (non_stop)
+	mark_async_event_handler (remote_async_get_pending_events_token);
 
       DEBUG_NOTIF ("Notification '%s' captured", np->name);
     }
-- 
1.7.7.6


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]