This is the mail archive of the gdb-patches@sourceware.org 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: [rfc / remote protocol] Remote shared library events


Daniel Jacobowitz <drow@false.org> writes:
> On Fri, May 18, 2007 at 09:04:49AM -0700, Jim Blandy wrote:
>> Sorry --- of course the @var{r} associated with the dllstop isn't
>> meaningless.  Regarding the other pairs, I didn't realize that one
>> wanted expedited registers for DLL events; would we actually use them?
>
> Sure.  For instance, if stop-on-solib-events was set, we would stop;
> or if we were single-stepping multiple instructions we'd (I hope, I
> haven't tested this) keep stepping.

Okay, this makes complete sense.

Humbly, I still don't think it's a great idea to take the trap packet
and give it new roles like this.  A DLL change is a new kind of event.

What would you say to this:

*** gdb.texinfo	16 May 2007 14:16:32 -0000	1.405
--- gdb.texinfo	18 May 2007 16:44:40 -0000
***************
*** 23178,23190 ****
  @item
  If @var{n} is @samp{watch}, @samp{rwatch}, or @samp{awatch}, then the
  packet indicates a watchpoint hit, and @var{r} is the data address, in
! hex.
  @item
  Otherwise, @value{GDBN} should ignore this @samp{@var{n}:@var{r}} pair
  and go on to the next; this allows us to extend the protocol in the
  future.
  @end enumerate
  
  @item W @var{AA}
  The process exited, and @var{AA} is the exit status.  This is only
  applicable to certain targets.
--- 23182,23219 ----
  @item
  If @var{n} is @samp{watch}, @samp{rwatch}, or @samp{awatch}, then the
  packet indicates a watchpoint hit, and @var{r} is the data address, in
! hex.  @var{aa} should be @samp{05}, the trap signal.
! 
  @item
  Otherwise, @value{GDBN} should ignore this @samp{@var{n}:@var{r}} pair
  and go on to the next; this allows us to extend the protocol in the
  future.
  @end enumerate
  
+ @item Lload @var{lib};@var{regs}
+ A dynamically linked library has been loaded.  The @var{lib} parameter
+ describes the new library, in the same format used by a
+ @samp{qfDllInfo} reply (@pxref{qfDllInfo}).  However, @var{lib} may
+ further end in @samp{,nop} if this library was already mapped, e.g.@:
+ by an earlier call to @code{LoadLibrary}.  The @var{regs} parameter is
+ a list of important register values, encoded as for a @samp{T} packet.
+ 
+ @item Lunload @var{lib};@var{regs}
+ A dynamically linked library has been unloaded.  the @var{lib}
+ parameter describes the unloaded library, in the same format used by 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.  The @var{regs} parameter is a list of important
+ register values, encoded as for a @samp{T} packet.
+ 
+ @item Ldll
+ The set of currently loaded dynamically linked libraries has changed.
+ @value{GDBN} should use @samp{qfDllInfo} to fetch a new list of loaded
+ libraries.
+ 
  @item W @var{AA}
  The process exited, and @var{AA} is the exit status.  This is only
  applicable to certain targets.


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