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] Make breakpoint subclasses inherit from breakpoint, add virtual destructor


On 05/03/2017 04:23 PM, Simon Marchi wrote:

> FYI, I just looked at it, and it looks like the
> momentary_breakpoint/longjmp_breakpoint hierarchy will cause a bit of
> trouble.  longjmp_breakpoint has a dtor, but no struct/class of its own,
> so nowhere to put the destructor.  I think that to do it correctly, I'll
> have to introduce structs/classes for them and have:
> 
>   breakpoint
>       ^
>       |
>   momentary_breakpoint
>       ^
>       |
>   longjmp_breakpoint
> 
> To keep it clean, it might be better if I introduced the structs/classes
> for momentary_breakpoint and longjmp_breakpoint first with the old-style
> inheritance, and then converted them to "real" inheritance along with
> the other types.

That sounds fine to me.

> 
> I'll try that tonight, but if you have ideas in the mean time, I'm all
> ears.

Thanks,
Pedro Alves


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