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: [PATCH, doc RFA] Split create-breakpoint! into make-breakpoint, register-breakpoint!


> From: ludo@gnu.org (Ludovic CourtÃs)
> Cc: Doug Evans <xdje42@gmail.com>,  gdb-patches@sourceware.org
> Date: Wed, 04 Jun 2014 10:29:14 +0200
> 
> Eli Zaretskii <eliz@gnu.org> skribis:
> 
> >> From: Doug Evans <xdje42@gmail.com>
> >> Date: Tue, 03 Jun 2014 21:53:48 -0700
> >> 
> >> In keeping with the splitting of object creation and registration into
> >> two separate pieces, this does the same for breakpoints.
> >> "Consistency Is Good".
> >> 
> >> There hasn't been an FSF release of gdb+guile yet so I think it's ok
> >> to remove create-breakpoint! here.
> >
> > OK for the documentation part, but is delete-breakpoint a better name
> > than breakpoint-delete?.
> 
> I prefer âdelete-breakpoint!â.

Fine with me.

(Btw, what exactly is the principle behind the usage of the trailing
exclam?)

> > A question: how does one discard breakpoint objects so that they no
> > longer exist?  It seems that breakpoint-delete! only "deregisters" the
> > breakpoint, but there's no way to undo the effect of the
> > create-breakpoint procedure.
> 
> They just get garbage collected eventually.

That's what I suspected.  But then we cannot say in the manual that a
breakpoint deleted by breakpoint-delete! can later be re-registered,
can we?  Because if the object was GCed, we cannot register it, can
we?

Actually, there's a more serious problem here: what if the object
created by create-breakpoint is GCed _before_ we register it the first
time?  GC can strike whenever it feels like, so we _must_ explain that
a Guile variable that holds the breakpoint object should never go out
of scope before it is used to register the breakpoint.  Am I missing
something?


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