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 breakpoint.c testsuite/Chang ...


CVSROOT:	/cvs/src
Module name:	src
Changes by:	brobecke@sourceware.org	2012-06-05 13:50:14

Modified files:
	gdb            : ChangeLog breakpoint.c 
	gdb/testsuite  : ChangeLog 
Added files:
	gdb/testsuite/gdb.ada: bad-task-bp-keyword.exp 
	gdb/testsuite/gdb.ada/bad-task-bp-keyword: foo.adb 

Log message:
	stop parsing breakpoint command if invalid keyword found
	
	With an Ada program, trying to break on a specific Ada task, but
	with the wrong capitalization of the `task' keyword, we currently
	get only pieces of the "garbage" that caused the error:
	
	(gdb) b *rendez_vous'address TASK 2
	Garbage 2 at end of command
	
	Pushing this a little further:
	
	(gdb) b *rendez_vous'address TASK Task TaSK 2
	Garbage 2 at end of command
	
	Another interesting failure mode:
	
	(gdb) b *rendez_vous'address TASK if
	Argument required (expression to compute).
	
	The parser skipped `TASK', then found the `if' keyword, and thus
	started looking for a condition.
	
	This patch fixes the problem by aborting the parsing as soon as
	an invalid keyword is found.  This makes it consistent with the
	case where the REST parameter is passed as NULL (where an error
	is raised immediately after seeing the first invalid keyword).
	
	It also introduces a new testcase that reproduces all above scenarios.
	
	gdb/ChangeLog:
	
	* breakpoint.c (find_condition_and_thread): Stop parsing
	as soon as the first invalid keyword is found.
	
	gdb/testsuite/ChangeLog:
	
	* gdb.ada/bad-task-bp-keyword: New testcase.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/ChangeLog.diff?cvsroot=src&r1=1.14321&r2=1.14322
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/breakpoint.c.diff?cvsroot=src&r1=1.677&r2=1.678
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/ChangeLog.diff?cvsroot=src&r1=1.3211&r2=1.3212
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.ada/bad-task-bp-keyword.exp.diff?cvsroot=src&r1=NONE&r2=1.1
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.ada/bad-task-bp-keyword/foo.adb.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]