/* Perform an inferior function call, for GDB, the GNU debugger.
- Copyright (C) 1986-2012 Free Software Foundation, Inc.
+ Copyright (C) 1986-2014 Free Software Foundation, Inc.
This file is part of GDB.
#include "objfiles.h"
#include "gdbcmd.h"
#include "command.h"
-#include "gdb_string.h"
+#include <string.h>
#include "infcall.h"
#include "dummy-frame.h"
#include "ada-lang.h"
#include "gdbthread.h"
#include "exceptions.h"
+#include "event-top.h"
/* If we can't find a function's name from its address,
we print this instead. */
{
/* Try the minimal symbols. */
- struct minimal_symbol *msymbol = lookup_minimal_symbol_by_pc (funaddr);
+ struct bound_minimal_symbol msymbol = lookup_minimal_symbol_by_pc (funaddr);
- if (msymbol)
- return SYMBOL_PRINT_NAME (msymbol);
+ if (msymbol.minsym)
+ return MSYMBOL_PRINT_NAME (msymbol.minsym);
}
{
TRY_CATCH (e, RETURN_MASK_ALL)
{
+ int was_sync = sync_execution;
+
proceed (real_pc, GDB_SIGNAL_0, 0);
/* Inferior function calls are always synchronous, even if the
{
wait_for_inferior ();
normal_stop ();
+ /* If GDB was previously in sync execution mode, then ensure
+ that it remains so. normal_stop calls
+ async_enable_stdin, so reset it again here. In other
+ cases, stdin will be re-enabled by
+ inferior_event_handler, when an exception is thrown. */
+ if (was_sync)
+ async_disable_stdin ();
}
}