* Fix internal error in value_cast_pointers
@ 2008-07-15 21:40 Andreas Schwab
2008-07-15 21:47 ` Daniel Jacobowitz
2008-07-15 21:53 ` Stan Shebs
0 siblings, 2 replies; 5+ messages in thread
From: Andreas Schwab @ 2008-07-15 21:40 UTC (permalink / raw)
To: gdb-patches
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."
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Fix internal error in value_cast_pointers
2008-07-15 21:40 Fix internal error in value_cast_pointers Andreas Schwab
@ 2008-07-15 21:47 ` Daniel Jacobowitz
2008-07-15 21:53 ` Stan Shebs
1 sibling, 0 replies; 5+ messages in thread
From: Daniel Jacobowitz @ 2008-07-15 21:47 UTC (permalink / raw)
To: Andreas Schwab; +Cc: gdb-patches
On Tue, Jul 15, 2008 at 11:39:54PM +0200, Andreas Schwab wrote:
> 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.
OK. Thanks a lot.
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Fix internal error in value_cast_pointers
2008-07-15 21:40 Fix internal error in value_cast_pointers Andreas Schwab
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
1 sibling, 2 replies; 5+ messages in thread
From: Stan Shebs @ 2008-07-15 21:53 UTC (permalink / raw)
To: Andreas Schwab; +Cc: gdb-patches
Andreas Schwab wrote:
> 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?
>
Do the regressions only happen on ppc or something? I just ran testsuite
on sources from a couple hours ago, on x86 linux, and bs15503 had no
failures.
Stan
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Fix internal error in value_cast_pointers
2008-07-15 21:53 ` Stan Shebs
@ 2008-07-15 22:02 ` Daniel Jacobowitz
2008-07-15 22:10 ` Andreas Schwab
1 sibling, 0 replies; 5+ messages in thread
From: Daniel Jacobowitz @ 2008-07-15 22:02 UTC (permalink / raw)
To: Stan Shebs; +Cc: Andreas Schwab, gdb-patches
On Tue, Jul 15, 2008 at 02:52:51PM -0700, Stan Shebs wrote:
> Andreas Schwab wrote:
>> 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?
>>
> Do the regressions only happen on ppc or something? I just ran testsuite
> on sources from a couple hours ago, on x86 linux, and bs15503 had no
> failures.
I think it is sensitive to the libstdc++ version - perhaps the
typedef was added in GCC 4.3. I've been seeing the failure for a
couple of weeks.
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Fix internal error in value_cast_pointers
2008-07-15 21:53 ` Stan Shebs
2008-07-15 22:02 ` Daniel Jacobowitz
@ 2008-07-15 22:10 ` Andreas Schwab
1 sibling, 0 replies; 5+ messages in thread
From: Andreas Schwab @ 2008-07-15 22:10 UTC (permalink / raw)
To: Stan Shebs; +Cc: gdb-patches
Stan Shebs <stan@codesourcery.com> writes:
> Andreas Schwab wrote:
>> 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?
>>
> Do the regressions only happen on ppc or something?
No, but they are compiler-dependent. If you are using an older gcc
(probably before 4.3) you will not see the typedefs in the debug info.
Andreas.
--
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."
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-07-15 22:10 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-07-15 21:40 Fix internal error in value_cast_pointers Andreas Schwab
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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox