When I compile lazarus with ppc386 -B -b -g lazarus.pp and do a ddd lazarus Why doesn't…
Hi!
Shane Miller wrote 12 lines
I was just about to write a little Faq about this, so could somebody please put it on the Website (linux-Howto):
xxxxxxxxx
Q: How can I debug lazarus and lcl on Linux?
A: First of all you need a debugger. gdb is the standard debugger under linux and there are several GUI-frontends available. One common frontend is ddd, which is part of most common distributions. To compile lazarus/lcl with debug-information you should then use the following commands to start a debug session:
export DEBUG=1
make clean; make
ddd lazarus
Be warned however, that ddd is not as comfortable as e.g. the Delphi debugger. Specially if it comes to view the contents of a variable you have to take into account that ddd/gdb are case sensitive whereas Pascal is case-insensitive. Therefore you have to type all variable names in uppercase to see their contents. For more information take a look into the fpc-manuals.
Q: I can debug now but ddd does not find my sources or complains that they contain no code. Whats that?
A: These seems to be a path-related problem with either gdb or ddd. To work around this you can use the "Change directory" command from the ddd menu and choose the directory where the sources are located. The drawback of this method is that you now can't use the source of the program you started with (e.g. lazarus). Thus it may be neccessary to change the directory multiple times.
xxxxxxxxxxx
hope this helps,
Stefan
