[Beginner Question] How to print the call link graph?

From: Wen Yi <wen-yi(at)qq(dot)com>
To: pgsql-general <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: [Beginner Question] How to print the call link graph?
Date: 2023-07-01 07:10:27
Message-ID: tencent_AAA2992A43F2C4A5BBE9486BB888D449AD0A@qq.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi community,
I use the gdb to track the postgres like this:

...

pq_getbyte () at pqcomm.c:980
980&nbsp;&nbsp;&nbsp;&nbsp; in pqcomm.c
(gdb)&nbsp; next
985&nbsp;&nbsp;&nbsp;&nbsp; in pqcomm.c
(gdb)&nbsp; next
986&nbsp;&nbsp;&nbsp;&nbsp; in pqcomm.c
(gdb)&nbsp; next
SocketBackend (inBuf=0x7ffc8f7e1310) at postgres.c:372

372&nbsp;&nbsp;&nbsp;&nbsp; postgres.c: Directory not empty.
(gdb)&nbsp; next
403&nbsp;&nbsp;&nbsp;&nbsp; in postgres.c
(gdb)&nbsp; next
406&nbsp;&nbsp;&nbsp;&nbsp; in postgres.c
(gdb)&nbsp; next
407&nbsp;&nbsp;&nbsp;&nbsp; in postgres.c
(gdb)&nbsp; next

...

But the question is:
It's too slow to input 'next' to run the postgres, I used to try to use the&nbsp; 'continut', but the gdb will run the postgres directly and not print the function name and code line

I want to it print like this:

... -&gt; pq_getbyte () at pqcomm.c:980 -&gt; SocketBackend (inBuf=0x7ffc8f7e1310) at postgres.c:372 -&gt; ...

Can someone provide me some advice?
Thanks in advance!

Yours,
Wen Yi

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ron 2023-07-01 15:26:07 Re: [Beginner Question] How to print the call link graph?
Previous Message Julien Rouhaud 2023-07-01 06:06:57 Re: psql and pgpass.conf on Windows