User forums > Help

weird gdb issues...

(1/3) > >>

Kreso:
so far I've noticed 2 problems with gdb in C::B :

1) it cant break at the first line in main()
2) breakpoints in class constructors seem to be ignored


I'm using ubuntu Linux 6.06, C::B latest svn build. I've tried this with GDB 6.3,6.4 and 6.5, same thing.

thomas:
1) Works fine, although you should notice that you generally cannot break on everything.
For example, POD variable declarations and constant initialisers usually don't work as breakpoints.
This is not limited to the first line in main() though.

2) Is a known feature of gcc and gdb. This is due to how the compiler implements constructors.

marfig:
Search the forums for "gdb constructor" for a few tips on dealing with 2)

Kreso:
1) yes ofcourse, I know that :) but I mean ,actual lines, like function calls(), it never breaks on the first line

Kreso:
I've tried the dummy() workarround and it works :)

maby this could be included in C::B as a debugger option, so whenever a breakpoint is set in a constructor/destructor, c::b makes a dummy() function for every such breakpoint, sets the breakpoint and automaticly steps when gdb breaks?

Can this be made with the plugin sdk? if so, I volunteer to do this :)

Navigation

[0] Message Index

[#] Next page

Go to full version