[RFC] 07/10 non-stop inferior control

Pedro Alves pedro@codesourcery.com
Mon May 19 16:56:00 GMT 2008


A Tuesday 06 May 2008 16:49:23, 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)

Updated patch, mostly for convenience.  The only thing that changed worth
of notice, was a check for non_stop in prepare_to_proceed
moved to its caller instead.

-- 
Pedro Alves
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 007-non_stop_core.diff
Type: text/x-diff
Size: 22180 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20080519/b1b011af/attachment.bin>


More information about the Gdb-patches mailing list