|Re: Debugging Existing Opensource Project [message #969828 is a reply to message #962787]
||Sat, 03 November 2012 11:45
| David Coventry
Registered: October 2012
Ok, well, thanks very much for the reply.|
The project I'm trying to examine has source files in a subdirectory called 'src'.
None of these has a 'main()' function.
There is another subdirectory called 'example' which has a file called 'test.c' which contains a 'int main()' function which then calls a function in 'dwg.c' which is in the 'src' directory. The header file for 'dwg.c' is invoked by the directive '#include <dwg.h>'.
I have compiled the Project files by running './configure CFLAGS=-g', 'make' and 'sudo make install' which has generated the executables including 'test'. The test execuatble takes as a required argument the path of a CAD file (in AutoCAD DWG file format) and does run when called from the command line, although it does a core dump with a segmentation fault.
Try as I might, I cannot figure how to get the Project to run the executable although it now appears to build without error. Quite what I am building is also a matter of mystery as there is no indication which of the executables in the 'example' subdirectory is being built. I am rather hoping, probably a little too optimistically, that it is all of them.
The source code I am trying to follow by stepping through the lines of code (alwats assuming this is possible with Eclipse) is a file called 'decode.c'.
Does Eclipse have this capability?
If so could someone perhaps point me in the right direction so that I can a) build the test executable with the correct debugging, b) run the executable giving it the correct path to the input file and c) set up breakpoints in the 'decode.c' source code.
~ Dave Coventry
[Updated on: Sat, 03 November 2012 11:54]
Report message to a moderator
Powered by FUDForum
. Page generated in 0.01712 seconds