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, The user sometimes enters an expression which is ambiguous. For instance, the name of a function or a variable which has homonyms... In that case, the debugger is expected to display the list of possibilities and ask the user to choose which one he meant (with an additional 2 possible choices: "all" and "cancel"). This has been a very practical solution when in interactive mode (ie when a user is driving the session), but an annoyance when driving the debugger with a tool. So we added a new set/show command that allowed the user to configure the behavior of the debugger so that: 1. Either the menu is still displayed (default behavior); 2. The choice "all" is always automatically selected; 3. The choice "cancel" is always automatically selected. Some of the AdaCore engineers actually disliked the menu and started using this new command to always select all options, even in interactive mode. The syntax is as follow: (gdb) set multiple-choice-auto-select (off|all|cancel) (gdb) show multiple-choice-auto-select As said above, the default is "off", which preserves the current behavior by default. The reason why I am proposing this as an RFA is that I'm wondering if others might be interested in sharing this setting. I noticed from a comment that Paul wrote that menus are also printed by linespec:decode_line_2. Otherwise, I'm happy to keep it in ada-lang.c (less work for me :-). 2008-01-01 Joel Brobecker <brobecker@adacore.com> * ada-lang.c (auto_select_off, auto_select_all, auto_select_cancel) (auto_select_choices, auto_select_choice): New static global variables. (user_select_syms): Add handling of new multiple-choice-auto-select setting. (_initialize_ada_language): Add new multiple-choice-auto-select option. Tested on x86-linux. No regression. A testcase and documentation will follow as soon as we agree on the patch itself. Thoughts? Thanks, -- Joel
Attachment:
auto-select.diff
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |