Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Doug Evans <dje@google.com>
To: Philippe Waroquiers <philippe.waroquiers@skynet.be>
Cc: gdb-patches <gdb-patches@sourceware.org>
Subject: Re: RFC: block of commands
Date: Sun, 24 Jan 2016 20:03:00 -0000	[thread overview]
Message-ID: <CADPb22S7u6YinHKSh-keg8SvP8d4847BLVW1Gqqf-RyJbVM=Ww@mail.gmail.com> (raw)
In-Reply-To: <1453499357.2097.18.camel@skynet.be>

On Fri, Jan 22, 2016 at 1:49 PM, Philippe Waroquiers
<philippe.waroquiers@skynet.be> wrote:
>
>
> I think that effectively, the principles you suggest below
> should allow to make a reasonable syntax, and no backward
> incompatibility.
> So basically:
>   * trailing } is mandatory
>   * inside a block of commands, { } and ;  must be escaped
>   * a command block is limited to be on a single line
>     I guess multiple lines will be ok if each line is terminated
>     by a \.
>
> The above principles should also allow to extend if/while/...
> to have 'one line' if/while/...
>
> I also think that 'one line if' will allow to do things such as:
>
>    thread apply all if $ebp -$esp > 1000000 { echo big frame in this thread }
>
> (today, trying to use an 'if' in thread apply gives a quite strange
>  behaviour : the rest of the 'if' command is read during each execution
> for each thread, which is not very user friendly :).
>
> I will work based on the above idea, and resubmit a draft patch
> but that will for sure have to wait after FOSDEM, which
> will already consume the night and week-end free time :).
>
> Thanks for the comments/help/nice suggestions
>


Hi.
Sounds like a plan, but in an effort to make your time
as productive as I can I would suggest first trying to come
up with syntax that the community can accept.

Among the questions we need to answer:
- when/how to escape { } ;
  (what I gave was a strawman, I didn't dig deep
  into whether there are any gotchas)
- what to do with { } in expressions,
  e.g., "if ({1,2,3})[2] == 3 { echo foo }"
- ???

P.S. Hope you enjoy FOSDEM!


  reply	other threads:[~2016-01-24 20:03 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-21  1:29 Doug Evans
2016-01-22 21:47 ` Philippe Waroquiers
2016-01-24 20:03   ` Doug Evans [this message]
2016-01-24 22:23     ` Philippe Waroquiers
  -- strict thread matches above, loose matches on Subject: below --
2016-01-11 21:40 Doug Evans
2016-01-12 20:52 ` Philippe Waroquiers
2015-11-21 18:41 Philippe Waroquiers
2015-12-03 22:28 ` Philippe Waroquiers
2015-12-21 13:35   ` Philippe Waroquiers
2016-01-04 19:28 ` Philippe Waroquiers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CADPb22S7u6YinHKSh-keg8SvP8d4847BLVW1Gqqf-RyJbVM=Ww@mail.gmail.com' \
    --to=dje@google.com \
    --cc=gdb-patches@sourceware.org \
    --cc=philippe.waroquiers@skynet.be \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox