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] Add new commands to windows native code.


 Hi Eli,



> -----Message d'origine-----
> De : gdb-patches-owner@sourceware.org [mailto:gdb-patches-
> owner@sourceware.org] De la part de Eli Zaretskii
> Envoyé : vendredi 9 août 2013 16:06
> À : Pierre Muller
> Cc : gdb-patches@sourceware.org
> Objet : Re: [RFC] Add new commands to windows native code.
> 
> > From: "Pierre Muller" <pierre.muller@ics-cnrs.unistra.fr>
> > Date: Thu, 8 Aug 2013 10:44:08 +0200
> >
> >   This patch adds three new commands to windows native code:
> > these are three Boolean set/show commands :
> >
> > 1) set print-first-chance-exception on/off
> > to also print a "gdb: unknown target exception ..."
> > string on each first-chance exception.
> >
> > 2) set stop-on-first-chance-exception on/off
> > to stop code execution each time a first chance exception occurs.
> > and
> > 3) set stop-on-debug-string-event on/off
> > to stop code execution each time a debug string event occurs.
> >
> >   The third command was particularly useful to
> > understand and eliminate a msvcrt debug string event generated
> > by GDB code (fix to be submitted in a next patch).
> 
> I agree that these are useful features, but I would think they are
> more appropriate as part of "catch" implementation for Windows.  For
> starters, treating these as catchpoints will allow to use all the
> features of catchpoints: ignore counts, commands, display in "info
> breakpoints", etc.
> 
> So would you like to rewrite this as subcommands of "catch"?  E.g.,
> how about
> 
>   . catch exception [NAME]

  Currently catch exception is an ADA specific catch type...

  It seems that 'catch catch regex ' 
could be used...

  But currently all exception are converted into signals inside
windows-nat.c code...
  So that implementing your suggestion would basically mean
that the Windows API exception would not be converted into 
signals anymore...
  This is a huge change, which should probably not be enabled 
by default, no?
 
>     will stop when a specified exception (default: any exception) is
>     detected
> 
>   . catch debug-string
> 
>     will stop whenever any debug string event is detected.
> 
> In any case, these are user-visible changes, so they will require
> updates to the user manual.

  I do agree here...
  But frankly speaking, I fear that I will never be able to
implement such a feature :(
  The list of stuff I wrote for windows OS GDB support
that was never integrated into main-line is already quite huge...

  I did look a little a the catching code inside break-catch-throw.c 
but I still didn't even get how the exception number is supposed to
be passed to the loop that looks through the list of all breakpoints
to see if there is a match...

Pierre 



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