public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: Stan Shebs <stanshebs@earthlink.net>
Cc: gdb@sourceware.org
Subject: Re: Toward multicore GDB - Set theory
Date: Thu, 03 Nov 2011 21:01:00 -0000	[thread overview]
Message-ID: <m34nyksyxf.fsf@fleche.redhat.com> (raw)
In-Reply-To: <4EB088E7.8040107@earthlink.net> (Stan Shebs's message of "Tue,	01 Nov 2011 17:03:51 -0700")

>>>>> "Stan" == Stan Shebs <stanshebs@earthlink.net> writes:

Stan> We then use set notation interesting with commands:

Stan> (gdb) [.7-80] print mytlsglob
Stan> $45 = [.8,16,32,64] 0xbadbad ; [.*] 0xfeedface

Stan> shows most threads with the same value for a variable, and a handful
Stan> of threads with a different value.

This is a tricky example since it implies pushing a lot of smarts into
'print'.  I'm in favor of it, I think it is the only way for this to
make sense and scale -- just painful.

Stan> Similarly, the single-thread option for breakpoints will be
Stan> generalized to sets.

Yes, nice.  I have actually been considering doing this myself, as a
follow-on to the ambiguous linespec patch.

Stan> The astute reader will notice many holes.  In particular, I am not
Stan> giving a formal definition of set syntax and how it fits into the CLI,
Stan> because I want us to develop some consensus on what would work best.
Stan> Key decisions to be made are:

Stan> 1) square brackets? curly brackets? nothing at all?
Stan> 2) prefix? postfix? both?
Stan> 3) build in extensibility? or leave to Python somehow?
Stan> 4) is there a better term than ptc set?

I think in the past we talked about square brackets and prefix.
How about we consider that as a straw proposal?

(gdb) [0-13] print x

I think that would suffice for all commands, even breakpoints; though it
may be slightly confusing that breakpoints "capture" the set while other
commands operate on them immediately.  If that is too confusing then
breakpoints could do another syntax, eg:

(gdb) break [0-13] function         # "semi-prefix"
(gdb) break function thread [0-13]  # "natural extension"


Allowing the definition of new kinds of ptc keywords from Python seems
natural.  I guess the question is whether it would be performant enough.

I think it would make sense to hold off on that, but carefully define
the PTC set syntax to be extensible and write the code to conservatively
reject unrecognized constructs.  Then we have leeway to make additions
in the future.

Tom

  reply	other threads:[~2011-11-03 21:01 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-02  0:04 Stan Shebs
2011-11-03 21:01 ` Tom Tromey [this message]
2011-11-04 13:20   ` Pedro Alves
2011-11-07 17:38   ` Joel Brobecker
2011-11-08  1:14     ` Daniel Jacobowitz
2011-11-08  5:17   ` Matt Rice
2011-11-08 14:50     ` Pedro Alves
2011-11-08 15:04       ` Tom Tromey
2011-11-08 15:45         ` Pedro Alves

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=m34nyksyxf.fsf@fleche.redhat.com \
    --to=tromey@redhat.com \
    --cc=gdb@sourceware.org \
    --cc=stanshebs@earthlink.net \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).