This is the mail archive of the gdb-cvs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

src/gdb ChangeLog ada-lang.c testsuite/ChangeL ...


CVSROOT:	/cvs/src
Module name:	src
Changes by:	brobecke@sourceware.org	2011-02-17 06:42:57

Modified files:
	gdb            : ChangeLog ada-lang.c 
	gdb/testsuite  : ChangeLog 
	gdb/testsuite/gdb.ada: packed_array.exp 
	gdb/testsuite/gdb.ada/packed_array: pa.adb 
Added files:
	gdb/testsuite/gdb.ada/packed_array: pck.adb pck.ads 

Log message:
	[Ada] Fix unconstrained packed array size
	
	When ada-lang transforms an array descriptor type (an XUP structure)
	into an array type, the size of the array type is computed by using
	the element size, and multiplying it by the number of elements in
	that array. This does not work, however, for packed arrays, where
	the *packed* size in bits needs to be used.
	
	This usually does not cause any problem, because we end up reading
	more memory than needed.  However, we have observed on LynxOS
	a memory error while trying to read the entire array, because
	the larger-than-needed read tried to read past the end of the stack
	into inaccessible memory.
	
	This patch fixes the problem by correctly computing the array size
	in bytes in the case of packed arrays.
	
	gdb/ChangeLog:
	
	* ada-lang.c (ada_type_of_array): Fix the size of the array
	in the case of an unconstrained packed array.
	
	gdb/testsuite/ChangeLog:
	
	* gdb.ada/packed_array: Expand testcase to test printing of
	unconstrained packed array.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/ChangeLog.diff?cvsroot=src&r1=1.12602&r2=1.12603
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/ada-lang.c.diff?cvsroot=src&r1=1.284&r2=1.285
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/ChangeLog.diff?cvsroot=src&r1=1.2591&r2=1.2592
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.ada/packed_array.exp.diff?cvsroot=src&r1=1.14&r2=1.15
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.ada/packed_array/pck.adb.diff?cvsroot=src&r1=NONE&r2=1.1
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.ada/packed_array/pck.ads.diff?cvsroot=src&r1=NONE&r2=1.1
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.ada/packed_array/pa.adb.diff?cvsroot=src&r1=1.7&r2=1.8


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]