[all-commits] [llvm/llvm-project] 9adc8d: When running OS Plugins from dSYM's, make sure sta...
jimingham via All-commits
all-commits at lists.llvm.org
Fri Jul 11 10:02:30 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 9adc8ddad02d062e0b395d8079f051e8ae4552b4
https://github.com/llvm/llvm-project/commit/9adc8ddad02d062e0b395d8079f051e8ae4552b4
Author: jimingham <jingham at apple.com>
Date: 2025-07-11 (Fri, 11 Jul 2025)
Changed paths:
M lldb/include/lldb/Host/HostThread.h
M lldb/include/lldb/Target/Process.h
M lldb/source/Host/common/HostThread.cpp
M lldb/source/Target/Process.cpp
M lldb/source/Target/StackFrameList.cpp
M lldb/test/API/functionalities/plugins/python_os_plugin/operating_system.py
A lldb/test/API/functionalities/plugins/python_os_plugin/os_plugin_in_dsym/Makefile
A lldb/test/API/functionalities/plugins/python_os_plugin/os_plugin_in_dsym/TestOSIndSYM.py
A lldb/test/API/functionalities/plugins/python_os_plugin/os_plugin_in_dsym/main.c
A lldb/test/API/functionalities/plugins/python_os_plugin/os_plugin_in_dsym/operating_system.py
Log Message:
-----------
When running OS Plugins from dSYM's, make sure start state is correct (#146441)
This is an odd corner case of the use of scripts loaded from dSYM's - a
macOS only feature, which can load OS Plugins that re-present the thread
state of the program we attach to. If we find out about and load the
dSYM scripts when we discover a target in the course of attaching to it,
we can end up running the OS plugin before we've started up the private
state thread. However, the os_plugin in that case will be running before
we broadcast the stop event to the public event listener. So it should
formally use the private state and not the public state for the Python
code environment.
This patch says that if we have not yet started up the private state
thread, then any thread that is servicing events is doing so on behalf
of the private state machinery, and should see the private state, not
the public state.
Most of the patch is getting a test that will actually reproduce the
error. Only the test `test_python_os_plugin_remote` actually reproduced
the error. In `test_python_os_plugin` we actually do start up the
private state thread before handling the event. `test_python_os_plugin`
is there for completeness sake.
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