On Wed, Dec 14, 2005 at 11:52:19AM -0800, Ale Raza wrote:
> Hi,
>
> I am writing a user defined data type in C and want to debug the lib
> I am creating for this data type. Wondering if somebody knows how to
> link and debug this lib or any document which can help me to do this?
> Can I debug this lib without compiling the PostgreSQL source code?
>
> I use prebuilt RPM package to installed PostgreSQL(7.4.6).
> Platform: Red Hat Enterprise Linux AS release 3 (Taroon). Kernel 2.4.21-4.EL on an i686
Hmm, you need the source code you make your user-defined type, and to
have it work you need to compile with exactly the same options. The
easiest way to do that is to compile both the server and your lib
yourself.
That said, it can be done, you just use GDB to attach to the backend
and break on your functions. But GBD will probably irritate you unless
you compile the server for debugging also.
Have a nice day,
--
Martijn van Oosterhout <kleptog@svana.org> http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.