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