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]

Re: [patch#2 0/6] auto-load: intro


On 03/29/2012 10:09 AM, Jan Kratochvil wrote:

> 
> This patchset is also present as:
> 	http://sourceware.org/gdb/wiki/ArcherBranchManagement
> 	archer-jankratochvil-autoload


The "set auto-load-scripts" scripts should be decrecated (with deprecate_cmd),
so that the deprecated command is hidden completion, and so that
"set auto-l<tab>" expands to "set auto-load ".  Easier on the user if she
doesn't need to type the ' ' before <tab> after "set auto-load" to see the
list of possible options.

Also, see what happens when a commands' show string doesn't
start with the literal "Show ", and you don't have a show callback:

 (gdb) show auto-load-scripts
 Cated alias for 'show auto-load python-scripts' is on.


   add_setshow_boolean_cmd ("auto-load-scripts", class_support,
-                          &auto_load_scripts, _("\
-Set the debugger's behaviour regarding auto-loaded scripts."), _("\
-Show the debugger's behaviour regarding auto-loaded scripts."), _("\
-If enabled, auto-loaded scripts are loaded when the debugger reads\n\
-an executable or shared library."),
-                          NULL, NULL,
-                          &setlist,
-                          &showlist);
+                          &auto_load_python_scripts, _("\
+Deprecated alias for 'set auto-load python-scripts'."), _("\
+Deprecated alias for 'show auto-load python-scripts'."),
+                          NULL, NULL, NULL, &setlist, &showlist);


There should always be an i18n'd show callback installed to handle
this (all new commands should have such a callback).  It might
be more userfriendly if the callback actually shows the new
command's current value.

-- 
Pedro Alves


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