From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4505 invoked by alias); 25 Aug 2009 05:03:14 -0000 Received: (qmail 4303 invoked by uid 22791); 25 Aug 2009 05:03:12 -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-pz0-f198.google.com (HELO mail-pz0-f198.google.com) (209.85.222.198) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 25 Aug 2009 05:03:06 +0000 Received: by pzk36 with SMTP id 36so1376717pzk.12 for ; Mon, 24 Aug 2009 22:03:04 -0700 (PDT) MIME-Version: 1.0 Received: by 10.143.138.5 with SMTP id q5mr610535wfn.286.1251176584088; Mon, 24 Aug 2009 22:03:04 -0700 (PDT) In-Reply-To: <83eir1dnqw.fsf@gnu.org> References: <4A7BA1DE.6010103@vmware.com> <4A90B261.2030602@vmware.com> <4A90C08A.8000107@vmware.com> <837hwufkxr.fsf@gnu.org> <83eir1dnqw.fsf@gnu.org> From: Hui Zhu Date: Tue, 25 Aug 2009 05:04:00 -0000 Message-ID: Subject: Re: Bug in i386_process_record? To: Eli Zaretskii Cc: msnyder@vmware.com, 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/msg00407.txt.bz2 On Tue, Aug 25, 2009 at 03:18, Eli Zaretskii wrote: >> From: Hui Zhu >> Date: Mon, 24 Aug 2009 08:00:29 +0800 >> Cc: gdb-patches@sourceware.org >> >> #rep stos %eax,%es:(%edi) >> $edi + 0 =3D 0x8049660 blob1 >> $edi + $es !=3D 0x8049660 blob1 > > Well, of course! %es:(%edi) does _not_ mean $es+$edi, it means that > $edi is used to address the section whose segment descriptor's index > (a.k.a. selector) is in $es. =A0That is, in your case, 0x7b is the > selector that identifies the segment descriptor of the section where > blob1[] is stored (.bss, if my rusty memory doesn't deceive me). > > Am I missing something? =A0If not, what was this example supposed to > prove, exactly? > I check the code about Kernel and read some X86 spec about it. It seems that the segment (It is not the section) registers in x86 protect mode is just help MMU to get the physical address. It's transparent for the user level program. What do you think about remove this warning from this patch? Thanks, Hui