Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@mvista.com>
To: Roland McGrath <roland@redhat.com>
Cc: Andrew Cagney <cagney@gnu.org>, gdb-patches@sources.redhat.com
Subject: Re: [PATCH] auxv support
Date: Sun, 01 Feb 2004 06:04:00 -0000	[thread overview]
Message-ID: <20040201060419.GA22586@nevyn.them.org> (raw)
In-Reply-To: <200401310013.i0V0DnGE018646@magilla.sf.frob.com>

On Fri, Jan 30, 2004 at 04:13:49PM -0800, Roland McGrath wrote:
> For some reason I didn't get your message directly (yet anyway), though
> I've now seen it in the mailing list archives.

List reply bites again.  If you are not subscribed to gdb-patches,
please use a reply-to or something along those lines... otherwise I
assume it was just mail lag.

> As to the OPS argument to target_auxv_parse, I found it consistent and
> originally had in mind that it would be used to know the wordsize and byte
> order, since that seems like the appropriate sort of modularity to me.  But
> then I followed Andrew's code for the implementation, i.e. using
> `extract_unsigned_integer' with its reference to global state.  I presume
> that what Andrew did is the current preferred thing to do.  Frankly, I
> can't figure out which parts of gdb's interface are supposed to be modular
> in what way.  Everything else related to this code uses target_ops pointers
> instead of referring to global variables.  

I'm not sure whether the target is supposed to indicate an architecture
in this fashion (target has-an architecture), but I guess it makes
sense that (someday) it would.  So, fine.

You wrote elsewhere:
>>The target vector update is fine.
>
>
>Sorry, I'm not entirely clear on how to read you.  Should I commit the 
>whole patch I posted now?  (I'm not sure because you said "target vector
>update", and my patch includes to_xfer_partial target updates,
>to_make_corefile_notes target updates, and the `info auxv' user command.)

I've approved the rest of the patch, so go ahead and check it in, along
with the documentation.  Then we can get back to the testcase and
remote support.

> +
> +    case TARGET_OBJECT_AUXV:
> +      sprintf (buf2, "qAuxVector:%lu", (unsigned long int) offset);
> +      i = putpkt (buf2);
> +      if (i < 0)
> +	return i;
> +      buf2[0] = '\0';
> +      getpkt (buf2, rs->remote_packet_size, 0);
> +      if (buf2[0] == '\0')
> +	return -1;
> +      return hex2bin (buf2, readbuf, len);
> +
>      default:
>        return -1;
>      }

Seems reasonable.  Probably the packet will need to be conditionally
supported (see packet_ok, remote_P_packet or so).  The mechanism for
doing that at the moment involves a couple of copy/pastes, it needs
cleaning up eventually.

> A slightly more grandiose idea is to define it as:
> 
> 	qAux:<what>:<offset>:<readsize>
> 
> This is in the target_read_partial vein, giving a <what> string of auxv or
> unwind or suchlike, and decimal values for <offset> and <readsize>.
> The reply packet should perhaps explicitly say whether it's just returning
> a partial response, or if it read all there was, e.g.
> 
> 	<totalsize>:<hexdata>
> 
> I don't know if this is considered more or less desireable than an entirely
> new flavor of packet for each kind of other-than-memory space to be accessed.

Personally I would prefer a separate packet for each type of aux data. 
Gdbserver would end up with a strncmp (buf, "qAux:auxv", 9) versus a
strncmp (buf, "qAuxVector:", 11), and qAuxVector is more
straightforward to probe for the existence of.  Perhaps it should be
qAuxVector:<offset>:<readsize> rather than qAuxVector:<offset>.

Note that you'll need to use LinuxThreads (or no threads) if you want
to test this with gdbserver; I have NPTL support almost done but it
needs the remote.c patch I posted today.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


       reply	other threads:[~2004-02-01  6:04 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200401310013.i0V0DnGE018646@magilla.sf.frob.com>
2004-02-01  6:04 ` Daniel Jacobowitz [this message]
2004-02-01 22:36   ` Roland McGrath
2004-02-02  0:11   ` Roland McGrath
2004-02-02  6:24     ` Eli Zaretskii
2004-02-02 14:17   ` Andrew Cagney
2004-02-02 14:25   ` Andrew Cagney
2004-01-29  2:59 Roland McGrath
2004-01-29  6:39 ` Eli Zaretskii
2004-01-29  8:20   ` Roland McGrath
2004-01-29 20:14     ` Eli Zaretskii
2004-01-29 21:31       ` Roland McGrath
2004-01-30 19:03 ` Daniel Jacobowitz
2004-01-30 23:35   ` Andrew Cagney
2004-01-30 23:51     ` Roland McGrath
2004-01-31  0:11       ` Andrew Cagney
2004-01-31  0:16         ` Roland McGrath
2004-02-02 14:27           ` Andrew Cagney
2004-02-17 16:35         ` Andrew Cagney
2004-02-18  2:08           ` Roland McGrath
2004-02-24  3:50         ` Roland McGrath
2004-02-25  3:59           ` Andrew Cagney
2004-02-25  4:03           ` Daniel Jacobowitz
2004-02-25 20:38             ` 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=20040201060419.GA22586@nevyn.them.org \
    --to=drow@mvista.com \
    --cc=cagney@gnu.org \
    --cc=gdb-patches@sources.redhat.com \
    --cc=roland@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