Ryan Mansfield(deleted)
|
Re: breakpoints in constructors
|
Ryan Mansfield(deleted)
12/01/2008 10:10 AM
post17636
|
Re: breakpoints in constructors
Malte Mundt wrote:
> Hi,
>
> a customer mentioned to me that breakpoints in constructors do not work. Is this true (haven't tried to reproduce it,
yet). Is there a fix?
This is true sometimes in C++ generated by gcc 3.x and newer. In the new
C++ ABI, gcc generates two copies of the constructor, one in-charge and
one not-in-charge. When you set a breakpoint in the ctor, gdb sets the
breakpoint in the closest one. In some cases this will not be the ctor
that gets executed. I believe there have been some changes done in the
upstream gdb (6.8 or newer) that sets breakpoints in both constructors
and resolves the issue.
Regards,
Ryan Mansfield
|
|
|