Skip to content

Commit 49c84fd

Browse files
committed
Revert "[AppleObjCRuntimeV2] Force lazily allocated class names to be resolved."
We're no longer convinced that this is needed and we have no test coverage to disprove that. Backing out of this change until we're convinced otherwise.
1 parent 7942960 commit 49c84fd

File tree

1 file changed

+1
-33
lines changed

1 file changed

+1
-33
lines changed

lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp

Lines changed: 1 addition & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1178,28 +1178,6 @@ AppleObjCRuntimeV2::GetClassDescriptorFromISA(ObjCISA isa) {
11781178
return class_descriptor_sp;
11791179
}
11801180

1181-
static std::pair<bool, ConstString> ObjCGetClassNameRaw(
1182-
AppleObjCRuntime::ObjCISA isa,
1183-
Process *process) {
1184-
StreamString expr_string;
1185-
std::string input = std::to_string(isa);
1186-
expr_string.Printf("(const char *)objc_debug_class_getNameRaw(%s)",
1187-
input.c_str());
1188-
1189-
ValueObjectSP result_sp;
1190-
EvaluateExpressionOptions eval_options;
1191-
eval_options.SetLanguage(lldb::eLanguageTypeObjC);
1192-
eval_options.SetResultIsInternal(true);
1193-
eval_options.SetGenerateDebugInfo(true);
1194-
eval_options.SetTimeout(process->GetUtilityExpressionTimeout());
1195-
auto eval_result = process->GetTarget().EvaluateExpression(
1196-
expr_string.GetData(),
1197-
process->GetThreadList().GetSelectedThread()->GetSelectedFrame().get(),
1198-
result_sp, eval_options);
1199-
ConstString type_name(result_sp->GetSummaryAsCString());
1200-
return std::make_pair(eval_result == eExpressionCompleted, type_name);
1201-
}
1202-
12031181
ObjCLanguageRuntime::ClassDescriptorSP
12041182
AppleObjCRuntimeV2::GetClassDescriptor(ValueObject &valobj) {
12051183
ClassDescriptorSP objc_class_sp;
@@ -1235,10 +1213,7 @@ AppleObjCRuntimeV2::GetClassDescriptor(ValueObject &valobj) {
12351213
return objc_class_sp;
12361214

12371215
objc_class_sp = GetClassDescriptorFromISA(isa);
1238-
1239-
if (objc_class_sp)
1240-
return objc_class_sp;
1241-
else {
1216+
if (isa && !objc_class_sp) {
12421217
Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS |
12431218
LIBLLDB_LOG_TYPES));
12441219
LLDB_LOGF(log,
@@ -1247,13 +1222,6 @@ AppleObjCRuntimeV2::GetClassDescriptor(ValueObject &valobj) {
12471222
"not in class descriptor cache 0x%" PRIx64,
12481223
isa_pointer, isa);
12491224
}
1250-
1251-
ClassDescriptorSP descriptor_sp(new ClassDescriptorV2(*this, isa, nullptr));
1252-
auto resolved = ObjCGetClassNameRaw(isa, process);
1253-
if (resolved.first == true) {
1254-
AddClass(isa, descriptor_sp, resolved.second.AsCString());
1255-
objc_class_sp = descriptor_sp;
1256-
}
12571225
return objc_class_sp;
12581226
}
12591227

0 commit comments

Comments
 (0)