From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13202 invoked by alias); 4 Mar 2010 07:58:38 -0000 Received: (qmail 13191 invoked by uid 22791); 4 Mar 2010 07:58:37 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40 X-Spam-Check-By: sourceware.org Received: from mail-px0-f203.google.com (HELO mail-px0-f203.google.com) (209.85.216.203) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 04 Mar 2010 07:58:33 +0000 Received: by pxi41 with SMTP id 41so865315pxi.23 for ; Wed, 03 Mar 2010 23:58:32 -0800 (PST) MIME-Version: 1.0 Received: by 10.142.207.10 with SMTP id e10mr5195391wfg.9.1267689512195; Wed, 03 Mar 2010 23:58:32 -0800 (PST) In-Reply-To: <20100304073855.GK2832@adacore.com> References: <20100304073855.GK2832@adacore.com> From: Hui Zhu Date: Thu, 04 Mar 2010 07:58:00 -0000 Message-ID: Subject: Re: [RFA] i386-tdep.c: fix a bug in prec i386 code To: Joel Brobecker Cc: gdb-patches ml , Mark Kettenis Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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: 2010-03/txt/msg00165.txt.bz2 On Thu, Mar 4, 2010 at 15:38, Joel Brobecker wrote: > > > 2010-03-04 =A0Hui Zhu =A0 > > > > =A0 =A0 =A0 * i386-tdep.c (i386_process_record): Change "addr" to "tmpu= 64". > > OK. Checked in. > > As an aside, your code needs a really good thorough cleanup. I warned > you already about the use of variables with a meaningless name, and > you'll make this sort of mistake again for as long as you keep using > them. However, my main point is that the use of a giant switch statement > makes your code very hard to read and review. =A0I really suggest that > you create a new file, precord-i386.c where you put your stuff there, > and instead of inlining the code inside each case, you define small > contained procedures for each instruction (or instruction group). > It'll be easier to find the code that handles such and such instruction, > easier to write a ChangeLog entry that tells us more about where the > change was made, and it'll make the switch block actually possible > to read. > Agree with you. But prec patch have some still hang in there (see http://sourceware.org/gdb/wiki/ProcessRecord) and this change will be very big. If I do it, what I will meet is: 1. Make a patch follow the hang change, then the new patch cannot checked in before the hang patch in. 2. Make a patch just for cvs-head. After this patch in, this hang patch need update follow cvs-head. This is not a small work. I conflict with them. So ... Thanks, Hui