Jonas Devlieghere 8c254a432f
[lldb] Remove calls to exit() in lldb-server (#186289)
After #185537, `lldb-server` would crash with an assertion because it
calls`exit()` instead of returning from `main`. This means that we never
get an opportunity to call `Terminate` before the static
`SystemLifetimeManager` is destroyed.

I could've created a static RAII object to wrap this in (similar to what
Aiden did in #186133) but that's not necessary. I updated the helper
functions to return an `llvm::Error` while `main_gdbserver` and
`main_platform` now return an `int`.

Fixes #186207
2026-03-13 10:04:49 -07:00
..