diff options
author | Keith Seitz <keiths@redhat.com> | 2017-08-17 13:58:01 -0700 |
---|---|---|
committer | Keith Seitz <keiths@redhat.com> | 2017-08-17 13:58:01 -0700 |
commit | b5f28d7abc02ca509e389fa932d725cf111e4b40 (patch) | |
tree | 57a0dc0feaff890630a6ba2c9fab811d56b1f9cf /gdb/procfs.c | |
parent | 2a95a158fae932f758d75a1178a40d4cc4804ff0 (diff) | |
parent | 1a457753cfad05989574c671a221ffce2d5df703 (diff) | |
download | binutils-users/pmuldoon/c++compile.zip binutils-users/pmuldoon/c++compile.tar.gz binutils-users/pmuldoon/c++compile.tar.bz2 |
Update w/HEADusers/pmuldoon/c++compile
Problems:
gdb/compile/compile.c
gdb/cp-support.c
gdb/cp-support.h
gdb/gdbtypes.h
gdb/language.c
gdb/linespec.c
Diffstat (limited to 'gdb/procfs.c')
-rw-r--r-- | gdb/procfs.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/gdb/procfs.c b/gdb/procfs.c index b03809c..4b965ea 100644 --- a/gdb/procfs.c +++ b/gdb/procfs.c @@ -5100,7 +5100,6 @@ procfs_info_proc (struct target_ops *ops, const char *args, struct cleanup *old_chain; procinfo *process = NULL; procinfo *thread = NULL; - char **argv = NULL; char *tmp = NULL; int pid = 0; int tid = 0; @@ -5121,24 +5120,19 @@ procfs_info_proc (struct target_ops *ops, const char *args, } old_chain = make_cleanup (null_cleanup, 0); - if (args) - { - argv = gdb_buildargv (args); - make_cleanup_freeargv (argv); - } - while (argv != NULL && *argv != NULL) + gdb_argv built_argv (args); + for (char *arg : argv) { - if (isdigit (argv[0][0])) + if (isdigit (arg[0])) { - pid = strtoul (argv[0], &tmp, 10); + pid = strtoul (arg, &tmp, 10); if (*tmp == '/') tid = strtoul (++tmp, NULL, 10); } - else if (argv[0][0] == '/') + else if (arg[0] == '/') { - tid = strtoul (argv[0] + 1, NULL, 10); + tid = strtoul (arg + 1, NULL, 10); } - argv++; } if (pid == 0) pid = ptid_get_pid (inferior_ptid); |