proc_debug (proc, "is %s", err ? "dead" : running ? "running" : "suspended");
if (err)
- proc_debug (proc, "err = %s", strerror (err));
+ proc_debug (proc, "err = %s", safe_strerror (err));
if (running)
{
proc->exc_port = exc_port;
else
warning ("Error setting exception port for %s: %s",
- proc_string (proc), strerror (err));
+ proc_string (proc), safe_strerror (err));
}
}
proc->exc_port = MACH_PORT_NULL;
else
warning ("Error setting exception port for %s: %s",
- proc_string (proc), strerror (err));
+ proc_string (proc), safe_strerror (err));
}
}
&prev_port);
if (err)
warning ("Couldn't request notification for port %d: %s",
- port, strerror (err));
+ port, safe_strerror (err));
else
{
proc_debug (proc, "notifications to: %d", inf->event_port);
err = mach_port_allocate (mach_task_self (),
MACH_PORT_RIGHT_RECEIVE, &inf->event_port);
if (err)
- error ("Error allocating event port: %s", strerror (err));
+ error ("Error allocating event port: %s", safe_strerror (err));
/* Make a send right for it, so we can easily copy it for other people. */
mach_port_insert_right (mach_task_self (), inf->event_port,
{
error_t err = proc_pid2task (proc_server, pid, &task_port);
if (err)
- error ("Error getting task for pid %d: %s", pid, strerror (err));
+ error ("Error getting task for pid %d: %s", pid, safe_strerror (err));
}
inf_debug (inf, "setting task: %d", task_port);
}
else if (err)
warning ("Can't modify tracing state for pid %d: %s",
- inf->pid, strerror (err));
+ inf->pid, safe_strerror (err));
else
inf->traced = on;
}
/* Can't do too much... */
warning ("Can't deliver signal %s: No signal thread.", NAME);
else if (err)
- warning ("Delivering signal %s: %s", NAME, strerror (err));
+ warning ("Delivering signal %s: %s", NAME, safe_strerror (err));
#undef NAME
}
}
if (err)
- warning ("Can't continue process: %s", strerror (err));
+ warning ("Can't continue process: %s", safe_strerror (err));
}
\f
err =
proc_wait_request (proc_server, inf->event_port, inf->pid, WUNTRACED);
if (err)
- warning ("wait request failed: %s", strerror (err));
+ warning ("wait request failed: %s", safe_strerror (err));
else
{
inf_debug (inf, "waits pending: %d", proc_waits_pending);
if (err == EMACH_RCV_INTERRUPTED)
inf_debug (inf, "interrupted");
else if (err)
- error ("Couldn't wait for an event: %s", strerror (err));
+ error ("Couldn't wait for an event: %s", safe_strerror (err));
else
{
struct
if (reply.err)
error ("Handling event, msgid = %d: %s",
- msg.hdr.msgh_id, strerror (reply.err));
+ msg.hdr.msgh_id, safe_strerror (reply.err));
}
if (inf->pending_execs)
struct inf *inf = waiting_inf;
inf_debug (inf, "err = %s, pid = %d, status = 0x%x, sigcode = %d",
- err ? strerror (err) : "0", pid, status, sigcode);
+ err ? safe_strerror (err) : "0", pid, status, sigcode);
if (err && proc_wait_pid && (!inf->task || !inf->task->port))
/* Ack. The task has died, but the task-died notification code didn't
{
if (err != EINTR)
{
- warning ("Can't wait for pid %d: %s", inf->pid, strerror (err));
+ warning ("Can't wait for pid %d: %s", inf->pid, safe_strerror (err));
inf->no_wait = 1;
/* Since we can't see the inferior's signals, don't trap them. */
inf->wait.status.value.sig = TARGET_SIGNAL_0;
}
else if (err)
- warning ("Signal delivery failed: %s", strerror (err));
+ warning ("Signal delivery failed: %s", safe_strerror (err));
if (err)
/* We only get this reply when we've posted a signal to a process which we
err = hurd_safe_copyin (myaddr, (void *) addr - low_address + copied, length);
if (err)
{
- warning ("Read from inferior faulted: %s", strerror (err));
+ warning ("Read from inferior faulted: %s", safe_strerror (err));
length = 0;
}
err = vm_deallocate (mach_task_self (), copied, copy_count);
if (err)
- warning ("gnu_read_inferior vm_deallocate failed: %s", strerror (err));
+ warning ("gnu_read_inferior vm_deallocate failed: %s", safe_strerror (err));
return length;
}
&port, &port_type);
if (err)
error ("Couldn't extract send right %d from inferior: %s",
- name, strerror (err));
+ name, safe_strerror (err));
if (proc->saved_exc_port)
/* Get rid of our reference to the old one. */
proc->exc_port = proc->inf->event_port;
err = proc_set_exception_port (proc, proc->exc_port);
error ("Can't set exception port for %s: %s",
- proc_string (proc), strerror (err));
+ proc_string (proc), safe_strerror (err));
}
}
print_port_info (right, 0, inf->task->port, PORTINFO_DETAILS,
stdout);
if (err)
- error ("%ld: %s.", right, strerror (err));
+ error ("%ld: %s.", right, safe_strerror (err));
}
}
else
print_task_ports_info (inf->task->port, only, PORTINFO_DETAILS,
stdout);
if (err)
- error ("%s.", strerror (err));
+ error ("%s.", safe_strerror (err));
}
value_free_to_mark (vmark);
error_t err =
thread_info (thread->port, THREAD_BASIC_INFO, (int *) &info, &info_len);
if (err)
- error ("%s.", strerror (err));
+ error ("%s.", safe_strerror (err));
thread->sc = info->suspend_count;
if (from_tty)
printf_unfiltered ("Suspend count was %d.\n", thread->sc);
MATTR_CACHE,
&flush);
if (ret != KERN_SUCCESS)
- warning ("Error flushing inferior's cache : %s", strerror (ret));
+ warning ("Error flushing inferior's cache : %s", safe_strerror (ret));
}
#endif /* FLUSH_INFERIOR_CACHE */