From: Daniel Jacobowitz <drow@mvista.com>
To: gdb-patches@sources.redhat.com
Subject: Re: unwind support for Linux 2.6 vsyscall DSO
Date: Tue, 07 Oct 2003 04:07:00 -0000 [thread overview]
Message-ID: <20031007040754.GA32257@nevyn.them.org> (raw)
In-Reply-To: <3F8238B0.50409@redhat.com>
On Mon, Oct 06, 2003 at 11:53:20PM -0400, Andrew Cagney wrote:
> >>> There should be an iterator over the entries in the /proc/pid/auxv
> >>> file with a callback that processes each entry. So that the iterator
> >>> could be used not just for finding the AT_SYSINFO_EHDR entry.
> >
> >>
> >>Ok, an iterator interface is fine with me, just marginally less efficient
> >>than the searcher when only one tag is actually used (and more efficient
> >>if
> >>many tags are used). (I had not proposed any function that would be
> >>useful
> >>solely for AT_SYSINFO_EHDR, though that was one of Jim's early
> >>suggestions.) If others agree this is the right interface for a
> >>target_ops
> >>addition, I will write that patch.
> >
> >
> >Actually, I think this is not as useful an interface as one that fetches
> >the whole block for you. There is another use for this call besides the
> >Linux-specific AT_SYSINFO_EHDR check: gcore. We want gcore to produce
> >NT_AUXV notes in core dumps so that those core dumps can be used to extract
> >whatever AT_* information we could extract from core dumps written by a
> >kernel.
> >
> >This is easy to add either way, but is cleaner, simpler, and more efficient
> >if it just writes the whole block uninterpreted than if it dissects and
> >reassembles it.
>
> For this to work, there will need to be mechanisms that:
>
> - unpack an architecture's auxv
> - pack an architecture's auxv
> - transport the auxv from the target, to GDB.
>
> The problem then is how to arrange these mechanisms so that they
> integrate well enough to work both native and cross (i386 on amd64 is
> considered a cross), be consistent with other gdb mechanisms and direction:
>
> target vector xfers via an iterator:
> - the low native code would be using the unpack method
> - the PIE and VSYSCALL code would be very simple
> - the CORE file code would need the pack method
> - the low remote could on-demand read the data
I think a pack method is overengineered. Unlike, for instance,
register files, we never need to pack an arbitrary auxv array.
We're always just copying one that we've been given, exactly as-is.
I just see call for transport and query.
> target vector xfers raw data:
> - the low native code would be simple
> - the PIE and VSYSCALL code would need to use the unpack method
> - the CORE file code would just write out the data
> - the low remote code would, either be locked into transfering raw
> bytes, or be forced to use the pack method
>
> Also, ...
>
> In my way earlier post, I also suggested "remote I/O' - a generic
> mechanism for accessing arbitrary target data. Looking through the
> target vectore I see there is already "to_query()". The original intent
> of to_query was to handle exactly this sort of problem - pushing data
> anonymously through the target vector. The auxv fetch, with a large
> bit of a struggle, could even be implemented using to_query.
Hmm, yes. The only problem that I see is the buffer-sizing one. A
traditional problem in our interfaces, I think; the remote code avoids
the issue delicately.
> So?
>
> I've strong reservations towards adding redundant functionality to the
> target vector. However, I also note that the existing to_query method
> isn't sufficient.
>
> So I can see either an iterator, or an update to to_query being added to
> the target vector. Given that the iterator is a given, that might be
> the safest starting point - let the target maintainer go through and
> clean up to_query.
While I won't argue about an iterator being useful, I think that the
target vector code would be clearer if we just had the raw buffer.
Layer the iterator on top of it, instead of re-implementing the
iterator in every target.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
next prev parent reply other threads:[~2003-10-07 4:07 UTC|newest]
Thread overview: 56+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-10-03 8:27 Roland McGrath
2003-10-03 23:44 ` Jim Blandy
2003-10-04 0:10 ` Roland McGrath
2003-10-04 7:28 ` Jim Blandy
2003-10-04 20:27 ` Roland McGrath
2003-10-04 21:14 ` Daniel Jacobowitz
2003-10-04 22:01 ` Roland McGrath
2003-10-04 23:28 ` Daniel Jacobowitz
2003-10-06 17:14 ` Jim Blandy
2003-10-06 19:35 ` Elena Zannoni
2003-10-06 19:31 ` Elena Zannoni
2003-10-06 20:24 ` Roland McGrath
2003-10-06 21:48 ` Elena Zannoni
2003-10-06 23:59 ` Roland McGrath
2003-10-07 0:13 ` Roland McGrath
2003-10-07 2:30 ` Elena Zannoni
2003-10-07 2:40 ` Roland McGrath
2003-10-07 2:47 ` Roland McGrath
2003-10-07 3:53 ` Andrew Cagney
2003-10-07 4:07 ` Daniel Jacobowitz [this message]
2003-10-07 4:17 ` Andrew Cagney
2003-10-07 4:28 ` Roland McGrath
2003-10-08 0:02 ` Michael Snyder
2003-10-08 0:46 ` Roland McGrath
2003-10-08 18:27 ` Andrew Cagney
2003-10-08 21:00 ` Andrew Cagney
2003-10-08 21:47 ` Roland McGrath
2003-10-08 23:25 ` Elena Zannoni
2003-10-09 0:45 ` Roland McGrath
2003-10-08 23:10 ` Elena Zannoni
2003-10-09 0:50 ` Roland McGrath
2003-10-08 23:53 ` Daniel Jacobowitz
2003-10-07 0:17 ` Daniel Jacobowitz
2003-10-07 23:54 ` Michael Snyder
2003-10-08 0:07 ` Roland McGrath
2003-10-07 4:43 ` Jim Blandy
2003-10-07 4:45 ` Roland McGrath
2003-10-09 19:58 ` Kevin Buettner
2003-10-09 20:02 ` Daniel Jacobowitz
2003-10-09 20:10 ` Jim Blandy
2003-10-09 22:20 ` Roland McGrath
2003-10-09 22:49 ` Kevin Buettner
2003-10-10 0:12 ` Michael Snyder
2003-10-11 1:44 ` Roland McGrath
2003-10-09 23:04 ` Kevin Buettner
2003-10-11 1:47 ` Roland McGrath
2003-10-15 4:33 ` Kevin Buettner
2003-10-09 20:21 ` Kevin Buettner
2003-10-09 20:23 ` Daniel Jacobowitz
2003-10-09 20:46 ` Kevin Buettner
2003-10-09 22:32 ` Roland McGrath
2003-10-09 22:46 ` Kevin Buettner
2003-10-11 1:40 ` Roland McGrath
2003-10-09 22:07 ` Roland McGrath
2003-10-09 22:32 ` Kevin Buettner
2003-10-07 3:33 Roland McGrath
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=20031007040754.GA32257@nevyn.them.org \
--to=drow@mvista.com \
--cc=gdb-patches@sources.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