Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qFcUI-0006O1-7c for pgsql-general@arkaria.postgresql.org; Sat, 01 Jul 2023 15:26:14 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1qFcUH-0005ec-2q for pgsql-general@arkaria.postgresql.org; Sat, 01 Jul 2023 15:26:13 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qFcUG-0005eQ-MN for pgsql-general@lists.postgresql.org; Sat, 01 Jul 2023 15:26:12 +0000 Received: from mail-yb1-xb2d.google.com ([2607:f8b0:4864:20::b2d]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1qFcUD-001aeX-WD for pgsql-general@lists.postgresql.org; Sat, 01 Jul 2023 15:26:11 +0000 Received: by mail-yb1-xb2d.google.com with SMTP id 3f1490d57ef6-c2cf29195f8so3019362276.1 for ; Sat, 01 Jul 2023 08:26:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1688225168; x=1690817168; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=mALWeLyH9DEu0QrPd4XpoxkqPkPBeeEfVG6ZrBqieWA=; b=iCBvBr+jxUvLpgpg5EoKGXRnJ/vDIhl6jrMFDhD2CVcoOuS3wtaSIMfP9qgiNGk/rG qNi81bQwiMXEBZWt9MJA99o5mFEf+m+9XW4tBEBND8Ky5EM55cWALpKW14aqv35FLr9g 8hDe4ZWz9gRPDw/3Sie6W75bV+XDaPX7+E0oCawE0rvUVMPQpthXYdG8LIiI/7yiBBtY Tjw9IOeOYajqr/ai1jBNMFMC8A3vvuPtC6kIlDKQ5tlDIf8WNQdBDu8TgZhaIXoueyca 2I/dwzNyF284tJj5ii4fFu7MWy0LwEafdqHWtxOq18CrxwQJ9SKtJF5ZpBcJjlK6RYad 1ERA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688225168; x=1690817168; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=mALWeLyH9DEu0QrPd4XpoxkqPkPBeeEfVG6ZrBqieWA=; b=aCkZYMtKBOxO4QjE12TmjA/+3FxNtFMFdbRVFBp0o0d0phNnD0VITZ5ohEw6QGraga 0CGQq8xVJHmttbvmvlWex6pThxAGvo13CIvXeHtAcUygkRi/hwjqqp+FOa0zUNK7kpIN gVEqTKPx6RVqh9Z3fgZGp6FZm1Zv7eGAmOlV8sNMjufEUGvbxbJsf+2qb/8gt/0RAyyB 8Lf79GZagIp2GudgyCCGZc63pGxs07vAkX90/frRNi1xWemqjabZeDPPr7ukqvCBRFpp mqaD4CLUgIKkWEcLbgCSxTDoMx6nV2bMdho/hcgpp435YP4k6I3fpoDoa1ZmomYW/Hkj LX/g== X-Gm-Message-State: ABy/qLaKkz1e0wB7nsrMRXjynjTVy5Le0hsuVZfENGMKL1b7NdLMLj+S N3HpuV1JQhzn7IxxONgVFz0mt06ITpY= X-Google-Smtp-Source: APBJJlFKK0hCcTxjeweFCLPkh6kGxSFXBBBBbtqiue+i8LhGXoi3rfpJc34UDYw2aaR3fgfvX4ta+A== X-Received: by 2002:a81:4a85:0:b0:56c:e70b:b752 with SMTP id x127-20020a814a85000000b0056ce70bb752mr6641728ywa.13.1688225168146; Sat, 01 Jul 2023 08:26:08 -0700 (PDT) Received: from ?IPV6:2600:1700:bd2c:b810:c2e:52b8:e839:9146? ([2600:1700:bd2c:b810:c2e:52b8:e839:9146]) by smtp.googlemail.com with ESMTPSA id a63-20020a818a42000000b0056cd44f9f23sm3977134ywg.63.2023.07.01.08.26.07 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 01 Jul 2023 08:26:07 -0700 (PDT) Message-ID: <998d1c67-2abd-b35e-c61f-61dcc2e80944@gmail.com> Date: Sat, 1 Jul 2023 10:26:07 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [Beginner Question] How to print the call link graph? Content-Language: en-US To: pgsql-general@lists.postgresql.org References: From: Ron In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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.