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-07-01 18:25:49

Modified files:
	gdb            : ChangeLog ada-lang.c 
	gdb/testsuite  : ChangeLog 
	gdb/testsuite/gdb.ada: arrayptr.exp 

Log message:
	variables whose type is a typedef to an array pointer
	
	If we declare a type as being an access to array type, and then
	declare a variable of that type, for instance:
	
	type Some_Array is array [...];
	type Array_Access is access all Some_Array;
	Table : Array_Access := [...];
	
	The variable "Table" may be defined in the debugging information
	as being a typedef to the array pointer type. In the past, it was
	defined directly as the array pointer type, but this has been changed
	to make sure that the typedef type gets used.
	
	If the typedef type wasn't used, it would allow the compiler to stop
	emitting that typedef type when compiling with
	-feliminate-unused-debug-types.  The removal of this typedef would
	be a problem, because GDB relies on the typedef to create symbols
	for pointer types, and without it, we would no longer be able to
	do "ptype array_access".
	
	This patch helps prevent incorrect output or even crashes when that
	extra typedef layer is used.
	
	The testing is already mostly covered by arrayptr.exp, but I still
	added a 'ptype' test, just for good measure.
	
	gdb/ChangeLog: (Eric Botcazou)
	
	* ada-lang.c (thin_descriptor_type): Deal with typedefs.
	(decode_constrained_packed_array): Likewise.
	(ada_evaluate_subexp) <TERNOP_SLICE>: Likewise.
	
	gdb/testsuite/ChangeLog (Joel Brobecker):
	
	* gdb.ada/arrayptr.exp: Add ptype test.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/ChangeLog.diff?cvsroot=src&r1=1.13135&r2=1.13136
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/ada-lang.c.diff?cvsroot=src&r1=1.301&r2=1.302
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/ChangeLog.diff?cvsroot=src&r1=1.2765&r2=1.2766
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.ada/arrayptr.exp.diff?cvsroot=src&r1=1.8&r2=1.9


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