3 Commits

Author SHA1 Message Date
Tom Hewitt
68edb9f3c0
[lldb] Fix trace load hang (#187768)
#179799 removed the `SetPrivateState(eStateStopped)` call in
`ProcessTrace::DidAttach()`. This makes the call to
`WaitForProcessToStop` hang forever, causing the `trace load` command to
hang.

This fix reintroduces the `SetPrivateState` call so a postmortem trace
process will "stop" after being loaded, matching the logic used in
`Process::LoadCore()`.
2026-03-24 13:09:03 -05:00
Jonas Devlieghere
c182ca3e3a
[lldb] Assert & fix missing calls to UnregisterPlugin (#185162)
Fix missing calls to UnregisterPlugin and add an assert in the
PluginManager that ensures all plugins have been unregistered by the
time the plugin manager is destroyed.
2026-03-09 13:04:08 -07:00
David Peixotto
782e0cef76
[lldb] Fix intel trace plugin tests (#133826)
The tests for the

[intel-pt](3483740289/lldb/docs/use/intel_pt.rst)
trace plugin were failing for multiple reasons.

On machines where tracing is supported many of the tests were crashing
because of a nullptr dereference. It looks like the `core_file`
parameter in `ProcessTrace::CreateInstance` was once ignored, but was
changed to always being dereferenced. This caused the tests to fail even
when tracing was supported.

On machines where tracing is not supported we would still run tests that
attempt to take a trace. These would obviously fail because the required
hardware is not present. Note that some of the tests simply read
serialized json as trace files which does not require any special
hardware.

This PR fixes these two issues by guarding the pointer dereference and
then skipping unsupported tests on machines. With these changes the
trace tests pass on both types of machines.

We also add a new unit test to validate that a process can be created
with a nullptr core_file through the generic process trace plugin path.
2025-04-01 12:55:41 -07:00