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: RFC: "set" command with 2 arguments instead of one?


> This feels like a case where we need to at least think about some
> future-proofing.
> One way some commands separate expressions is with commas.
> I'm not fond of optional commas (setting aside the thread on
> info macro -at LOCATION,).
> IOW, if it turns out that we want to use commas down the road
> to separate expressions here, then I'd prefer the commas
> be required today.
> E.g., set mpx bound ADDR, LBOUND, UBOUND

> As for how to process multiple arguments to a "set" command,
> one way would be to stage the value in a string parameter,
> and then have a set handler post-process the result.

I think using commas systematically is making it worse for ourselves,
since it prevents us from using gdb_buildargv to parse the command
arguments for us. Commas also have a meaning in C, so arguably
they could be used in expressions as well. But, if that's the way
people prefer, then having a standard gdb_buildargv-like API that
everyone consistently uses will make it easier for me to accept
that decision.

-- 
Joel


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