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

Mailing lists / lazarus / 1999-10
10 messages · 6 people ·
Reply by email Subscribe to this list Your subscription
Read-only archive. Use j and k to move between messages.
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
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.yep it sure makes me happy also... I am getting as familiar as I can with it before…
Cliff Baeseman wroteyep 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.
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
Has anyone tried this thing yet.? I have managed to compile a small program for testing…
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
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
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.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
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
This would make life very nice... I was actually able to step thru code last night using…
Hi!
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.
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.