From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23651 invoked by alias); 14 Nov 2004 15:47:08 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 23643 invoked from network); 14 Nov 2004 15:47:04 -0000 Received: from unknown (HELO walton.sibelius.xs4all.nl) (82.92.89.47) by sourceware.org with SMTP; 14 Nov 2004 15:47:04 -0000 Received: from elgar.sibelius.xs4all.nl (elgar.sibelius.xs4all.nl [192.168.0.2]) by walton.sibelius.xs4all.nl (8.13.0/8.13.0) with ESMTP id iAEFl17L020536; Sun, 14 Nov 2004 16:47:01 +0100 (CET) Received: from elgar.sibelius.xs4all.nl (localhost [127.0.0.1]) by elgar.sibelius.xs4all.nl (8.12.6p3/8.12.6) with ESMTP id iAEFl1Lt010679; Sun, 14 Nov 2004 16:47:01 +0100 (CET) (envelope-from kettenis@elgar.sibelius.xs4all.nl) Received: (from kettenis@localhost) by elgar.sibelius.xs4all.nl (8.12.6p3/8.12.6/Submit) id iAEFkvOS010674; Sun, 14 Nov 2004 16:46:57 +0100 (CET) Date: Sun, 14 Nov 2004 20:41:00 -0000 Message-Id: <200411141546.iAEFkvOS010674@elgar.sibelius.xs4all.nl> From: Mark Kettenis To: cagney@gnu.org CC: gdb@sources.redhat.com In-reply-to: <200411141437.iAEEbiCc010466@elgar.sibelius.xs4all.nl> (message from Mark Kettenis on Sun, 14 Nov 2004 15:37:44 +0100 (CET)) Subject: Re: Fallout from value changes? References: <200411141437.iAEEbiCc010466@elgar.sibelius.xs4all.nl> X-SW-Source: 2004-11/txt/msg00136.txt.bz2 Replying to my onw message: Date: Sun, 14 Nov 2004 15:37:44 +0100 (CET) From: Mark Kettenis Hi Andrew, I noticed this new testsuite failure on i386-unknown-freebsd4.7: -PASS: gdb.base/store.exp: up struct 4 u; print new u, expecting {s = \{1, 2, 3, 4}} +FAIL: gdb.base/store.exp: up struct 4 u; print new u, expecting {s = \{1, 2, 3, 4}} This is caused by this patch: 2004-11-12 Andrew Cagney * defs.h (enum lval_type): Delete lval_reg_frame_relative. * value.h (struct value): Update comment. * valops.c (value_assign): Fold lval_reg_fame_relative into lval_register. * findvar.c (value_from_register, locate_var_value): Ditto. which breaks valops.c:value_assign(). That function contains the following bit of code: case lval_register: { struct frame_info *frame; int value_reg; /* Figure out which frame this is in currently. */ if (VALUE_LVAL (toval) == lval_register) { frame = get_current_frame (); value_reg = VALUE_REGNUM (toval); } else { frame = frame_find_by_id (VALUE_FRAME_ID (toval)); value_reg = VALUE_REGNUM (toval); } The if statement doesn't make sense; it's always true. As a result the function will never do proper frame-relative assigns. Simply removing the if-clause isn't a good solution since that will break assigning to non-frame-relative register variables. I guess we'll have to change GDB such that it always initializes VALUE_FRAME_ID to say null_frame_id, and using get_current_frame() in that case. Please revert the patch above, or fix this properly. Mark