debugging with gdb - Mailing list pgsql-general

From Ravi Kiran
Subject debugging with gdb
Date
Msg-id CAOh57xH-Rzi-9LUP0N10135zpy33xTk-jSfWWd2xFTs4wLeS+A@mail.gmail.com
Whole thread Raw
Responses Re: debugging with gdb  (Michael Paquier <michael.paquier@gmail.com>)
List pgsql-general
Hi,

I am facing some problem with gdb for the past few days.

I want to debug nestloop.c in postgresql , so I followed the below steps.

I followed the steps given in the below for collecting the stack trace.



1) I started Postgresql using eclipse using run.

2) I started one client using the following command in bash
3)psql test(Where test is the database and it has the tables student and marks)
4)Then using the command pg_backend_pid(); , I got the pid of the client.
5)In another terminal I started gdb using the command sudo gdb -p pid
6)set pagination off
7)set detach-on-fork off
8)set schedule-multiple on
9)handle SIGUSR1 noprint nostop
handle SIGUSR2 noprint nostop
10)python gdb.events.exited.connect(lambda x: [gdb.execute('inferior 1'), gdb.post_event(lambda: gdb.execute('continue'))])
11)b ExecNestLoop(which is the function in nodenestloop.c)
12)In the client I did a join query, select * from student inner join marks on student.id=marks.id;
13)n

But the problem is that the code in nodenestloop.c is not getting executed.

could anyone help me with that.

Thank you

pgsql-general by date:

Previous
From: Craig Ringer
Date:
Subject: Re: Bi-Directional replication client awareness
Next
From: Roelof Wobben
Date:
Subject: permission problem