diff options
author | Enrico Granata <egranata@apple.com> | 2015-01-14 23:58:18 +0000 |
---|---|---|
committer | Enrico Granata <egranata@apple.com> | 2015-01-14 23:58:18 +0000 |
commit | 02d87608c166b25f3435128dea94866fee8a519b (patch) | |
tree | eb5e6083d422b82efd23aa952c69931643205136 | |
parent | eb7b5e74d4380e4e5b758c816e43e31fc1155517 (diff) | |
download | bcm5719-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.cpp | 7 |
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. |