mirror of
https://github.com/go-delve/delve.git
synced 2025-10-29 09:46:56 +08:00
proc: do not panic if we can't satisfy a composite location
When a location expression requests a register check that we have as many bytes in the register as requested and if we don't report the error. Updates #1416
This commit is contained in:
@ -908,7 +908,10 @@ func (scope *EvalScope) extractVarInfoFromEntry(varEntry *dwarf.Entry) (*Variabl
|
||||
mem := scope.Mem
|
||||
if pieces != nil {
|
||||
addr = fakeAddress
|
||||
mem = newCompositeMemory(scope.Mem, scope.Regs, pieces)
|
||||
mem, err = newCompositeMemory(scope.Mem, scope.Regs, pieces)
|
||||
if mem == nil {
|
||||
mem = scope.Mem
|
||||
}
|
||||
}
|
||||
|
||||
v := scope.newVariable(n, uintptr(addr), t, mem)
|
||||
|
||||
Reference in New Issue
Block a user