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] Make static tracepoint with markers more OO


On 01/13/2012 05:09 PM, Sergio Durigan Junior wrote:
>> > It's unfortunate to be calling the breakpoint's virtual methods
>> > before the object itself is created, which will require some redesign
>> > and refactoring if we ever switch to C++ (and is dangerous, as you may
>> > end up touching parts of the object which are not constructed yet by
>> > mistake), but, this is no worse than what we have now, so I'm fine with it.
> Yes, I understand what you're saying.  I couldn't figure out a better
> way of handling this (except creating a "pre_breakpoint_ops"?).

Yeah, something like a factory object, along with trying to push out of
init_breakpoint_sal, etc. breakpoint-type specific bits, up into the callers, so
to get rid of layer inversion.  Anyway, don't worry about it now.  Your patch
is already a good cleanup.

> Anyway, thanks for the review, I will submit a fixed version of the patch in
> Tromey's reply.

-- 
Pedro Alves


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