From: Pedro Alves <alves.ped@gmail.com>
To: Ulrich Weigand <uweigand@de.ibm.com>
Cc: gdb-patches@sourceware.org, jan.kratochvil@redhat.com,
sergiodj@redhat.com
Subject: Re: [rfc, ping] Remote "info proc" and core file generation
Date: Thu, 05 Jan 2012 16:38:00 -0000 [thread overview]
Message-ID: <4F05D20B.8030700@gmail.com> (raw)
In-Reply-To: <201201051517.q05FH0IE012035@d06av02.portsmouth.uk.ibm.com>
On 01/05/2012 03:17 PM, Ulrich Weigand wrote:
> Hello,
>
> given the problems with my latest attempt to access /proc remotely via
> generic file access routines documented here:
> http://sourceware.org/ml/gdb-patches/2011-12/msg00782.html
>
> I would like to go back to my earlier approach using TARGET_INFO_PROC:
> http://sourceware.org/ml/gdb-patches/2011-12/msg00007.html
> http://sourceware.org/ml/gdb-patches/2011-12/msg00008.html
> http://sourceware.org/ml/gdb-patches/2011-12/msg00009.html
> http://sourceware.org/ml/gdb-patches/2011-12/msg00010.html
> http://sourceware.org/ml/gdb-patches/2011-12/msg00011.html
> http://sourceware.org/ml/gdb-patches/2011-12/msg00014.html
> http://sourceware.org/ml/gdb-patches/2011-12/msg00015.html
> http://sourceware.org/ml/gdb-patches/2011-12/msg00016.html
>
> In the meantime, I've got approval for the doc and bfd parts, and
> Joel has regression-tested the patches on a procfs target (Irix).
>
> So the only thing that stops this patch series from going in as-is
> is consensus that TARGET_INFO_PROC is the right abstraction level.
>
> Given the experiments I did in the meantime (see above), I'd now
> argue that this *is* the proper level of abstraction:
>
> - TARGET_INFO_PROC allows the *contents* of Linux /proc files to
> be passed through unchanged, so we don't have to define our own
> formats (and keep updating them) -- the one drawback is that the
> contents are obviously Linux-specific, but that's OK as long as
> the target objects are only used in linux-tdep code.
>
> - At the same time, *access* to those contents is abstracted. This
> means we do *not* have to know exactly where on the target the
> /proc files are found: e.g. in the classic remote target, the GDB
> host side does not even know the PID of the inferior process on
> the target. (Another possibility might be a Linux kernel remote
> target that operates via hardware debugging or in-kernel debugging
> and still provides access to Linux processes: such remote stubs
> could also implement TARGET_INFO_PROC, even if they may not
> provide general access to the file system.)
>
> Pedro, you had been raising concerns about this initially. Did you
> have a chance to look at the discussion refered to at the top of
> this mail?
I've replied now. Sorry for the delay...
> Do you still feel that TARGET_INFO_PROC is inappropiate?
I still do. :-(
- there's the issue I raised about needing to cache the object across
the whole transfer, lest the file disappears
of changes behind your feet. Easy to fix, though.
- I don't see the advantage over separate target objects for each
proc/... subtype. We already have a mechanism to report back
some object is not supports (simply don't support
the qXfer:object:read packet). Why use the annex instead?
An e.g., getting at the current process'es executable is something
that would be useful for target_pid_to_exec_file, for attach.
If we're having a specific packet for that, shouldn't it be a "top-level"
packet, rather than buried in TARGET_INFO_PROC?
- if GDB already needs to know what target it is talking to (for the
gdbarch methods), then I don't see what gain do we have from half
an abstraction -- this is what leads me to consider instead reading
from the target filesystem.
prev parent reply other threads:[~2012-01-05 16:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-05 15:17 Ulrich Weigand
2012-01-05 16:38 ` Pedro Alves [this message]
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=4F05D20B.8030700@gmail.com \
--to=alves.ped@gmail.com \
--cc=gdb-patches@sourceware.org \
--cc=jan.kratochvil@redhat.com \
--cc=sergiodj@redhat.com \
--cc=uweigand@de.ibm.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).