From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ms9.webland.ch (ms9.webland.ch [92.43.217.109]) by sourceware.org (Postfix) with ESMTPS id B8FEB385AE5E for ; Mon, 25 Jul 2022 12:53:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B8FEB385AE5E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=indel.ch Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=ms9.webland.ch Received: from macserver.private ([84.73.225.123]) by ms9.webland.ch (12.3.0 build 2 x64) with ASMTP id 01202207251452578940 for ; Mon, 25 Jul 2022 14:52:57 +0200 Received: from localhost (localhost [127.0.0.1]) by macserver.private (Postfix) with ESMTP id B854E4D25B79; Mon, 25 Jul 2022 14:52:55 +0200 (CEST) X-Virus-Scanned: amavisd-new at indel.ch Received: from macserver.private ([127.0.0.1]) by localhost (macserver.private [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2jXflnab-wV9; Mon, 25 Jul 2022 14:52:55 +0200 (CEST) Received: from [192.168.1.99] (unknown [192.168.1.99]) by macserver.private (Postfix) with ESMTP id 1EB404D25B72 for ; Mon, 25 Jul 2022 14:52:55 +0200 (CEST) From: Christian Walther Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.21\)) Subject: [PING][PATCH v2 1/2] Fix number of children of varobj with stub debug info Date: Mon, 25 Jul 2022 14:52:54 +0200 References: <09601b2b-bb3c-a38a-3bd9-ae06f1c98513@redhat.com> <20220622153740.176590-1-walther@indel.ch> To: gdb-patches@sourceware.org In-Reply-To: <20220622153740.176590-1-walther@indel.ch> Message-Id: <7D18A421-36CB-47E5-AE7C-9A7DBDDBC612@indel.ch> X-Mailer: Apple Mail (2.3445.104.21) X-CTCH: RefID="str=0001.0A782F1E.62DE9229.000C,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0"; Spam="Unknown"; VOD="Unknown" X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_ASCII_DIVIDERS, KAM_DMARC_STATUS, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jul 2022 12:53:04 -0000 Ping! On 2022-06-22 at 17:37, Christian Walther wrote: >=20 > GDB under some circumstances wrongly reports 'numchild=3D"0"' on a > variable object for a pointer to a C++ class instance when the type > description from the debug info is a stub that does not include = members. > The code path is missing a call to check_typedef() to look up the > complete type description. This commit adds it. >=20 > Additional conditions for the bug to occur: > 1. "print object" is set to "on" > 2. The class has no run-time type identification (no vtable). >=20 > Debug information of this kind is generated by Clang 13. > --- >=20 > Changes in v2: > - fix code style=20 > - add second commit to move confusing comment >=20 > --- > gdb/c-varobj.c | 1 + > 1 file changed, 1 insertion(+) >=20 > diff --git a/gdb/c-varobj.c b/gdb/c-varobj.c > index 8fecbd57e08..64c3a9ebf1c 100644 > --- a/gdb/c-varobj.c > +++ b/gdb/c-varobj.c > @@ -121,6 +121,7 @@ adjust_value_for_child_access (struct value = **value, > enclosing_type =3D value_actual_type (*value, 1, = &real_type_found); > if (real_type_found) > { > + enclosing_type =3D check_typedef (enclosing_type); > *type =3D enclosing_type; > *value =3D value_cast (enclosing_type, *value); > } > --=20 > 2.25.1 --=20 Indel AG Christian Walther - Software Tuefiwis 26 CH-8332 Russikon Switzerland Tel.: +41 44 956 20 00 www.indel.ch = --------------------------------------------------------------------------= ---------------- New product GIN-MAX4x4: The compact 4-axis motion board now also = available as PRO version! https://www.indel.ch/en/products/drives/compact-motion-drives