This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 3/5] Teach gdb::option about string options
- From: Pedro Alves <palves at redhat dot com>
- To: Tom Tromey <tom at tromey dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Wed, 3 Jul 2019 17:25:06 +0100
- Subject: Re: [PATCH 3/5] Teach gdb::option about string options
- References: <20190627191427.20742-1-palves@redhat.com> <20190627191427.20742-4-palves@redhat.com> <87woh5zqw1.fsf@tromey.com>
On 6/28/19 4:11 PM, Tom Tromey wrote:
>>>>>> "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.
Yeah on the later. I don't see anyone fixing that until
we have some option that requires it, and then, whoever
implements such an option will quickly run into it for sure.
>
> 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.
Indeed, I don't recall why I didn't use DISABLE_COPY_AND_ASSIGN.
I've done that now.
Thanks,
Pedro Alves