This is the mail archive of the
mailing list for the binutils project.
Re: [PATCH 2/2] Put more info in NT_PRPSINFO Linux notes
- From: Pedro Alves <palves at redhat dot com>
- To: Sergio Durigan Junior <sergiodj at redhat dot com>
- Cc: Pedro Alves <palves at redhat dot com>, binutils at sourceware dot org, jan dot kratochvil at redhat dot com, hongjiu dot lu at intel dot com, gdb-patches at sourceware dot org
- Date: Mon, 04 Feb 2013 16:35:56 +0000
- Subject: Re: [PATCH 2/2] Put more info in NT_PRPSINFO Linux notes
- References: <510AA7A3.email@example.com> <firstname.lastname@example.org> <email@example.com>
On 02/03/2013 09:05 PM, Sergio Durigan Junior wrote:
> On Thursday, January 31 2013, Pedro Alves wrote:
>> I just noticed, right before pushing send, that linux_fill_prpsinfo
>> does a "stat" call on the host, while that should be a call on the
>> target. Unfortunately, there's no target_fileio_stat method.
>> Fortunately, the RSP bits are already in place, and just we need to
>> add the target method and hook it to remote_fileio_stat on the remote
>> target (and to the host stat for native targets).
> I am still hacking on the remote code in order to implement the stat
> operation on it, but I noticed that it will involve some more time so I
> decided to do a different approach in order to get this patch in.
Good idea. Then it sounds like the remote work won't be
necessary then. Looking at the proc manual, or proc.txt in the kernel
I didn't find any indication that these fields weren't "always there".
> What I did was basically read (via target_fileio_read_stralloc) and
> parse the `/proc/PID/status' file, which contains both UID and GID
> numbers (the only information I need from the `stat' call after all).
> It was easy enough to do and worked fine on all targets, so I'm sending
> this version of the patch for review and hopefully approval.
> The ChangeLog entry is still the same
(Please always paste it along with the patch, even if unchanged.
That's a good policy to avoid a reviewer having to go back
and forth between emails looking for the pieces.)
> and everything else is untouched
> except for the linux_fill_prpsinfo function.
> OK to apply?
Looks good to me. Thanks!