Toward multicore GDB - Set theory

Pedro Alves pedro@codesourcery.com
Tue Nov 8 14:50:00 GMT 2011


On Tuesday 08 November 2011 05:17:28, Matt Rice wrote:
> On Thu, Nov 3, 2011 at 2:01 PM, Tom Tromey <tromey@redhat.com> wrote:
> 
> > (gdb) break [0-13] function         # "semi-prefix"
> 
> I personally prefer to avoid this one because the square brackets it
> would seem difficult to
> disambiguate between thread sets and objective-c methods,  at least
> when naming threads is added.
> 

Yeah, that was one of the reasons the current WIP prototype does:

 [TRIGGER-SET] break -stop [STOP-SET] (--) LINESPEC

That is [TRIGGER-SET] is a prefix, because it really is
the same meaning as applying the prefix in other commands.
That is, "the command applies to this set".  For breakpoints,
it naturally means "the breakpoint applies/triggers to/on
this set".  For "continue" it'd mean "continue this set",
for print, it'd mean "print this expression in the context
of this set", etc., etc..

The "-stop" option is required when specifying a
stop set (compared to not requiring "-stop" and just
accepting the [] part, and LINESPEC is last.  This gets rid
of LINESPEC ambiguity with obj-c at least, and leaves a saner
path open for other future options too.  I've left the
`--' option separator too for the same reason (like in your
info macro & friends changes).

-- 
Pedro Alves



More information about the Gdb mailing list