LLDB/debugserver: earliest observation point, image-event completeness, and child reaping

Versions under discussion:

  • Apple Command Line Tools: 26.5.0.0.1777544298
  • LLDB: 2100.0.17.108
  • Components: lldb, LLDB.framework, debugserver

I am seeking documented capability boundaries for observing an owned test process on macOS, rather than reporting a reproduced defect.

  1. Earliest observation point

For a process launched under LLDB/debugserver, what is the earliest guaranteed stopped point? Is there a supported workflow that establishes observation before dyld and image initializers execute, or is observation necessarily established later? Please distinguish an exec stop, a stop at main, and images already present at the first stop.

  1. Event completeness and loss detection

Are image-load/unload notifications a complete, ordered event stream, including shared-cache/preexisting images? Can library-initializer execution be observed with equivalent guarantees? What documented sequence, overflow, or dropped-event indication lets a client detect an incomplete observation, rather than treating a snapshot or lack of events as proof of completeness?

  1. Process ownership and reaping

In launch versus attach modes, which process actually creates the target and which process consumes its terminal wait status? What documented behavior applies if the LLDB frontend or debugserver exits unexpectedly? In particular, how can a controller distinguish a termination signal being sent from the target actually being reaped, without competing with another wait-status consumer?

Pointers to documentation or source/build references matching these components would be appreciated. If any of these guarantees are unsupported, an explicit limitation would also answer the question.

It looks like you’re trying to use LLDB as an API, that is, you’re asking about what behaviour is documented to work both now and in the future. That’s not something we support. LLDB can and does evolve over time and we reserve the right to change things in support of the product goal, that is, acting as a tool to help developers debug their programs.

Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"