Wednesday, March 9, 2011

Bug hunting, the continuing story of gdb

Finding the bugs and using gdb is not so simple as it first seemed. First I tried to compile all those files with the -g option, but even after asking around, I could not get it to give me the exact line in the program where I was getting the segfault error. The lead programmer had not made any progress with it for several months. He is useless now, it seems, so I will have to do something I have never done before, find the bugs in wogedit, and fix them myself.
I ran some x11 tutorials in gdb. They work great, and gdb gives me the line number when I introduce bugs (I quickly found a way to add a segmentation fault bug to the x11 tutorial) . So it seems I am stuck looking at flags in the makefiles. For some reason, the flag FFLAGS, a flag that is supposed to be for the fortran compiler is where my -g flag is showing up. I thought it would give me the c flags instead, but it does not seem to be doing that. I wonder why the makefiles include it. I know this project still has strange bits of code I have not looked at yet, but as far as I know, it does not use any fortran. I don't even think I have this F77 compiler installed on my machine. I don't know anyone who uses fortran for anything nowadays.
So, I am reading up on autoconf, automake, and make in hopes that I can solve this mystery before I die of old age.

No comments: