Sign in Join

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

Mailing lists / lazarus / 1999-10

DDD Graphical Debugger

10 messages · 6 people ·

Reply by email Subscribe to this list Your subscription

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

Cliff Baeseman

yep it sure makes me happy also...

I am getting as familiar as I can with it before jumping back on the lazarus code.

Cliff

Earlier message 71 lines
-----Original Message----- From: Curtis White To: Date: Wednesday, October 06, 1999 11:04 PM Subject: RE: [lazarus] DDD Graphical Debugger >Cliff, > >I was playing with DDD tonight and this is great. I sure wish I would have known >about this a long time ago. It really makes it easy to use GDB. > >You need to have the Data Window and the GDB Console enabled from the View menu. > >When you want to set a watch variable, you can enter "watch SHELLO" (without >the quotes) in the bottom window. It must be in all uppercase. This sets GDB to >watch that variable. Then when you step through, it stops everytime that >variable is changed. I tried it on your program below and it worked really well. > >You can also display the variable by entering "graph display SHELLO" in the >bottom window. This will setup a display in the top data window so you can stop >and see the value of the variable at any point. > >This will be a huge help in debugging the code. I highly recommend for anyone >using Linux to use DDD for debugging your FPC code. > > >Curtis > >On 06-Oct-99 Baeseman, Cliff wrote: >> Stephan >> >> >> In the example below what do I tell DDD in order to put a watch on sHello... >> >> say for instance I break on writeln and I wish to know the value of sHello.. >> >> How about for a class?? >> >> You are correct I have to start ddd from the same directory as my source or >> it will look in the user home dir for the source. >> >> >> >> program hello >> >> var >> sHello : string; >> >> begin >> sHello := 'Hello World'; >> writeln(sHello); >> end. >> > > >_________________________________________________________________ > To unsubscribe: mail with > "unsubscribe" as the Subject > archives at http://www.miraclec.com/list_archives/lazarus >

Reply by email

Baeseman, Cliff

Peter,

here is the program it was not in a class ??? trying to put a watch on a..

program test

var
  a: string;
begin
  a := 'test';
  writeln(a);
end.
Earlier message 22 lines
-----Original Message----- From: Peter Vreman Sent: Wednesday, October 06, 1999 10:19 AM To: '' Subject: RE: [lazarus] DDD Graphical Debugger > DDD is pretty good with Free Pascal from what I saw last night. Of course it > is using gdb on the back end which could not resolve a variable I was trying > to place a watch on. If I could just place a watch on something I would be > off and running. It can't watch variables in other stackframes. To see a field of a class/object you need 'this.FIELD' Peter _________________________________________________________________ To unsubscribe: mail with "unsubscribe" as the Subject archives at http://www.miraclec.com/list_archives/lazarus

Reply by email

Michael Van Canneyt
to Cliff Baeseman: yep it sure makes me happy also... I am getting as familiar as I can with it before…
Cliff Baeseman wrote
yep it sure makes me happy also... I am getting as familiar as I can with it before jumping back on the lazarus code.

I've been using it for a long time on Linux for FPC debugging. On win32 you can use Code Insight from cygnus software. It works also very well. (with the same caveat: use uppercase names for ALL vars and types). Classes are a bit difficult, but can be managed as well.

I guess I should have told you guys about this a long time ago... Mea culpa...

Michael.

Reply by email

Peter Vreman
to Baeseman, Cliff: This would make life very nice... I was actually able to step thru code last night using…
DDD is pretty good with Free Pascal from what I saw last night. Of course it is using gdb on the back end which could not resolve a variable I was trying to place a watch on. If I could just place a watch on something I would be off and running.

It can't watch variables in other stackframes. To see a field of a class/object you need 'this.FIELD'

Peter

Reply by email

Peter Vreman
to Cliff Baeseman: Has anyone tried this thing yet.? I have managed to compile a small program for testing…
Show quoted text 9 lines
Has anyone tried this thing yet.? I have managed to compile a small program for testing with debug turned on and can set code break points based on line numbers. This works ok but I cannot get it to load a pp source file or the ability to put a watch on something. Man I could really get serious with some code if I had a tool like it to debug the lazarus libs. They do mention something on the DDD site about setting up something in GDB to make the source show something like a search path. Just getting back in the groove.

GDB commandos:

Watch: print (only once) / display
Searchdirs: dir
Showfiles: list

But i like rhgdb more to debug on a normal console after seting the DISPLAY string to the correct X server

It should get time that we get our own gui debugger working with pascal support (there are already working patches for gdb 4.18)

Peter

Reply by email

Baeseman, Cliff

This would make life very nice...

I was actually able to step thru code last night using DDD, now that may seem like a small thing but I can at least see where the liib code is jumping to. I would imagine it would also help other people trying to code in our libs to understand what is going on in there. Most of us have a pretty good idea but it was a great blessing just to be able to set a breakpoint and step code...

DDD is pretty good with Free Pascal from what I saw last night. Of course it is using gdb on the back end which could not resolve a variable I was trying to place a watch on. If I could just place a watch on something I would be off and running.

A: string

A := 'hello';

I was trying to use DDD to watch A and it said a was not in this context.

Cliff

Cliff

Earlier message 44 lines
-----Original Message----- From: Peter Vreman Sent: Wednesday, October 06, 1999 9:49 AM To: Subject: Re: [lazarus] DDD Graphical Debugger > Has anyone tried this thing yet.? I have managed to compile a small > program for testing with debug turned on and can set code break points based > on line numbers. This works ok but I cannot get it to load a pp source file > or the ability to put a watch on something. Man I could really get serious > with some code if I had a tool like it to debug the lazarus libs. They do > mention something on the DDD site about setting up something in GDB to make > the source show something like a search path. > > Just getting back in the groove. GDB commandos: Watch: print (only once) / display Searchdirs: dir Showfiles: list But i like rhgdb more to debug on a normal console after seting the DISPLAY string to the correct X server It should get time that we get our own gui debugger working with pascal support (there are already working patches for gdb 4.18) Peter _________________________________________________________________ To unsubscribe: mail with "unsubscribe" as the Subject archives at http://www.miraclec.com/list_archives/lazarus

Reply by email

Baeseman, Cliff

Stephan

In the example below what do I tell DDD in order to put a watch on sHello...

say for instance I break on writeln and I wish to know the value of sHello..

How about for a class??

You are correct I have to start ddd from the same directory as my source or it will look in the user home dir for the source.

program hello

var
 sHello : string;
begin
 sHello := 'Hello World';
 writeln(sHello);
end.
Earlier message 65 lines
-----Original Message----- From: Stefan Hille Sent: Wednesday, October 06, 1999 2:34 PM To: Subject: Re: [lazarus] DDD Graphical Debugger Hi! On Wed, Oct 06, 1999 at 10:01:51AM -0500, Baeseman, Cliff wrote: > This would make life very nice... > > I was actually able to step thru code last night using DDD, now that may > seem like a small thing but I can at least see where the liib code is > jumping to. I would imagine it would also help other people trying to code > in our libs to understand what is going on in there. Most of us have a > pretty good idea but it was a great blessing just to be able to set a > breakpoint and step code... As far as I know it's important to start DDD from the directory where the program to be debugged resides. Don't know if this is typical, but for me the following works: cd working_dir make ddd & Since I don't keep lazarus ppu's around these will also be in my working dir after make, but I'm not sure if this makes any difference. > DDD is pretty good with Free Pascal from what I saw last night. Although it's a much too slow on my machine I couldn't work without it. > Of course it > is using gdb on the back end which could not resolve a variable I was trying > to place a watch on. If I could just place a watch on something I would be > off and running. > > A: string > > A := 'hello'; As stated somewhere in the fpc-docs you'll always have to type in variable names (fpc-variables, not C variables from GTK) in upper case letters. bye, Stefan PS: Which version of ddd are you using? My debian 2.1 comes with some different versions (linked against motif/lesstiff static/dynamic) but not all of them are stable. The best one for me is statically linked against motif, the lesstiff version sucks completely. -- --------------------------------------------------------- Stefan Hille email: 48155 Muenster voice: 0251/664695 _________________________________________________________________ To unsubscribe: mail with "unsubscribe" as the Subject archives at http://www.miraclec.com/list_archives/lazarus

Reply by email

Cliff Baeseman

Gent's,

Has anyone tried this thing yet.? I have managed to compile a small program for testing with debug turned on and can set code break points based on line numbers. This works ok but I cannot get it to load a pp source file or the ability to put a watch on something. Man I could really get serious with some code if I had a tool like it to debug the lazarus libs. They do mention something on the DDD site about setting up something in GDB to make the source show something like a search path.

Just getting back in the groove.

Cliff

Reply by email

Curtis White
to Baeseman, Cliff: Stephan In the example below what do I tell DDD in order to put a watch on sHello... say…

Cliff,

I was playing with DDD tonight and this is great. I sure wish I would have known about this a long time ago. It really makes it easy to use GDB.

You need to have the Data Window and the GDB Console enabled from the View menu.

When you want to set a watch variable, you can enter "watch SHELLO" (without the quotes) in the bottom window. It must be in all uppercase. This sets GDB to watch that variable. Then when you step through, it stops everytime that variable is changed. I tried it on your program below and it worked really well.

You can also display the variable by entering "graph display SHELLO" in the bottom window. This will setup a display in the top data window so you can stop and see the value of the variable at any point.

This will be a huge help in debugging the code. I highly recommend for anyone using Linux to use DDD for debugging your FPC code.

Curtis

Cliff wrote 24 lines
Stephan In the example below what do I tell DDD in order to put a watch on sHello... say for instance I break on writeln and I wish to know the value of sHello.. How about for a class?? You are correct I have to start ddd from the same directory as my source or it will look in the user home dir for the source. program hello var sHello : string; begin sHello := 'Hello World'; writeln(sHello); end.

Reply by email

Stefan Hille
to Baeseman, Cliff: This would make life very nice... I was actually able to step thru code last night using…

Hi!

Cliff wrote 8 lines
This would make life very nice... I was actually able to step thru code last night using DDD, now that may seem like a small thing but I can at least see where the liib code is jumping to. I would imagine it would also help other people trying to code in our libs to understand what is going on in there. Most of us have a pretty good idea but it was a great blessing just to be able to set a breakpoint and step code...

As far as I know it's important to start DDD from the directory where the program to be debugged resides. Don't know if this is typical, but for me the following works:

cd working_dir
make
ddd &

Since I don't keep lazarus ppu's around these will also be in my working dir after make, but I'm not sure if this makes any difference.

DDD is pretty good with Free Pascal from what I saw last night.

Although it's a much too slow on my machine I couldn't work without it.

Show quoted text 8 lines
Of course it is using gdb on the back end which could not resolve a variable I was trying to place a watch on. If I could just place a watch on something I would be off and running. A: string A := 'hello';

As stated somewhere in the fpc-docs you'll always have to type in variable names (fpc-variables, not C variables from GTK) in upper case letters.

bye,

Stefan

PS: Which version of ddd are you using? My debian 2.1 comes with some different versions (linked against motif/lesstiff static/dynamic) but not all of them are stable. The best one for me is statically linked against motif, the lesstiff version sucks completely.

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

Reply by email