What happened : LLDB breakpoints stopped working.
Specific use case example here : https://advance-software.com/develop/#tutorial
Our app invokes Web Asssembly C-API from a plugin (DLL on Windows) - specifically wasmtime runtime.
I've debugged this & the fix is as follows - seems an overly aggressive optimization has been introduced that needs rolling back.
PATCH UPDATED: IsAlive not affecting behaviour so no reason for patch to exclude it.
File: lldb\source\Plugins\JITLoader\GDB\JITLoaderGDB.cpp
Add at the top of the file :
#define WASM_DBG_PATCH 1
a. In JITLoaderGDB::SetJITBreakpoint
#ifndef WASM_DBG_PATCH
if (DidSetJITBreakpoint())
return;
#endif
b. In JITLoaderGDB::ModulesDidLoad
#ifdef WASM_DBG_PATCH
if (m_process->IsAlive())
#else
if (!DidSetJITBreakpoint() && m_process->IsAlive())
#endif
c. Build lldb as normal.
Breakpoints working again 🙂