debug using dbx
Posted in 2000
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL
Hi When I compile: esql -g -o myfile myfile.ec and run: dbx debug myfile if I try to set a breakpoint in myfile.c, get response: line ### not executable even though I list ###, and see (presumably) executable code How do I debug .ec executables Thanks John Sent via Deja.com http://www.deja.com/ Before you buy.
jcoyne11374@my-deja.com wrote: > Hi > When I compile: esql -g -o myfile myfile.ec > > and run: dbx > debug myfile > > if I try to set a breakpoint in myfile.c, get response: > line ### not executable > > even though I list ###, and see (presumably) executable code > > How do I debug .ec executables With some difficulty. Use ESQL/C to compile to C code (esql -e). Change all the #line directives in the resulting C code with comments -- you need the info to get back to your .ec files. Compile the .c files using the ESQL/C compiler again: esql -c xyz.c Link using the ESQL/C compiler. Last trick. Many C compilers require the -g option to add debugging info to the object files. ESQL/C treats -G and -g as directives to itself and does not pass them to the compiler. Hence, on Unix, set INFORMIXC="cc -g" before producing any object files. Preserve the C files. The debugger will use them. You can then manually refer back to your ESQL/C source by looking for the #line comments. -- Jonathan Leffler (jleffler@informix.com, jleffler@earthlink.net) Guardian of DBD::Informix v1.00.PC1 -- see http://www.perl.com/CPAN #include <disclaimer.h>