summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSean Callanan <scallanan@apple.com>2014-10-31 18:05:26 +0000
committerSean Callanan <scallanan@apple.com>2014-10-31 18:05:26 +0000
commitb678b907495dc44ddd342aaa19ad77dc114da51b (patch)
tree2f93d7f543fe61d2191b86a62e354e3be3cebf2f
parenta330933f159064dfc463564a10ccc3b79bc21f28 (diff)
downloadbcm5719-llvm-b678b907495dc44ddd342aaa19ad77dc114da51b.tar.gz
bcm5719-llvm-b678b907495dc44ddd342aaa19ad77dc114da51b.zip
- Fixed a bug where ::Describe for class descriptors
would fail if the class had no ivars. - Updated use of the RealizeType API by the class descriptors to use "for_expression" rather than the misnamed "allow_unknownanytype." llvm-svn: 220980
-rw-r--r--lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCClassDescriptorV2.cpp35
1 files changed, 19 insertions, 16 deletions
diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCClassDescriptorV2.cpp b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCClassDescriptorV2.cpp
index 6396dacad9b..9bf272ca143 100644
--- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCClassDescriptorV2.cpp
+++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCClassDescriptorV2.cpp
@@ -390,21 +390,24 @@ ClassDescriptorV2::Describe (std::function <void (ObjCLanguageRuntime::ObjCISA)>
if (ivar_func)
{
- ivar_list_t ivar_list;
- if (!ivar_list.Read(process, class_ro->m_ivars_ptr))
- return false;
-
- if (ivar_list.m_entsize != ivar_t::GetSize(process))
- return false;
-
- ivar_t ivar;
-
- for (uint32_t i = 0, e = ivar_list.m_count; i < e; ++i)
- {
- ivar.Read(process, ivar_list.m_first_ptr + (i * ivar_list.m_entsize));
+ if (class_ro->m_ivars_ptr != 0)
+ {
+ ivar_list_t ivar_list;
+ if (!ivar_list.Read(process, class_ro->m_ivars_ptr))
+ return false;
- if (ivar_func(ivar.m_name.c_str(), ivar.m_type.c_str(), ivar.m_offset_ptr, ivar.m_size))
- break;
+ if (ivar_list.m_entsize != ivar_t::GetSize(process))
+ return false;
+
+ ivar_t ivar;
+
+ for (uint32_t i = 0, e = ivar_list.m_count; i < e; ++i)
+ {
+ ivar.Read(process, ivar_list.m_first_ptr + (i * ivar_list.m_entsize));
+
+ if (ivar_func(ivar.m_name.c_str(), ivar.m_type.c_str(), ivar.m_offset_ptr, ivar.m_size))
+ break;
+ }
}
}
@@ -524,9 +527,9 @@ ClassDescriptorV2::iVarsStorage::fill (AppleObjCRuntimeV2& runtime, ClassDescrip
nullptr,
nullptr,
[this,process,encoding_to_type_sp](const char * name, const char * type, lldb::addr_t offset_ptr, uint64_t size) -> bool {
- const bool allow_unknownanytype = false;
+ const bool for_expression = false;
const bool stop_loop = false;
- ClangASTType ivar_type = encoding_to_type_sp->RealizeType(type, allow_unknownanytype);
+ ClangASTType ivar_type = encoding_to_type_sp->RealizeType(type, for_expression);
if (ivar_type)
{
Scalar offset_scalar;
OpenPOWER on IntegriCloud