Re: Trouble debugging contrib/fulltextindex - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: Trouble debugging contrib/fulltextindex
Date
Msg-id Pine.LNX.4.44.0208212107270.1376-100000@localhost.localdomain
Whole thread Raw
In response to Trouble debugging contrib/fulltextindex  ("Christopher Kings-Lynne" <chriskl@familyhealth.com.au>)
List pgsql-hackers
Christopher Kings-Lynne writes:

> 1. How do you compile contribs with full debugging symbols.  I always get
> heuristic-fencepost-blah probs with gdb even though I've configured postgres
> with all the debugging stuff.

First, compile without optimization (-O0).  Second, using LOAD to load the
shared object before the function call may be of advantage.  I would allow
you to set breakpoints in the loaded object, for example.  Just waiting
for the code to crash and hoping to get a good backtrace isn't always a
successful strategy.

> 2. Should contribs exclusively use palloc/pfree?

Yes (unless there are some wildly unusual memory allocation requirements).

-- 
Peter Eisentraut   peter_e@gmx.net



pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: bison news
Next
From: Peter Eisentraut
Date:
Subject: Re: Build failure in current CVS