From: Vladimir Prus <vladimir@codesourcery.com>
To: gdb-patches@sources.redhat.com
Subject: Re: [RFC] 07/10 non-stop inferior control
Date: Wed, 04 Jun 2008 11:49:00 -0000 [thread overview]
Message-ID: <g25vfe$i72$1@ger.gmane.org> (raw)
In-Reply-To: <200805061649.24082.pedro@codesourcery.com>
Pedro Alves wrote:
> This patch adds the inferior control support for non-stop mode.
>
> In non-stop mode, each thread is handled individually. It should
> be like you have a separate debugger attached to each thread.
> To accomplish that, as soon as we have an event, we context switch
> to it, and go on handling it. The cases of hiting a breakpoint
> in another thread while we're stepping don't need to be handled
> specially, as the stepping thread will have its state, and the
> other thread will have its own state.
>
> Every exec command should apply only to the selected thread.
>
> A new target_stop_ptid method was added to request the target
> to interrupt a single thread.
>
> Several checks have been added so GDB doesn't try to do
> things with running threads, which don't make sense,
> like asking for the current PC of a running thread.
>
> Info threads now shows the running state of a thread. MI
> support can be added on top.
>
> (gdb) info threads
> 3 Thread 0xf7603b90 (LWP 23454) Â (running)
> * 2 Thread 0xf7e04b90 (LWP 23453) Â 0xffffe410 in __kernel_vsyscall ()
> 1 Thread 0xf7e056b0 (LWP 23450) Â (running)
Am I missing something, or there's no way to interrupt all threads?
Given that we have "continue -a"/"-exec-continue --all", I think a way
to interrupt all threads will be desirable. In fact, I'd claim that if
MI frontend has to issue several -exec-interrupt commands to stop the
program completely, it's a regression in functionality. Of course, I
can make MI do anything, but I need backend support for that :-)
Also, it seems inconsistent to me that "continue" has the -a option,
to resume all threads, while "interrupt" accepts an thread id. I'd
suggest that "interrupt" be modified to accept -a, and not accept
thread number. Or, alternatively, both continue and interrupt accept
both -a and thread number.
- Volodya
next prev parent reply other threads:[~2008-06-04 11:49 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-06 17:43 Pedro Alves
2008-05-08 18:19 ` Eli Zaretskii
2008-05-09 2:08 ` Pedro Alves
2008-05-09 2:52 ` Daniel Jacobowitz
2008-05-19 16:55 ` Pedro Alves
2008-05-19 16:56 ` Pedro Alves
2008-06-04 11:49 ` Vladimir Prus [this message]
2008-06-04 12:07 ` Pedro Alves
2008-06-04 12:18 ` Vladimir Prus
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='g25vfe$i72$1@ger.gmane.org' \
--to=vladimir@codesourcery.com \
--cc=gdb-patches@sources.redhat.com \
/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