From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 25E83385841E; Wed, 8 Mar 2023 00:54:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 25E83385841E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1678236859; bh=SdbNDGquNpZnWa8M8NP/wt3kN7fF9YSMEZZZsVzMXwQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=amC5j/aYxNhFkmvYYW5m2ndfJf0rGlofCrEvaWyet1HSZ3ap8xFz6m57u5+gYxbxt uEKbNtNiwTyeJZPJDcfWt1QZYq9bwfbL7tXC8efIQBSNwDj2X1vtIw8Y6IKG9JNknB 2haItdwlNKV2moSJXnJU5j7obABXVIpGgc8d82es= From: "woodard at redhat dot com" 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 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: gdb X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: woodard at redhat dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D30204 --- Comment #2 from Ben Woodard --- "info types REGEX" can do what I need in many cases. However, it becomes ra= ther 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 compila= tion units. For example a few days ago I was dealing with four different version= s 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. --=20 You are receiving this mail because: You are on the CC list for the bug.=