This is the mail archive of the 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:	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.
	* breakpoint.c (find_condition_and_thread): Stop parsing
	as soon as the first invalid keyword is found.
	* gdb.ada/bad-task-bp-keyword: New testcase.


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