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

brobecke@sourceware.org brobecke@sourceware.org
Wed Feb 29 19:29:00 GMT 2012


CVSROOT:	/cvs/src
Module name:	src
Changes by:	brobecke@sourceware.org	2012-02-29 19:29:12

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

Log message:
	[Ada] whatis not printing array type name for value from history
	
	Consider the following declaration:
	
	type Full_Table is array (Color) of Integer;
	Full : Full_Table := (144, 233, 377, 610, 987);
	
	The debugger correctly prints the type name of variable "full":
	
	(gdb) whatis full
	type = pck.full_table
	
	But is unable to do so when using the value history:
	
	(gdb) print full
	$1 = (144, 233, 377, 610, 987)
	(gdb) whatis $
	!!! -> type = array (black .. white) of integer
	
	This is because the evaluation creates a "fixed" version of
	the array type, and that "fixed" version is missing a type name.
	As a result, whatis falls back to describing the type (a la ptype)
	instead of printing the type name.
	
	gdb/ChangeLog:
	
	* ada-lang.c (to_fixed_array_type): Set result's type name.
	
	gdb/testsuite/ChangeLog:
	
	* gdb.ada/whatis_array_val: New testcase.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/ChangeLog.diff?cvsroot=src&r1=1.13880&r2=1.13881
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/ada-lang.c.diff?cvsroot=src&r1=1.338&r2=1.339
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/ChangeLog.diff?cvsroot=src&r1=1.3101&r2=1.3102
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.ada/whatis_array_val.exp.diff?cvsroot=src&r1=NONE&r2=1.1
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.ada/whatis_array_val/foo.adb.diff?cvsroot=src&r1=NONE&r2=1.1
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.ada/whatis_array_val/pck.adb.diff?cvsroot=src&r1=NONE&r2=1.1
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.ada/whatis_array_val/pck.ads.diff?cvsroot=src&r1=NONE&r2=1.1



More information about the Gdb-cvs mailing list