Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: Sergio Durigan Junior <sergiodj@redhat.com>
Cc: Pedro Alves <palves@redhat.com>,
	binutils@sourceware.org,        jan.kratochvil@redhat.com,
	hongjiu.lu@intel.com,        gdb-patches@sourceware.org
Subject: Re: [PATCH 2/2] Put more info in NT_PRPSINFO Linux notes
Date: Mon, 04 Feb 2013 16:36:00 -0000	[thread overview]
Message-ID: <510FE36C.3050301@redhat.com> (raw)
In-Reply-To: <m38v75rtv6.fsf@redhat.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).
>
> 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


  reply	other threads:[~2013-02-04 16:36 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-30  6:53 [PATCH 1/3] Implement new Linux target vectors on BFD Sergio Durigan Junior
2013-01-30  9:16 ` Alan Modra
2013-01-30 16:43   ` Sergio Durigan Junior
2013-01-31 17:19     ` Pedro Alves
2013-01-31 23:04       ` [PATCH 1/2] New entry points for writing Linux NT_PRPSINFO notes Pedro Alves
2013-02-01  6:37         ` Alan Modra
2013-02-03  2:51           ` Sergio Durigan Junior
2013-02-04 18:31           ` Sergio Durigan Junior
2013-01-31 23:05       ` [PATCH 2/2] Put more info in NT_PRPSINFO Linux notes Pedro Alves
2013-02-03 21:05         ` Sergio Durigan Junior
2013-02-04 16:36           ` Pedro Alves [this message]
2013-02-04 18:41             ` Sergio Durigan Junior
2013-01-30 16:44   ` [PATCH 1/3] Implement new Linux target vectors on BFD H.J. Lu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=510FE36C.3050301@redhat.com \
    --to=palves@redhat.com \
    --cc=binutils@sourceware.org \
    --cc=gdb-patches@sourceware.org \
    --cc=hongjiu.lu@intel.com \
    --cc=jan.kratochvil@redhat.com \
    --cc=sergiodj@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox