From 74164c5624c276e97cf9cb01876ef908745cd185 Mon Sep 17 00:00:00 2001 From: Jan Kratochvil Date: Mon, 15 Feb 2010 17:35:50 +0000 Subject: gdb/ * defs.h (parse_pid_to_attach): New. * utils.c (parse_pid_to_attach): New. * darwin-nat.c (darwin_attach): Replace ARGS parsing by parse_pid. * gnu-nat.c (gnu_attach): Likewise. * nto-procfs.c (procfs_attach): Likewise. * procfs.c (procfs_attach): Likewise. * windows-nat.c (windows_attach): Likewise. * inf-ptrace.c (inf_ptrace_attach): Likewise. Remove variable dummy. * inf-ttrace.c (inf_ttrace_attach): Likewise. * remote.c (extended_remote_attach_1): Likewise. New comment on getpid check. gdb/testsuite/ * gdb.base/attach.exp (attach to nonsense is prohibited): Make the "Illegal process-id" expect string more exact. (attach to digits-starting nonsense is prohibited): New. --- gdb/defs.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gdb/defs.h') diff --git a/gdb/defs.h b/gdb/defs.h index 770d171..eee7b39 100644 --- a/gdb/defs.h +++ b/gdb/defs.h @@ -426,6 +426,8 @@ int compare_positive_ints (const void *ap, const void *bp); extern const char *gdb_bfd_errmsg (bfd_error_type error_tag, char **matching); +extern int parse_pid_to_attach (char *args); + /* From demangle.c */ extern void set_demangling_style (char *); -- cgit v1.1