Re: debugging C functions

Поиск
Список
Период
Сортировка
От Islam Hegazy
Тема Re: debugging C functions
Дата
Msg-id 030101c7a663$03f48c80$0d0e9f88@pc.cpsc.ucalgary.ca
обсуждение исходный текст
Ответ на debugging C functions  ("Islam Hegazy" <islheg@gawab.com>)
Ответы Re: debugging C functions  (Gregory Stark <stark@enterprisedb.com>)
Список pgsql-general
I do the same but I use the ddd debugger
1) Load the shared library from the SQL
2) Open the .c file of my function
3) Place the break points
4) Execute the sql statement 'Select * from Myfn(...);'

The result is displayed and the debugger doesn't stop at the breakpoints.

Are there any steps missing?


Regards
Islam Hegazy


----- Original Message -----
From: "Tom Lane" <tgl@sss.pgh.pa.us>
To: "Islam Hegazy" <islheg@gawab.com>
Cc: "Joe Conway" <mail@joeconway.com>; <pgsql-general@postgresql.org>
Sent: Sunday, June 03, 2007 10:00 PM
Subject: Re: [GENERAL] debugging C functions


> "Islam Hegazy" <islheg@gawab.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


В списке pgsql-general по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: debugging C functions
Следующее
От: "Albe Laurenz"
Дата:
Сообщение: Re: Stored Procedures and Functions