forked from OSchip/llvm-project
Fix a small issue with -var-update.
If the variable was a pointer, code was ignoring the change in the pointee. Discussed in http://lists.llvm.org/pipermail/lldb-dev/2017-May/012435.html llvm-svn: 304400
This commit is contained in:
parent
183d1368f3
commit
f64177ea83
|
@ -510,22 +510,20 @@ bool CMICmdCmdVarUpdate::ExamineSBValueForChange(lldb::SBValue &vrwValue,
|
|||
}
|
||||
|
||||
lldb::SBType valueType = vrwValue.GetType();
|
||||
if (!valueType.IsPointerType() && !valueType.IsReferenceType()) {
|
||||
const MIuint nChildren = vrwValue.GetNumChildren();
|
||||
for (MIuint i = 0; i < nChildren; ++i) {
|
||||
lldb::SBValue member = vrwValue.GetChildAtIndex(i);
|
||||
if (!member.IsValid())
|
||||
continue;
|
||||
|
||||
if (member.GetValueDidChange()) {
|
||||
vrwbChanged = true;
|
||||
return MIstatus::success;
|
||||
} else if (ExamineSBValueForChange(member, vrwbChanged) && vrwbChanged)
|
||||
// Handle composite types (i.e. struct or arrays)
|
||||
return MIstatus::success;
|
||||
}
|
||||
const MIuint nChildren = vrwValue.GetNumChildren();
|
||||
for (MIuint i = 0; i < nChildren; ++i) {
|
||||
lldb::SBValue member = vrwValue.GetChildAtIndex(i);
|
||||
if (!member.IsValid())
|
||||
continue;
|
||||
|
||||
if (member.GetValueDidChange()) {
|
||||
vrwbChanged = true;
|
||||
return MIstatus::success;
|
||||
} else if (ExamineSBValueForChange(member, vrwbChanged) && vrwbChanged)
|
||||
// Handle composite types (i.e. struct or arrays)
|
||||
return MIstatus::success;
|
||||
}
|
||||
|
||||
vrwbChanged = false;
|
||||
return MIstatus::success;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue