diff options
Diffstat (limited to 'gdb/gdbserver/target.c')
-rw-r--r-- | gdb/gdbserver/target.c | 31 |
1 files changed, 29 insertions, 2 deletions
diff --git a/gdb/gdbserver/target.c b/gdb/gdbserver/target.c index 3bdc469..b570b6c 100644 --- a/gdb/gdbserver/target.c +++ b/gdb/gdbserver/target.c @@ -89,14 +89,27 @@ write_inferior_memory (CORE_ADDR memaddr, const unsigned char *myaddr, } unsigned long -mywait (struct target_waitstatus *ourstatus, int connected_wait) +mywait (struct target_waitstatus *ourstatus, int options, + int connected_wait) { unsigned long ret; if (connected_wait) server_waiting = 1; - ret = (*the_target->wait) (ourstatus); + ret = (*the_target->wait) (ourstatus, options); + + if (ourstatus->kind == TARGET_WAITKIND_EXITED + || ourstatus->kind == TARGET_WAITKIND_SIGNALLED) + { + if (ourstatus->kind == TARGET_WAITKIND_EXITED) + fprintf (stderr, + "\nChild exited with status %d\n", ourstatus->value.sig); + if (ourstatus->kind == TARGET_WAITKIND_SIGNALLED) + fprintf (stderr, "\nChild terminated with signal = 0x%x (%s)\n", + target_signal_to_host (ourstatus->value.sig), + target_signal_to_name (ourstatus->value.sig)); + } if (connected_wait) server_waiting = 0; @@ -104,6 +117,20 @@ mywait (struct target_waitstatus *ourstatus, int connected_wait) return ret; } +int +start_non_stop (int nonstop) +{ + if (the_target->start_non_stop == NULL) + { + if (nonstop) + return -1; + else + return 0; + } + + return (*the_target->start_non_stop) (nonstop); +} + void set_target_ops (struct target_ops *target) { |