Fix an issue where an element of an array or struct changing will visually show the change on the containing array/struct.

- Getting the change list from GDB will get changes from members.
- Original code was mistakenly using the variable name from the outside object when looking up the handle to apply the changes instead of the variable name in the changelist.
This commit is contained in:
Marcel Ball 2018-01-24 16:02:45 -04:00
commit d827275613

View file

@ -342,7 +342,7 @@ export class MI2DebugSession extends DebugSession {
const changelist = changes.result("changelist"); const changelist = changes.result("changelist");
changelist.forEach((change) => { changelist.forEach((change) => {
const name = MINode.valueOf(change, "name"); const name = MINode.valueOf(change, "name");
const vId = this.variableHandlesReverse[varObjName]; const vId = this.variableHandlesReverse[name];
const v = this.variableHandles.get(vId) as any; const v = this.variableHandles.get(vId) as any;
v.applyChanges(change); v.applyChanges(change);
}); });