User forums > Help
weird gdb issues...
thomas:
This would mean to recompile and relink each time you set or unset a breakpoint. It may be better to use the regex method (and possibly loop through next until At: says you're in the line you want).
Kreso:
--- Quote from: thomas on August 14, 2006, 10:13:51 am ---This would mean to recompile and relink each time you set or unset a breakpoint. It may be better to use the regex method (and possibly loop through next until At: says you're in the line you want).
--- End quote ---
well not necesarily, you could like create a hidden cpp file where you would make lets say, 50 dummy functions, each with a different name ofcourse, and if the user checks that workarround option, you always compile that file with the rest of the project, and just set/unset breakpoints whenever the user sets them in the constructor.
mandrav:
--- Quote from: Kreso on August 13, 2006, 09:36:23 pm ---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?
--- End quote ---
Don't get your hopes up, this will never be included in C::B.
It is an IDE for developers. You are the developer, you should know what to do. The IDE should never perform such drastic operations like adding a hidden file to your project and compiling/linking it with the rest of your files :shock: .
This constructor-breakpoints issue is a known shortcoming of gdb. Learn your way around it. Don't expect your IDE to perform complex tasks to do it for you (which is not guaranteed to work anyway).
Kreso:
I know, I know, but still :)
just tell me one thing: can the method described above me made with the C::B plugin sdk? if so, I'll get right on it, and it will serve as a temporary solution until gdb fixes the issue.
thomas:
This can certainly be done with the Code::Blocks SDK, it just isn't good practice and it doesn't make much sense.
You can query a projectfile's filename from ProjectManager, and you can certainly tell it to use some different file, too. You'll only have to manage swapping in the right thing when the user compiles and swapping it back when the user edits a file (which can happen while the IDE compiles).
All in all, it's a terrible hack. Don't come running when it eats your cat... 8)
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version