Re: debugging C functions

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Islam Hegazy" <islheg(at)gawab(dot)com>
Cc: "Joe Conway" <mail(at)joeconway(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: debugging C functions
Date: 2007-06-04 04:00:09
Message-ID: 2002.1180929609@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Islam Hegazy" <islheg(at)gawab(dot)com> writes:
> Thanks for your replies, they were very helpful to me. Unfortuantely, I
> can't trace the C function. PostgreSQL returns the results directly and the
> debugger doesn't stop at the breakpoints in the C function.

Well, you need to deal with that last, because you will never get very
far if you can't debug your code.

My experience is that gdb needs help to recognize a shared library's
symbols. It works for me to LOAD the shared library (from SQL) before
attaching to the backend with gdb. If you can't do that, gdb's
"sharedlibrary" command might do it.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Islam Hegazy 2007-06-04 04:37:45 Re: debugging C functions
Previous Message Andrej Ricnik-Bay 2007-06-04 03:55:24 Re: Strange delimiters problem