From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7248 invoked by alias); 27 Aug 2009 01:44:25 -0000 Received: (qmail 7118 invoked by uid 22791); 27 Aug 2009 01:44:24 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail-px0-f194.google.com (HELO mail-px0-f194.google.com) (209.85.216.194) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 27 Aug 2009 01:44:15 +0000 Received: by pxi32 with SMTP id 32so702252pxi.25 for ; Wed, 26 Aug 2009 18:44:13 -0700 (PDT) MIME-Version: 1.0 Received: by 10.143.26.38 with SMTP id d38mr624502wfj.216.1251337453078; Wed, 26 Aug 2009 18:44:13 -0700 (PDT) In-Reply-To: <4A95D342.6070304@vmware.com> References: <4A7BA1DE.6010103@vmware.com> <837hwufkxr.fsf@gnu.org> <83eir1dnqw.fsf@gnu.org> <8363cbenvt.fsf@gnu.org> <4A95C927.8020607@vmware.com> <4A95D342.6070304@vmware.com> From: Hui Zhu Date: Thu, 27 Aug 2009 01:50:00 -0000 Message-ID: Subject: Re: Bug in i386_process_record? To: Michael Snyder Cc: Eli Zaretskii , "gdb-patches@sourceware.org" 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: 2009-08/txt/msg00470.txt.bz2 On Thu, Aug 27, 2009 at 08:28, Michael Snyder wrote: > Michael Snyder wrote: >> >> Hui Zhu wrote: >>> >>> On Wed, Aug 26, 2009 at 02:42, Eli Zaretskii wrote: >>>>> >>>>> From: Hui Zhu >>>>> Date: Tue, 25 Aug 2009 13:02:44 +0800 >>>>> Cc: msnyder@vmware.com, gdb-patches@sourceware.org >>>>> >>>>> It seems that the segment (It is not the section) =A0registers in x86 >>>>> protect mode is just help MMU to get the physical address. =A0It's >>>>> transparent for the user level program. >>>> >>>> It's transparent if $es and $ds have the same value (which they >>>> usually do, AFAIK). >>>> >>>>> What do you think about remove this warning from this patch? >>>> >>>> I would indeed do that, if we find that $es and $ds have the same >>>> values. =A0Assuming that someone who knows Linux better than I do >>>> confirms that these two registers hold the same selector when a normal >>>> application is running in user mode. >>>> >>> Thanks for remind me. =A0We cannot get the value of each segment >>> register, but we can get each segment register point to. =A0So if the >>> value of segment registers, it's means that the value of them is same. >>> >>> I add some code about it: >>> =A0 =A0 =A0 =A0 =A0regcache_raw_read_unsigned (ir.regcache, >>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0ir.regmap[X86_RECORD_ES_REGNUM], >>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0&es); >>> =A0 =A0 =A0 =A0 =A0regcache_raw_read_unsigned (ir.regcache, >>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0ir.regmap[X86_RECORD_DS_REGNUM], >>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0&ds); >>> =A0 =A0 =A0 =A0 =A0if (ir.aflag && (es !=3D ds)) >>> =A0 =A0 =A0 =A0 =A0 =A0{ >>> >>> After that, we will not get the warning because the es is same with ds >>> in user level. >>> >>> What do you think about it? >> >> I think it is the best version I have seen so far. >> And it seems to follow the conclusions of the discussion. >> And I've tested it, and it seems to work. >> >> I would say wait until end-of-business Friday, and >> if there are no more comments, check it in! > > Hui, > > Do you think you could add some new tests to i386-reverse.exp, > to verify the string instructions? > > Thanks, > Michael > OK. I will do it. Thanks, Hui