Debugging of C functions

Started by Janek Sendrowskiover 12 years ago2 messagesgeneral
Jump to latest
#1Janek Sendrowski
janek12@web.de

Hi,
 
How is it possible to debug user defined functions written in C.
I can't just include all the files and run it.
 
Does anyone have an idea?
 
Janek Sendrowski

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#2Noname
hamann.w@t-online.de
In reply to: Janek Sendrowski (#1)
Re: Debugging of C functions

Hi,

How is it possible to debug user defined functions written in C.
I can't just include all the files and run it.

Does anyone have an idea?

Janek Sendrowski

Hi,

I recall compiling with debug as normal, adding a printf followed by 30 sec sleep, and
use the pause to attach gdb.
If it is at all possible, you should try to run the database in single mode rather than
normal server operation

Regards
Wolfgang Hamann

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general