Re: debugging C functions

From: Gregory Stark <stark(at)enterprisedb(dot)com>
To: "Islam Hegazy" <islheg(at)gawab(dot)com>
Cc: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Joe Conway" <mail(at)joeconway(dot)com>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: debugging C functions
Date: 2007-06-04 11:50:08
Message-ID: 87vee4szv3.fsf@oxford.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Islam Hegazy" <islheg(at)gawab(dot)com> writes:

> I do the same but I use the ddd debugger
> 1) Load the shared library from the SQL
> 2) Open the .c file of my function
> 3) Place the break points
> 4) Execute the sql statement 'Select * from Myfn(...);'
>
> The result is displayed and the debugger doesn't stop at the breakpoints.

Are you sure you're attaching to the right process?

One way to do it is to run select pg_backend_pid() from psql and attach to
that pid.

--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Teodor Sigaev 2007-06-04 12:03:38 Re: warm standby server stops doingcheckpointsafterawhile
Previous Message Franz.Rasper 2007-06-04 11:42:33 Re: Corruption of files in PostgreSQL