diff options
| author | Johnny Chen <johnny.chen@apple.com> | 2011-06-29 21:19:39 +0000 |
|---|---|---|
| committer | Johnny Chen <johnny.chen@apple.com> | 2011-06-29 21:19:39 +0000 |
| commit | 6999f86617f371784be2b6f8d2ae38c8030dfd31 (patch) | |
| tree | 02cbdbc515bda5998169028d22c01ea29d7ee011 /lldb/source/API/SBValue.cpp | |
| parent | 1b8b9419bab268fcbd78022669a30433b40ad875 (diff) | |
| download | bcm5719-llvm-6999f86617f371784be2b6f8d2ae38c8030dfd31.tar.gz bcm5719-llvm-6999f86617f371784be2b6f8d2ae38c8030dfd31.zip | |
Add fuzz calls to SBType, SBValue, and SBValueList.
Fixed crashes for SBValue fuzz calls.
And change 'bool SBType::IsPointerType(void)' to
'bool SBType::IsAPointerType(void)' to avoid name collision with the static 'bool SBType::IsPointerType(void *)'
function, which SWIG cannot handle.
llvm-svn: 134096
Diffstat (limited to 'lldb/source/API/SBValue.cpp')
| -rw-r--r-- | lldb/source/API/SBValue.cpp | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/lldb/source/API/SBValue.cpp b/lldb/source/API/SBValue.cpp index 376bd624a54..801d15d060f 100644 --- a/lldb/source/API/SBValue.cpp +++ b/lldb/source/API/SBValue.cpp @@ -353,8 +353,13 @@ SBValue::SetValueFromCString (const char *value_str) SBValue SBValue::GetChildAtIndex (uint32_t idx) { - lldb::DynamicValueType use_dynamic_value = m_opaque_sp->GetUpdatePoint().GetTarget()->GetPreferDynamicValue(); - return GetChildAtIndex (idx, use_dynamic_value); + if (m_opaque_sp) + { + lldb::DynamicValueType use_dynamic_value = m_opaque_sp->GetUpdatePoint().GetTarget()->GetPreferDynamicValue(); + return GetChildAtIndex (idx, use_dynamic_value); + } + else + return GetChildAtIndex (idx, eNoDynamicValues); } SBValue @@ -416,8 +421,13 @@ SBValue::GetIndexOfChildWithName (const char *name) SBValue SBValue::GetChildMemberWithName (const char *name) { - lldb::DynamicValueType use_dynamic_value = m_opaque_sp->GetUpdatePoint().GetTarget()->GetPreferDynamicValue(); - return GetChildMemberWithName (name, use_dynamic_value); + if (m_opaque_sp) + { + lldb::DynamicValueType use_dynamic_value = m_opaque_sp->GetUpdatePoint().GetTarget()->GetPreferDynamicValue(); + return GetChildMemberWithName (name, use_dynamic_value); + } + else + return GetChildMemberWithName (name, eNoDynamicValues); } SBValue |

