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

From: Ron <ronljohnsonjr(at)gmail(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: [Beginner Question] How to print the call link graph?
Date: 2023-07-01 15:26:07
Message-ID: 998d1c67-2abd-b35e-c61f-61dcc2e80944@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 7/1/23 02:10, Wen Yi wrote:
> Hi community,
> I use the gdb to track the postgres like this:
>
> ...
> pq_getbyte () at pqcomm.c:980
> 980     in pqcomm.c
> (gdb)  next
> 985     in pqcomm.c
> (gdb)  next
> 986     in pqcomm.c
> (gdb)  next
> SocketBackend (inBuf=0x7ffc8f7e1310) at postgres.c:372
>
> 372     postgres.c: Directory not empty.
> (gdb)  next
> 403     in postgres.c
> (gdb)  next
> 406     in postgres.c
> (gdb)  next
> 407     in postgres.c
> (gdb)  next
> ...
>
> But the question is:
> It's too slow to input 'next' to run the postgres, I used to try to use
> the  '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:
>
> ... -> pq_getbyte () at pqcomm.c:980 -> SocketBackend
> (inBuf=0x7ffc8f7e1310) at postgres.c:372 -> ...
>
> Can someone provide me some advice?

If no one here can, then superuser.com, unix.stackexchange.com or
stackoverflow.com should be able to.  (Just don't cross-post...)

--
Born in Arizona, moved to Babylonia.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Julien Rouhaud 2023-07-01 16:08:59 Re: [Beginner Question] How to print the call link graph?
Previous Message Wen Yi 2023-07-01 07:10:27 [Beginner Question] How to print the call link graph?