Re: Debug user lib for user define data type

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

OK, thanks meneer!

Ale

-----Original Message-----
From: Martijn van Oosterhout [mailto:kleptog(at)svana(dot)org]
Sent: Thursday, December 15, 2005 11:35 AM
To: Ale Raza
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: [GENERAL] Debug user lib for user define data type

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.

Browse pgsql-general by date

  From Date Subject
Next Message Carlos Benkendorf 2005-12-16 18:28:03 Fetch statements
Previous Message Russ Brown 2005-12-16 18:19:38 Re: is this a bug or I am blind?