From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3349 invoked by alias); 26 Jan 2009 15:41:45 -0000 Received: (qmail 3304 invoked by uid 22791); 26 Jan 2009 15:41:45 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 26 Jan 2009 15:41:40 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id D673E1072C; Mon, 26 Jan 2009 15:41:38 +0000 (GMT) Received: from caradoc.them.org (209.195.188.212.nauticom.net [209.195.188.212]) by nan.false.org (Postfix) with ESMTP id C3F5410597; Mon, 26 Jan 2009 15:41:38 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1LRTak-0003kg-6p; Mon, 26 Jan 2009 10:41:38 -0500 Date: Mon, 26 Jan 2009 15:41:00 -0000 From: Daniel Jacobowitz To: Mathieu Lacage Cc: gdb@sourceware.org Subject: Re: baffling assembly-level weirdness Message-ID: <20090126154138.GA14406@caradoc.them.org> Mail-Followup-To: Mathieu Lacage , gdb@sourceware.org References: <74fef6df0901260724p188c5507x2cfa3a4283f6fd41@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <74fef6df0901260724p188c5507x2cfa3a4283f6fd41@mail.gmail.com> User-Agent: Mutt/1.5.17 (2008-05-11) X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2009-01/txt/msg00172.txt.bz2 On Mon, Jan 26, 2009 at 04:24:40PM +0100, Mathieu Lacage wrote: > hi, > > The following gdb session baffles me completely: %edx is reset to zero > by the mov at address 0x0804ad62 instead of being set to the constant > 0x804ad62. Of course, this code segfaults at $pc = 0x804ad68 when zero > is dereferenced... > > Version: GNU gdb 6.8 > > (gdb) disas $pc $pc+10 > Dump of assembler code from 0x804ad62 to 0x804ad6c: > 0x0804ad62 : mov 0x805e3c0,%edx This is a load from memory at address 0x805e3c0, in x86 syntax. -- Daniel Jacobowitz CodeSourcery