[Lldb-commits] [lldb] r164871 - /lldb/trunk/source/Core/CXXFormatterFunctions.cpp
Enrico Granata
egranata at apple.com
Fri Sep 28 17:47:43 PDT 2012
Author: enrico
Date: Fri Sep 28 19:47:43 2012
New Revision: 164871
URL: http://llvm.org/viewvc/llvm-project?rev=164871&view=rev
Log:
<rdar://problem/12378910> Fix a bunch of other places where similar problems could happen
Modified:
lldb/trunk/source/Core/CXXFormatterFunctions.cpp
Modified: lldb/trunk/source/Core/CXXFormatterFunctions.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/CXXFormatterFunctions.cpp?rev=164871&r1=164870&r2=164871&view=diff
==============================================================================
--- lldb/trunk/source/Core/CXXFormatterFunctions.cpp (original)
+++ lldb/trunk/source/Core/CXXFormatterFunctions.cpp Fri Sep 28 19:47:43 2012
@@ -164,6 +164,10 @@
uint64_t value = 0;
const char* class_name = descriptor->GetClassName().GetCString();
+
+ if (!class_name || !*class_name)
+ return false;
+
if (!strcmp(class_name,"__NSDictionaryI"))
{
Error error;
@@ -230,6 +234,10 @@
uint64_t value = 0;
const char* class_name = descriptor->GetClassName().GetCString();
+
+ if (!class_name || !*class_name)
+ return false;
+
if (!strcmp(class_name,"__NSArrayI"))
{
Error error;
@@ -290,6 +298,10 @@
uint64_t value = 0;
const char* class_name = descriptor->GetClassName().GetCString();
+
+ if (!class_name || !*class_name)
+ return false;
+
if (!strcmp(class_name,"NSConcreteData") ||
!strcmp(class_name,"NSConcreteMutableData") ||
!strcmp(class_name,"__NSCFData"))
@@ -341,6 +353,9 @@
const char* class_name = descriptor->GetClassName().GetCString();
+ if (!class_name || !*class_name)
+ return false;
+
if (!strcmp(class_name,"NSNumber") || !strcmp(class_name,"__NSCFNumber"))
{
if (descriptor->IsTagged())
@@ -979,6 +994,10 @@
return NULL;
const char* class_name = descriptor->GetClassName().GetCString();
+
+ if (!class_name || !*class_name)
+ return NULL;
+
if (!strcmp(class_name,"__NSArrayI"))
{
return (new NSArrayISyntheticFrontEnd(valobj_sp));
@@ -1056,6 +1075,10 @@
return NULL;
const char* class_name = descriptor->GetClassName().GetCString();
+
+ if (!class_name || !*class_name)
+ return NULL;
+
if (!strcmp(class_name,"__NSDictionaryI"))
{
return (new NSDictionaryISyntheticFrontEnd(valobj_sp));
More information about the lldb-commits
mailing list