Rename thread.Process -> thread.dbp

Process is an incorrect name for the DebuggedProcess struct that the
thread is "a part" of. Also, no need to export that field.
This commit is contained in:
Derek Parker
2015-05-27 12:16:45 -05:00
parent 8f4f54d22a
commit 49667f2302
10 changed files with 95 additions and 72 deletions

View File

@ -124,15 +124,14 @@ func threads(p *proctl.DebuggedProcess, args ...string) error {
if th == p.CurrentThread {
prefix = "* "
}
pc, err := th.PC()
loc, err := th.Location()
if err != nil {
return err
}
f, l, fn := th.Process.PCToLine(pc)
if fn != nil {
fmt.Printf("%sThread %d at %#v %s:%d %s\n", prefix, th.Id, pc, f, l, fn.Name)
if loc.Fn != nil {
fmt.Printf("%sThread %d at %#v %s:%d %s\n", prefix, th.Id, loc.PC, loc.File, loc.Line, loc.Fn.Name)
} else {
fmt.Printf("%sThread %d at %#v\n", prefix, th.Id, pc)
fmt.Printf("%sThread %d at %#v\n", prefix, th.Id, loc.PC)
}
}
return nil