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 6/7] Cleanup pending queues before resume in all-stop


In patch 3/N, we mark 'remote_async_get_pending_events_token'
only in non-stop mode, and function 'remote_notif_process' is
called in async event handler accordingly.  In all-stop mode,
we need to find a place to call 'remote_notif_process', I find
it is reasonable to process them before resume inferior.  So
this is what this patch does.

gdb:

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

	* remote.c (remote_resume): Call 'remote_notif_process' in
	all-stop mode.
---
 gdb/remote.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/gdb/remote.c b/gdb/remote.c
index 7e9b373..1797af5 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -4755,6 +4755,10 @@ remote_resume (struct target_ops *ops,
   struct remote_state *rs = get_remote_state ();
   char *buf;
 
+  /* Clean up pending queues before resume.  */
+  if (!non_stop)
+    remote_notif_process ((struct notif *) &notif_packet_stop);
+
   last_sent_signal = siggnal;
   last_sent_step = step;
 
-- 
1.7.7.6


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