From: Daniel Jacobowitz <drow@mvista.com>
To: gdb-patches@sources.redhat.com
Subject: Re: [PATCH] target_read_aux_vector
Date: Tue, 07 Oct 2003 01:53:00 -0000 [thread overview]
Message-ID: <20031007015317.GB18589@nevyn.them.org> (raw)
In-Reply-To: <200310070148.h971m8Wd011747@magilla.sf.frob.com>
On Mon, Oct 06, 2003 at 06:48:08PM -0700, Roland McGrath wrote:
> This patch adds target_read_aux_vector to read the auxv information as a
> whole block (there is no code here that interprets its contents). It also
> makes ELF core file writing (gcore) use this to produce an NT_AUXV note.
> I have only tested the linux-proc.c code in actuality, but the procfs.c
> (Solaris) and corelow.c code is so simple it would be hard for it to be
> wrong.
>
> The function signature used here is a little goofy if you ask me. But I
> modelled it on target_make_corefile_notes, which is another recent addition
> and so I assume it is in the style that gdb folk prefer. I would be happy
> to change the signature if there is a different preference. I made the
> malloc'd-ness of the returned pointer part of the interface rather than
> having it call make_cleanup and magically know that's the right scope as
> the to_make_corefile_notes implementations do.
>
> The one way I've tested this is that "gcore" used on Linux 2.6 du jour
> produces an NT_AUXV note in the core file matching what a kernel-written
> dump has. The Solaris additions should make it do the same there as well.
>
> The core_ops implementation of target_read_aux_vector is not presently
> used at all, because you can't do gcore when examining a core file.
> (Incidentally, I think gdb should support that. Doing that and comparing
> what gdb wrote to the original core file is a good test of both core file
> reading and core file writing.) It would be used by the tdep code looking
> for AT_SYSINFO_EHDR, as we have been discussing here.
>
> I am not happy that the identical function is duplicated in procfs.c and
> linux-proc.c; but I did not see any place for common code that is usable
> for both flavors of /proc filesystem. The to_make_corefile_notes hooks in
> those two files are close to identical as well.
>
>
> Comments?
Yes, comments would be nice :) Just trivially: summary comments before
new functions. And two spaces after full stops.
I have no substantive comments on this code. Let's see if anyone
else does though.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
next prev parent reply other threads:[~2003-10-07 1:53 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-10-07 1:48 Roland McGrath
2003-10-07 1:53 ` Daniel Jacobowitz [this message]
2003-10-07 1:58 ` Andrew Cagney
2003-10-07 2:08 ` Roland McGrath
2003-10-08 14:11 ` Andrew Cagney
2003-10-08 19:10 ` Jim Blandy
2003-10-08 20:10 ` Andrew Cagney
2003-10-09 0:51 ` Michael Snyder
2003-10-09 0:55 ` Roland McGrath
2003-10-07 2:08 ` Daniel Jacobowitz
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=20031007015317.GB18589@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