Unix Technical Forum

=?iso-8859-1?Q?R=E9f=2E_=3A_Re=3A_R=E9f=2E_=3A__Debugging_SPI _C?=functions

This is a discussion on =?iso-8859-1?Q?R=E9f=2E_=3A_Re=3A_R=E9f=2E_=3A__Debugging_SPI _C?=functions within the Pgsql General forums, part of the PostgreSQL category; --> I do use gdb with eclipse but I don't manage to enter the source code of my spi C ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > Pgsql General

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-08-2008, 06:50 PM
bsimon@loxane.com
 
Posts: n/a
Default =?iso-8859-1?Q?R=E9f=2E_=3A_Re=3A_R=E9f=2E_=3A__Debugging_SPI _C?=functions

I do use gdb with eclipse but I don't manage to enter the source code of
my spi C functions.

Suppose I have a SPI functions that :

1) connects to the db (SPIConnect)
2) Executes a simple select (SPIExec)
3) Writes result of the select in a text file
4) disconnects from the db (SPIFinish)

Then I have a C (libpq) client program that calls my spi functions like
this :

PQExec(conn,"SELECT mySpiFunction()");

the problem is -> I can't step into this line !

We have many C SPI functions registered on our server, I just would like
to find a way to debug them ...

Thanks.

Benjamin.






Joe Conway <mail@joeconway.com>
13/01/2005 16:08


Pour : bsimon@loxane.com
cc : pgsql-general@postgresql.org
Objet : Re: Réf. : [GENERAL] Debugging SPI C functions


bsimon@loxane.com wrote:
> Aren't there any way to debug server programming functions (whatever the


> language) ??


What's wrong with gdb?

Joe



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-08-2008, 06:50 PM
Alvaro Herrera
 
Posts: n/a
Default Re: =?iso-8859-1?B?UulmLiA6IFJlOiBS6WY=?=

On Thu, Jan 13, 2005 at 04:23:29PM +0100, bsimon@loxane.com wrote:

> Then I have a C (libpq) client program that calls my spi functions like
> this :
>
> PQExec(conn,"SELECT mySpiFunction()");
>
> the problem is -> I can't step into this line !


Of course not. The processing is done server side, so the debugging
should occur server side too. You have to connect GDB with the backend
serving the connection, and step through function execution there.

--
Alvaro Herrera (<alvherre[@]dcc.uchile.cl>)
"La experiencia nos dice que el hombre peló millones de veces las patatas,
pero era forzoso admitir la posibilidad de que en un caso entre millones,
las patatas pelarían al hombre" (Ijon Tichy)

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo@postgresql.org)

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 12:39 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com