This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [rfc v2][0/6] Remote /proc file access
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: palves at redhat dot com (Pedro Alves)
- Cc: gdb-patches at sourceware dot org
- Date: Mon, 16 Jan 2012 18:28:32 +0100 (CET)
- Subject: Re: [rfc v2][0/6] Remote /proc file access
Pedro Alves wrote:
> I've been through the series, and it looks good to me.
> Thanks a lot! If this doesn't work out in the end, I'll certainly help
> sort it out.
Thanks for the review!
> I've given a couple comments in reply to the patches directly. I'm leaving
> some general-ish comments here:
>
> - We could consider making "info proc" work with the default run
> target if the current target can't handle it, so that
> "info proc PID" works even when not debugging a process yet,
> like today.
Maybe. On the other hand, once we've switched to the gdbarch based
implementation, it would automatically work when not yet debugging
a process anyway, so I'm not sure this is really necessary ...
> - It could be argued that the pid parsing should be kept at
> the target/gdbarch callbacks side (pass down `char *args'),
> so that we didn't have:
>
> + if (args && *args == '/')
> + tid = strtoul (args + 1, &args, 10);
> + else
> + tid = 0;
>
> in infcmd.c:info_proc_cmd_1 which is only needed by procfs.c.
Yes, good point. In fact, that makes more sense; the format of a
process ID ought to be target-specific (like with attach). Also,
this will make the diffs a bit smaller ...
I'll provide an updated patch set.
Bye,
Ulrich
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com