Reuse existing function for BP by ID lookup

Also, kill whitespace to make code appear more as a singular block for
readability.
This commit is contained in:
Derek Parker 2015-07-09 15:45:43 -05:00
parent 386101466a
commit a00957fcf5

@ -185,11 +185,8 @@ func (dbp *Process) FindLocation(str string) (uint64, error) {
if err != nil {
return 0, fmt.Errorf("unable to find location for %s", str)
}
for _, bp := range dbp.Breakpoints {
if uint64(bp.ID) == id {
return bp.Addr, nil
}
if bp, ok := dbp.FindBreakpointByID(int(id)); ok {
return bp.Addr, nil
}
// Last resort, use as raw address