Forum > Beginners
Complex programs unable to create breakpoints
daringly:
I have a breakpoint problem in 2.64 and 3.0.0. If I create a simple program, breakpoints work fine.
If I have a longer program (e.g., 400 lines, and some complex and large data structures), I cannot set a breakpoint anywhere. If I do set it, I get the error "Could not set Breakpoint <sourcefile: linenumber>".
any suggestions how to enable these are larger programs?
Martin_fr:
Sounds like a bug. So an example source might be needed.
One known issue is "inline" code. so for debug disable that {$INLINE OFF}.
It may also depend/differ on the debug symbol type (project options: stabs vs dwarf / the latter preferred)
What OS? Which version of GDB?
For windows (32 bit) we have a newer gdb on sourceforge (will be in the 1.6 release too). Maybe that helps.
daringly:
There is no inline code, and adding the debug disable didn't change anything.
I'm not sure how to access the debug symbol type.
I'm using Windows 7, GDB 7.4. Win 32 for i386. Version 1.0.12.
I have this issue for nearly every large program I write, and will be very happy if I can resolve it.
Martin_fr:
--- Quote from: daringly on February 18, 2016, 04:16:13 pm ---I'm not sure how to access the debug symbol type.
--- End quote ---
Menu "Project" > "Project options" then in the dialog go to "Debugging". There is a dropdown. Use either "Stabs" or "Dwarf with sets" (Do not use dwarf3)
--- Quote ---I'm using Windows 7, GDB 7.4. Win 32 for i386. Version 1.0.12.
--- End quote ---
Probably not related to your issue, but 7.4 may have some other issues. http://wiki.lazarus.freepascal.org/GDB_Debugger_Tips#Bugs_in_GDB
Better use 7.7.1 https://sourceforge.net/projects/lazarus/files/Lazarus%20Windows%2032%20bits/Alternative%20GDB/
Also check your setup
http://wiki.lazarus.freepascal.org/Debugger_Setup
- *NO* smart linking !
- only -O1 better no optimization at all. To be sure you can add -O- in "Custom Options" of project opitons
If problem persists try external linker -Xe in "Custom Options"
If units are in packages you need to go to the options of the package and enable debugging there.
Otherwise you need to find what those lines have in common. I debug the IDE itself (which is a fairly big project), and breakpoints work.
Martin_fr:
--- Quote from: daringly on February 18, 2016, 04:16:13 pm ---I'm using Windows 7, GDB 7.4. Win 32 for i386. Version 1.0.12.
--- End quote ---
If that is Lazarus 1.0.12 I recommend to upgrade.
Though that should not be related to your issue.
Navigation
[0] Message Index
[#] Next page