This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFAv5 1/3] Implement convenience functions to examine GDB settings.
- From: Pedro Alves <palves at redhat dot com>
- To: Philippe Waroquiers <philippe dot waroquiers at skynet dot be>, gdb-patches at sourceware dot org
- Date: Wed, 30 Oct 2019 19:43:48 +0000
- Subject: Re: [RFAv5 1/3] Implement convenience functions to examine GDB settings.
- References: <20190915185314.19875-1-philippe.waroquiers@skynet.be> <20190915185314.19875-2-philippe.waroquiers@skynet.be>
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