This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC] Make static tracepoint with markers more OO
- From: Pedro Alves <palves at redhat dot com>
- To: Sergio Durigan Junior <sergiodj at redhat dot com>
- Cc: Pedro Alves <palves at redhat dot com>, gdb-patches at sourceware dot org, Tom Tromey <tromey at redhat dot com>
- Date: Mon, 16 Jan 2012 12:31:46 +0000
- Subject: Re: [RFC] Make static tracepoint with markers more OO
- References: <m362gg9ro7.fsf@gmail.com> <4F1010F5.4020104@redhat.com> <m3y5tb8r7u.fsf@gmail.com>
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