Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Jim Blandy <jimb@codesourcery.com>
To: gdb-patches@sourceware.org
Cc: gdb@sourceware.org
Subject: Re: [rfc / remote protocol] Remote shared library events
Date: Wed, 16 May 2007 22:59:00 -0000	[thread overview]
Message-ID: <m31whgv0ib.fsf@codesourcery.com> (raw)
In-Reply-To: <20070509201627.GA23422@caradoc.them.org> (Daniel Jacobowitz's message of "Wed, 9 May 2007 16:16:27 -0400")


Daniel Jacobowitz <drow@false.org> writes:
> All comments welcome!
>
> +@item
> +If @var{n} is @samp{load}, then the packet indicates a DLL load event,
> +and @var{r} describes the newly loaded library.  The library format is
> +the same used in @samp{qfDllInfo} replies (@pxref{qfDllInfo}), e.g.@:
> +@samp{load:Name=@var{hexname},TextSeg=@var{textaddr}}.  The entry may
> +end in @samp{,nop} if this library was already mapped, e.g.@: by an
> +earlier call to @code{LoadLibrary}.  @var{aa} should be @samp{05}, the
> +trap signal.
> +
> +@item
> +If @var{n} is @samp{unload}, then the packet indicates a DLL unload
> +event, and @var{r} describes the unloaded library.  @var{r} is a list
> +of comma-separated @samp{Key=Value} pairs, similar to a
> +@samp{qfDllInfo} reply.  The name, the segment offsets, or both may be
> +used to specify which DLL to unload, e.g.@:
> +@samp{unload:Name=@var{hexname}} or
> +@samp{unload:Name=@var{hexname},TextSeg=@var{textaddr}}.  The entry
> +may end in @samp{,nop} if this library is still mapped, e.g.@: by
> +another open handle.  @var{aa} should be @samp{05}, the trap signal.
> +
> +@item
> +If @var{n} is @samp{dll}, then the packet indicates that the loaded
> +DLLs have changed.  @value{GDBN} should use @samp{qfDllInfo} to fetch
> +a new list of loaded libraries.  @var{r} is ignored.  @var{aa} should
> +be @samp{05}, the trap signal.

It seems odd to me that it's an @var{n} that distinguishes the reason
for the stop; the @var{AA}, the @var{r}, and any other @var{r}:@var{n}
pairs are essentially meaningless.  I'd rather see an entirely new
stop reply packet type --- 'L', say --- with subsequent name/value
pairs, like those in a q[fs]DllInfo packet's 'm' response.

> +Reply:
> +@table @samp
> +@item m Name=@var{hexname},TextSeg=@var{textaddr}@r{[},DataSeg=@var{dataaddr}@r{]}
> +A single loaded library.  @var{hexname} is the name of the library,
> +as a hexadecimal sequence of ASCII characters.  @var{textaddr} is the
> +load address for the text segment of the library.  @var{dataaddr} is
> +the load address for the data segment of the library, if necessary.
> +If only @var{textaddr} is provided, the data segment will be relocated
> +by the same amount as the text segment.
> +
> +Other @samp{Key=Value} pairs may be added later to describe target
> +specific data.

Should the protocol allow Key=Value pairs to appear in any order?  I
don't think you really need to revise the reply template to show this,
just a note to that effect would be plenty.

> +If the packet ends with @samp{;l} then no further @samp{qsDllInfo}
> +packet will be sent.

Perfect.  Same trick as with qXfer.


  parent reply	other threads:[~2007-05-16 22:59 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-09 20:16 Daniel Jacobowitz
2007-05-09 20:40 ` Smith, Stephen (SWCOE)
2007-05-10  3:18 ` Eli Zaretskii
2007-05-16 22:59 ` Jim Blandy [this message]
2007-05-18  0:27   ` Daniel Jacobowitz
2007-05-18 16:04     ` Jim Blandy
2007-05-18 16:10       ` Daniel Jacobowitz
2007-05-18 16:49         ` Jim Blandy

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=m31whgv0ib.fsf@codesourcery.com \
    --to=jimb@codesourcery.com \
    --cc=gdb-patches@sourceware.org \
    --cc=gdb@sourceware.org \
    /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