[lldb][Darwin] Don't try to insert breakpoint on corefiles (#184749)

lldb is printing an error that the kext-loaded notification breakpoint
can't be set when debugging a kernel corefile. The breakpoint only needs
to be inserted in live debug sessions.

rdar://170813438
This commit is contained in:
Jason Molenda 2026-03-05 15:12:05 -08:00 committed by GitHub
parent 34259b76bf
commit c9555f6675
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1561,7 +1561,8 @@ void DynamicLoaderDarwinKernel::PrivateInitialize(Process *process) {
}
void DynamicLoaderDarwinKernel::SetNotificationBreakpointIfNeeded() {
if (m_break_id == LLDB_INVALID_BREAK_ID && m_kernel.GetModule()) {
if (m_break_id == LLDB_INVALID_BREAK_ID && m_kernel.GetModule() &&
m_process->IsLiveDebugSession()) {
DEBUG_PRINTF("DynamicLoaderDarwinKernel::%s() process state = %s\n",
__FUNCTION__, StateAsCString(m_process->GetState()));