From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22226 invoked by alias); 11 Jan 2002 01:56:25 -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 22150 invoked from network); 11 Jan 2002 01:56:23 -0000 Received: from unknown (HELO tooth.toronto.redhat.com) (216.138.202.10) by sources.redhat.com with SMTP; 11 Jan 2002 01:56:23 -0000 Received: (from fche@localhost) by tooth.toronto.redhat.com (8.11.6/8.11.0) id g0B1uMN01199; Thu, 10 Jan 2002 20:56:22 -0500 X-Authentication-Warning: tooth.toronto.redhat.com: fche set sender to fche@redhat.com using -f To: Michael Snyder Cc: gdb-patches@sources.redhat.com Subject: Re: [RFA] Add new cmd line parameter "--pid" for attach. References: <200201050321.g053L6l16505@reddwarf.cygnus.com> <15418.21637.258565.54021@localhost.cygnus.com> <3C3B70ED.D8256B4A@redhat.com> <3C3B95FD.50803@cygnus.com> <15421.63455.895750.313310@localhost.cygnus.com> <3C3E2FBD.3080108@cygnus.com> <3C3E394C.7A1E6BA8@redhat.com> Content-Type: text/plain; charset=US-ASCII From: fche@redhat.com (Frank Ch. Eigler) Date: Thu, 10 Jan 2002 17:56:00 -0000 In-Reply-To: <3C3E394C.7A1E6BA8@redhat.com> Message-ID: User-Agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.1 (Cuyahoga Valley) MIME-Version: 1.0 X-SW-Source: 2002-01/txt/msg00273.txt.bz2 msnyder wrote: > [...] > + [...] Now, if the second argument begins with a non-digit, > + it will be treated as a corefile. If it begins with a digit, > + GDB will attempt to attach it as a process, and if no such process > + is found, will then attempt to open it as a corefile. > [...] How hard would it be to stop guessing based on isdigit(arg[0]) and parse the whole string? Anyway, there is only a problem here if there are *both* an entirely-numeric core file, and an existing process with the same id. If not both of these hold, there is no ambiguity about what the user means, right? - FChE