Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-debug-dev] Multithread debugging

> 
> Hi
> 
> GDB assumes that if one thread is stopped the whole application is
> stopped (e.g. on a breakpoint). In an embedded system this isn't always
> the case. We have a true multitasking system and every task can be
> stopped, debugged and run again, also several simultaneously. Eclipse
> also has the gdb philosophy, if one thread is stopped then all are.
> 
> Assuming I can either change gdb or use another debugger which supports
> the fully multitasking philosophy, how much work would be needed to
> change eclipse/CDT to work with this?
> 

It should work now.  When we become suspended
we send a suspended event with the source of the event being the Target.
It tells Eclipse/CDT that the target is suspended i.e. all the threads
are suspended.  If we have a suspended event with a thread as the source
then only this thread is suspended.

> What I would need:
> 
> - Every thread has a state independently of other threads
> - A running thread can change variables which should be observable
>   (and not only while the thread is stopped)
> - For this reason some kind of global refresh is necessary which would
>   refresh stuff as registers, task states, variables in the watches etc
>   independently of any thread state
> - I can debug every thread independently of others, e.g. three threads
>   are stopped on a breakpoint, I can single-step thread 1, then thread 2,
>   then again thread 1, then run thread 2, single-step thread 3, single-step
>   thread 1, stop thread 2, run thread 1, run thread 3 etc.
> - The possibility to attach to an already running (and possibly halted)
>   system and read its states, already set breakpoints, variables etc
> 

We are looking at writing documentation for this, but also the debug interfaces
are going through an overall:

- The interface to the CDT Launcher
- The interface to CDI; interface that Eclipse/CDT is using to exchange
  with the backend (for example GDB).
- Change to the MI, to adapt to MI level 2
- some 0yving patches 8-)
- etc ...

So your timing is ... not good, unless you have a few free cycles and
want to participate.




Back to the top