mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-23 03:29:47 +08:00
* target.h (target_waitstatus_to_string): Declare.
* target.c (target_waitstatus_to_string): New function. Copied from debug_to_wait. Add missing entries for TARGET_WAITKIND_SYSCALL_ENTRY, TARGET_WAITKIND_SYSCALL_RETURN, TARGET_WAITKIND_IGNORE, TARGET_WAITKIND_NO_HISTORY. (debug_to_wait): Call it. * infrun.c (wait_for_inferior): If debug_infrun, print result of target_wait. (fetch_inferior_event): Ditto.
This commit is contained in:
20
gdb/infrun.c
20
gdb/infrun.c
@ -1789,6 +1789,16 @@ wait_for_inferior (int treat_exec_as_sigtrap)
|
||||
else
|
||||
ecs->ptid = target_wait (waiton_ptid, &ecs->ws);
|
||||
|
||||
if (debug_infrun)
|
||||
{
|
||||
char *status_string = target_waitstatus_to_string (&ecs->ws);
|
||||
fprintf_unfiltered (gdb_stdlog,
|
||||
"infrun: target_wait (%d, status) = %d, %s\n",
|
||||
PIDGET (waiton_ptid), PIDGET (ecs->ptid),
|
||||
status_string);
|
||||
xfree (status_string);
|
||||
}
|
||||
|
||||
if (treat_exec_as_sigtrap && ecs->ws.kind == TARGET_WAITKIND_EXECD)
|
||||
{
|
||||
xfree (ecs->ws.value.execd_pathname);
|
||||
@ -1864,6 +1874,16 @@ fetch_inferior_event (void *client_data)
|
||||
else
|
||||
ecs->ptid = target_wait (waiton_ptid, &ecs->ws);
|
||||
|
||||
if (debug_infrun)
|
||||
{
|
||||
char *status_string = target_waitstatus_to_string (&ecs->ws);
|
||||
fprintf_unfiltered (gdb_stdlog,
|
||||
"infrun: target_wait (%d, status) = %d, %s\n",
|
||||
PIDGET (waiton_ptid), PIDGET (ecs->ptid),
|
||||
status_string);
|
||||
xfree (status_string);
|
||||
}
|
||||
|
||||
if (non_stop
|
||||
&& ecs->ws.kind != TARGET_WAITKIND_IGNORE
|
||||
&& ecs->ws.kind != TARGET_WAITKIND_EXITED
|
||||
|
Reference in New Issue
Block a user