aboutsummaryrefslogtreecommitdiff
path: root/gdb/infcall.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/infcall.c')
-rw-r--r--gdb/infcall.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/gdb/infcall.c b/gdb/infcall.c
index 350572b..705e377 100644
--- a/gdb/infcall.c
+++ b/gdb/infcall.c
@@ -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,7 +401,7 @@ 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;
@@ -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. */