aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorPierre Muller <muller@sourceware.org>2009-03-24 07:19:46 +0000
committerPierre Muller <muller@sourceware.org>2009-03-24 07:19:46 +0000
commita3224241d37815406e23b8043a3d0a3df9e00c1c (patch)
treeab5c163fb89f7ab5af3ca599c7c6436b27c876c6 /gdb
parent7f055c204a4371154123a1816fbec9855ee60ad5 (diff)
downloadgdb-a3224241d37815406e23b8043a3d0a3df9e00c1c.zip
gdb-a3224241d37815406e23b8043a3d0a3df9e00c1c.tar.gz
gdb-a3224241d37815406e23b8043a3d0a3df9e00c1c.tar.bz2
ARI fix: "strerror" rule.
* darwin-nat.c (darwin_ptrace): Use safe_strerror. (darwin_stop_inferior, darwin_attach, darwin_detach): Ditto.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog6
-rw-r--r--gdb/darwin-nat.c8
2 files changed, 10 insertions, 4 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index d03cb2b..bfa43ff 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,9 @@
+2009-03-24 Pierre Muller <muller@ics.u-strasbg.fr>
+
+ ARI fix: "strerror" rule.
+ * darwin-nat.c (darwin_ptrace): Use safe_strerror.
+ (darwin_stop_inferior, darwin_attach, darwin_detach): Ditto.
+
2009-03-23 Joel Brobecker <brobecker@adacore.com>
* ada-exp.y (get_symbol_field_type): Make sure to resolve typedefs
diff --git a/gdb/darwin-nat.c b/gdb/darwin-nat.c
index cc1047a..abe285c 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;