There is no other way to exit this loop.
Returns the inferior_pid for rest of gdb.
- Side effects: Set unix exit value to *w.
- */
+ Side effects: Set *OURSTATUS. */
int
mach_really_wait (w)
- WAITTYPE *w;
+ struct target_waitstatus *ourstatus;
{
int pid;
kern_return_t ret;
+ int w;
struct msg {
mach_msg_header_t header;
{
/* Collect Unix exit status for gdb */
- wait3(w, WNOHANG, 0);
+ wait3(&w, WNOHANG, 0);
/* This mess is here to check that the rest of
* gdb knows that the inferior died. It also
* has happened to it's children when mach-magic
* is applied on them.
*/
- if ((!WIFEXITED(*w) && WIFSTOPPED(*w)) ||
- (WIFEXITED(*w) && WEXITSTATUS(*w) > 0377))
+ if ((!WIFEXITED(w) && WIFSTOPPED(w)) ||
+ (WIFEXITED(w) && WEXITSTATUS(w) > 0377))
{
- WSETEXIT(*w, 0);
+ WSETEXIT(w, 0);
warning ("Using exit value 0 for terminated task");
}
- else if (!WIFEXITED(*w))
+ else if (!WIFEXITED(w))
{
- int sig = WTERMSIG(*w);
+ int sig = WTERMSIG(w);
/* Signals cause problems. Warn the user. */
if (sig != SIGKILL) /* Bad luck if garbage matches this */
warning ("The terminating signal stuff may be nonsense");
else if (sig > NSIG)
{
- WSETEXIT(*w, 0);
+ WSETEXIT(w, 0);
warning ("Using exit value 0 for terminated task");
}
}
+ store_waitstatus (ourstatus, w);
return inferior_pid;
}
}
if (stopped_in_exception)
{
/* Get unix state. May be changed in mach3_exception_actions() */
- wait3(w, WNOHANG, 0);
+ wait3(&w, WNOHANG, 0);
- mach3_exception_actions (w, FALSE, "Task");
+ mach3_exception_actions (&w, FALSE, "Task");
+ store_waitstatus (ourstatus, w);
return inferior_pid;
}
}
char *allargs;
char **env;
{
- fork_inferior (exec_file, allargs, env, m3_trace_m3, m3_trace_him);
+ fork_inferior (exec_file, allargs, env, m3_trace_m3, m3_trace_him, NULL);
/* We are at the first instruction we care about. */
/* Pedal to the metal... */
proceed ((CORE_ADDR) -1, 0, 0);
m3_resume (pid, step, signal)
int pid;
int step;
- int signal;
+ enum target_signal signal;
{
kern_return_t ret;
vm_read_cache_valid = FALSE;
if (signal && inferior_pid > 0) /* Do not signal, if attached by MID */
- kill (inferior_pid, signal);
+ kill (inferior_pid, target_signal_to_host (signal));
if (step)
{