[PATCH 3/5] Teach gdb::option about string options

Tom Tromey tom@tromey.com
Fri Jun 28 15:11:00 GMT 2019


>>>>> "Pedro" == Pedro Alves <palves@redhat.com> writes:

Pedro> This commit adds support for string options, mapped to var_string.
Pedro> For now, a string is parsed up until the first whitespace.  I imagine
Pedro> that we'll need to add support for quoting so that we could do:

Pedro>  (gdb) cmd -option 'some -string'

Pedro> without gdb confusing the "-string" for an option.

Pedro> This doesn't seem important for pipe, so I'm leaving it for another
Pedro> day.

I wonder if we should file bugs for known holes like this.
On the one hand it seems nice to write down what we know.
On the other hand, maybe nobody will ever look at these.

Pedro> +  /* Disable the copy constructor.  */
Pedro> +  option_def_and_value (const option_def_and_value &rval) = delete;

I wonder if it makes sense to disable operator= as well.

Tom



More information about the Gdb-patches mailing list