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] |
Hello, This is my third take on introducing this new set/show command. The change since the last time is that the default had been changed to "all". This is not what used to be the default behavior in Ada, but it better matches the direction taken for C/C++, so it's all consistent across languages (and will make it easier later, when we manage to merge the ada code with the core code). So, to summarize, this patch introduces a new set/show command: (gdb) set multiple-choice-auto-select (off|all|cancel) (gdb) show multiple-choice-auto-select The idea is that some expressions are ambiguous, and that the debugger normally has several options: Select all matching symbols, ask the user to select one or more of them, or error out. This new option allows the user to configure how the debugger should behave in that situation: - "all" (default): auto-select all matching symbols. - "off": Auto-selection is off, so display a menu with all possible choices and ask the user to choose one or more of them. - "cancel": Abort the command explaining why. After the new setting was introduced, I modified ada-lang.c and linespec.c to take it into account. That resulted in some behavior changes which I think I desirable and consistent with we have done recently with multiple-location breakpoints. In order to preserve the current testcases, I simply forced multiple-choice-auto-select to "off" to reproduce the previous behavior. I also added some testing of the cases when multiple-choice-auto-select is set to "cancel" and "all". I still haven't written an Ada testcase but that's very easy. I'll do that next, together with the documentation if this patch is approved. 2008-02-02 Joel Brobecker <brobecker@adacore.com> * symtab.c (auto_select_off, auto_select_all, auto_select_cancel): New constants. (auto_select_modes, auto_select_mode): New static globals. (multiple_choice_auto_select_mode): New function. (_initialize_symtab): Add new multiple-choice-auto-select command. * symtab.h (auto_select_off, auto_select_all, auto_select_cancel) (multiple_choice_auto_select_mode): Add declarations. * ada-lang.c (user_select_syms): Add handling of new multiple-choice-auto-select setting. * linespec.c (decode_line_2): Likewise. 2008-02-02 Joel Brobecker <brobecker@adacore.com> * gdb.cp/ovldbreak.cc: Add missing bodies for methods foo::foofunc. * gdb.cp/ovldbreak.exp: Set multiple-choice-auto-select to "off" as this is the value that this test was assuming when it was written, before this setting got introduced. Add a couple of tests that verify the behavior when the new setting is "cancel" and "all". * gdb.cp/method2.exp, gdb.cp/templates.exp: Set multiple-choice- auto-select to "off" before we start the testing. Tested on x86-linux. OK to apply? Thanks, -- Joel
Attachment:
mcas.diff
Description: Text document
Attachment:
mcas-tc.diff
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |