[Lldb-commits] [lldb] [LLDB] Add empty Microsoft ABI language runtime (PR #168941)

Martin Storsjö via lldb-commits lldb-commits at lists.llvm.org
Thu Nov 20 13:11:12 PST 2025


================
@@ -491,3 +491,10 @@ bool CPPLanguageRuntime::IsSymbolARuntimeThunk(const Symbol &symbol) {
   return mangled_name.starts_with("_ZTh") || mangled_name.starts_with("_ZTv") ||
          mangled_name.starts_with("_ZTc");
 }
+
+bool CPPLanguageRuntime::ShouldUseMicrosoftABI(Process *process) {
+  return process->GetTarget()
+      .GetArchitecture()
+      .GetTriple()
+      .isWindowsMSVCEnvironment();
----------------
mstorsjo wrote:

How does this distinguish whether the target process to be debugged is mingw or msvc style? Does this in the end just determine the style based on which flavour LLDB itself was built as?

Note that one process may include multiple DLLs that use both ABIs. (In particular, most mingw executables link in a bunch of MS DLLs that internally use their C++ ABI - even though we perhaps don't have debug info for them normally.)

And one may want to use a MSVC built LLDB for debugging mingw executables, or vice versa.

See 25c8a061c5739677d2fc0af29a8cc9520207b923 and 3c867898c7be7ed2b5d119a2478a836a0c85f19b for existing options that allow controlling which C++ ABI to use for interpreting things; these options allow controlling this on the level of each individual DLL. Can't the information from those preexisting options be used here, instead of inventing a new and less flexible approach?



https://github.com/llvm/llvm-project/pull/168941


More information about the lldb-commits mailing list