public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
From: "woodard at redhat dot com" <sourceware-bugzilla@sourceware.org> To: gdb-prs@sourceware.org Subject: [Bug gdb/30204] RFE add an option to to ptype to print the decl file and decl line for a type Date: Wed, 08 Mar 2023 00:54:18 +0000 [thread overview] Message-ID: <bug-30204-4717-XGgDRFYRs8@http.sourceware.org/bugzilla/> (raw) In-Reply-To: <bug-30204-4717@http.sourceware.org/bugzilla/> https://sourceware.org/bugzilla/show_bug.cgi?id=30204 --- Comment #2 from Ben Woodard <woodard at redhat dot com> --- "info types REGEX" can do what I need in many cases. However, it becomes rather unhandy in C++ code where the number of types can be astronomically large. It also doesn't associate it with a variable in the particular context the way that ptype does. This can be particularly confusing when you have ABI compatible but polymorphic C types defined differently in different compilation units. For example a few days ago I was dealing with four different versions of struct _Unwind_Context and the type changed depending on which function I happened to be in. It was hard to know which one of the various versions of the type I was using at any given time. That is why I think it would be nice if you could do something like: ptype/l variable and it would print the declaration file and line number in addition to the normal output of ptype. I do not have any particular attachment to /l in particular, I was thinking "declaration location" 'l' for location but it could be 'd' for declaration or something else that makes sense to people. -- You are receiving this mail because: You are on the CC list for the bug.
prev parent reply other threads:[~2023-03-08 0:54 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-03-06 18:32 [Bug gdb/30204] New: " woodard at redhat dot com 2023-03-07 14:13 ` [Bug gdb/30204] " tromey at sourceware dot org 2023-03-07 15:34 ` ssbssa at sourceware dot org 2023-03-08 0:54 ` woodard at redhat dot com [this message]
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-30204-4717-XGgDRFYRs8@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: linkBe 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).