From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 5D41C3858D1E; Thu, 28 Mar 2024 14:28:07 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5D41C3858D1E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1711636087; bh=PoE0N16+zkWt0dqRAhhHjT45o0aNTef/xH3LOpky2ac=; h=From:To:Subject:Date:From; b=HCqeC3iMhZMTWb0NGnNQgWzS1Wi4eFTQDEkJsIdgTwDaQITRQTQPbiiebgmRxjpTp 9vZ7vcJjLxa+KuMUT7QATeZIWDIVXzLSCNMEW697yxhJvCAvIeoWFhsrHcdKsW6h/M Cr59eWD+GR4p0eg16YprUwYkt8x+Zffhk7tyo+ok= From: "tromey at sourceware dot org" To: gdb-prs@sourceware.org Subject: [Bug gdb/31569] New: "finish" command loses typedef Date: Thu, 28 Mar 2024 14:28:06 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new 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: tromey at sourceware dot org 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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=3D31569 Bug ID: 31569 Summary: "finish" command loses typedef Product: gdb Version: HEAD Status: NEW Severity: normal Priority: P2 Component: gdb Assignee: unassigned at sourceware dot org Reporter: tromey at sourceware dot org Target Milestone: --- gcc has a "tree" typedef and a pretty-printer that recognizes it. While debugging gcc, I used "finish" and got: (gdb) fini Run till exit from #0 get_global_context () at ../../gcc/gcc/ada/gcc-interface/utils.cc:812 0x0000000001b0e800 in gnat_push_namespace (ns=3D) at ../../gcc/gcc/ada/gcc-interface/utils.cc:820 Value returned is $26 =3D (tree_node *) 0x7fffe9c0c168 However, this function is actually defined as: static tree get_global_context (void) { ... If I cast that value back to a tree, I get the pretty-printer output: (gdb) p (tree) $ $28 =3D I think this is a bug -- "finish" should result in a value that uses the function's declared return type, so that pretty-printers can see what they expect. Arguably I guess this is a bug in gcc as well, since it should probably recognize the underlying type and not the typedef. --=20 You are receiving this mail because: You are on the CC list for the bug.=