From: | Ravi Kiran <ravi(dot)kolanpaka(at)gmail(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | debugging with gdb |
Date: | 2014-07-12 06:26:08 |
Message-ID: | CAOh57xH-Rzi-9LUP0N10135zpy33xTk-jSfWWd2xFTs4wLeS+A@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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.
https://wiki.postgresql.org/wiki/Getting_a_stack_trace_of_a_running_PostgreSQL_backend_on_Linux/BSD
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
From | Date | Subject | |
---|---|---|---|
Next Message | Roelof Wobben | 2014-07-12 06:37:12 | permission problem |
Previous Message | Martin Gudmundsson | 2014-07-12 06:24:04 | Re: Bi-Directional replication client awareness |