From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26826 invoked by alias); 24 Aug 2009 19:18:46 -0000 Received: (qmail 26814 invoked by uid 22791); 24 Aug 2009 19:18:45 -0000 X-SWARE-Spam-Status: No, hits=-1.6 required=5.0 tests=AWL,BAYES_00,SPF_SOFTFAIL X-Spam-Check-By: sourceware.org Received: from mtaout2.012.net.il (HELO mtaout2.012.net.il) (84.95.2.4) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 24 Aug 2009 19:18:33 +0000 Received: from conversion-daemon.i_mtaout2.012.net.il by i_mtaout2.012.net.il (HyperSendmail v2004.12) id <0KOW00K00AVTHK00@i_mtaout2.012.net.il> for gdb-patches@sourceware.org; Mon, 24 Aug 2009 22:18:30 +0300 (IDT) Received: from HOME-C4E4A596F7 ([84.228.180.85]) by i_mtaout2.012.net.il (HyperSendmail v2004.12) with ESMTPA id <0KOW005R4AYTW020@i_mtaout2.012.net.il>; Mon, 24 Aug 2009 22:18:30 +0300 (IDT) Date: Mon, 24 Aug 2009 19:20:00 -0000 From: Eli Zaretskii Subject: Re: Bug in i386_process_record? In-reply-to: To: Hui Zhu Cc: msnyder@vmware.com, gdb-patches@sourceware.org Reply-to: Eli Zaretskii Message-id: <83eir1dnqw.fsf@gnu.org> References: <4A7BA1DE.6010103@vmware.com> <4A8A2ACD.9000208@vmware.com> <4A90B261.2030602@vmware.com> <4A90C08A.8000107@vmware.com> <837hwufkxr.fsf@gnu.org> 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/msg00394.txt.bz2 > From: Hui Zhu > Date: Mon, 24 Aug 2009 08:00:29 +0800 > Cc: gdb-patches@sourceware.org > > #rep stos %eax,%es:(%edi) > $edi + 0 = 0x8049660 blob1 > $edi + $es != 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. That 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? If not, what was this example supposed to prove, exactly?