Debugging PostgreSQL with GDB - Mailing list pgsql-hackers

From Manolo SupaMA
Subject Debugging PostgreSQL with GDB
Date
Msg-id 7a32fc660804010835j123c61f1s92b9862dd5bee713@mail.gmail.com
Whole thread Raw
Responses Re: Debugging PostgreSQL with GDB  ("korry" <korry.douglas@enterprisedb.com>)
Re: Debugging PostgreSQL with GDB  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-hackers
Hi.<br /><br />I have problems on how to debug PostgreSQL on Linux using GDB. I made some changes to
src/backend/utils/sort/tuplesort.cbut it hangs while performing run formation (where my changes are).<br /><br />I
configuredit using<br /><br />./configure --prefix="/usr/local/pgsql/8.3/" CFLAGS="-O0 -DTRACE_SORT" --enable-debug
--enable-cassert--enable-depend<br /><br />and trying to debug it using<br /><br />'gdb postmaster'<br />(which
revealedto be not a very good idea) and <br /> 'gdb pg_ctl' followed by 'run -D /usr/local/psql/data'<br /><br />This
lastchoice allowed me to set a breackpoint on puttuple_common (contained into tuplesort.c) but then I'm unable to run
'psql'.<a href="http://pastebin.com/m6a97b4dd">http://pastebin.com/m6a97b4dd</a><br /><br />I'm new on GDB and it's
alsomy first postgrest patch. I just want some suggestion to know if I'm on the right way or not.<br /><br />Thanks for
yourtime.<br /><br />PS: I suppose I'll write some related  "HowTo Debug PostgreSQL with GDB - Basics" for newbies like
me.<br/><br /> 

pgsql-hackers by date:

Previous
From: Mathias Hasselmann
Date:
Subject: Re: [PATCHES] Avahi support for Postgresql
Next
From: tomas@tuxteam.de
Date:
Subject: Re: [PATCHES] Avahi support for Postgresql