From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6215 invoked by alias); 11 Jun 2004 17:42:07 -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 6193 invoked from network); 11 Jun 2004 17:42:06 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 11 Jun 2004 17:42:06 -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 i5BHg6i7011785 for ; Fri, 11 Jun 2004 13:42:06 -0400 Received: from localhost.redhat.com (to-dhcp51.toronto.redhat.com [172.16.14.151]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i5BHg5023173; Fri, 11 Jun 2004 13:42:05 -0400 Received: from gnu.org (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 7C0642B9D; Fri, 11 Jun 2004 13:41:58 -0400 (EDT) Message-ID: <40C9EEE6.1000500@gnu.org> Date: Fri, 11 Jun 2004 17:42: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: Daniel Jacobowitz Cc: "Martin M. Hunt" , gdb-patches@sources.redhat.com, kevinb@redhat.com Subject: Re: [RFA] MIPS DWARF2 CFI support References: <1086666547.5507.23.camel@hunt.cipe.redhat.com> <20040608040305.GA5511@nevyn.them.org> In-Reply-To: <20040608040305.GA5511@nevyn.them.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004-06/txt/msg00270.txt.bz2 > On Mon, Jun 07, 2004 at 08:49:08PM -0700, Martin M. Hunt wrote: > >>> This is really kevinb's work, with some minor tweaks. I've tested this >>> on over 50 multilib combinations and it looks goood. >>> >>> 2004-05-26 Kevin Buettner: >>> >>> * dwarf2-frame.c (execute_cfa_program): Fix typo in which the >>> alignment was being added to the offset instead of multiplied. >>> >>> * dwarf2-frame.c (struct comp_unit): Add new field ``signed_addr_p''. >>> (encoding_for_size): Add new parameter ``signed_addr_p''. Adjust >>> all callers. Add code for handling signed encodings. >>> (dwarf2_build_frame_info): Initialize ``unit.signed_addr_p''. >>> >>> * dwarf2-frame.c (dwarf2_build_frame_info): Set unit.addr_size. >>> >>> * config/mips/tm-mips.h (SP_REGNUM): Delete define. >>> * mips-tdep.h (MIPS_SP_REGNUM): Define. >>> * mips-tdep.c (mips_gdbarch_init): Set SP_REGNUM via call >>> to set_gdbarch_sp_regnum(). Use cooked register number. >>> (SP_REGNUM): Replace all occurrences with MIPS_SP_REGNUM. >>> >>> * mips-tdep.c (mips_gdbarch_init): Set PC_REGNUM (via >>> call to set_gdbarch_pc_regnum()) to cooked register number. >>> >>> * mips-tdep.c (dwarf2-frame.h): Include. >>> (mips_gdbarch_init): Enable DWARF2 CFI support. > > > I've got three objections: > - This is a whole lot of changes. Please submit them independently, > with some sort of attempt at explanation. (Yes please, the SP_REGNUM looked to be an easy one to split out and the bulk of the change). >>> - unit.addr_size = objfile->obfd->arch_info->bits_per_address / 8; >>> + unit.addr_size = TYPE_LENGTH (builtin_type_void_data_ptr); >>> + unit.signed_addr_p = bfd_get_sign_extend_vma (unit.abfd); > > > - This is wrong; please don't introduce dependencies on GDB's type > system in dwarf2-frame.c. I imagine what's there isn't right > either because arch_info is completely unreliable on MIPS. There > is already a dwarf64_p where this is used; is that right? > > Actually, this sounds like a problem in the dwarf3 draft that > someone (maybe Jim?) brought up on the dwarf2 list a few weeks ago. > Jim, do you remember? > > And somewhat theoretical: > - I'd really rather not enable dwarf2 unwinding for MIPS until > someone makes a go at fixing the MIPS prologue unwinder. Either > that or rip it out; because after this patch it will get almost > zero coverage in the testsuite. This is an ongoing problem. > I know that the existing prologue unwinder is broken at the > beginning of functions and in a number of other situations. I don't think delaying CFI until the prologue unwinder is working is reasonable. However, what would help is the addition of a new more specialized stub-unwinder (see hppa and s390) (perhaphs later we can return to cleaning up the existing prologue unwinder). Patches for the former (the stub unwinder) more than welcome. Andrew