Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Pierre Muller" <muller@ics.u-strasbg.fr>
To: <gdb-patches@sourceware.org>
Subject: [RFA] darwin-nat.c AR Index fixes: remove strerror uses
Date: Mon, 23 Mar 2009 23:23:00 -0000	[thread overview]
Message-ID: <000801c9ac0d$16f88d70$44e9a850$@u-strasbg.fr> (raw)


  This patch could be consider 
under the obvious rule,
but as it is a native file, I still wanted to
get an approval from someone 'who knows'...

  But I didn't find anyone in MAINTAINERS
for the darwin* files...

  Is this OK  to check in?


Pierre Muller
Pascal language support maintainer for GDB


2009-03-24  Pierre Muller  <muller@ics.u-strasbg.fr>

	ARI fix.
	* darwin-nat.c (darwin_ptrace): Use safe_strerror.
	(darwin_stop_inferior, darwin_attach, darwin_detach): Ditto.
 

Index: gdb/darwin-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/darwin-nat.c,v
retrieving revision 1.6
diff -u -p -r1.6 darwin-nat.c
--- gdb/darwin-nat.c    16 Mar 2009 15:57:08 -0000      1.6
+++ gdb/darwin-nat.c    23 Mar 2009 22:57:05 -0000
@@ -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

   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, c
   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, c
   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;



             reply	other threads:[~2009-03-23 23:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-23 23:23 Pierre Muller [this message]
2009-03-24  2:46 ` Joel Brobecker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='000801c9ac0d$16f88d70$44e9a850$@u-strasbg.fr' \
    --to=muller@ics.u-strasbg.fr \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox