[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[cdt-debug-dev] Re: [cdt-patch] MISession terminate patch
|
>
> doh! patch attached..
>
Allright, but I'm not sure this will solve the problem.
The sequence of termination for the session is:
- Destroy the inferior(For the platform --> the DebugTarget):
* if (the inferior is running || connected)
send the abort/kill command for the inferior
* send an event (Target TERMINATED)to the Debug platform about the target being destroy.
- Remove the predicate
* this will terminate the RxThread, TxThread and the Eventthread
on the there next iterations.
- Destroy the gdb session(for the platform --> The Launch session)
* gdbProcess.destroy()
- Kill the RxThread, TxThread and EventThread explicitely if they are still around.
- Fire and explicit (Session TERMINATED) event telling the sesion is gone.
I can see a few things, if the EventThread was busy with pushing a lots of events
it may not have the chance to process the (Targer TERMINATED) event before being
decommission. So your patch may have buy the EventThread a few seconds.
We could:
- Explicitely flush the event Queue, but it is probably useless since
gdb is going down, there is no point to try update variables value and all.
- Make sure that events like: Target TERMINATED or Target DISCONNECTED goes through reliably,
this could be done by not using the EventThread but rather explicitely.
The fact that we do not know when the EventThread will process the event or when it will
go down can play tricks.
Questions:
Did you have a PR for this ?
Is this happen for you only when doing remote/attach ?
Is the abort/kill succesfull ?
Note, I'll happily apply corrections to head and 2.1 branch but for the branch
do not expect any release soon.