From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14353 invoked by alias); 21 Aug 2002 03:33:56 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 14346 invoked from network); 21 Aug 2002 03:33:54 -0000 Received: from unknown (HELO localhost.redhat.com) (216.138.202.10) by sources.redhat.com with SMTP; 21 Aug 2002 03:33:54 -0000 Received: from ges.redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 434BB3DA0 for ; Tue, 20 Aug 2002 23:33:53 -0400 (EDT) Message-ID: <3D630A21.5060308@ges.redhat.com> Date: Tue, 20 Aug 2002 20:33:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.0) Gecko/20020810 X-Accept-Language: en-us, en MIME-Version: 1.0 To: gdb-patches@sources.redhat.com Subject: Set ADDR Content-Type: multipart/mixed; boundary="------------030203060506070807060700" X-SW-Source: 2002-08/txt/msg00652.txt.bz2 This is a multi-part message in MIME format. --------------030203060506070807060700 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-length: 406 Hello, The bug below and the attached patch are just scary! (top-gdb) print $r0 $4 = 209 (top-gdb) print $r2 $5 = 0 (top-gdb) set $r2 = 0 (top-gdb) print $r2 $6 = 0 (top-gdb) print $r0 $7 = 0 ``addr'' the offset into the registers buffer wasn't being set which would lead to register zero always being set. The worry is that I didn't pick up any testsuite failures :-( committed the attached, Andrew --------------030203060506070807060700 Content-Type: text/plain; name="diffs" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="diffs" Content-length: 831 2002-08-19 Andrew Cagney * frame.c (frame_register_unwind): When a register, set addrp to the register's byte. Index: frame.c =================================================================== RCS file: /cvs/src/src/gdb/frame.c,v retrieving revision 1.14 diff -u -r1.14 frame.c --- frame.c 6 Aug 2002 22:42:56 -0000 1.14 +++ frame.c 21 Aug 2002 03:16:11 -0000 @@ -142,7 +142,9 @@ register cache. */ *optimizedp = 0; *lvalp = lval_register; - *addrp = 0; + /* ULGH! Code uses the offset into the raw register byte array + as a way of identifying a register. */ + *addrp = REGISTER_BYTE (regnum); /* Should this code test ``register_cached (regnum) < 0'' and do something like set realnum to -1 when the register isn't available? */ --------------030203060506070807060700--