提交 74d330a0 编写于 作者: A aarzilli 提交者: Derek Parker

proc: Remove unused code

上级 91fdc520
......@@ -220,7 +220,7 @@ func Step(dbp Process) (err error) {
if err = next(dbp, true); err != nil {
switch err.(type) {
case ThreadBlockedError, NoReturnAddr: // Noop
case ThreadBlockedError: // Noop
default:
dbp.ClearInternalBreakpoints()
return
......
......@@ -676,7 +676,7 @@ func returnAddress(thread proc.Thread) (uint64, error) {
return 0, err
}
if len(locations) < 2 {
return 0, proc.NoReturnAddr{locations[0].Current.Fn.BaseName()}
return 0, fmt.Errorf("no return address for function: %s", locations[0].Current.Fn.BaseName())
}
return locations[1].Current.PC, nil
}
......
......@@ -13,16 +13,6 @@ import (
// This code is partly adaped from runtime.gentraceback in
// $GOROOT/src/runtime/traceback.go
// NoReturnAddr is returned when return address
// could not be found during stack trace.
type NoReturnAddr struct {
Fn string
}
func (nra NoReturnAddr) Error() string {
return fmt.Sprintf("could not find return address for %s", nra.Fn)
}
// Stackframe represents a frame in a system stack.
type Stackframe struct {
// Address the function above this one on the call stack will return to.
......
......@@ -360,12 +360,6 @@ func (scope *EvalScope) PtrSize() int {
return scope.BinInfo.Arch.PtrSize()
}
// ChanRecvBlocked returns whether the goroutine is blocked on
// a channel read operation.
func (g *G) ChanRecvBlocked() bool {
return (g.Thread == nil) && (g.WaitReason == chanRecv)
}
// NoGError returned when a G could not be found
// for a specific thread.
type NoGError struct {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册