Topic: A project that RUNS won't DEBUG
The debugger is working brilliantly for most of my Fortran 90/95 project development but there is one project in which it is failing to run properly and is completely preventing me from making any progress.
It may or may not be relevant that the project is one in which I have a linked library of my own, and in which I have elected to compile both the library as a 32-bit library and the main project as a 32-bit executable, which project is also very similar to another project in which I have both all-32-bit and all-64-bit versions, and I can compile and debug without a problem.
The problem project is also especially strange, in that I can RUN the project without error. What I cannot do is to run it through the debugger. When I run it normally, it presents the user with a data file-opening dialog boxes, opens the files, then begins the analysis and finally fails at a late stage in the work it is designed to do. When I try to debug it, it fails right at the start, before displaying the first data file-opening dialog box.
I haÂÂve managed to debug it as far as just the first few lines of source code, to find where it crashes. It fails when trying to execute the third of the three lines in the code fragment shown below:
*
*
USE DISLIN
CHARACTER AINPUT*128, FiNAME*128
*
*
*
CALL dwgfil('INPUT file name', FiNAME, '*.*')
Here is what DWGFIL does (from the DISLIN manual):
The routine DWGFIL creates a file
selection box that can be used to
get a filename. The call is:
CALL DWGFIL (CLAB, CFIL, CMASK)
or:
char *dwgfil (char *clab, char *cfil, char *cmask);
CLAB is a character string that will be
displayed in the dialog widget.
CFIL is the returned filename selected by
the user. The variable can also be
used to pre-define a filename.
For the C Routine, the user input is
returned as function value.
The returned pointer is allocated by
malloc and can be freed by an user.
CMASK specifies the search pattern used in
determining the files to be displayed
in the file selection box.
When the program fails, these things happen:
(1) A debugger warning appears:
! Program received signal SIGTRAP, Trace/breakpoint trap
(2) When I click [OK] to send this away, the Source Window goes blank except for a single line at the top which reads,
Select function name to disassemble
I am able to pull-down the file selector and re-select the source file which crashed but the debugging session has failed and cannot be revived.
Anyone got any ideas?
---
John