Re: gdb with postgres - Mailing list pgsql-hackers

From Pavan Deolasee
Subject Re: gdb with postgres
Date
Msg-id BANLkTin7tK5G5X_-caZzR+tXZhgn2s3Axw@mail.gmail.com
Whole thread Raw
In response to gdb with postgres  (HuangQi <huangqiyx@gmail.com>)
Responses Re: gdb with postgres
List pgsql-hackers
On Mon, Jun 6, 2011 at 1:13 PM, HuangQi <huangqiyx@gmail.com> wrote:
> Hi,
>    I was using gdb to debug postgres. In order to debug the backend of
> running query, I start postgres first and use "select * from
> pg_backend_pid()" to ask for backend pid. Then I start gdb in another bash
> window with "gdb postgres" and attach the pid obtained above and set the
> breakpoint. Then I run the query from the first window. However, the
> debugging precess which is shown below is not going to the breakpoint. I
> tried many different breakpoints, but it always start from the 305
> client_read_ended().
>

Please compile with -O0 -g flags to see all the debug symbols.

CFLAGS="-O0 -g" ./configure --enable-debug

Thanks,
Pavan

--
Pavan Deolasee
EnterpriseDB     http://www.enterprisedb.com


pgsql-hackers by date:

Previous
From: HuangQi
Date:
Subject: gdb with postgres
Next
From: HuangQi
Date:
Subject: Re: gdb with postgres