mirror of
https://github.com/go-delve/delve.git
synced 2025-11-01 20:20:40 +08:00
service/debugger,terminal: API and user interface for follow exec mode (#3286)
Updates #2551
This commit is contained in:
committed by
GitHub
parent
47481fe0ab
commit
a61ccea65a
@ -429,10 +429,12 @@ func ConvertRegisters(in *op.DwarfRegisters, dwarfRegisterToString func(int, *op
|
||||
return
|
||||
}
|
||||
|
||||
// ConvertImage convers proc.Image to api.Image.
|
||||
func ConvertImage(image *proc.Image) Image {
|
||||
return Image{Path: image.Path, Address: image.StaticBase}
|
||||
}
|
||||
|
||||
// ConvertDumpState converts proc.DumpState to api.DumpState.
|
||||
func ConvertDumpState(dumpState *proc.DumpState) *DumpState {
|
||||
dumpState.Mutex.Lock()
|
||||
defer dumpState.Mutex.Unlock()
|
||||
@ -449,3 +451,12 @@ func ConvertDumpState(dumpState *proc.DumpState) *DumpState {
|
||||
}
|
||||
return r
|
||||
}
|
||||
|
||||
// ConvertTarget converts a proc.Target into a api.Target.
|
||||
func ConvertTarget(tgt *proc.Target, convertThreadBreakpoint func(proc.Thread) *Breakpoint) *Target {
|
||||
//TODO(aarzilli): copy command line here
|
||||
return &Target{
|
||||
Pid: tgt.Pid(),
|
||||
CurrentThread: ConvertThread(tgt.CurrentThread(), convertThreadBreakpoint(tgt.CurrentThread())),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user