From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9033 invoked by alias); 27 Sep 2007 12:07:16 -0000 Received: (qmail 8962 invoked by uid 22791); 27 Sep 2007 12:07:15 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 27 Sep 2007 12:07:11 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 89B4C9832B; Thu, 27 Sep 2007 12:07:09 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id 68BA89829E; Thu, 27 Sep 2007 12:07:09 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.67) (envelope-from ) id 1Ias96-0007Cj-NT; Thu, 27 Sep 2007 08:07:08 -0400 Date: Thu, 27 Sep 2007 12:15:00 -0000 From: Daniel Jacobowitz To: Erik Niessen Cc: gdb@sourceware.org Subject: Re: inconsistency in printing out the value of an unsigned short in gdb Message-ID: <20070927120708.GB27672@caradoc.them.org> Mail-Followup-To: Erik Niessen , gdb@sourceware.org References: <20070925141947.GA6437@caradoc.them.org> <20070926212800.GC17502@caradoc.them.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.15 (2007-04-09) 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: 2007-09/txt/msg00228.txt.bz2 On Thu, Sep 27, 2007 at 12:41:37PM +0200, Erik Niessen wrote: > I ran the readelf -wi on my executable. The output file is attached. > Looking at this debug info all the 3 variables are of type short > unsigned int 2 byte size. > So it looks that the debug info generated by the compiler is correct? That's not the issue. You need to look at where the .debug_info section says the variables live (DW_AT_location), and compare it to what the assembly code is putting there. -- Daniel Jacobowitz CodeSourcery