Remove any printing from core proc package

Also, reorganizes some code.

Initially, the `proc` package emitted a lot of output. Now, that should
not be the case. The `proc` package should never print, for any reason.
That should be handled by clients.
This commit is contained in:
Derek Parker 2015-07-10 15:48:51 -05:00
parent c8e4fcc285
commit 1ce255ffa3

@ -412,8 +412,7 @@ func (dbp *Process) Step() (err error) {
if th.blocked() { if th.blocked() {
continue continue
} }
err := th.Step() if err := th.Step(); err != nil {
if err != nil {
return err return err
} }
} }
@ -426,7 +425,6 @@ func (dbp *Process) Step() (err error) {
// Change from current thread to the thread specified by `tid`. // Change from current thread to the thread specified by `tid`.
func (dbp *Process) SwitchThread(tid int) error { func (dbp *Process) SwitchThread(tid int) error {
if th, ok := dbp.Threads[tid]; ok { if th, ok := dbp.Threads[tid]; ok {
fmt.Printf("thread context changed from %d to %d\n", dbp.CurrentThread.Id, tid)
dbp.CurrentThread = th dbp.CurrentThread = th
return nil return nil
} }