From: Daniel Jacobowitz <drow@false.org>
To: Nick Roberts <nickrob@snap.net.nz>
Cc: Aleksandar Ristovski <ARistovski@qnx.com>,
gdb-patches@sourceware.org, Ryan Mansfield <RMansfield@qnx.com>
Subject: Re: [patch] Fix for varobj.c assertions.
Date: Tue, 29 Jan 2008 19:21:00 -0000 [thread overview]
Message-ID: <20080129192024.GB9019@caradoc.them.org> (raw)
In-Reply-To: <18317.12654.364705.470631@kahikatea.snap.net.nz>
On Wed, Jan 16, 2008 at 11:19:26AM +1300, Nick Roberts wrote:
> Maybe it cures the symptom and not the cause. We really need to know what is
> happening here. In your oringinal report the failed assertion occurred in
> my_value_equal but that function has gone now. Presumably it now occurs in
> install_new_value, but at which line?
>
> When there is no problem, presumably *value (in adjust_value_for_child_access)
> or value (in c_describe_child) are null. How do they become non null for
> inaccessible memory in the failing case?
I can reproduce this too. With GDB 6.7.1:
~"/tmp/buildd/gdb-6.7.1/gdb/varobj.c:2011: internal-error:
value_struct_element_index: Assertion `TYPE_CODE (type) ==
TYPE_CODE_STRUCT || TYPE_CODE (type) == TYPE_CODE_UNION' failed.\n"
~"A problem internal to GDB has been detected,\n"
~"further debugging may prove unreliable.\n"
~"Quit this debugging session? (y or n) "
With HEAD it's on line 2008, but otherwise the same. type is a
pointer type, "B *". *value was a B * value; indirecting it failed
because the pointer hasn't been initialized yet at the start of main.
When gdb_value_ind returns zero, it has not changed *result. So we
go ahead as if *result was set.
Aleksandar's change to c_describe_child is safe but not necessary,
because *cvalue will already be NULL if gdb_value_ind fails. The
change to adjust_value_for_child_access is right, and fixes the bug.
And the change to cplus_describe_child is definitely right (*whoops*).
So I've checked in the patch.
--
Daniel Jacobowitz
CodeSourcery
next prev parent reply other threads:[~2008-01-29 19:20 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-15 14:51 Aleksandar Ristovski
2008-01-15 22:20 ` Nick Roberts
2008-01-29 19:21 ` Daniel Jacobowitz [this message]
-- strict thread matches above, loose matches on Subject: below --
2008-01-11 3:05 Aleksandar Ristovski
2008-01-11 4:50 ` Nick Roberts
2008-01-10 22:05 Aleksandar Ristovski
2008-01-10 22:37 ` Nick Roberts
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=20080129192024.GB9019@caradoc.them.org \
--to=drow@false.org \
--cc=ARistovski@qnx.com \
--cc=RMansfield@qnx.com \
--cc=gdb-patches@sourceware.org \
--cc=nickrob@snap.net.nz \
/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