public inbox for [email protected]
help / color / mirror / Atom feedFrom: [email protected]
To: [email protected]
Subject: printing PGresult content with gdb
Date: Tue, 2 Jul 2024 18:13:04 +0200
Message-ID: <trinity-3ee0d178-9734-4afd-8657-c348e860763e-1719936784801@3c-app-mailcom-bs16> (raw)
<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div> </div>
<div class="signature">Hi all</div>
<div class="signature">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.</div>
<div class="signature">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</div>
<div class="signature">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)</div>
<div class="signature">(gdb) p res<br/>
$1 = (PGresult *) 0x7f0718000b80<br/>
(gdb) p *res<br/>
$2 = <incomplete type><br/>
(gdb) ptype res<br/>
type = struct pg_result {<br/>
<incomplete type><br/>
} *<br/>
(gdb) explore res<br/>
'res' is a pointer to a value of type 'PGresult'<br/>
Continue exploring it as a pointer to a single value [y/n]: y<br/>
The value of '*res' is of type 'PGresult' which is a typedef of type 'pg_result'<br/>
The value of '*res' is a struct/class of type 'pg_result' with no fields.<br/>
(gdb) <br/>
thanks for your hints</div>
<div class="signature">doris</div></div></body></html>
view thread (4+ messages) latest in thread
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]
Subject: Re: printing PGresult content with gdb
In-Reply-To: <trinity-3ee0d178-9734-4afd-8657-c348e860763e-1719936784801@3c-app-mailcom-bs16>
* 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