This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: RFC: "set" command with 2 arguments instead of one?
- From: Joel Brobecker <brobecker at adacore dot com>
- To: "Tedeschi, Walfred" <walfred dot tedeschi at intel dot com>
- Cc: Doug Evans <xdje42 at gmail dot com>, Andreas Schwab <schwab at linux-m68k dot org>, "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Tue, 14 Apr 2015 05:49:20 -0700
- Subject: Re: RFC: "set" command with 2 arguments instead of one?
- Authentication-results: sourceware.org; auth=none
- References: <20141123042417 dot GA839 at adacore dot com> <87bnny45zi dot fsf at igel dot home> <20141123095317 dot GE5774 at adacore dot com> <CAP9bCMStR=uJ387HDhKdN8CHShFOiquYFHXhOvcVX0i0_Hr7VA at mail dot gmail dot com> <20141124071258 dot GI5774 at adacore dot com> <AC542571535E904D8E8ADAE745D60B192FA0A7CD at IRSMSX104 dot ger dot corp dot intel dot com>
> Sorry for the long delay here. Now I could come back to the patches again.
>
> Was there any outcome on that discussion. How do you think I could use
> the multiple arguments?
I don't remember any reply to the message you quote above, which
summarizes my current thinking and position. As you indicate, it is
a question of making a decision.
Global Maintainers: What do you think? Let's make a decision so that
Walfred can resume his work on this.
Thanks!
>
> -----Original Message-----
> From: gdb-patches-owner@sourceware.org [mailto:gdb-patches-owner@sourceware.org] On Behalf Of Joel Brobecker
> Sent: Monday, November 24, 2014 8:13 AM
> To: Doug Evans
> Cc: Andreas Schwab; gdb-patches@sourceware.org
> Subject: 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
> Intel GmbH
> Dornacher Strasse 1
> 85622 Feldkirchen/Muenchen, Deutschland
> Sitz der Gesellschaft: Feldkirchen bei Muenchen
> Geschaeftsfuehrer: Christian Lamprechter, Hannes Schwaderer, Douglas Lusk
> Registergericht: Muenchen HRB 47456
> Ust.-IdNr./VAT Registration No.: DE129385895
> Citibank Frankfurt a.M. (BLZ 502 109 00) 600119052
--
Joel