1753971 Members
8685 Online
108811 Solutions
New Discussion юеВ

Re: cobol and c debuger

 
Ignacio Javier
Regular Advisor

cobol and c debuger


Hi everybody:

Do you guys know any debugging application that lets you debug c and cobol programs in the same code.

I mean, debuging cobol applications that call c rutines and viceversa.


Thanks a lot
3 REPLIES 3
A. Clay Stephenson
Acclaimed Contributor

Re: cobol and c debuger

It greatly depends upon the flavor of COBOL. Many COBOL's are compiled to p-code rather than native code so that general purpose debuggers such as gdb aren't all that useful. In those cases, the COBOL development system almost always includes its own debugger. If your flavor of COBOL compiles to native code then gdb will handle it as well as the C routines.

If it ain't broke, I can fix that.
Peter Godron
Honored Contributor

Re: cobol and c debuger

Ignacio,
whenever we have to debug programs like that, we create stubs.

These stubs replace the external routines and return known data.

Once we have proven that the main code works, we then flip the whole thing and test the fuctions with stubs of known input.

You could try to use the attach feature of gdb for the C code. From "man gdb"
gdb program 1234 would attach GDB to process 1234

Ignacio Javier
Regular Advisor

Re: cobol and c debuger

Hi:

Thanks all.

The flavor is Microfocus Cobol, and i do not know what type of compilation does.

Making those stubs it is a way, but i am not sure if the developers would like that.

It has to exist something, cobol its really old !!, and C.. this problem must be present before the univac came to us !!


Regards