[Gambas-devel] Question to the C-workers.

Benoit Minisini gambas at ...1...
Sun Jul 4 01:28:30 CEST 2004


On Saturday 03 July 2004 21:52, Charlie Reinl wrote:
> Salut,
>
> I started, and for the first time on Linux to work with C/C++ .
> (I play with the gambas SRC and added my PrettyPrinter to the gb.qt.editor
> ).
>
> Till now I user KWrite to edit the sources, read the output from make and
> use printf to see values.
>
> When I was in touch with C, that was in 1993 , I worked with
> Borland Tourbo C 2 (??), you could write, compile and debug with in the IDE
> (like you can with gambas).
>
> Has anybody some hints for me about tools like that or better ?
> How do you work ?
>
> Amicalement
> Charlie
>

I use Kate as source code editor.

To debug your code, you have three possibilities:

- Use gdb in text mode, sometimes the only way that works.

- Use the kdbg program, which is a graphical front-end to gdb: the old version 
provided in Mandrake 10 does not work with recent gdb, but you can compile a 
more recent one from the kdbg web site (search in google).

- Use ddd: it is an old graphical front-end to gdb, but that uses the Motif 
toolkit, and so is not very practical to use.

A fourth possibility would make your own graphical front-end to gdb in Gambas, 
which would be a great idea! :-)

As for Kdevelop, I don't use it, so I don't know what you can do with it.

Otherwise, look at valgrind: this is a marvelous tool that run your code in a 
x86 emulator, and that tells you when you make bad memory access, or bad 
allocations, when you use unitialized variables as soon they are done. It 
tells you which functions are take the most time to execute, via a KDE 
program named kcachegrind, so that you know what to optimize in your code. 
And it can do surely many other things!

Regards,

-- 
Benoit Minisini
mailto:gambas at ...1...




More information about the Devel mailing list