mirror of
https://github.com/go-delve/delve.git
synced 2025-10-29 09:46:56 +08:00
proc/variables: fill Len field of maps when recursion limit is reached (#834)
If we don't fill the Len field there will be no way for the user to distinguish maps we didn't load from empty maps.
This commit is contained in:
committed by
Derek Parker
parent
a4df01e105
commit
d8bb8ed5bf
@ -824,6 +824,9 @@ func (v *Variable) loadValueInternal(recurseLevel int, cfg LoadConfig) {
|
||||
case reflect.Map:
|
||||
if recurseLevel <= cfg.MaxVariableRecurse {
|
||||
v.loadMap(recurseLevel, cfg)
|
||||
} else {
|
||||
// loads length so that the client knows that the map isn't empty
|
||||
v.mapIterator()
|
||||
}
|
||||
|
||||
case reflect.String:
|
||||
|
||||
Reference in New Issue
Block a user