[all-commits] [llvm/llvm-project] ee11ef: Launch state discoverable in Darwin, use for SafeT...

Jason Molenda via All-commits all-commits at lists.llvm.org
Tue Dec 13 11:43:12 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ee11ef6dc0b293161dd916b64581eb37a231709b
      https://github.com/llvm/llvm-project/commit/ee11ef6dc0b293161dd916b64581eb37a231709b
  Author: Jason Molenda <jason at molenda.com>
  Date:   2022-12-13 (Tue, 13 Dec 2022)

  Changed paths:
    M lldb/docs/lldb-gdb-remote.txt
    M lldb/include/lldb/Target/Process.h
    M lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOS.cpp
    M lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOS.h
    M lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
    M lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.h
    M lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
    M lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h
    M lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
    M lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h
    M lldb/source/Target/Thread.cpp
    A lldb/test/API/macosx/early-process-launch/Makefile
    A lldb/test/API/macosx/early-process-launch/TestEarlyProcessLaunch.py
    A lldb/test/API/macosx/early-process-launch/main.c
    M lldb/tools/debugserver/source/DNB.cpp
    M lldb/tools/debugserver/source/DNB.h
    M lldb/tools/debugserver/source/MacOSX/MachProcess.h
    M lldb/tools/debugserver/source/MacOSX/MachProcess.mm
    M lldb/tools/debugserver/source/RNBRemote.cpp
    M lldb/tools/debugserver/source/RNBRemote.h

  Log Message:
  -----------
  Launch state discoverable in Darwin, use for SafeToCallFunctions

The dynamic linker on Darwin, dyld, can provide status of
the process state for a few significant points early on,
most importantly, when libSystem has been initialized and it
is safe to call functions behind the scenes.  Pipe this
information up from debugserver to DynamicLoaderMacOS, for
the DynamicLoader::IsFullyInitialized() method, then have
Thread::SafeToCallFunctions use this information.  Finally,
for the two utility functions in the AppleObjCRuntimeV2
LanguageRuntime plugin that I was fixing, call this method
before running our utility functions to collect the list of
objc classes registered in the runtime.

User expressions will still be allowed to run any time -
we assume the user knows what they are doing - but these
two additional utility functions that they are unaware of
will be limited by this state.

Differential Revision: https://reviews.llvm.org/D139054
rdar://102436092
can probably make function calls.




More information about the All-commits mailing list