Re: gdb with postgres

From: Pavan Deolasee <pavan(dot)deolasee(at)gmail(dot)com>
To: HuangQi <huangqiyx(at)gmail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: gdb with postgres
Date: 2011-06-06 07:46:35
Message-ID: BANLkTin7tK5G5X_-caZzR+tXZhgn2s3Axw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Jun 6, 2011 at 1:13 PM, HuangQi <huangqiyx(at)gmail(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message HuangQi 2011-06-06 07:57:29 Re: gdb with postgres
Previous Message HuangQi 2011-06-06 07:43:04 gdb with postgres