Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2000-06

debugging

7 messages · 4 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Stefan Hille
to Shane Miller: 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
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: 48155 Muenster voice: 0251/664695

Reply by email

Shane Miller

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).

Thanks
Shane

>> 06/29/00 08:59AM >>>

What's the url to look at the cvs tree so I can view what's changed over the past few days. I need to see what's causing the problem with the editor.

Thanks
Shane

>> 04/13/00 09:17AM >>>

Hello,

I changed the CVS and web server from a RedHat to a SuSE machine.

Unfortunately, a RedHat password file doesn't work on a SuSE machine, so I had to reset all passwords. I think that I restored the Lazarus user password correctly. Could someone try this and confirm that it works.

Just try a cvs update somewhere. If it fails with a authentication failure, I messed up. In that case please send me the correct password.

Michael.

_________________________________________________________________ To unsubscribe: mail with
"unsubscribe" as the Subject
archives at http://www.miraclec.com/list_archives/lazarus

_________________________________________________________________ To unsubscribe: mail with
"unsubscribe" as the Subject
archives at http://www.miraclec.com/list_archives/lazarus

Reply by email

Marc Weustink
to Stefan Hille: Thanks Marc, I'll try that although I already have these settings in ddd. I'll report if…

+ From: Stefan Hille
+
+ On Wed, Jul 05, 2000 at 12:48:37AM +0200, Marc Weustink wrote:

+ > You can create a $(HOME)/.gdbinit file like:
+ >
+ > directory /your/path/to/lazarus
+ > directory /your/path/to/lazarus/lcl
+ > directory /your/path/to/lazarus/lcl/include
+ > directory /your/path/to/lazarus/lcl/interfaces/gtk +
+ Thanks Marc, I'll try that although I already have these
+ settings in ddd.

Ah, Where did you put these. ddd has gdb options but somehow it seems that these settings aren't stored anywhere so I keep entering them.

Marc

Reply by email

Marc Weustink
to Shane Miller: When I compile lazarus with ppc386 -B -b -g lazarus.pp and do a ddd lazarus Why doesn't…
Stefan Hille wrote 9 lines
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.

You can create a $(HOME)/.gdbinit file like:

directory /your/path/to/lazarus
directory /your/path/to/lazarus/lcl
directory /your/path/to/lazarus/lcl/include
directory /your/path/to/lazarus/lcl/interfaces/gtk

marc

Reply by email

Stefan Hille
to Stefan Hille: Thanks Marc, I'll try that although I already have these settings in ddd. I'll report if…
Marc Weustink wrote 13 lines
+ From: Stefan Hille + + On Wed, Jul 05, 2000 at 12:48:37AM +0200, Marc Weustink wrote: + > You can create a $(HOME)/.gdbinit file like: + > + > directory /your/path/to/lazarus + > directory /your/path/to/lazarus/lcl + > directory /your/path/to/lazarus/lcl/include + > directory /your/path/to/lazarus/lcl/interfaces/gtk + + Thanks Marc, I'll try that although I already have these + settings in ddd.

I tried now, but the message "... but contains no code" still comes. Nevertheless it works, I can set breakpoints. Strange behaviour....

Ah, Where did you put these. ddd has gdb options but somehow it seems that these settings aren't stored anywhere so I keep entering them.

I only selected "Edit" "gdb-settings" and set the search-path. After that used "Edit" "Save options". I looked around a little bit to find the place where these settings are stored. My suggestion: These settings get stored in the log-file and will be passed to gdb as "commands" during startup.

bye,

Stefan

--------------------------------------------------------- Stefan Hille email: 48155 Muenster voice: 0251/664695

Reply by email

Stefan Hille
to Shane Miller: When I compile lazarus with ppc386 -B -b -g lazarus.pp and do a ddd lazarus Why doesn't…
Marc Weustink wrote 17 lines
At 13:18 30-06-2000 +0200, Stefan Hille wrote: > >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. You can create a $(HOME)/.gdbinit file like: directory /your/path/to/lazarus directory /your/path/to/lazarus/lcl directory /your/path/to/lazarus/lcl/include directory /your/path/to/lazarus/lcl/interfaces/gtk

Thanks Marc, I'll try that although I already have these settings in ddd. I'll report if it's successful.

bye,

Stefan

--------------------------------------------------------- Stefan Hille email: 48155 Muenster voice: 0251/664695

Reply by email