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 09/15] Don't trigger async event in inf-call.


This patch is to fix a problem that unable to type in CLI after doing
inferior call.  I don't fully understand the cause of the this problem,
so it is a little bit hacky here.

gdb:

2012-04-12  Yao Qi  <yao@codesourcery.com>

	* infrun.c (do_target_resume): Don't trigger async event if
	any thread is in inferior call.
---
 gdb/infrun.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/gdb/infrun.c b/gdb/infrun.c
index dee08a1..ec9e2b0 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -1751,6 +1751,7 @@ do_target_resume (ptid_t ptid, int step, enum target_signal signo)
   int can_wildcard;
   int any_to_resume;
   ptid_t leader_ptid = inferior_ptid;
+  int in_infcall = 0;
 
   /* A specific PTID means `step only this process id'.  */
   resume_many = (ptid_equal (minus_one_ptid, ptid)
@@ -1784,6 +1785,9 @@ do_target_resume (ptid_t ptid, int step, enum target_signal signo)
     {
       if (ptid_match (tp->ptid, ptid))
 	{
+	  if (tp->control.in_infcall)
+	    in_infcall = 1;
+
 	  if (tp->executing)
 	    {
 	      if (debug_infrun)
@@ -1923,7 +1927,7 @@ do_target_resume (ptid_t ptid, int step, enum target_signal signo)
       clear_inline_frame_state (ptid);
     }
 
-  if (target_can_async_p ())
+  if (target_can_async_p () && !in_infcall)
     {
       target_async (inferior_event_handler, 0);
       /* Tell the event loop we have something to process.  */
-- 
1.7.0.4


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