RE: [HACKERS] How do I get the backend server into gdb?

Поиск
Список
Период
Сортировка
Искать

RE: [HACKERS] How do I get the backend server into gdb?

От:
Michael J Davis <michael.j.davis@tvguide.com>
Дата:
The problem I need to debug won't allow me to do this.  A Postgres
connection starts and then dies very quickly with a user authentication
error or database non existence error before I have a chance to attach to
the process via gdb.  I need to find out why postgres will not allow my
Access97 connection to succeed.  Pg_hba.conf appears to be configured
correctly (it was working and has not changed in past two months).  I need
to have the new postgres session start up in debug.
-----Original Message-----From:	The Hermit Hacker [SMTP:scrappy@hub.org]Sent:	Wednesday, April 28, 1999 10:19 AMTo:	Michael J DavisCc:	pgsql-hackers@postgreSQL.orgSubject:	RE: [HACKERS]  How do I get the backend server into
gdb?

You can attach to a running process using gdb... 'gdb -t ' orsomething like that...its been awhile since I've used it, sorry...
On Wed, 28 Apr 1999, Michael J Davis wrote:
> I need to debug this connection problem I am having with Access97.
My> question is how can I get the new Postgres backend that starts up
for Access> into debug (gdb)?  I can get the PostMaster open in gdb.> > Thanks, Michael> 
Marc G. Fournier                   ICQ#7615664               IRC
Nick: ScrappySystems Administrator @ hub.org primary: scrappy@hub.org           secondary:
scrappy@{freebsd|postgresql}.org 

Re: [HACKERS] How do I get the backend server into gdb?

От:
Bruce Momjian <maillist@candle.pha.pa.us>
Дата:
There is some option that starts backends, and then sleeps waiting for a
gdb connection, or something like that.


Or you can add the sleep yourself.

[Charset iso-8859-1 unsupported, filtering to ASCII...]
> The problem I need to debug won't allow me to do this.  A Postgres
> connection starts and then dies very quickly with a user authentication
> error or database non existence error before I have a chance to attach to
> the process via gdb.  I need to find out why postgres will not allow my
> Access97 connection to succeed.  Pg_hba.conf appears to be configured
> correctly (it was working and has not changed in past two months).  I need
> to have the new postgres session start up in debug.
> 
> 	-----Original Message-----
> 	From:	The Hermit Hacker [SMTP:scrappy@hub.org]
> 	Sent:	Wednesday, April 28, 1999 10:19 AM
> 	To:	Michael J Davis
> 	Cc:	pgsql-hackers@postgreSQL.org
> 	Subject:	RE: [HACKERS]  How do I get the backend server into
> gdb?
> 
> 
> 	You can attach to a running process using gdb... 'gdb -t ' or
> 	something like that...its been awhile since I've used it, sorry...
> 
> 	On Wed, 28 Apr 1999, Michael J Davis wrote:
> 
> 	> I need to debug this connection problem I am having with Access97.
> My
> 	> question is how can I get the new Postgres backend that starts up
> for Access
> 	> into debug (gdb)?  I can get the PostMaster open in gdb.
> 	> 
> 	> Thanks, Michael
> 	> 
> 
> 	Marc G. Fournier                   ICQ#7615664               IRC
> Nick: Scrappy
> 	Systems Administrator @ hub.org 
> 	primary: scrappy@hub.org           secondary:
> scrappy@{freebsd|postgresql}.org 
> 	
> 
> 


--  Bruce Momjian                        |  http://www.op.net/~candle maillist@candle.pha.pa.us            |  (610) 853-3000 +  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

Re: [HACKERS] How do I get the backend server into gdb?

От:
Theo Kramer <theo@flame.co.za>
Дата:
Bruce Momjian wrote:
> 
> There is some option that starts backends, and then sleeps 
> waiting for a
> gdb connection, or something like that.
> 

Why not just the following

gdb postmaster

Set one ore more breakpoints where you think the problem 
might be, then type 'run'.

Start the client and with a bit of luck gdb will break at
the breakpoint set.

You may need to do this a couple of times until you
have found the right area in the code.
--------
Regards
Theo

FAQ