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-lex.l testsuite/ChangeLo ...


CVSROOT:	/cvs/src
Module name:	src
Changes by:	hilfingr@sourceware.org	2013-03-12 09:03:11

Modified files:
	gdb            : ChangeLog ada-lex.l 
	gdb/testsuite  : ChangeLog 
Added files:
	gdb/testsuite/gdb.ada: expr_delims.exp 
	gdb/testsuite/gdb.ada/expr_delims: foo.adb pck.adb pck.ads 

Log message:
	Allow 'thread' to be used as a variable name in expressions.
	
	GDB treats the identifiers 'if', 'thread', and 'task' unconditionally
	as expression delimiters in Ada mode, which is correct for 'if' and 'task',
	but wrong for 'thread' in cases such as
	
	print thread
	
	Borrowing from c-exp.y, we observe that 'thread' must be followed by
	numerals, whereas identifiers never are and treat them as delimiters
	only in that case.
	
	In the process, the current also refactors and incidentally fixes the
	code for rewinding the input to before the delimiting tokens.  For
	example, the code
	
	watch expr if i > 2
	
	fails because the input is only rewound to just before the 'i',
	leaving the 'if' as part of the expression (and thus making the
	rest look like trailing junk rather than a conditional clause).
	
	gdb/ChangeLog:
	
	* ada-lex.l (rules): Only recognize 'thread' as a
	delimiter when followed by numerals, as for c-exp.y.
	Use new rewind_to_char function to rewind the input for
	expression-delimiting tokens.
	(rewind_to_char): New function.
	
	gdb/testsuite/ChangeLog:
	
	* gdb.ada/expr_delims.exp: New file.
	* gdb.ada/expr_delims/foo.adb: New file.
	* gdb.ada/expr_delims/pck.ads: New file.
	* gdb.ada/expr_delims/pck.adb: New file.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/ChangeLog.diff?cvsroot=src&r1=1.15255&r2=1.15256
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/ada-lex.l.diff?cvsroot=src&r1=1.34&r2=1.35
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/ChangeLog.diff?cvsroot=src&r1=1.3579&r2=1.3580
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.ada/expr_delims.exp.diff?cvsroot=src&r1=NONE&r2=1.1
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.ada/expr_delims/foo.adb.diff?cvsroot=src&r1=NONE&r2=1.1
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.ada/expr_delims/pck.adb.diff?cvsroot=src&r1=NONE&r2=1.1
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.ada/expr_delims/pck.ads.diff?cvsroot=src&r1=NONE&r2=1.1


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