Are there any news on this?
Maybe this can inspire someone (it actually works):
http://mailman.isi.edu/pipermail/ns-users/2005-November/052583.html
One other thing, I made C::B run my own "debugger initialization command" (source gdb.txt) setting some breakpoints:
> source gdb.txt
Breakpoint 1 at 0x4013a9: file main.cpp, line 30.
Breakpoint 2 at 0x4013d2: file main.cpp, line 36.
Breakpoint 3 at 0x401411: file main.cpp, line 42.
Breakpoint 4 at 0x4014c4: file main.cpp, line 83.
Breakpoint 5 at 0x401518: file main.cpp, line 90.
(gdb)
> directory C:/cppcourse/Line_example2/
(gdb)
> delete breakpoints
(gdb)
However the breakpoints was automatically removed :(
Any chance that breakpoints could be removed before running the C::B "debugger initalization commands"?
I was just wondering if the workaround is already available(November 17, 2005)?
Should be. Set the breakpoint on the constructor's first line, i.e:
AClass::AClass(int x) // <-- put the breakpoint here
{
}
Thanks mandrav.
I tried that:-(
I am using gdb 6.3 and gcc 3.4.4. I updated to the nightly build previously mentioned (by overwritting files in the install folder).
I set the breakpoints like on the picture attached (it is breaking perfectly on a breakpoint in my main function).
The code example I used is also attached.
It works all fine if I enter the following "gdb user commands":
b _ZN7Point2DC1Eii
b _ZN7Point2DC1Ev
b _ZN7Point2DC1ERKS_
b _ZN6Line2DC1E7Point2DS0_
b _ZN6Line2DD1Ev
I must be doing something else wrong I guess?!?
[attachment deleted by admin]
OK
Then I get this from the debugger window:
> break Point2D::Point2D
[0] cancel
[1] all
[2] Point2D::Point2D(Point2D const&) at main.cpp:42
[3] Point2D::Point2D() at main.cpp:36
[4] Point2D::Point2D(int, int) at main.cpp:30
>
And the dubugger hangs:-(
Cannot enter "1" anywhere?
That works:
> rbreak Point2D::Point2D
Breakpoint 2 at 0x4013c2: file main.cpp, line 36.
void Point2D::Point2D();
Breakpoint 3 at 0x4013d2: file main.cpp, line 36.
void Point2D::Point2D();
Breakpoint 4 at 0x4013e3: file main.cpp, line 42.
void Point2D::Point2D(Point2D const&);
Breakpoint 5 at 0x401411: file main.cpp, line 42.
void Point2D::Point2D(Point2D const&);
Breakpoint 6 at 0x4013a9: file main.cpp, line 30.
void Point2D::Point2D(int, int);
Breakpoint 7 at 0x401393: file main.cpp, line 30.
void Point2D::Point2D(int, int);
(gdb)
Thanks for the workaround :D
Any plans to make this less troublesome at the moment :D?