public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "malcolm.parsons at gmail dot com" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug python/13326] Need support for C++ method call for a gdb.Value object from within python
Date: Thu, 21 Jan 2021 19:27:40 +0000	[thread overview]
Message-ID: <bug-13326-4717-y97QS7Np5u@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-13326-4717@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=13326

Malcolm Parsons <malcolm.parsons at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |malcolm.parsons at gmail dot com

--- Comment #3 from Malcolm Parsons <malcolm.parsons at gmail dot com> ---
Use from a python pretty-printer is a bit convoluted, but it works:

def to_string(self):
    gdb.set_convenience_variable('_tmp', self.val.reference_value())
    return gdb.parse_and_eval('$_tmp.str()')

-- 
You are receiving this mail because:
You are on the CC list for the bug.

  parent reply	other threads:[~2021-01-21 19:27 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-20  5:14 [Bug python/13326] New: " lxmachine at gmail dot com
2012-05-05 20:13 ` [Bug python/13326] " vmiklos at frugalware dot org
2013-02-25 17:42 ` tfogal at alumni dot unh.edu
2021-01-21 19:27 ` malcolm.parsons at gmail dot com [this message]
2021-08-12 19:24 ` jwakely.gcc at gmail dot com
2023-07-24 16:30 ` joelhock at gmail dot com
2023-12-15 16:11 ` ssbssa at sourceware dot org
2024-02-08 19:10 ` cvs-commit at gcc dot gnu.org
2024-02-08 19:13 ` ssbssa at sourceware dot org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-13326-4717-y97QS7Np5u@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).