| From: | Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at> |
|---|---|
| To: | "Sameer Thakur *EXTERN*" <samthakur74(at)gmail(dot)com>, Postgres General <pgsql-general(at)postgresql(dot)org> |
| Subject: | Re: Using fmgr_hook |
| Date: | 2014-08-25 13:03:15 |
| Message-ID: | A737B7A37273E048B164557ADEF4A58B17D2D019@ntex2010i.host.magwien.gv.at |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
Sameer Thakur wrote:
> In the process of implementing my own version of sysdate, i was trying
> to use the fmgr_hook.
[...]
> To debug i have a breakpoint inside custom_fmgr_hook.
>
> Debugging:
> 1. Start postgres
> 2. Start psql connecting to postgres
> 3. Attach gdb to process spawned off by postmaster representing psql session.
> 4. execute select * from now();
>
> Problem:
> The breakpoint seems to get skipped. Just to be sure i put a
> breakpoint in explain_ExecutorStart and i could debug that function.
> So i am attaching gdb to correct process.
> What am i doing wrong?
My experience is that you cannot set breakpoints before the library
is loaded, so you first have to call a function in the library, then
you interrupt and set the breakpoint.
I don't know if there is a way to get around that with gdb on Linux.
Yours,
Laurenz Albe
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Marc Mamin | 2014-08-25 13:03:56 | Re: Way to identify the current session's temp tables within pg_class ? |
| Previous Message | Sameer Thakur | 2014-08-25 12:35:09 | Using fmgr_hook |