Re: Core dump when I run a program that uses embedded sql - Mailing list pgsql-interfaces

From Michael Meskes
Subject Re: Core dump when I run a program that uses embedded sql
Date
Msg-id 20010831211422.F2448@feivel.fam-meskes.de
Whole thread Raw
In response to Core dump when I run a program that uses embedded sql  ("Ligia Pimentel" <lmpimentel@yahoo.com>)
List pgsql-interfaces
On Wed, Aug 29, 2001 at 11:08:24AM -0500, Ligia Pimentel wrote:
> Then I precompile it (ecpg ...) successfully, and after that I compile it
> with gcc (also everything OK aparently), and when I try to run my program, I
> get
> SEGMENTATION FAULT (core dumped).

Where does it segfault? I need more info to help you. Could you please run
the program in gdb and tell me where exactly it segfaults?

If you need to learn more about the executed statementy you can add the
following code:

FILE *dbgs;

<at start of main()>
if ((dbgs = fopen("log", "w")) != NULL)ECPGdebug(1, dbgs);
...

<before exit>
if (dbgs != NULL)fclose(dbgs);

This will log all actions by libecpg in file "log". However, this will give
you an empty file if the program segfaults before closing the file. 

Michael
-- 
Michael Meskes
Michael@Fam-Meskes.De
Go SF 49ers! Go Rhein Fire!
Use Debian GNU/Linux! Use PostgreSQL!


pgsql-interfaces by date:

Previous
From: Constantin Teodorescu
Date:
Subject: BUG in binaries for Mandrake 8.0 !!!
Next
From: Jeremy Buchmann
Date:
Subject: Re: tcl on Mac OS X