This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: int target_query(what, aux, buf, offset, len)


On Wed, Oct 08, 2003 at 06:26:31PM -0400, Andrew Cagney wrote:
> 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", ...)

This seems reasonable to me.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]