[Lldb-commits] [lldb] [lldb][Windows] Report module paths the way the loader spelled them (PR #226492)
via lldb-commits
lldb-commits at lists.llvm.org
Fri Sep 25 06:39:02 PDT 2026
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff origin/main HEAD --extensions h,cpp,c -- lldb/test/API/functionalities/module_aliased_path/foo.c lldb/test/API/functionalities/module_aliased_path/main.c lldb/source/Plugins/DynamicLoader/Windows-DYLD/DynamicLoaderWindowsDYLD.cpp lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp lldb/source/Plugins/Process/Windows/Common/DebuggerThread.cpp lldb/source/Plugins/Process/Windows/Common/DebuggerThread.h lldb/source/Plugins/Process/Windows/Common/NativeProcessWindows.cpp --diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/lldb/source/Plugins/Process/Windows/Common/DebuggerThread.cpp b/lldb/source/Plugins/Process/Windows/Common/DebuggerThread.cpp
index c058e54fd..7070ddbca 100644
--- a/lldb/source/Plugins/Process/Windows/Common/DebuggerThread.cpp
+++ b/lldb/source/Plugins/Process/Windows/Common/DebuggerThread.cpp
@@ -468,14 +468,15 @@ DebuggerThread::HandleCreateThreadEvent(const CREATE_THREAD_DEBUG_INFO &info,
static std::optional<std::string> GetImagePathFromPEB(HANDLE process) {
using NtQueryInformationProcessFn =
NTSTATUS(NTAPI *)(HANDLE, PROCESSINFOCLASS, PVOID, ULONG, PULONG);
- static auto query = reinterpret_cast<NtQueryInformationProcessFn>(
- ::GetProcAddress(::GetModuleHandleW(L"ntdll.dll"),
- "NtQueryInformationProcess"));
+ static auto query =
+ reinterpret_cast<NtQueryInformationProcessFn>(::GetProcAddress(
+ ::GetModuleHandleW(L"ntdll.dll"), "NtQueryInformationProcess"));
if (!query)
return std::nullopt;
PROCESS_BASIC_INFORMATION pbi = {};
- if (query(process, ProcessBasicInformation, &pbi, sizeof(pbi), nullptr) != 0 ||
+ if (query(process, ProcessBasicInformation, &pbi, sizeof(pbi), nullptr) !=
+ 0 ||
!pbi.PebBaseAddress)
return std::nullopt;
``````````
</details>
https://github.com/llvm/llvm-project/pull/226492
More information about the lldb-commits
mailing list