From: "Tomas Östlund" <tomas.ostlund@ericsson.com>
To: Pedro Alves <palves@redhat.com>
Cc: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>,
ERAMMFN <mats.fredriksson@ericsson.com>,
<stanshebs@earthlink.net>
Subject: Re: [RFC/WIP PATCH 00/14] I/T sets (resend)
Date: Wed, 15 Feb 2012 09:48:00 -0000 [thread overview]
Message-ID: <4F3B7A53.7080509@ericsson.com> (raw)
In-Reply-To: <4F33D9BD.7020209@redhat.com>
On 02/09/12 15:35, Pedro Alves wrote:
[...]
>
> Great. I actually implemented most of this.
>
> See the v2 (latest version) of the series at:
>
> http://sourceware.org/ml/gdb-patches/2011-12/msg00550.html
Thanks, I will check that out.
>
> The problem is one of ambiguity when you want to be able to specify
> sets as an option, and support other options. E.g.,
>
> break -stop foo bar qux
>
> -stop takes a set as argument. Is the set "foo", or "foo bar"? Perhaps
> even "foo bar qux"? You'd need to quote the set somehow, like
>
> break -stop 'foo bar' qux.
>
> which we were trying to avoid (just like []'s)
>
> We could allow optional quoting. Another alternative would be to use some
> other characters. I don't know, '.', and ',' seemed quite intuitive to me. Maybe
> you could try v2 out a bit. It's still easily accessible in my git, as pointed
> out in the v2 series intro.
I'm not sure I see what the problem is here. If you compare to a UNIX shell, you have
the same kind of issue that you sometimes need to quote in order to be unambiguous.
For example, using the grep command as an example:
> grep foo bar froz
will grep for the string "foo" in the files bar and froz.
On the other hand, in order to search for the string "foo bar" in the file froz you
need to quote like
> grep "foo bar" froz.
The idea is that you do not need to *always* quote as was the case with the brackets
in the HPD spec, only when the command is ambiguous. So I think it is perfectly fine
to expect the user to somehow quote the argument to the -stop flag like
break -stop 'foo bar' qux
or
break -stop foo,bar qux
>
> It kind of follows from the idea that you can also switch the
> set focus permanently. With "itfocus" in v1, or "scope" in v2.
>
> You define your commands to apply to the current
> scope. So:
>
> (gdb) itfocus foo / scope foo
> (gdb) step
>
> is the same as
>
> (gdb) [foo] step (v1)
>
> or
>
> (gdb) scope foo step (v2)
>
> IOW, you can think of prefix scope as a shorthand. BTW, the v2 syntax is
> quite like TotalView's (they call theirs "dfocus", IIRC).
I think the semantics of this is confusing.
The command "scope foo" and "scope foo step" looks quite similar but has completely
different semantics. If you compare again with a UNIX shell (which I think is a
very good analogy and one that maps very well to the PCT concept)it would mean that
you would write
> cd bar ls
instead of simply
> ls bar
As you can see, I like the semantics of the Unix shell ;-)
The reason I use the shell as example is that our debugger shell is very much
influenced by it and as I said, it maps very nicely.
Both the UNIX shell and a debugger shell has a concept of a "current context".
In the UNIX shell, it is the current working directory and in the debug shell it is
the "current working set".
In the Unix shell many commands operates on files and directories and in the debug
shell it operates on cores, processes and threads.
We have even implemented shell things like ";" to execute more than one command like
cluster1/dsp0> step; print foo; go; print bar
will step the current core dsp0, then print the variable foo, then start execution
and finally print the variable bar when we stop for some reason.
Another shell features we have is redirect of output, so that you can write things like
cluster1/dsp0> showregisters > my_regs.txt
The above command will store the contents of all registers on dsp0 in the file
my_reg.txt. The nice thing about mimicking a real shell is that you have a lot of
knowledge that can be directly transferred to the debug shell.
If you know how to use a UNIX shell then many of the same concepts can be reused.
Cheers,
Tomas
prev parent reply other threads:[~2012-02-15 9:27 UTC|newest]
Thread overview: 53+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-28 15:39 [RFC/WIP PATCH 00/14] I/T sets Pedro Alves
2011-11-28 15:39 ` [RFC/WIP PATCH 03/14] Flip to set target-async on by default Pedro Alves
2011-11-29 21:18 ` Tom Tromey
2011-12-02 19:16 ` Marc Khouzam
2011-11-28 15:39 ` [RFC/WIP PATCH 01/14] Breakpoints always-inserted and the record target Pedro Alves
2011-11-29 21:09 ` Tom Tromey
2011-12-05 17:04 ` Pedro Alves
2011-11-28 15:39 ` [RFC/WIP PATCH 05/14] Add a small helper to get at a thread's inferior Pedro Alves
2011-11-29 21:19 ` Tom Tromey
2011-11-28 15:39 ` [RFC/WIP PATCH 02/14] Mask software breakpoints from memory writes too Pedro Alves
2011-12-06 20:40 ` Pedro Alves
2011-12-13 21:26 ` Andreas Schwab
2011-12-13 21:38 ` Pedro Alves
2011-12-14 2:08 ` Andreas Schwab
2011-12-14 12:53 ` Pedro Alves
2011-12-14 12:53 ` Andreas Schwab
2011-12-14 15:06 ` Pedro Alves
2011-12-14 15:38 ` Joel Brobecker
2011-11-28 15:40 ` [RFC/WIP PATCH 13/14] Make "thread apply all" only loop over threads in the current set Pedro Alves
2011-11-28 18:40 ` Eli Zaretskii
2011-11-28 18:56 ` Pedro Alves
2011-11-29 21:47 ` Tom Tromey
2011-12-16 18:47 ` Pedro Alves
2011-11-28 15:40 ` [RFC/WIP PATCH 08/14] Add support for the '@' core operator Pedro Alves
2011-11-30 17:29 ` Tom Tromey
2011-11-28 15:40 ` [RFC/WIP PATCH 12/14] Fix deref of stale pointer Pedro Alves
2011-11-28 15:40 ` [RFC/WIP PATCH 04/14] Implement all-stop on top of a target running non-stop mode Pedro Alves
2011-11-28 15:40 ` [RFC/WIP PATCH 10/14] Comment out new info breakpoints output, in order to not break the test suite Pedro Alves
2011-11-28 15:40 ` [RFC/WIP PATCH 09/14] I/T set support for breakpoints - trigger set, and stop set Pedro Alves
2011-11-29 22:02 ` Tom Tromey
2011-11-30 19:38 ` Tom Tromey
2011-12-16 19:29 ` Pedro Alves
2011-11-28 15:40 ` [RFC/WIP PATCH 07/14] Expand %ITSET% in the prompt to the current I/T set Pedro Alves
2011-11-29 21:22 ` Tom Tromey
2011-12-16 19:07 ` Pedro Alves
2011-12-16 19:09 ` Tom Tromey
2011-12-16 19:38 ` Pedro Alves
2011-11-28 15:45 ` [RFC/WIP PATCH 06/14] Add base itsets support Pedro Alves
2011-11-28 18:47 ` Eli Zaretskii
2011-11-28 18:56 ` Pedro Alves
2011-11-29 22:07 ` Tom Tromey
2011-11-30 18:54 ` Tom Tromey
2011-12-16 17:26 ` Pedro Alves
2011-11-28 15:45 ` [RFC/WIP PATCH 14/14] Fix manythreads.exp test Pedro Alves
2011-11-28 15:46 ` [RFC/WIP PATCH 11/14] Add I/T set support to most execution commands Pedro Alves
2011-11-30 19:27 ` Tom Tromey
2011-11-28 18:10 ` [RFC/WIP PATCH 00/14] I/T sets Pedro Alves
2011-11-30 19:35 ` Tom Tromey
2011-12-16 19:40 ` Pedro Alves
2012-02-09 7:51 ` Tomas Östlund
2012-02-09 8:19 ` [RFC/WIP PATCH 00/14] I/T sets (resend) Tomas Östlund
2012-02-09 14:36 ` Pedro Alves
2012-02-15 9:48 ` Tomas Östlund [this message]
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=4F3B7A53.7080509@ericsson.com \
--to=tomas.ostlund@ericsson.com \
--cc=gdb-patches@sourceware.org \
--cc=mats.fredriksson@ericsson.com \
--cc=palves@redhat.com \
--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