I am working with C code functions that call legacy Fortran code subroutines. The Fortran code subroutines also call other C code functions. The code that I am working with is not the prettiest, but it is fairly challenging to re-write everything from scratch.
Unfortunately, a segfault is occurring somewhere within the program, and I am wondering if there is a software tool with a nice GUI that can be used to accurately pinpoint the location in both C and Fortran code.
Although I am developing the software program on Windows using the Open Watcom compiler to compile both C and Fortran code, I’m willing to move the code to my GNU/Linux box if there is a FOSS tool that can be used.
Alternately, I would wonder if the Intel Composer XE suite could be used to visually pinpoint the location of the segmentation violation. The Intel Composer XE suite includes both C and Fortran compilers.
Since I am working with C and Fortran code, I need some sort of indication where in the code the segfault is occurring. I don’t especially want to use calls to the printf() function.
This isn’t a GUI, but valgrind is an excellent memory debugging tool. It will tell you not just which line a segfault is on (which you should be able to do with any debugger), but also each time you access uninitialized or unallocated memory, or make a variety of other errors. You do need to port to Linux to use it though.