On Fri, 20 Jun 2003, Peter Eisentraut wrote:
> Nigel J. Andrews writes:
>
> > Attaching the debugger to the backend process I can't set a break point on my
> > function, it says 'Function "blah" not defined' and when it segments somewhere
> > under SPI_execp called from my function the stack trace has all the postgres
> > symbols but just a '??' at the place my function is obviously sitting.
>
> Use the command LOAD to load the dynamic object into the server process,
> then set the break point, then run the function.
Thanks Peter and Tom. I haven't actually checked that a segmentation fault
lists my function in the stack trace properly (I fixed that fault by code
inspection) however, I had discovered that once the function had run without
faulting the symbols were there. There's too many variables to check properly
now but I had tried using LOAD before and it made no difference but then I
might not have tried the LOAD then attach gdb sequence.
The principal mistake I think was my forgetting that the load isn't done until
the function is first used.
--
Nigel J. Andrews