gas thunderx support
[deliverable/binutils-gdb.git] / gdb / infcall.c
index b5a9ae190a4d01f1c1c5a1e4a0e481dcf4c1d4b3..26c64f60b9a692ce4d77441a2c87ba77aed58228 100644 (file)
@@ -1,6 +1,6 @@
 /* Perform an inferior function call, for GDB, the GNU debugger.
 
-   Copyright (C) 1986-2014 Free Software Foundation, Inc.
+   Copyright (C) 1986-2015 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -383,7 +383,7 @@ get_function_name (CORE_ADDR funaddr, char *buf, int buf_size)
 static struct gdb_exception
 run_inferior_call (struct thread_info *call_thread, CORE_ADDR real_pc)
 {
-  volatile struct gdb_exception e;
+  struct gdb_exception caught_error = exception_none;
   int saved_in_infcall = call_thread->control.in_infcall;
   ptid_t call_thread_ptid = call_thread->ptid;
   int saved_sync_execution = sync_execution;
@@ -401,11 +401,11 @@ run_inferior_call (struct thread_info *call_thread, CORE_ADDR real_pc)
   /* We want stop_registers, please...  */
   call_thread->control.proceed_to_finish = 1;
 
-  TRY_CATCH (e, RETURN_MASK_ALL)
+  TRY
     {
       int was_sync = sync_execution;
 
-      proceed (real_pc, GDB_SIGNAL_0, 0);
+      proceed (real_pc, GDB_SIGNAL_0);
 
       /* Inferior function calls are always synchronous, even if the
         target supports asynchronous execution.  Do here what
@@ -423,6 +423,11 @@ run_inferior_call (struct thread_info *call_thread, CORE_ADDR real_pc)
            async_disable_stdin ();
        }
     }
+  CATCH (e, RETURN_MASK_ALL)
+    {
+      caught_error = e;
+    }
+  END_CATCH
 
   /* At this point the current thread may have changed.  Refresh
      CALL_THREAD as it could be invalid if its thread has exited.  */
@@ -435,7 +440,7 @@ run_inferior_call (struct thread_info *call_thread, CORE_ADDR real_pc)
      If all error()s out of proceed ended up calling normal_stop
      (and perhaps they should; it already does in the special case
      of error out of resume()), then we wouldn't need this.  */
-  if (e.reason < 0)
+  if (caught_error.reason < 0)
     {
       if (call_thread != NULL)
        breakpoint_auto_delete (call_thread->control.stop_bpstat);
@@ -446,7 +451,7 @@ run_inferior_call (struct thread_info *call_thread, CORE_ADDR real_pc)
 
   sync_execution = saved_sync_execution;
 
-  return e;
+  return caught_error;
 }
 
 /* A cleanup function that calls delete_std_terminate_breakpoint.  */
This page took 0.025898 seconds and 4 git commands to generate.