Re: Trouble debugging contrib/fulltextindex

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
Cc: Hackers <pgsql-hackers(at)postgresql(dot)org>, <f(dot)helmberger(at)uptime(dot)at>
Subject: Re: Trouble debugging contrib/fulltextindex
Date: 2002-08-21 20:47:59
Message-ID: Pine.LNX.4.44.0208212107270.1376-100000@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)gmx(dot)net

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2002-08-21 20:48:07 Re: Build failure in current CVS
Previous Message Peter Eisentraut 2002-08-21 20:45:42 Re: bison news