aboutsummaryrefslogtreecommitdiff
path: root/gdb/mi/mi-interp.c
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2009-03-22 17:59:59 +0000
committerPedro Alves <palves@redhat.com>2009-03-22 17:59:59 +0000
commitc5a4d20bb945df22e3244f60cff1860932802354 (patch)
treea58a881ecb6f727cdfd7ceea57a9e2efba44f8d3 /gdb/mi/mi-interp.c
parent41d2bdb467371e3a18ff8eb69859b1d7cb56a2bd (diff)
downloadgdb-c5a4d20bb945df22e3244f60cff1860932802354.zip
gdb-c5a4d20bb945df22e3244f60cff1860932802354.tar.gz
gdb-c5a4d20bb945df22e3244f60cff1860932802354.tar.bz2
* 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.
Diffstat (limited to 'gdb/mi/mi-interp.c')
-rw-r--r--gdb/mi/mi-interp.c11
1 files changed, 11 insertions, 0 deletions
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,