From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31128 invoked by alias); 16 Sep 2007 19:45:22 -0000 Received: (qmail 31117 invoked by uid 22791); 16 Sep 2007 19:45:21 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sun, 16 Sep 2007 19:45:13 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id BE5809810A; Sun, 16 Sep 2007 19:45:11 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id 69A4E98109; Sun, 16 Sep 2007 19:45:11 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.67) (envelope-from ) id 1IX03K-0007EG-C8; Sun, 16 Sep 2007 15:45:10 -0400 Date: Sun, 16 Sep 2007 19:45:00 -0000 From: Daniel Jacobowitz To: Luis Machado Cc: gdb-patches@sources.redhat.com Subject: Re: [patch] Backtrace prints wrong argument value Message-ID: <20070916194510.GC27177@caradoc.them.org> Mail-Followup-To: Luis Machado , gdb-patches@sources.redhat.com References: <1177527233.12599.42.camel@localhost> <20070425191304.GA1283@caradoc.them.org> <1179293640.4323.16.camel@localhost> <20070516144250.GD24682@caradoc.them.org> <1189694765.4564.5.camel@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1189694765.4564.5.camel@localhost> User-Agent: Mutt/1.5.15 (2007-04-09) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-09/txt/msg00208.txt.bz2 On Thu, Sep 13, 2007 at 11:46:05AM -0300, Luis Machado wrote: > :ADDPATCH PowerPC-64: > > Hi, > > Bringing back this topic, i've written a patch to address this issue on > ppc's side, providing a function to specify call-clobbered registers > based on the ABI, similar to the S390's. :REVIEWMAIL: I guess this works, then? That's great. > 2007-09-13 Luis Machado > > * rs6000-tdep.c (ppc_dwarf2_frame_init_reg): New function. > (rs6000_gdbarch_init): Install ppc_dwarf2_frame_init_reg as > default dwarf2_frame_set_init_reg function. ChangeLog entries should be tab indented - you probably know this and your mailer ate the tabs? Indentation all over your patch is wrong, too. > +/* DWARF-2 frame support. Used to handle the detection of > + clobbered registers during function calls. */ Two spaces after periods, please. More occurances below. > + static void No leading space there. > +ppc_dwarf2_frame_init_reg (struct gdbarch *gdbarch, int regnum, > + struct dwarf2_frame_state_reg *reg, > + struct frame_info *next_frame) Those lines don't line up. More occurances below. > + /* Call-saved GP registers. */ > + if ((regnum >= (tdep->ppc_gp0_regnum + 14) > + && regnum <= (tdep->ppc_gp0_regnum + 31)) > + || (regnum == (tdep->ppc_gp0_regnum + 1))) > + reg->how = DWARF2_FRAME_REG_SAME_VALUE; You don't need the parentheses around (tdep->ppc_gp0_regnum + 14), et cetera; >= and <= are very low precedence. > @@ -3790,6 +3852,10 @@ > tdep->ppc_vr0_regnum = 71; > tdep->ppc_vrsave_regnum = 104; > } > + > + /* Frame handling. */ > + dwarf2_frame_set_init_reg (gdbarch, ppc_dwarf2_frame_init_reg); > + > /* Fall Thru */ > case GDB_OSABI_NETBSD_AOUT: > case GDB_OSABI_NETBSD_ELF: I don't think this should be GNU/Linux specific, so it should probably be elsewhere (before gdbarch_init_osabi). -- Daniel Jacobowitz CodeSourcery