From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4207 invoked by alias); 12 Apr 2006 19:15:21 -0000 Received: (qmail 4196 invoked by uid 22791); 12 Apr 2006 19:15:20 -0000 X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 12 Apr 2006 19:15:17 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id k3CJFDUs031108; Wed, 12 Apr 2006 15:15:13 -0400 Received: from potter.sfbay.redhat.com (potter.sfbay.redhat.com [172.16.27.15]) by int-mx1.corp.redhat.com (8.12.11.20060308/8.11.6) with ESMTP id k3CJFDel020806; Wed, 12 Apr 2006 15:15:13 -0400 Received: from [172.16.24.50] (bluegiant.sfbay.redhat.com [172.16.24.50]) by potter.sfbay.redhat.com (8.12.8/8.12.8) with ESMTP id k3CJFATq022610; Wed, 12 Apr 2006 15:15:11 -0400 Message-ID: <443D51BE.2020207@redhat.com> Date: Wed, 12 Apr 2006 19:15:00 -0000 From: Michael Snyder User-Agent: Mozilla Thunderbird 1.0.7-1.4.1 (X11/20050929) MIME-Version: 1.0 To: Mark Kettenis CC: jimb@red-bean.com, gdb-patches@sourceware.org, drow@false.org Subject: Re: [RFA/RFC] dwarf2-frame read_reg References: <443C7529.7020206@redhat.com> <8f2776cb0604112142i32dcdf0dic8f44f2989311786@mail.gmail.com> <200604121817.k3CIH7nA021495@elgar.sibelius.xs4all.nl> In-Reply-To: <200604121817.k3CIH7nA021495@elgar.sibelius.xs4all.nl> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-04/txt/msg00154.txt.bz2 Mark Kettenis wrote: >>Date: Tue, 11 Apr 2006 21:42:01 -0700 >>From: "Jim Blandy" >> >>On 4/11/06, Michael Snyder wrote: >> >>>I want you guys to vett this change. I was getting wrong results >>>on a target where sizeof (SP) != sizeof (void *). The local func >>>read_reg was calling extract_unsigned_integer with the wrong size. >> >>Well, extract_typed_address requires the type of the register to be >>some sort of pointer. read_reg is given as a callback to the Dwarf >>expression evaluator in dwarf2expr.c, so it could be handed any >>register at all. >> >>How about unpack_long (buf, register_type (gdbarch, regnum))? >>Definitely regression-test this on several platforms... > > > This is likely to be wrong for platforms where addresses are signed. > > Michael, what kind of funny target is this? It has a stack pointer > register, but its size is different from the size of pointers? Yep, the reg size is 3 bytes. When it's pushed onto the stack, it occupies 3 bytes of memory. Funky, huh? The cpu can only reach 24 bits worth of address space.