public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "jwakely.gcc at gmail dot com" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug python/28856] Python pretty printer causes stack overflow when printing frame arguments
Date: Thu, 03 Feb 2022 22:19:16 +0000	[thread overview]
Message-ID: <bug-28856-4717-60IpD1sRC0@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-28856-4717@http.sourceware.org/bugzilla/>

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

--- Comment #5 from Jonathan Wakely <jwakely.gcc at gmail dot com> ---
OK, thanks. I suppose I could just use the class name instead of calling the
name() member. I think my preference would be to try to call the function, and
if that returns a char* then use that, and if it fails (e.g. because there's no
inferior process, just a core) then use the class name. But of course to
gracefully find out if calling the function is possible, it needs to not crash
:-)

For the std:: error categories I can actually avoid calling the name()
function, because GDB can look up the address of the private symbol and compare
the _M_cat pointer to that.

gdb.parse_and_eval('_ZN12_GLOBAL__N_124system_category_instanceE.obj').address

But for user-defined custom categories, I'd like to be able to print the name.

I'll see what I can do to avoid calling the function. Thanks for the guidance.

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

  parent reply	other threads:[~2022-02-03 22:19 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-03 11:45 [Bug python/28856] New: " jwakely.gcc at gmail dot com
2022-02-03 11:46 ` [Bug python/28856] " jwakely.gcc at gmail dot com
2022-02-03 11:49 ` jwakely.gcc at gmail dot com
2022-02-03 12:02 ` fweimer at redhat dot com
2022-02-03 19:01 ` ssbssa at sourceware dot org
2022-02-03 20:50 ` jwakely.gcc at gmail dot com
2022-02-03 21:15 ` ssbssa at sourceware dot org
2022-02-03 21:29 ` simark at simark dot ca
2022-02-03 22:19 ` jwakely.gcc at gmail dot com [this message]
2022-02-07 17:51 ` blarsen at redhat dot com
2022-03-21 13:23 ` cvs-commit at gcc dot gnu.org
2022-03-24 14:28 ` simon.marchi at polymtl dot ca
2022-10-10 10:14 ` cvs-commit at gcc dot gnu.org
2022-10-10 10:23 ` blarsen at redhat dot com
2023-08-03 15:59 ` tromey at sourceware dot org
2024-01-13 18:50 ` 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-28856-4717-60IpD1sRC0@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).