[all-commits] [llvm/llvm-project] bf2d84: [lldb][ObjC] Consult Objective-C runtime decl vend...

Michael Buch via All-commits all-commits at lists.llvm.org
Fri Oct 17 15:28:18 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: bf2d84db8e95cf0dbf782f6609b034427ab1c07d
      https://github.com/llvm/llvm-project/commit/bf2d84db8e95cf0dbf782f6609b034427ab1c07d
  Author: Michael Buch <michaelbuch12 at gmail.com>
  Date:   2025-10-17 (Fri, 17 Oct 2025)

  Changed paths:
    M lldb/source/Plugins/LanguageRuntime/ObjC/ObjCLanguageRuntime.cpp
    M lldb/source/Plugins/LanguageRuntime/ObjC/ObjCLanguageRuntime.h
    A lldb/test/API/lang/objc/ivar-in-framework-base/Makefile
    A lldb/test/API/lang/objc/ivar-in-framework-base/TestIvarInFrameworkBase.py
    A lldb/test/API/lang/objc/ivar-in-framework-base/lib.h
    A lldb/test/API/lang/objc/ivar-in-framework-base/lib.m
    A lldb/test/API/lang/objc/ivar-in-framework-base/main.m

  Log Message:
  -----------
  [lldb][ObjC] Consult Objective-C runtime decl vendor when completing type (#164011)

(Note, this upstreams code that has been deployed on Apple's Swift LLDB
for many years at this point).

When a `ValueObject` computes its "complete type"
(`MaybeCalculateCompleteType`), it gives the language runtimes a chance
to override the type known to it. The current implementation of
`ObjCLanguageRuntime::GetRuntimeType`, however, didn't consult the
`AppleObjCDeclVendor` to look for types.

As demonstrated in the attached test, when we don't have debug-info for
a base class type (most commonly happens when inheriting from system
framework types) we would not be able to deduce ivars of that type.
However, the runtime knows about the ivars, so we should be able to
retrieve them.

There's still a couple of caveats for future follow-up/investigation:
1. `frame var` isn't able to access such backing ivars explicitly (even
if they do exist)
2. When compiling with `-gmodules`, LLDB gets confused about what is
correct source of information for these decls is.

rdar://162069497



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list