This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] Add new cmd line parameter "--pid" for attach.


"Frank Ch. Eigler" wrote:
> 
> 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? 

Wouldn't make any difference if the whole string consists of digits, 
eg. the cannonical case of a corefile called "12345".

> 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?

Right.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]