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


CVSROOT:	/cvs/src
Module name:	src
Changes by:	brobecke@sourceware.org	2010-11-23 01:10:55

Modified files:
	gdb            : ChangeLog ada-lang.c 

Log message:
	[Ada] array pointers encoded as typedef to fat pointer
	
	A recent change in check_typedef caused the following regression,
	considering:
	
	type String_Access is access String;
	S1 : String_Access := null;
	
	Trying to print S1, we get:
	
	(gdb) print s1
	$1 = (string) (null)
	
	The type name is wrong.  We were expecting:
	
	(gdb) print s1
	$1 = (string_bug.string_access) (null)
	
	The extensive comment in this patch explains how pointers to arrays
	are encoded when the array is a "fat pointer".  What happened is
	that the change in check_typedef broke a type-equality test that
	we were performing.   The test really was on the fringe, but it
	turns out that, for what we're doing, we're really only interested
	in the main-type portion of the type.
	
	The patch adjust the check accordingly.
	
	gdb/ChangeLog:
	
	* ada-lang.c (ada_to_fixed_type): Expand function documentation.
	Return the original type if the main type portions match rather
	than when the type themselves match.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/ChangeLog.diff?cvsroot=src&r1=1.12335&r2=1.12336
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/ada-lang.c.diff?cvsroot=src&r1=1.277&r2=1.278


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