|
From: David E. <de...@us...> - 2005-07-13 06:36:24
|
Jim Morcombe wrote:
> I have attached a Cobol program that crashes the compiler with a
> segmentation fault.
> ...
Jim, trying to debug the TC compiler can be a real pain at times.
Trying isolate the problem with the code you enclosed will not work as
it contains COPYBOOKS.
This leaves two options.
Try to isolate the bug yourself, which is not difficult but can be
problematic.
Or, assuming that it is a viable option, send me the the complete source
including the COPYBOOKS, and I will try to duplicate the problem on the
CVS version.
If you would like to try to isolate the problem first, then just do the
following.
1) Compile the TC compiler (RT not required) with the GCC '-g' option.
2) In the same directory as $PROG.cbl, create a '.gdbinit' file and
add the following line.
'r -c -g -C -D -F -P -I $COBCPY -I $IO $PROG.cbl'
3) initialize the environment variables.
export COBCPY=...
4) Run GDB
gdb htcobol
This should give you output some thing like the following.
|