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 ada-lang.c ada-lang.h ada-typeprint.c ...


CVSROOT:	/cvs/src
Module name:	src
Changes by:	brobecke@sourceware.org	2010-04-20 22:38:02

Modified files:
	gdb            : ada-lang.c ada-lang.h ada-typeprint.c ChangeLog 
	gdb/testsuite  : ChangeLog 
Added files:
	gdb/testsuite/gdb.ada: info_types.c info_types.exp 

Log message:
	"unsupported language" error in info types when using Ada.
	
	This implements a rudimentary version of the la_print_typedef method
	for Ada.  Ada usually does not use typedefs, but there is one exception:
	pointers to unconstrained arrays.  Without this patch, we sometimes
	get an error in the "info types" output:
	
	(gdb) info types new_integer_type
	All types matching regular expression "new_integer_type":
	
	File foo.adb:
	Language not supported.
	
	For now, we treat the typedef as if it did not exist - using the
	underlying type instead.  This is the right thing to do for most cases,
	the only exception being access to array types.  Since we already have
	a general issue in handling these pointers (we confuse them with fat
	pointers), we will enhance ada_print_typedef to handle these pointers
	at the same time we address the general issue.
	
	gdb/ChangeLog:
	
	* ada-typeprint.c (ada_print_typedef): New function.
	* ada-lang.h (ada_print_typedef): Add declaration.
	* ada-lang.c (ada_language_defn): set la_print_typdef field
	to ada_print_typedef.
	
	gdb/testsuite/ChangeLog:
	
	* info_types.c, info_types.exp: New files.
	
	Tested on x86_64-linux.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/ada-lang.c.diff?cvsroot=src&r1=1.254&r2=1.255
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/ada-lang.h.diff?cvsroot=src&r1=1.53&r2=1.54
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/ada-typeprint.c.diff?cvsroot=src&r1=1.32&r2=1.33
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/ChangeLog.diff?cvsroot=src&r1=1.11654&r2=1.11655
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.ada/info_types.c.diff?cvsroot=src&r1=NONE&r2=1.1
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.ada/info_types.exp.diff?cvsroot=src&r1=NONE&r2=1.1
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/ChangeLog.diff?cvsroot=src&r1=1.2241&r2=1.2242


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