Stream: wasmtime

Topic: Wasmtime breakpoints - Windows - C_API calls in DLL not EXE


view this post on Zulip Steve Williams (Oct 14 2025 at 17:14):

Seems when wasmtime C/API calls are made from a Windows DLL, lldb fails to resolve the breakpoint.
When C/API calls made from a window exe, such as the example I posted yesterday, breakpoints resolve.
Seems to be an lldb issue. Will update yesterday's repro to emulate what our actual app does in a DLL & see if that can reproduce. If so, seems an LLDB issue, not a wasmtime issue, but FYI.

lldb version 21.1.3

next step is build lldb trunk from source in debug mode & see if I can figure out what's going on.

This is a regression somewhere as it used to work.

view this post on Zulip Steve Williams (Oct 14 2025 at 17:39):

Fixed this once. Will be something like this.

diff --git "a/lldb/source/Plugins/JITLoader/GDB/JITLoaderGDB.cpp" "b/lldb/source/Plugins/JITLoader/GDB/JITLoaderGDB.cpp"
index 7b810c0fee43..f6d45685e4b7 100644
--- "a/lldb/source/Plugins/JITLoader/GDB/JITLoaderGDB.cpp"
+++ "b/lldb/source/Plugins/JITLoader/GDB/JITLoaderGDB.cpp"
@@ -195,7 +195,17 @@ void JITLoaderGDB::SetJITBreakpoint(lldb_private::ModuleList &module_list) {
     return;

   m_jit_descriptor_addr = GetSymbolAddress(
-      module_list, ConstString("__jit_debug_descriptor"), eSymbolTypeData);
+      module_list, ConstString("__jit_debug_descriptor"),
+
+#if defined WIN32 || defined WINDOWS || defined WIN64
+                       // ADV_SW_PATCH: Windows implementation not indicating symbol is Data
+                       // so we use Any as workaround for the time being.
+                       eSymbolTypeAny);
+#else
+                       eSymbolTypeData);
+#endif
+
+
   if (m_jit_descriptor_addr == LLDB_INVALID_ADDRESS) {
     LLDB_LOGF(log, "JITLoaderGDB::%s failed to find JIT descriptor address",
               __FUNCTION__);

view this post on Zulip Chris Fallin (Oct 14 2025 at 17:48):

@Steve Williams this is not a forum for LLDB diffs; please take it to their issue tracker. Thanks.

view this post on Zulip Steve Williams (Oct 14 2025 at 17:49):

course but this stuff is difficult, if it doesn't interest you, stay out of my threads. you're getting annoying.

its core functionality. without this wasmtime is a toy.

view this post on Zulip Steve Williams (Oct 14 2025 at 17:53):

that's not a fix, that's how I fixed it last time. I don't know what the current status is yet, but the issue will be somewhere around there. robust wasm debugging on core platforms absolutely is relevant here.

view this post on Zulip Ramon Klass (Oct 14 2025 at 18:02):

you can't force people to reprioritize your favorite toy by shouting louder, what do you think would happen if everyone started to post a zulip message every time they found out another detail about what they are currently working on?

view this post on Zulip Steve Williams (Oct 14 2025 at 18:03):

You're in my thread, if you've got an issue higher priority, post it.


Last updated: Dec 06 2025 at 06:05 UTC