From: Pawel Piech <pawel.piech@windriver.com>
To: Nick Roberts <nickrob@snap.net.nz>
Cc: gdb@sourceware.org
Subject: Re: Non-stop multi-threaded debugging
Date: Thu, 29 Nov 2007 06:15:00 -0000 [thread overview]
Message-ID: <474E58EF.2060601@windriver.com> (raw)
In-Reply-To: <18254.7923.167270.745538@kahikatea.snap.net.nz>
Nick Roberts wrote:
> > ... A -thread-select on an
> > ID of a process followed by an -exec-continue would resume an entire
> > process, while a -thread-select of a thread's ID followed by a continue
> > would resume only that thread. This could also be applied to all other
> > commands that need to operate on a process, such as -thread-list-ids,
> > -break-insert, etc.
>
> This would change the current behaviour of these commands. If a new command
> is undesirable then perhaps optional parameters could be used:
>
> -exec-continue [ -p THREAD-ID/PROCESS-ID ]
> -exec-interrupt [ -p THREAD-ID/PROCESS-ID ]
>
> It appears that -break-insert already has such an option for threads.
>
>
From Eclipse's point of view it actually doesn't make much difference
whether -thread-select or -p option is used to specify the thread.
That said, I would argue that adding the non-stop debugging feature
changes the behavior of the entire system, so it could be expected that
some commands will behave somewhat differently as they relate to this
new feature. Actually, with non-stop debugging feature turned off, and
without attaching to multiple processes, these commands would still
behave exactly as they do now.
In fact, the original post states:
> - Execution commands like '-exec-continue' and '-exec-step' shall
> resume only the selected thread, without affecting the other
> threads in the process.
So it seems that Jim's proposal would already change the existing
behavior of -exec-continue and -exec-step commands.
Also:
> At the user interface level:
>
> - MI shall provide a command to stop all the threads in a given
> process, and a command to resume all stopped threads in a given
> process.
Which to me implies that -exec-continue and -exec-interrupt would act on
a single thread, although this is contradicted by the other statement
about -exec-interrupt.
Lastly, since my post I thought a little about the CLI aspect in my
suggested use of thread IDs. It would probably be a little awkward to
use the "thread <id>" command to switch to a different process, or to
use it with a process-id to initiate process-wide operations. So for
the CLI interface, while I still think it would make sense to use the
same ID name-space for processes and threads, it would help to add a
couple of new commands:
"process <id>" - To select a new active process where the active thread
would be the last active thread in this process. This would be the
equivalent of a -thread-select with the last active thread in that process.
"thread all" - To un-select the current thread in order to perform
operations on all threads in the process. Equivalent of -thread-select
with the ID of the process.
Cheers,
Pawel
next prev parent reply other threads:[~2007-11-29 6:15 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-28 5:18 Pawel Piech
2007-11-29 2:08 ` Nick Roberts
2007-11-29 6:15 ` Pawel Piech [this message]
2007-11-29 6:46 ` gdb over RNDIS to PDA Steve DeLaney
2007-11-29 8:36 ` Non-stop multi-threaded debugging Vladimir Prus
2007-11-29 16:42 ` Pawel Piech
[not found] ` <474EEB36.1040203@windriver.com>
2007-11-29 16:46 ` Vladimir Prus
2007-11-29 17:36 ` Pawel Piech
2007-11-29 17:51 ` Vladimir Prus
2007-11-29 18:13 ` Pawel Piech
2007-12-04 18:34 ` Jim Blandy
2007-12-04 23:05 ` Pawel Piech
2007-12-05 21:52 ` Jim Blandy
-- strict thread matches above, loose matches on Subject: below --
2007-11-20 17:21 Nathan Sidwell
2007-11-20 19:28 ` Nick Roberts
2007-11-20 20:12 ` Jim Blandy
2007-11-21 13:53 ` Michael Snyder
2007-11-26 23:13 ` Jim Blandy
2007-11-27 16:42 ` Ulrich Weigand
2007-11-30 20:48 ` Thiago Jung Bauermann
2007-12-04 18:17 ` Jim Blandy
2007-12-05 13:41 ` Fabian Cenedese
2007-12-05 20:01 ` Nigel Stephens
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=474E58EF.2060601@windriver.com \
--to=pawel.piech@windriver.com \
--cc=gdb@sourceware.org \
--cc=nickrob@snap.net.nz \
/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