using of asserts in lldb

Hello,

What is our policy about asserts?

Thanks,
Ilia

I don't think there is an explicit policy.
But I would personally encourage you to look in LLDBAssert.h and consider using the lldbassert() macro defined there
In debug builds it behaves like a normal assert
But in release builds it dumps a scary assert()-style message with backtrace, but then does not crash. This is helpful because we'd rather much avoid tearing down debug sessions. Of course, you may still end up crashing even if the assert() does not tear us down, but it's at least worth a shot at "ask for bug reports then continue"

Just to amplify. LLDB is a library, used in various tools. Moreover, in cases like Xcode, there may be multiple debug sessions running, and it is really unfortunate if an error in one destroys all the other sessions. So lldb should never assert in release builds unless there really is no way to tear things down in a reasonable fashion. It would be better to detach and null out the current process than do that, since it will still leave the other Debuggers alive.

I think Greg is also strongly opposed to asserts in header files.

Jim