mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-07-15 05:01:13 +08:00
2011-06-06 Pedro Alves <pedro@codesourcery.com>
gdb/ * infcall.c (run_inferior_call): Don't mask async. Instead force a synchronous wait, if the target can async. * target.h (struct target_ops): Delete to_async_mask. (target_async_mask): Delete. * target.c (update_current_target): Delete references to to_async_mask. * linux-nat.c (linux_nat_async_mask_value): Delete. (linux_nat_is_async_p, linux_nat_can_async_p): Remove references to linux_nat_async_mask_value. (linux_nat_async_mask): Delete. (linux_nat_async, linux_nat_close): Remove references to linux_nat_async_mask_value. * record.c (record_async_mask_value): Delete. (record_async): Remove references to record_async_mask_value. (record_async_mask): Delete. (record_can_async_p, record_is_async_p): Remove references to record_async_mask_value. (init_record_ops, init_record_core_ops): Remove references to record_async_mask. * remote.c (remote_async_mask_value): Delete. (init_remote_ops): Remove reference to remote_async_mask. (remote_can_async_p, remote_is_async_p): Remove references to remote_async_mask_value. (remote_async): Remove references to remote_async_mask_value. (remote_async_mask): Delete. * infrun.c (fetch_inferior_event): Don't claim registers changed if the current thread is already not executing.
This commit is contained in:
@ -387,10 +387,8 @@ static struct gdb_exception
|
||||
run_inferior_call (struct thread_info *call_thread, CORE_ADDR real_pc)
|
||||
{
|
||||
volatile struct gdb_exception e;
|
||||
int saved_async = 0;
|
||||
int saved_in_infcall = call_thread->control.in_infcall;
|
||||
ptid_t call_thread_ptid = call_thread->ptid;
|
||||
char *saved_target_shortname = xstrdup (target_shortname);
|
||||
|
||||
call_thread->control.in_infcall = 1;
|
||||
|
||||
@ -401,22 +399,24 @@ run_inferior_call (struct thread_info *call_thread, CORE_ADDR real_pc)
|
||||
/* We want stop_registers, please... */
|
||||
call_thread->control.proceed_to_finish = 1;
|
||||
|
||||
if (target_can_async_p ())
|
||||
saved_async = target_async_mask (0);
|
||||
|
||||
TRY_CATCH (e, RETURN_MASK_ALL)
|
||||
proceed (real_pc, TARGET_SIGNAL_0, 0);
|
||||
{
|
||||
proceed (real_pc, TARGET_SIGNAL_0, 0);
|
||||
|
||||
/* Inferior function calls are always synchronous, even if the
|
||||
target supports asynchronous execution. Do here what
|
||||
`proceed' itself does in sync mode. */
|
||||
if (target_can_async_p () && is_running (inferior_ptid))
|
||||
{
|
||||
wait_for_inferior ();
|
||||
normal_stop ();
|
||||
}
|
||||
}
|
||||
|
||||
/* At this point the current thread may have changed. Refresh
|
||||
CALL_THREAD as it could be invalid if its thread has exited. */
|
||||
call_thread = find_thread_ptid (call_thread_ptid);
|
||||
|
||||
/* Don't restore the async mask if the target has changed,
|
||||
saved_async is for the original target. */
|
||||
if (saved_async
|
||||
&& strcmp (saved_target_shortname, target_shortname) == 0)
|
||||
target_async_mask (saved_async);
|
||||
|
||||
enable_watchpoints_after_interactive_call_stop ();
|
||||
|
||||
/* Call breakpoint_auto_delete on the current contents of the bpstat
|
||||
@ -433,8 +433,6 @@ run_inferior_call (struct thread_info *call_thread, CORE_ADDR real_pc)
|
||||
if (call_thread != NULL)
|
||||
call_thread->control.in_infcall = saved_in_infcall;
|
||||
|
||||
xfree (saved_target_shortname);
|
||||
|
||||
return e;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user