Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sOxHH-0029p6-0y for pgsql-general@arkaria.postgresql.org; Wed, 03 Jul 2024 10:31:55 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1sOxHF-007Sna-1E for pgsql-general@arkaria.postgresql.org; Wed, 03 Jul 2024 10:31:53 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sOg7y-002kOV-IW for pgsql-general@lists.postgresql.org; Tue, 02 Jul 2024 16:13:11 +0000 Received: from mout.gmx.net ([212.227.15.18]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sOg7w-0003m1-5s for pgsql-general@lists.postgresql.org; Tue, 02 Jul 2024 16:13:09 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.fr; s=s31663417; t=1719936785; x=1720541585; i=clipperdb@gmx.fr; bh=nigeLNMoel4h56QQ+QB9D6AaMiAkM3fTvLVhOJxhfT4=; h=X-UI-Sender-Class:MIME-Version:Message-ID:From:To:Subject: Content-Type:Date:cc:content-transfer-encoding:content-type:date: from:message-id:mime-version:reply-to:subject:to; b=RZqSOO3a2MR6JuRKQ1HDT1ekYuCOLrQs9NH2Ztm87XjctwYonespFd9uwTTGMtSs X5plKBADcJ+9Zp4omM/Mn9esPP28Q4ef93wYFQH/d9U64Ydg5wxQ6StToJNIDinDf MbFoF7zIXQ1flq05tirCoJqlOmrSGvGFMKBOyYsVnZo3TKF1HOIJUrRr10Ku8cdrW oDrCfyviqf8yGGr2SrgJ2KJ6VYoMYZ8PgrAn17MpmU3FOw24lAmIH9izz5eFNi+50 XIrqsDlO+AovOoA4uaRWY/4xtWrZA9hQMW71c9kKC6wrwDVStOU5tva1pxVSrRtFF ulMoFwXF6WSXO4WKCg== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from [90.118.59.215] ([90.118.59.215]) by web-mail.gmx.net (3c-app-mailcom-bs16.server.lan [172.19.170.184]) (via HTTP); Tue, 2 Jul 2024 18:13:04 +0200 MIME-Version: 1.0 Message-ID: From: clipperDB@gmx.fr To: pgsql-general@lists.postgresql.org Subject: printing PGresult content with gdb Content-Type: text/html; charset=UTF-8 Date: Tue, 2 Jul 2024 18:13:04 +0200 Importance: normal Sensitivity: Normal X-Priority: 3 X-Provags-ID: V03:K1:w/t7ZT/P6n/UrpXLQ7gTrD2zHC+MZmMRXBIJ8OvE7C/nhE/bPKfPHIb1f2Fmv82LDOs+X YjQqvN99YmUt+Pbroj0Rco+rqBhJPG0fkhNHaV4JERM4xb40rWCtb9nnoTuBE1449bj5jar7gHtY jH0RsVDf0LUW1F8WO5i3IlTY5xKvZU9SZ3xMczd0StwsoMhJM3XMMAEZ8a0p83G5oO5v7p/aWbaO 7kxW69QkDcTJRCUlMWtqQwntZyMf5E1bX2BybiG6IcCToMnAu3FRsX1rEuGabgRs49Cgq67FHrCM uU= X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:Dxum206fUcE=;bdGPz1AQrpWVxAEkLm6tKK3t4e6 VXSRmDxwlrxvZVweW/xeffaxORlY7/za4rPYBW0PKZVey/2BHxD3iNUjjoRETgyvlNzci7eh0 Sz5W+rZEqVgZBEd8F4NVYdvGAVNyVPr7XQrgm4uPjTbtZnDn1UQ92++x+UsMy9DXvAvaKZhTT 18U8AhkqNcMt5A1yeFq0nx+Cq616p4I82ZIbykuBkGdL9gMSlTPrnGP9sWqxv4CC5h67cqbku SGwjgu1OOafKFIEkh5DQeRw1LOPr969bKjRD3BRK5yqaAifeGuWlbnBjU+f1Xy2KQAhnmHmv9 JFq2ky4oAeBg1DR+6HkJx5z83gtgVMpnBo1wUJ7SXJC46HkXxGeySA0En6pPN+xpsPJekvoh/ j04f0TnDzz2DtoLBn2qvZEzzTf3hUc+d///f3GcANccwhvFZNUlFlFYyUPnLfAn55XTli1QuZ xH6gKcLs8b2Em/5NjNPWjRBjJoJuET8B87SJiMKEhNgLiC5D4gKRGHtYZduHNGL2wYhL91Erl t9wne83Pg10rt/lWacbHkoHsYvuLKCvTGlT+KVJMSaLtAlK7X1LuEDvewm1zSXLf26HJYhafY vXnA85M9giZytlryg10VraEdq/7rX5/HvSev2vlR6WdFV6hwfsxKDZaO9IVXY00950qSmw0SU 3e1EVdG3iJOa4HyVSwc9VNjvb3yS3Hy2qsLT5fXhvnB8E8HLvSrALn2e+cn7Gho= List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk
 
Hi all
I don't know if it is the right mailing list, but i was wondering if one could introspect via gdb the content of PGresult.
In my case i got a coredump and when i tried to analyze the core and try to print the content of PGresult i got incomplete type
I'm using libpq-13.3 (installed via libpq-13.3-1.el8_4.x86_64, RHEL8.5). Any help would be appreciated (i'm trying to get the errMesg value of this field)
(gdb) p res
$1 = (PGresult *) 0x7f0718000b80
(gdb) p *res
$2 = <incomplete type>
(gdb) ptype res
type = struct pg_result {
    <incomplete type>
} *
(gdb) explore res
'res' is a pointer to a value of type 'PGresult'
Continue exploring it as a pointer to a single value [y/n]: y
The value of '*res' is of type 'PGresult' which is a typedef of type 'pg_result'
The value of '*res' is a struct/class of type 'pg_result' with no fields.
(gdb) 
thanks for your hints
doris