public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
From: "simon.marchi at ericsson dot com" <sourceware-bugzilla@sourceware.org> To: gdb-prs@sourceware.org Subject: [Bug gdb/17416] New: -var-list-children fails with "set print object on" and invalid/NULL value Date: Fri, 19 Sep 2014 21:24:00 -0000 [thread overview] Message-ID: <bug-17416-4717@http.sourceware.org/bugzilla/> (raw) https://sourceware.org/bugzilla/show_bug.cgi?id=17416 Bug ID: 17416 Summary: -var-list-children fails with "set print object on" and invalid/NULL value Product: gdb Version: HEAD Status: NEW Severity: normal Priority: P2 Component: gdb Assignee: unassigned at sourceware dot org Reporter: simon.marchi at ericsson dot com Created attachment 7796 --> https://sourceware.org/bugzilla/attachment.cgi?id=7796&action=edit Test program When - "set print object" is on - The variable object is a pointer to a struct, and it contains an invalid value (e.g. NULL, or random uninitialized value) - The variable object (struct) has a child which is also a pointer to a struct. -var-list-children returns an error. GDB tries to dereference the top-level pointer to get the value of the child one, in order to go determine the real type of the pointed object using RTTI. In the process, value_ind in value_rtti_indirect_type throws an error that is never caught. What happens then is that the variable object for the child is half-created. If the top-level pointer is set to a sensible value and we try to do -var-list-children again, we get a "Duplicate variable object name" error. The attached test case shows the problem. -- You are receiving this mail because: You are on the CC list for the bug.
next reply other threads:[~2014-09-19 21:24 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2014-09-19 21:24 simon.marchi at ericsson dot com [this message] 2014-09-19 21:25 ` [Bug gdb/17416] " simon.marchi at ericsson dot com 2015-01-23 18:01 ` cvs-commit at gcc dot gnu.org 2015-01-23 18:08 ` simon.marchi at ericsson dot com 2015-05-02 13:32 ` malaperle at gmail dot com 2015-05-03 3:18 ` simon.marchi at polymtl dot ca 2015-05-03 14:44 ` malaperle at gmail dot com
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=bug-17416-4717@http.sourceware.org/bugzilla/ \ --to=sourceware-bugzilla@sourceware.org \ --cc=gdb-prs@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: linkBe 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).