From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6049 invoked by alias); 23 Mar 2009 23:14:22 -0000 Received: (qmail 6036 invoked by uid 22791); 23 Mar 2009 23:14:21 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from mailhost.u-strasbg.fr (HELO mailhost.u-strasbg.fr) (130.79.200.154) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 23 Mar 2009 23:14:14 +0000 Received: from baal.u-strasbg.fr (baal.u-strasbg.fr [IPv6:2001:660:2402::41]) by mailhost.u-strasbg.fr (8.14.2/jtpda-5.5pre1) with ESMTP id n2NNE9I1025486 for ; Tue, 24 Mar 2009 00:14:10 +0100 (CET) Received: from mailserver.u-strasbg.fr (ms1.u-strasbg.fr [IPv6:2001:660:2402:d::10]) by baal.u-strasbg.fr (8.14.0/jtpda-5.5pre1) with ESMTP id n2NNE903086114 for ; Tue, 24 Mar 2009 00:14:09 +0100 (CET) (envelope-from muller@ics.u-strasbg.fr) Received: from d620muller (lec67-4-82-230-53-140.fbx.proxad.net [82.230.53.140]) (user=mullerp mech=LOGIN) by mailserver.u-strasbg.fr (8.14.3/jtpda-5.5pre1) with ESMTP id n2NNE9ng097972 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO) for ; Tue, 24 Mar 2009 00:14:09 +0100 (CET) (envelope-from muller@ics.u-strasbg.fr) From: "Pierre Muller" To: Subject: [RFA] darwin-nat.c AR Index fixes: remove strerror uses Date: Mon, 23 Mar 2009 23:23:00 -0000 Message-ID: <000801c9ac0d$16f88d70$44e9a850$@u-strasbg.fr> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-03/txt/msg00510.txt.bz2 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 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;