This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 09/14] Set thread's state in infcall.
Split from original V2. Nothing changed.
Fix this fail below in both native and remote.
-FAIL: gdb.base/step-resume-infcall.exp: next
+PASS: gdb.base/step-resume-infcall.exp: next
gdb:
2012-04-12 Pedro Alves <pedro@codesourcery.com>
* infcall.c (run_inferior_call): Set the thread's state to
THREAD_STOPPED while calling clear_proceed_status.
---
gdb/infcall.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/gdb/infcall.c b/gdb/infcall.c
index 6c250e3..d40b7ef 100644
--- a/gdb/infcall.c
+++ b/gdb/infcall.c
@@ -387,11 +387,21 @@ run_inferior_call (struct thread_info *call_thread, CORE_ADDR real_pc)
volatile struct gdb_exception e;
int saved_in_infcall = call_thread->control.in_infcall;
ptid_t call_thread_ptid = call_thread->ptid;
+ int state = call_thread->state;
call_thread->control.in_infcall = 1;
+ /* Fudge the thread's state so clear_proceed_status doesn't ignore
+ it. We may be running an infcall with a THREAD_RUNNING but
+ !executing thread, e.g., when evaluating a breakpoint's
+ condition. */
+ state = call_thread->state;
+ call_thread->state = THREAD_STOPPED;
+
clear_proceed_status ();
+ call_thread->state = state;
+
disable_watchpoints_before_interactive_call_start ();
/* We want stop_registers, please... */
--
1.7.0.4