Re: inconsistency in printing out the value of an unsigned short in gdb

Daniel Jacobowitz
2007-09-27T12:07:16Z

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.