From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28763 invoked by alias); 14 Jul 2004 17:26:48 -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 28753 invoked from network); 14 Jul 2004 17:26:47 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 14 Jul 2004 17:26:47 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i6EHQke3001084 for ; Wed, 14 Jul 2004 13:26:47 -0400 Received: from localhost.redhat.com (porkchop.devel.redhat.com [172.16.58.2]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i6EHQk025695; Wed, 14 Jul 2004 13:26:46 -0400 Received: from gnu.org (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id CDFDF2B9D; Wed, 14 Jul 2004 13:26:34 -0400 (EDT) Message-ID: <40F56CCA.5080106@gnu.org> Date: Wed, 14 Jul 2004 17:29:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-GB; rv:1.4.1) Gecko/20040217 MIME-Version: 1.0 To: "Martin M. Hunt" Cc: gdb@sources.redhat.com Subject: Re: dwarf2-frame.c question for maintainers References: <1089749730.3026.18.camel@dragon> In-Reply-To: <1089749730.3026.18.camel@dragon> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004-07/txt/msg00136.txt.bz2 > I'm working on some dwarf2 fixes with kevinb. In > dwarf2_build_frame_info(), Kevin added > +unit.signed_addr_p = bfd_get_sign_extend_vma (unit.abfd); > > This is useful for fixing several bugs where addresses needed to be > sign-extended. However, I found that read_reg() also needs to > sign-extend its result. Passing a pointer to the CU all the way down to > read_reg doesn't seem practical. > > I don't have any understanding of the overall structure of this code or > where it is going. I can see several possibilities, including the > obvious one; using a global. So how do I solve this to get the patch > accepted? (The global is out :-) How come extract_typed_address, in read_reg, doesn't sign extend? The MIPS (I'm assuming this is for the MIPS) has the dogma that _all_ addresses (a.k.a. CORE_ADDRs) are _always_ sign extended. If you see a non sign-extended address in the wild, try tracing it back to where it was created. Andrew