summaryrefslogtreecommitdiff
path: root/gdb/darwin-nat.c
diff options
context:
space:
mode:
authorPierre Muller <muller@ics.u-strasbg.fr>2009-03-24 07:19:44 +0000
committerPierre Muller <muller@ics.u-strasbg.fr>2009-03-24 07:19:44 +0000
commit27c4a5d2ebbfd4f68a5e87b459adbbc6eeda7cf8 (patch)
tree2ca3754cf20c5aabbd40c263eeb4527a17932e0c /gdb/darwin-nat.c
parent8c4195d13e945d3cf2c8583c9f818bbf4a3b5710 (diff)
downloadgdb-27c4a5d2ebbfd4f68a5e87b459adbbc6eeda7cf8.tar.gz
ARI fix: "strerror" rule.
* darwin-nat.c (darwin_ptrace): Use safe_strerror. (darwin_stop_inferior, darwin_attach, darwin_detach): Ditto.
Diffstat (limited to 'gdb/darwin-nat.c')
-rw-r--r--gdb/darwin-nat.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/darwin-nat.c b/gdb/darwin-nat.c
index cc1047adab6..abe285c5a0f 100644
--- a/gdb/darwin-nat.c
+++ b/gdb/darwin-nat.c
@@ -242,7 +242,7 @@ darwin_ptrace (const char *name,
inferior_debug (2, _("ptrace (%s, %d, 0x%x, %d): %d (%s)\n"),
name, pid, arg3, arg4, ret,
- (ret != 0) ? strerror (errno) : _("no error"));
+ (ret != 0) ? safe_strerror (errno) : _("no error"));
return ret;
}
@@ -686,7 +686,7 @@ darwin_stop_inferior (struct target_ops *ops, darwin_inferior *inf)
res = kill (inf->pid, SIGSTOP);
if (res != 0)
- warning (_("cannot kill: %s\n"), strerror (errno));
+ warning (_("cannot kill: %s\n"), safe_strerror (errno));
ptid = darwin_wait (ops, inferior_ptid, &wstatus);
gdb_assert (wstatus.kind = TARGET_WAITKIND_STOPPED);
@@ -964,7 +964,7 @@ darwin_attach (struct target_ops *ops, char *args, int from_tty)
res = PTRACE (PT_ATTACHEXC, pid, 0, 0);
if (res != 0)
error (_("Unable to attach to process-id %d: %s (%d)"),
- pid, strerror (errno), errno);
+ pid, safe_strerror (errno), errno);
inf = add_inferior (pid);
inf->attach_flag = 1;
@@ -1028,7 +1028,7 @@ darwin_detach (struct target_ops *ops, char *args, int from_tty)
res = PTRACE (PT_DETACH, darwin_inf->pid, 0, 0);
if (res != 0)
printf_unfiltered (_("Unable to detach from process-id %d: %s (%d)"),
- darwin_inf->pid, strerror (errno), errno);
+ darwin_inf->pid, safe_strerror (errno), errno);
msg_state = NO_MESSAGE;