Re: Debug user lib for user define data type

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Ale Raza <araza(at)esri(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Debug user lib for user define data type
Date: 2005-12-15 19:34:39
Message-ID: 20051215193432.GB20612@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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(at)svana(dot)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.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Greg Stark 2005-12-15 21:55:15 Re: is this a bug or I am blind?
Previous Message Michelle Konzack 2005-12-15 19:34:15 Re: 7.4.5 vs 8.0 on Debian/sparc