From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 76B6938582AF; Fri, 15 Dec 2023 20:18:04 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 76B6938582AF DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1702671484; bh=8mBqY024i07ObGq3S1pMJVxY5OVH6fK73MgaGQdL884=; h=From:To:Subject:Date:In-Reply-To:References:From; b=p7VwpzS1RYoUo0gXmgnE/sbNXUPk63Fqn7GRPirKQJ7AcCcqim/8aGXVh7Uz/Hprj mMh6Y3d1TYaAI6A17oI/PjNZO9Wz/JUFj/L9sz9VIY0CRdgmxG99pdL/dhV5ZDDcS+ wD7ddICVCNy70z2dTjo3qCejmhhVWRYAShOea0lU= From: "ssbssa at sourceware dot org" To: gdb-prs@sourceware.org Subject: [Bug python/17568] gdb.lookup_type fails if a C++11 enum class has a value with the same name Date: Fri, 15 Dec 2023 20:18:03 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: python X-Bugzilla-Version: 7.7 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: ssbssa at sourceware dot org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: 7.8 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: target_milestone bug_status cc resolution 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=3D17568 Hannes Domani changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |7.8 Status|NEW |RESOLVED CC| |ssbssa at sourceware dot o= rg Resolution|--- |FIXED --- Comment #1 from Hannes Domani --- Looks to me like this was fixed quite some time ago. With gdb-7.8 I already get these results: ``` (gdb) pt SP type =3D enum class SP : int {SP::SP} (gdb) p SP Attempt to use a type name as an expression (gdb) p SP::SP $1 =3D SP::SP (gdb) py print(gdb.lookup_type('SP')) SP (gdb) py print(gdb.parse_and_eval('SP')) Traceback (most recent call last): File "", line 1, in gdb.error: Attempt to use a type name as an expression Error while executing Python code. (gdb) py print(gdb.parse_and_eval('SP::SP')) SP::SP ``` --=20 You are receiving this mail because: You are on the CC list for the bug.=