This is the mail archive of the gdb-patches@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]

[RFA] Limit qualified completions


Hi,

If the user attempts to complete symbols in a class or namespace, i.e., "complete break foo::", default_make_symbol_completion_list will return every single known global symbol in the executable.

This simplistic patch (and test case) "fixes" the problem, limiting the matches to the appropriate symbols.

Ok?

Keith

ChangeLog
2009-08-18  Keith Seitz  <keiths@redhat.com>

	* symtab.c (default_make_symbol_completion_list): Keep
	':', too, so that we can limit searches in namespaces
	and classes.

testsuite/ChangeLog
2009-08-18  Keith Seitz  <keiths@redhat.com>

	* gdb.cp/cpcompletion.exp (test_class_complete): New procedure.
	Add two new C++ completer tests which limit the output to a given
	class.

Attachment: cpcompletion.patch
Description: Text document


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