mirror of
https://github.com/go-delve/delve.git
synced 2025-10-28 04:35:19 +08:00
Update eval.go (#2110)
Check val != nil to ignore possible crash. Related to #2101
This commit is contained in:
committed by
GitHub
parent
54664c54db
commit
3d896ece07
@ -473,7 +473,7 @@ func (scope *EvalScope) PackageVariables(cfg LoadConfig) ([]*Variable, error) {
|
|||||||
|
|
||||||
// Ignore errors trying to extract values
|
// Ignore errors trying to extract values
|
||||||
val, err := extractVarInfoFromEntry(scope.BinInfo, pkgvar.cu.image, regsReplaceStaticBase(scope.Regs, pkgvar.cu.image), scope.Mem, godwarf.EntryToTree(entry))
|
val, err := extractVarInfoFromEntry(scope.BinInfo, pkgvar.cu.image, regsReplaceStaticBase(scope.Regs, pkgvar.cu.image), scope.Mem, godwarf.EntryToTree(entry))
|
||||||
if val.Kind == reflect.Invalid {
|
if val != nil && val.Kind == reflect.Invalid {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user