summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEnrico Granata <egranata@apple.com>2015-01-14 23:58:18 +0000
committerEnrico Granata <egranata@apple.com>2015-01-14 23:58:18 +0000
commit02d87608c166b25f3435128dea94866fee8a519b (patch)
treeeb5e6083d422b82efd23aa952c69931643205136
parenteb7b5e74d4380e4e5b758c816e43e31fc1155517 (diff)
downloadbcm5719-llvm-02d87608c166b25f3435128dea94866fee8a519b.tar.gz
bcm5719-llvm-02d87608c166b25f3435128dea94866fee8a519b.zip
Reenable the logic to take an integer value and attempt to "po" it as an ObjC object
While there is quite a bit of potential for mishaps due to tagged pointers, and after quite some internal discussion, this seems a saner behavior given how "po" stands for "print OBJECT". The argument being that we should make at least some sensible attempt to print the thing the user passed as-if it was an object Fixes rdar://19423124 llvm-svn: 226062
-rw-r--r--lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp
index ccb483a8cb6..ba1ccb17985 100644
--- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp
+++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp
@@ -42,8 +42,11 @@ using namespace lldb_private;
bool
AppleObjCRuntime::GetObjectDescription (Stream &str, ValueObject &valobj)
{
- // ObjC objects can only be pointers
- if (!valobj.IsPointerType())
+ ClangASTType clang_type(valobj.GetClangType());
+ bool is_signed;
+ // ObjC objects can only be pointers (or numbers that actually represents pointers
+ // but haven't been typecast, because reasons..)
+ if (!clang_type.IsIntegerType (is_signed) && !clang_type.IsPointerType ())
return false;
// Make the argument list: we pass one arg, the address of our pointer, to the print function.
OpenPOWER on IntegriCloud