Re: debugging C functions
От | Nigel J. Andrews |
---|---|
Тема | Re: debugging C functions |
Дата | |
Msg-id | Pine.LNX.4.21.0306201909330.29248-100000@ponder.fairway2k.co.uk обсуждение исходный текст |
Ответ на | Re: debugging C functions (Peter Eisentraut <peter_e@gmx.net>) |
Ответы |
Re: debugging C functions
|
Список | pgsql-general |
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
В списке pgsql-general по дате отправления: