From: Andreas Schwab <schwab@suse.de>
To: gdb-patches@sourceware.org
Subject: Fix internal error in value_cast_pointers
Date: Tue, 15 Jul 2008 21:40:00 -0000 [thread overview]
Message-ID: <jeiqv6omhh.fsf@sykes.suse.de> (raw)
This patch fixes five regressions in bs15503.exp. value_ind has never
returned a value whose type has typedefs stripped off (the type is
always the direct target of the pointer type). Tested on ppc-linux.
OK?
Andreas.
2008-07-15 Andreas Schwab <schwab@suse.de>
* valops.c (value_cast_pointers): Follow typedefs when checking
result of coercion.
--- valops.c.~1.191.~ 2008-06-08 17:05:35.000000000 +0200
+++ valops.c 2008-07-15 22:59:34.000000000 +0200
@@ -268,7 +268,7 @@ value_cast_pointers (struct type *type,
v2 = coerce_ref (arg2);
else
v2 = value_ind (arg2);
- gdb_assert (TYPE_CODE (value_type (v2)) == TYPE_CODE_STRUCT
+ gdb_assert (TYPE_CODE (check_typedef (value_type (v2))) == TYPE_CODE_STRUCT
&& !!"Why did coercion fail?");
v2 = value_cast_structs (t1, v2);
/* At this point we have what we can have, un-dereference if needed. */
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, MaxfeldstraÃe 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
next reply other threads:[~2008-07-15 21:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-15 21:40 Andreas Schwab [this message]
2008-07-15 21:47 ` Daniel Jacobowitz
2008-07-15 21:53 ` Stan Shebs
2008-07-15 22:02 ` Daniel Jacobowitz
2008-07-15 22:10 ` Andreas Schwab
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=jeiqv6omhh.fsf@sykes.suse.de \
--to=schwab@suse.de \
--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