From c5a4d20bb945df22e3244f60cff1860932802354 Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Sun, 22 Mar 2009 17:59:59 +0000 Subject: * gdbthread.h (struct thread_info): Add in_infcall member. * infcall.c (run_inferior_call): Save, set and restore in_infcall. Remove reverences to suppress_resume_observer. Refresh `call_thread' after returning from `proceed'. * infcmd.c (suppress_resume_observer): Delete. * inferior.h (suppress_resume_observer): Delete declaration. * mi/mi-interp.c (mi_on_resume): Suppress output while calling an inferior function. * thread.c (set_running): Remove references to suppress_resume_observer. * infrun.c (struct inferior_status): Add in_infcall member. (save_inferior_status): Save it. (restore_inferior_status): Restore it. --- gdb/mi/mi-interp.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'gdb/mi') diff --git a/gdb/mi/mi-interp.c b/gdb/mi/mi-interp.c index 131698b..fb4b4d5 100644 --- a/gdb/mi/mi-interp.c +++ b/gdb/mi/mi-interp.c @@ -370,6 +370,17 @@ mi_on_normal_stop (struct bpstats *bs, int print_frame) static void mi_on_resume (ptid_t ptid) { + struct thread_info *tp = NULL; + + if (ptid_equal (ptid, minus_one_ptid)) + tp = inferior_thread (); + else + tp = find_thread_pid (ptid); + + /* Suppress output while calling an inferior function. */ + if (tp->in_infcall) + return; + /* To cater for older frontends, emit ^running, but do it only once per each command. We do it here, since at this point we know that the target was successfully resumed, and in non-async mode, -- cgit v1.1