This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 2/2] Put more info in NT_PRPSINFO Linux notes


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).
>
> Thanks.
>
> 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!

-- 
Pedro Alves


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]