Set CurrentThread after printing thread switch

This commit is contained in:
Derek Parker 2015-06-11 22:16:18 -05:00
parent 19e0e50062
commit d59ef1371b

@ -393,8 +393,8 @@ func (dbp *DebuggedProcess) Step() (err error) {
// Change from current thread to the thread specified by `tid`.
func (dbp *DebuggedProcess) SwitchThread(tid int) error {
if th, ok := dbp.Threads[tid]; ok {
dbp.CurrentThread = th
fmt.Printf("thread context changed from %d to %d\n", dbp.CurrentThread.Id, tid)
dbp.CurrentThread = th
return nil
}
return fmt.Errorf("thread %d does not exist", tid)