[Lldb-commits] [lldb] [lldb][Windows] Reuse preloaded exe module on launch (PR #210010)

Charles Zablit via lldb-commits lldb-commits at lists.llvm.org
Thu Jul 16 05:24:09 PDT 2026


charles-zablit wrote:

> > `GetOrCreateModule` then fails to match the module LLDB had already preloaded and creates a duplicate instead.
> 
> Shouldn't we fix this then? So that it searches for the canonicalized path or that we use the canonical path. Looking at other uses of `SetExecutableModule`, we don't check that `GetExecutableModule` is set to _any_ module.
> 
> I'm guessing this is also an issue when the executable is behind some symlinks.

I agree. I'm not sure what the best thing to do is here:
- Either we only canonicalize when comparing paths, but that's slow and adds fs calls.
- Either we canonicalize the path when we create the FileSpec or path object, but that might confuse the user if the path they specified for a target is not the one that's printed.

I've opened https://github.com/llvm/llvm-project/pull/210041 as a complimentary patch, which implements the first approach.

I still think we should merge this one as well, as we should not recreate the module if we already resolved it.

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


More information about the lldb-commits mailing list