[Lldb-commits] [PATCH] D43419: Fix TestBreakpointInGlobalConstructor for Windows
Adrian McCarthy via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Tue Feb 20 09:37:22 PST 2018
amccarth added a comment.
I have reservations about making the debugger try to pre-locate the modules and their PDBs before those modules are actually loaded. For a few reasons.
(1) On Windows, module resolution is complex. Search paths, the safe search path, manifests, the side-by-side cache, dynamic library link redirection (.exe.local), Windows API sets, etc. It got to the point that Microsoft dropped support for the venerable DependencyWalker tool (though there is an open source community trying to keep it alive). That's a lot of logic to bake into the debugger (and to create tests for), and the cost of getting it wrong is that we think your breakpoint will resolve when actually it won't.
(2) A typical program depends directly and indirectly on many DLLs. Even with lazy-evaluation, trying to apply all the rules in 1 (which must be done serially) to locate all of the dependents seems like a lot of unnecessary work on startup.
(3) It's different than how all the debuggers on Windows work, which might be mildly surprising to users.
If there's a strong will to head down this path, I think that'll be a separate effort than my getting this test working again in the short term. So I think I'll do something less invasive along the lines of Pavel's suggestion to get this test working. Stay tuned.
More information about the lldb-commits