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?


> > It proposes the introduction of a couple of commands, one to dump
> > the contents of the of the bounds table, and one to set the bounds
> > for any given address. Since those commands are MPX-specific,
> > I would like to have them prefixed somehow. But the beyond the
> > fact that I'd like to have them prefixed, I was wondering if
> > set/show commands could be used for that. Eg:
> >
> >     show mpx bound ADDR
> >     set mpx bound ADDR LBOUND UBOUND
> >
> > The reason why I am asking for comments is that the "set" command
> > above has a syntax which is slightly unusual for "set" commands
> > in the sense that "set" commands nearly always only have one argument,
> > whereas it has 3 in this case.
> 
> How do you parse the arguments if they are arbitrary expressions?

I think that this is a question which is othogonal to the question
I am asking. If you need a command that takes multiple arguments,
and some of these arguments are going to be arbitrary expressions,
you're going to have a parsing problem regardless of the name of
the command you're choosing. And each command, regardless of the
name of the command they decide on, can determine how they handle it.
For instance, they could use quoting, a la shell.

But in the particular case that interests us, there are no arbitrary
expressions as of yet.

-- 
Joel


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