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

Frank Ch. Eigler
2002-01-11T01:56:25Z

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