[M3commit] CVS Update: cm3

Rodney M. Bates rodney at elego.de
Sat Jul 11 03:54:27 CEST 2009


CVSROOT:	/usr/cvs
Changes by:	rodney at birch.	09/07/11 03:54:27

Modified files:
	cm3/m3-sys/m3gdb/gdb/bfd/: elf64-x86-64.c 
	cm3/m3-sys/m3gdb/gdb/gdb/: m3-exp.c 

Log message:
	Fix a configuration bug that caused m3gdb to get incorrect addresses
	for locals and formals.
	
	This shows up an unfortunate problem on 64-bit targets that is
	probably not fixable without going to Dwarf2 debug format.  The stabs
	format has a field named "value" than holds, in some cases,
	displacements.  This field is apparently always 32 bits in the object
	file, regardless of the target word size.
	
	This bug fix sets a configuration parameter that causes this value to
	be sign-extended when reading in.  This will no doubt work fine for
	displacements, which are signed and not so large in absolute value.
	
	But this field can also be used in other ways, including holding
	constant values.  Constant values that don't fit in 32 bits will get
	garbled.
	
	'as' on AMD64_LINUX (at least Ubuntu 8.04) assembles .stabs lines with
	only 32 bits for this field.  'objdump -G' prints 64 bits worth in its
	output, but apparently does not read 64, rather reads 32 and pads to
	64.
	
	Probably the world at large is not interested in updating stabs and
	the tools that use it for 64 bits.  Nor has the newer bfd code in gdb
	6.8 made the sign-extension fix.
	
	Other files parallel to m3gdb/gdb/bfd/elf64-x86-64.c, for other 64-bit
	targets probably need this change too.




More information about the M3commit mailing list