[Lldb-commits] [PATCH] D99694: Add support for getting signed ObjC tagged pointer values

Jim Ingham via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Mar 31 17:19:07 PDT 2021


jingham created this revision.
jingham added a reviewer: JDevlieghere.
jingham requested review of this revision.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.

The ObjC runtime offers both signed & unsigned tagged pointer value
accessors to tagged pointer providers, but lldb's tagged pointer
code only implemented the unsigned one.  This patch adds an
emulation of the signed one.

      

The motivation for doing this is that NSNumbers use the signed
accessor (they are always signed) and we need to follow that in our
summary provider or we will get incorrect values for negative
NSNumbers.

      

The data-formatter-objc test file had NSNumber examples (along with lots of other
goodies) but the NSNumber values weren't tested.  So I also added
checks for those values to the test.

      

I also did a quick audit of the other types in that main.m file, and
it looks like pretty much all the other values are either intermediates
or are tested.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D99694

Files:
  lldb/source/Plugins/Language/ObjC/Cocoa.cpp
  lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCClassDescriptorV2.h
  lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.h
  lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
  lldb/source/Plugins/LanguageRuntime/ObjC/ObjCLanguageRuntime.h
  lldb/test/API/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjCCF.py

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D99694.334563.patch
Type: text/x-patch
Size: 10582 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20210401/22236678/attachment.bin>


More information about the lldb-commits mailing list