Re: Debugging seems not to work

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Groovy,

At Tue, 2 Apr 2002 17:20:16 +0200,
Christian.Groove.extern@xxxxxxxxxxxxxx wrote:
> 
> Now for some completly different. I do have some problems in
> using a debugger, showing the steps in COBOL. Since OpenCOBOL
> compiles the statements into C, i actually only see the 
> intermediate C code.
> Is there a chance to view the COBOL code, while debugging ?

There are some preliminarily code for this purpose, though
it is not completed yet.

With the patch below, line directives are activated in the
intermediate C code, and gdb will find your COBOL files if
you compile them with option `-g':

--- cobc/codegen.c.~1.244.~	Fri Mar 15 02:52:54 2002
+++ cobc/codegen.c	Wed Apr  3 11:24:35 2002
@@ -109,7 +109,7 @@
 {
   if (x->loc.text)
     {
-      //output ("#line %d \"%s\"\n", x->loc.first_line, x->loc.text);
+      output ("#line %d \"%s\"\n", x->loc.first_line, x->loc.text);
       output_line ("cob_source_line = %d;", x->loc.first_line);
     }
 }

Note that this patch does not cover all COBOL lines, and thus
not very useful yet.  For now, it is better to generate C code
with option -C, compile it by using gcc with option -g, and
trace the C code.

I am going to implement better debugging support after writing
some documentation in English.

Regards,
Keisuke Nishida



[Index of Archives]     [Gcc Help]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Info]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux