[all-commits] [llvm/llvm-project] fe17e0: [lldb][Windows] Always call SetExecutableModule on...
alvinhochun via All-commits
all-commits at lists.llvm.org
Fri Sep 30 03:53:20 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: fe17e026959cc263c12fafa3a8e9e83503f9a18b
https://github.com/llvm/llvm-project/commit/fe17e026959cc263c12fafa3a8e9e83503f9a18b
Author: Alvin Wong <alvin at alvinhc.com>
Date: 2022-09-30 (Fri, 30 Sep 2022)
Changed paths:
M lldb/source/Plugins/Process/Windows/Common/ProcessWindows.cpp
A lldb/test/Shell/Target/Inputs/main.c
A lldb/test/Shell/Target/Inputs/shlib.c
A lldb/test/Shell/Target/dependent-modules-nodupe-windows.test
Log Message:
-----------
[lldb][Windows] Always call SetExecutableModule on debugger connected
In `ProcessWindows::OnDebuggerConnected` (triggered from
`CREATE_PROCESS_DEBUG_EVENT`), we should always call
`Target::SetExecutableModule` regardless of whether LLDB has already
preloaded the executable modules. `SetExecutableModule` has the side
effect of clearing the module list of the Target, which help make sure
that module #0 is the executable module and the rest of the modules are
listed according to the DLL load order in the process (technically this
has no real consequences but it seems to make more sense anyway.) It
also fixes an issue where the modules preloaded by LLDB will be
duplicated when the debuggee process actually loads the DLL.
Reviewed By: labath
Differential Revision: https://reviews.llvm.org/D134636
More information about the All-commits
mailing list