public inbox for [email protected]
help / color / mirror / Atom feedFrom: Lana ABADIE <[email protected]>
To: Tom Lane <[email protected]>
Cc: [email protected]
Subject: Re: printing PGresult content with gdb
Date: Thu, 4 Jul 2024 18:11:40 +0200
Message-ID: <trinity-ad245337-3615-4511-ae0f-293359d4eef9-1720109500405@3c-app-mailcom-bs07> (raw)
In-Reply-To: <[email protected]>
References: <trinity-3ee0d178-9734-4afd-8657-c348e860763e-1719936784801@3c-app-mailcom-bs16>
<[email protected]>
<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div> </div>
<div>
<div>
<div name="quote" style="margin:10px 5px 5px 10px; padding: 10px 0 10px 10px; border-left:2px solid #C3D9E5; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
<div style="margin:0 0 10px 0;"><b>Envoyé:</b> mercredi 3 juillet 2024 à 17:55<br/>
<b>De:</b> "Tom Lane" <[email protected]><br/>
<b>À:</b> [email protected]<br/>
<b>Cc:</b> [email protected]<br/>
<b>Objet:</b> Re: printing PGresult content with gdb</div>
<div name="quoted-content">[email protected] writes:<br/>
> I don't know if it is the right mailing list, but i was<br/>
> wondering if one could introspect via gdb the content of PGresult.<br/>
<br/>
You might have better luck with that if you install the debuginfo<br/>
RPM corresponding to your libpq RPM. PGresult's innards are not<br/>
exposed to applications by libpq-fe.h, so your own app's debug<br/>
data is not going to contain the details of the struct. But I think<br/>
it would be available to gdb if libpq's debug symbols were installed.<br/>
<br/>
regards, tom lane</div>
<div name="quoted-content"> </div>
<div name="quoted-content">thanks Tom</div>
<div name="quoted-content">Indeed installing the debuginfo rpm on my system solves the issue, i could print the content</div>
<div name="quoted-content">see trace below</div>
<div name="quoted-content">
<pre>(gdb) p *res
$2 = {ntups = 0, numAttributes = 0, attDescs = 0x0, tuples = 0x0, tupArrSize = 0, numParameters = 0, paramDescs = 0x0, resultStatus = PGRES_FATAL_ERROR,
cmdStatus = "\000ELECT 3\000\061", '\000' <repeats 53 times>, binary = 0, noticeHooks = {noticeRec = 0x7f0731f40770 <defaultNoticeReceiver>, noticeRecArg = 0x0,
noticeProc = 0x7f0731f40500 <defaultNoticeProcessor>, noticeProcArg = 0x0}, events = 0x0, nEvents = 0, client_encoding = 6,
errMsg = 0x7f07180076e8 "server closed the connection unexpectedly\n\tThis probably means the server terminated abnormally\n\tbefore or while processing the request.\n",
errFields = 0x0, errQuery = 0x0, null_field = "", curBlock = 0x7f07180076e0, curOffset = 146, spaceLeft = 1902, memorySize = 2264}</pre>
</div>
</div>
</div>
</div></div></body></html>
view thread (4+ messages)
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: printing PGresult content with gdb
In-Reply-To: <trinity-ad245337-3615-4511-ae0f-293359d4eef9-1720109500405@3c-app-mailcom-bs07>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox