Martijn van Oosterhout <kleptog@svana.org> writes:
> First step, you must connect with psql and then attach gdb to the
> running process (there's a function to get the pid of your backend).
> Next, you can use "LOAD foo" in psql to trigger the loading of your
> module, gdb should then be able to see it (assuming you have debug
> symbols everywhere).
On some platforms it's necessary to do the LOAD first (before attaching
with gdb). Experiment...
regards, tom lane