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: remove global stop_bpstat dependency from breakpoints module


On Thu, Jun 05, 2008 at 07:27:07PM +0100, Pedro Alves wrote:
> As I said, I would mind at all to change this to the read
> the PC of the current thread.  Just pointing out the current
> behaviour.

I think that would be correcting it to the right behavior.  In 99% of
the cases where this is used at all, they mean the same thing.

> > > One way to fix it, would be to also loop through all threads to update
> > > their version of stop_bpstat, but I'd like better.
> >
> > If we do need to context-switch stop_bpstat, it seems like checking
> > all of those would be simpler than this patch as posted.
> 
> Well, simpler yes, but adds even more coupling.  I thought this was
> a nice cleanup.  It's mentioned a few times in comments
> throughout breakpoints.c.

I don't like reference counting as a solution to clear memory
management.  Sometimes it's necessary or helpful, but here I think it
just gives us room to be careless (and have to worry more about
leaks).

-- 
Daniel Jacobowitz
CodeSourcery


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