mirror of
				https://github.com/go-delve/delve.git
				synced 2025-11-01 03:42:59 +08:00 
			
		
		
		
	proc: Remove unused code
This commit is contained in:
		| @ -220,7 +220,7 @@ func Step(dbp Process) (err error) { | |||||||
|  |  | ||||||
| 	if err = next(dbp, true); err != nil { | 	if err = next(dbp, true); err != nil { | ||||||
| 		switch err.(type) { | 		switch err.(type) { | ||||||
| 		case ThreadBlockedError, NoReturnAddr: // Noop | 		case ThreadBlockedError: // Noop | ||||||
| 		default: | 		default: | ||||||
| 			dbp.ClearInternalBreakpoints() | 			dbp.ClearInternalBreakpoints() | ||||||
| 			return | 			return | ||||||
|  | |||||||
| @ -676,7 +676,7 @@ func returnAddress(thread proc.Thread) (uint64, error) { | |||||||
| 		return 0, err | 		return 0, err | ||||||
| 	} | 	} | ||||||
| 	if len(locations) < 2 { | 	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 | 	return locations[1].Current.PC, nil | ||||||
| } | } | ||||||
|  | |||||||
| @ -13,16 +13,6 @@ import ( | |||||||
| // This code is partly adaped from runtime.gentraceback in | // This code is partly adaped from runtime.gentraceback in | ||||||
| // $GOROOT/src/runtime/traceback.go | // $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. | // Stackframe represents a frame in a system stack. | ||||||
| type Stackframe struct { | type Stackframe struct { | ||||||
| 	// Address the function above this one on the call stack will return to. | 	// 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() | 	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 | // NoGError returned when a G could not be found | ||||||
| // for a specific thread. | // for a specific thread. | ||||||
| type NoGError struct { | type NoGError struct { | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user
	 aarzilli
					aarzilli