From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2881 invoked by alias); 15 Jul 2008 21:40:23 -0000 Received: (qmail 2872 invoked by uid 22791); 15 Jul 2008 21:40:22 -0000 X-Spam-Check-By: sourceware.org Received: from ns2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 15 Jul 2008 21:39:57 +0000 Received: from Relay1.suse.de (mail2.suse.de [195.135.221.8]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2.suse.de (Postfix) with ESMTP id 1A12A45A9B for ; Tue, 15 Jul 2008 23:39:55 +0200 (CEST) From: Andreas Schwab To: gdb-patches@sourceware.org Subject: Fix internal error in value_cast_pointers X-Yow: I've gotta GO, now!! I wanta tell you you're a GREAT bunch of guys but you ought to CHANGE your UNDERWEAR more often!! Date: Tue, 15 Jul 2008 21:40:00 -0000 Message-ID: User-Agent: Gnus/5.110009 (No Gnus v0.9) Emacs/22.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-07/txt/msg00327.txt.bz2 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 * 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."