From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9559 invoked by alias); 28 Feb 2003 01:52:41 -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 9539 invoked from network); 28 Feb 2003 01:52:40 -0000 Received: from unknown (HELO crack.them.org) (65.125.64.184) by 172.16.49.205 with SMTP; 28 Feb 2003 01:52:40 -0000 Received: from nevyn.them.org ([66.93.61.169] ident=mail) by crack.them.org with asmtp (Exim 3.12 #1 (Debian)) id 18oban-0004xT-00 for ; Thu, 27 Feb 2003 21:53:49 -0600 Received: from drow by nevyn.them.org with local (Exim 3.36 #1 (Debian)) id 18oZhW-0006iC-00 for ; Thu, 27 Feb 2003 20:52:38 -0500 Date: Fri, 28 Feb 2003 01:52:00 -0000 From: Daniel Jacobowitz To: gdb-patches@sources.redhat.com Subject: Re: The ari hits Message-ID: <20030228015238.GA17237@nevyn.them.org> Mail-Followup-To: gdb-patches@sources.redhat.com References: <3E5E8CAA.1080304@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3E5E8CAA.1080304@redhat.com> User-Agent: Mutt/1.5.1i X-SW-Source: 2003-02/txt/msg00798.txt.bz2 On Thu, Feb 27, 2003 at 05:09:46PM -0500, Andrew Cagney wrote: > Daniel, > > The files you recently committed trip the ARI. Can you please check > this out. > > Andrew > > http://sources.redhat.com/gdb/current/ari/ Thanks for reminding me; this patch fixes them. Almost obvious except for a bit that I want your opinion on - the hint on the ARI says to use register_size but I'm not convinced that's right. Is gdbarch_register_size always big enough that I don't need to use gdbarch_register_raw_size? -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer 2003-02-27 Daniel Jacobowitz * dwarf2expr.c (new_dwarf_expr_context): Add (void) to definition. * dwarf2loc.c (dwarf_expr_read_reg): Rename regnum argument to dwarf_regnum. Use gdbarch_register_raw_size. Index: dwarf2expr.c =================================================================== RCS file: /cvs/src/src/gdb/dwarf2expr.c,v retrieving revision 1.1 diff -u -p -r1.1 dwarf2expr.c --- dwarf2expr.c 21 Feb 2003 15:24:17 -0000 1.1 +++ dwarf2expr.c 28 Feb 2003 01:48:13 -0000 @@ -35,7 +35,7 @@ static void execute_stack_op (struct dwa /* Create a new context for the expression evaluator. */ struct dwarf_expr_context * -new_dwarf_expr_context () +new_dwarf_expr_context (void) { struct dwarf_expr_context *retval; retval = xcalloc (1, sizeof (struct dwarf_expr_context)); Index: dwarf2loc.c =================================================================== RCS file: /cvs/src/src/gdb/dwarf2loc.c,v retrieving revision 1.1 diff -u -p -r1.1 dwarf2loc.c --- dwarf2loc.c 21 Feb 2003 15:24:17 -0000 1.1 +++ dwarf2loc.c 28 Feb 2003 01:48:13 -0000 @@ -51,17 +51,21 @@ struct dwarf_expr_baton type will be returned in LVALP, and for lval_memory the register save address will be returned in ADDRP. */ static CORE_ADDR -dwarf_expr_read_reg (void *baton, int regnum, enum lval_type *lvalp, +dwarf_expr_read_reg (void *baton, int dwarf_regnum, enum lval_type *lvalp, CORE_ADDR *addrp) { - CORE_ADDR result; struct dwarf_expr_baton *debaton = (struct dwarf_expr_baton *) baton; - char *buf = (char *) alloca (MAX_REGISTER_RAW_SIZE); - int optimized, realnum; + CORE_ADDR result; + char *buf; + int optimized, regnum, realnum, regsize; + + regnum = DWARF2_REG_TO_REGNUM (dwarf_regnum); + regsize = gdbarch_register_raw_size (current_gdbarch, regnum); + buf = (char *) alloca (regsize); - frame_register (debaton->frame, DWARF2_REG_TO_REGNUM (regnum), - &optimized, lvalp, addrp, &realnum, buf); - result = extract_address (buf, REGISTER_RAW_SIZE (regnum)); + frame_register (debaton->frame, regnum, &optimized, lvalp, addrp, &realnum, + buf); + result = extract_address (buf, regsize); return result; }