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 3/5] Teach gdb::option about string options


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


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