This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
int target_query(what, aux, buf, offset, len)
- From: Andrew Cagney <ac131313 at redhat dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Wed, 08 Oct 2003 18:26:31 -0400
- Subject: int target_query(what, aux, buf, offset, len)
Hello,
Ref: The bottom of:
http://sources.redhat.com/ml/gdb-patches/2003-10/msg00158.html
and replies.
has identified the need to update target_query(). The present interface
looks like:
int target_query (int /*char */ query_type,
char *buf,
char *outbuf,
int *bufsiz);
Where QUERY_TYPE and BUF are used to construct the query sent to the
target. I'd like to propose that it be changed to:
long
target_query (enum target_query_type query_type, const char *aux,
void *outbuf, CORE_ADDR offset, long length);
It attempts to query OFFSET:LENGTH bytes returning them in outbuf.
The number of bytes actually transfered is returned, or zero if no more
bytes are available, or -1 if the query isn't supported. This allows
short reads.
Defined QUERY_TYPEs include QUERY_TYPE_T, QUERY_TYPE_P, others can be
added later. Some queries require suplemental information and that can
be passed using the string buffer AUX.
The "auxv" could be transfered using (QUERY_TYPE_PROC_AUXV, ...) or
(QUERY_TYPE_PROC, "auxv", ...)
thoughts,
Andrew