[all-commits] [llvm/llvm-project] 4d9039: Add support for fetching signed values from tagged...

jimingham via All-commits all-commits at lists.llvm.org
Thu Apr 1 10:59:45 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4d9039c8dc2d1f0be1b5ee486d5a83b1614b038a
      https://github.com/llvm/llvm-project/commit/4d9039c8dc2d1f0be1b5ee486d5a83b1614b038a
  Author: Jim Ingham <jingham at apple.com>
  Date:   2021-04-01 (Thu, 01 Apr 2021)

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

  Log Message:
  -----------
  Add support for fetching signed values from tagged pointers.

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.

Differential Revision: https://reviews.llvm.org/D99694




More information about the All-commits mailing list