From: Christian Walther <walther@indel.ch>
To: gdb-patches@sourceware.org
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 [thread overview]
Message-ID: <7D18A421-36CB-47E5-AE7C-9A7DBDDBC612@indel.ch> (raw)
In-Reply-To: <20220622153740.176590-1-walther@indel.ch>
Ping!
On 2022-06-22 at 17:37, Christian Walther <walther@indel.ch> wrote:
>
> GDB under some circumstances wrongly reports 'numchild="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.
>
> 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).
>
> Debug information of this kind is generated by Clang 13.
> ---
>
> Changes in v2:
> - fix code style
> - add second commit to move confusing comment
>
> ---
> gdb/c-varobj.c | 1 +
> 1 file changed, 1 insertion(+)
>
> 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 = value_actual_type (*value, 1, &real_type_found);
> if (real_type_found)
> {
> + enclosing_type = check_typedef (enclosing_type);
> *type = enclosing_type;
> *value = value_cast (enclosing_type, *value);
> }
> --
> 2.25.1
--
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
next prev parent reply other threads:[~2022-07-25 12:53 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-21 8:18 [PATCH] " Christian Walther
2022-06-21 14:24 ` Bruno Larsen
2022-06-22 12:58 ` Christian Walther
2022-06-22 13:40 ` Bruno Larsen
2022-06-22 15:37 ` [PATCH v2 1/2] " Christian Walther
2022-06-22 15:37 ` [PATCH v2 2/2] Move a comment to a less confusing place Christian Walther
2022-07-25 12:52 ` Christian Walther [this message]
2022-06-22 15:43 ` [PATCH] Fix number of children of varobj with stub debug info Christian Walther
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=7D18A421-36CB-47E5-AE7C-9A7DBDDBC612@indel.ch \
--to=walther@indel.ch \
--cc=gdb-patches@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: link
Be 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).