diff options
Diffstat (limited to 'gdb/gnu-nat.c')
-rw-r--r-- | gdb/gnu-nat.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/gdb/gnu-nat.c b/gdb/gnu-nat.c index 2750f9d..51dde6f 100644 --- a/gdb/gnu-nat.c +++ b/gdb/gnu-nat.c @@ -2139,12 +2139,9 @@ gnu_attach (struct target_ops *ops, char *args, int from_tty) struct inf *inf = cur_inf (); struct inferior *inferior; - if (!args) - error_no_arg (_("process-id to attach")); - - pid = atoi (args); + pid = parse_pid_to_attach (args); - if (pid == getpid ()) /* Trying to masturbate? */ + if (pid == getpid ()) /* Trying to masturbate? */ error (_("I refuse to debug myself!")); if (from_tty) |