From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17066 invoked by alias); 19 Jul 2009 17:39:14 -0000 Received: (qmail 17051 invoked by uid 22791); 19 Jul 2009 17:39:14 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from sibelius.xs4all.nl (HELO sibelius.xs4all.nl) (82.92.89.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 19 Jul 2009 17:39:06 +0000 Received: from brahms.sibelius.xs4all.nl (kettenis@localhost [127.0.0.1]) by brahms.sibelius.xs4all.nl (8.14.3/8.14.3) with ESMTP id n6JHd018011080; Sun, 19 Jul 2009 19:39:00 +0200 (CEST) Received: (from kettenis@localhost) by brahms.sibelius.xs4all.nl (8.14.3/8.14.3/Submit) id n6JHcxTR008064; Sun, 19 Jul 2009 19:39:00 +0200 (CEST) Date: Sun, 19 Jul 2009 21:22:00 -0000 Message-Id: <200907191739.n6JHcxTR008064@brahms.sibelius.xs4all.nl> From: Mark Kettenis To: teawater@gmail.com CC: msnyder@vmware.com, gdb-patches@sourceware.org In-reply-to: (message from Hui Zhu on Mon, 20 Jul 2009 01:16:10 +0800) Subject: Re: [RFA/RFC Prec] Add Linux AMD64 process record support second version, (instruction set support) 1/3 References: <4A5A810B.7080603@vmware.com> <4A610EE8.1090904@vmware.com> 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: 2009-07/txt/msg00457.txt.bz2 > From: Hui Zhu > Date: Mon, 20 Jul 2009 01:16:10 +0800 > /* Parse the current instruction and record the values of the registers and > memory that will be changed in current instruction to "record_arch_list". > Return -1 if something wrong. */ > > +#define I386_RECORD_ARCH_LIST_ADD_REG(regnum) \ > + do { \ > + if (record_arch_list_add_reg (ir.regcache, ir.regmap[(regnum)])) \ > + return -1; \ > + } while (0) > + Hmm, I really disklike this macro. Having that return embedded in there is really bad. The current implementation of record_arch_list_add_reg() always returns 0, so I don't see why you need it. You should make record_arch_list_add_reg().