mirror of
https://github.com/go-delve/delve.git
synced 2025-10-29 09:46:56 +08:00
service,terminal: support logical breakpoints (#1742)
Changes CreateBreakpoint to create a logical breakpoint when multiple addresses are specified, FindLocation and the api.Location type to return logical locations and the cli to support logical breakpoints.
This commit is contained in:
committed by
Derek Parker
parent
222deeec36
commit
e8d4ed7ece
@ -446,6 +446,8 @@ func (d *Debugger) CreateBreakpoint(requestedBp *api.Breakpoint) (*api.Breakpoin
|
||||
addrs, err = proc.FindFileLocation(d.target, fileName, requestedBp.Line)
|
||||
case len(requestedBp.FunctionName) > 0:
|
||||
addrs, err = proc.FindFunctionLocation(d.target, requestedBp.FunctionName, requestedBp.Line)
|
||||
case len(requestedBp.Addrs) > 0:
|
||||
addrs = requestedBp.Addrs
|
||||
default:
|
||||
addrs = []uint64{requestedBp.Addr}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user