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

Frank Ch. Eigler fche@redhat.com
Thu Jan 10 17:56:00 GMT 2002


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



More information about the Gdb-patches mailing list