[RFAv5 1/3] Implement convenience functions to examine GDB settings.

Pedro Alves palves@redhat.com
Wed Oct 30 19:43:00 GMT 2019


On 9/15/19 7:53 PM, Philippe Waroquiers wrote:

>  void
>  _initialize_cli_cmds (void)
>  {
> @@ -2049,6 +2241,44 @@ abbreviations for commands and/or values.  E.g.:\n\
>    set_cmd_completer_handle_brkchars (c, with_command_completer);
>    add_com_alias ("w", "with", class_vars, 1);
>  
> +  add_internal_function ("_gdb_setting_str", _("\
> +$_gdb_setting_str - returns the value of a GDB setting as a string.\n\
> +Usage: $_gdb_setting_str (setting)\n\
> +\n\
> +auto-boolean values are \"off\", \"on\", \"auto\".\n\
> +boolean values are \"off\", \"on\".\n\
> +The unlimited value for integer, uinteger, zuinteger-unlimited\n\
> +settings is represented as \"unlimited\"."),

I wonder what users will think of these 
integer, uinteger, zuinteger-unlimited, etc. references.  I mean,
these are internal setting types, we don't describe them anywhere,
right?  Maybe the description here should be closer to the
manual description, telling users to loop at the documentation
of each setting to know which values to use.

> +			 gdb_setting_str_internal_fn, NULL);
> +
> +  add_internal_function ("_gdb_setting", _("\
> +$_gdb_setting - returns the value of a GDB setting.\n\
> +Usage: $_gdb_setting (setting)\n\
> +auto-boolean values are \"off\", \"on\", \"auto\".\n\
> +boolean values are \"off\", \"on\".\n\
> +The unlimited value for integer, uinteger settings is 0.\n\
> +The unlimited value for zuinteger-unlimited is -1."),

"for zuinteger-unlimited settings", I suppose.  Same thing
appears in other places below.

Otherwise LGTM.

Thanks,
Pedro Alves



More information about the Gdb-patches mailing list