[lazarus] debugging
Stefan Hille
stoppok at osibisa.ms.sub.org
Thu Jun 29 19:04:36 EDT 2000
Hi!
On Thu, Jun 29, 2000 at 10:48:13AM -0500, Shane Miller wrote:
> Hey,
>
> When I compile lazarus with
>
> ppc386 -B -b -g lazarus.pp
> and do a
>
> ddd lazarus
>
> Why doesn't it allow me to enter the .inc files? It says that they contain no code but it should have compiled them!!!! What am I doing wrong?
>
> This used to work (I think).
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
--
---------------------------------------------------------
Stefan Hille email: stoppok at osibisa.ms.sub.org
48155 Muenster voice: 0251/664695
More information about the Lazarus
mailing list