New developer's issues
janssens.geert at advalvas.be
Tue May 3 05:57:40 EDT 2005
This passed weekend, I spent some time (actually quite a lot) trying to
understand GnuCash's internals a bit better. I must admit, it's a steep
learning curve, especially since I never worked on a gnome app before (my
devel experience is based on motif on Solaris), neither with the gnu
autotools, as my questions will show.
So I have some questions, for which I hope some of you could provide me with
some answers, or pointers to answers.
1. I have built the G2 branch, installed it, and started the gdb debugger (I
actually use ddd, the graphical front-end) to step through the running app,
as per the HACKING file. This works fine, except for some issues:
* As I'm stepping through the creation of the Invoice Edit window, I have a
display of the Invoice Datastructure that is to be used to create the window.
With every step I do in the source, I see that the values of several of it's
member pointers change (sometimes indicating address out of bounds). Is this
normal behaviour ? It makes it very hard to read the values stored in there.
* While stepping through the code, the cursor jumps up and down: instead of
just stepping from one source line to the next, it jumps two lines up, then 3
lines down again, and so on. Some portions of the code I can't step (the
program just continues until after the block), although they are not part of
a conditional block. Additionally, when trying to print some variables, the
debugger complains that they are not defined. It seems like there are some
optimizations done during compilation, although I have disabled -O2 (which
was on by default).
The only compiler directives I see are:
-g -Wall -Wunused -Wmissing-prototypes -Wmissing-declarations
-Wdeclaration-after-statement -g -Wall -Wunused -Wmissing-prototypes
So is there something else I can do to remove this behaviour ?
* By the way, the -O2 flag was configured automatically by configure, even
though I had passed --enable-debug as an option to autogen.sh
2. ddd as a graphical front-end is a bit distracting, because it is not really
intuitive. I would much rather use another front-end. What do other people on
this list use, apart from purely text based debugging ? Would it be possible
to use Anjuta's built-in front end ?
3. So far I have been tracing the Invoice creation and editing in G2. I
haven't been able (yet) to correct the crasher bug, but at least, I've
learned a lot about the working of the ledger, register, and invoice
mechanisms. However, my understanding of the gnome2 vs gnome1.x api
differences is lacking. Is there some good documentation on the web that
summarizes these differences well ? Some kind of a migration guide or such. I
do have the api references, but there's rather elaborate, and don't really
focus on what's different, but rather on what's in each api.
Thanks for the help.
More information about the gnucash-devel