Discussion:
How could I debug C in 4GL?
(too old to reply)
LOH KOK HOE
2014-02-25 09:30:45 UTC
Permalink
Does anyone have experience in compiling C code in 4GL? I'm currently in charge in the C module of a 4GL program, but I couldn't know how could I debug the C code. I have try put a file I/O to put my debugging information into that log. Anyhow the C program doesn't output any files. Could you share some light here as long as I can debug my C code.

THanks @!
s***@t-online.de
2014-02-26 16:41:08 UTC
Permalink
You have to compile it using the -g option of the c compiler.
have a look in the c4gl script either hard code it there or set the appropiate env var.

Then you can debug your program using gdb, dbx the usual way.

Superboer.
Post by LOH KOK HOE
Does anyone have experience in compiling C code in 4GL? I'm currently in charge in the C module of a 4GL program, but I couldn't know how could I debug the C code. I have try put a file I/O to put my debugging information into that log. Anyhow the C program doesn't output any files. Could you share some light here as long as I can debug my C code.
LOH KOK HOE
2014-02-28 07:49:03 UTC
Permalink
I wasn't using cfgl, I'm using fglgo.
Post by s***@t-online.de
You have to compile it using the -g option of the c compiler.
have a look in the c4gl script either hard code it there or set the appropiate env var.
Then you can debug your program using gdb, dbx the usual way.
Superboer.
Post by LOH KOK HOE
Does anyone have experience in compiling C code in 4GL? I'm currently in charge in the C module of a 4GL program, but I couldn't know how could I debug the C code. I have try put a file I/O to put my debugging information into that log. Anyhow the C program doesn't output any files. Could you share some light here as long as I can debug my C code.
s***@t-online.de
2014-03-08 10:38:06 UTC
Permalink
Hello Lok Kok Hoe,

Ah r4gl instead of i4gl so you are using a custom runner???

That is a bit long ago, you have to gointo the manuals and see where the
custom runner is build. there you have to add the -g flag.

Debug would be something like

gdb yourcustomrunner

break <whereever you want it >

run <your4glprogram>



This is not tested and i can not verify it since i do not have access to 4gl
anymore..... hope it helps bit.


Superboer.
Post by LOH KOK HOE
Does anyone have experience in compiling C code in 4GL? I'm currently in charge in the C module of a 4GL program, but I couldn't know how could I debug the C code. I have try put a file I/O to put my debugging information into that log. Anyhow the C program doesn't output any files. Could you share some light here as long as I can debug my C code.
Loading...