From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7354 invoked by alias); 21 May 2003 22:46:43 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 7347 invoked from network); 21 May 2003 22:46:43 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 21 May 2003 22:46:43 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id h4LMkhH29072 for ; Wed, 21 May 2003 18:46:43 -0400 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [172.16.52.156]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id h4LMkgI11710; Wed, 21 May 2003 18:46:42 -0400 Received: from localhost.localdomain (vpn50-3.rdu.redhat.com [172.16.50.3]) by pobox.corp.redhat.com (8.11.6/8.11.6) with ESMTP id h4LMkfo24414; Wed, 21 May 2003 18:46:41 -0400 Received: (from kev@localhost) by localhost.localdomain (8.11.6/8.11.6) id h4LMkaP00476; Wed, 21 May 2003 15:46:36 -0700 Date: Wed, 21 May 2003 22:46:00 -0000 From: Kevin Buettner Message-Id: <1030521224635.ZM475@localhost.localdomain> In-Reply-To: "J. Johnston" "RFA: patch to infptrace.c" (May 21, 6:31pm) References: <3ECBFE38.4020701@redhat.com> To: "J. Johnston" , gdb-patches@sources.redhat.com Subject: Re: RFA: patch to infptrace.c MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2003-05/txt/msg00412.txt.bz2 On May 21, 6:31pm, J. Johnston wrote: > The attached patch changes the ptrace detach call to not perform error handling > when an error occurs in detach. Without this patch, an error in detach stops gdb > from exiting. The error keeps returning to the command line over and over again. > > I thought I had fixed this earlier by adding a check for errno != ESRCH, but it > appears there are other scenarios that may occur. Which other errno values are tripping it up? Assuming that it's a good idea to emit only a warning, do we still need the errno != ESRCH check? > Ok to commit? > > -- Jeff J. > > 2003-05-21 Jeff Johnston > > * infptrace.c (detach): Call print_sys_errmsg when an error occurs > instead of perror_with_name. > > [ text/plain ] : > > Index: infptrace.c > =================================================================== > RCS file: /cvs/src/src/gdb/infptrace.c,v > retrieving revision 1.25 > diff -u -p -r1.25 infptrace.c > --- infptrace.c 8 May 2003 20:52:47 -0000 1.25 > +++ infptrace.c 21 May 2003 21:39:56 -0000 > @@ -302,7 +302,7 @@ detach (int signal) > ptrace (PT_DETACH, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) 1, > signal); > if (errno && errno != ESRCH) > - perror_with_name ("ptrace"); > + print_sys_errmsg ("ptrace", errno); > attach_flag = 0; > } > #endif /* ATTACH_DETACH */