Introduce new m_current_process and m_continue_process variables that
keep the pointers to currently selected process. At this moment, this
is equivalent to m_debugged_process_up but it lays foundations for
the future multiprocess support.
Details
Diff Detail
Event Timeline
Does this actually need to be a function? It seems like this could just be a pointer variable (or two), pointing into our pool of processes. I'd consider making a small struct to group the current process and the current thread within that process.
I suppose a pointer might work for the proposed design. However, I'm wondering why we have the GetID() check here — can we have an invalid value of m_debugged_process_up then?
I think someone was just being overly cautious. I'm pretty sure the check is redundant...
Switched to using two pointers instead of a function. Made ReadTid() accept a default PID instead of playing with bools. Corrected Hc PID to apply only to c/C/s/vCont packets, similarly to how GDB does it.
@labath, I've left the GetID() asserts in place because I've just did a big search/replace, and replacing them would be non-trivial and I can't really spend much more time on this.