From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3339 invoked by alias); 8 Jun 2004 04:03:08 -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 3307 invoked from network); 8 Jun 2004 04:03:06 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sourceware.org with SMTP; 8 Jun 2004 04:03:06 -0000 Received: from drow by nevyn.them.org with local (Exim 4.34 #1 (Debian)) id 1BXXpK-0001Sc-11; Tue, 08 Jun 2004 00:03:06 -0400 Date: Tue, 08 Jun 2004 04:03:00 -0000 From: Daniel Jacobowitz To: "Martin M. Hunt" Cc: gdb-patches@sources.redhat.com, kevinb@redhat.com Subject: Re: [RFA] MIPS DWARF2 CFI support Message-ID: <20040608040305.GA5511@nevyn.them.org> Mail-Followup-To: "Martin M. Hunt" , gdb-patches@sources.redhat.com, kevinb@redhat.com References: <1086666547.5507.23.camel@hunt.cipe.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1086666547.5507.23.camel@hunt.cipe.redhat.com> User-Agent: Mutt/1.5.5.1+cvs20040105i X-SW-Source: 2004-06/txt/msg00146.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. > - 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. -- Daniel Jacobowitz