[Lldb-commits] [lldb] [lldb][Windows] Use uint64 for GetExceptionArguments (PR #203485)

via lldb-commits lldb-commits at lists.llvm.org
Fri Jun 12 02:28:31 PDT 2026


llvmorg-github-actions[bot] wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-lldb

Author: Nerixyz (Nerixyz)

<details>
<summary>Changes</summary>

Intended to fix the build failure mentioned in https://github.com/llvm/llvm-project/pull/203301#issuecomment-4688315446.

Makes sure we always use a 64 bit int, as the minidump exception record specifies the arguments to be 64 bit. Then updates uses of the return value to use `uint64_t` over `ULONG_PTR`.

---
Full diff: https://github.com/llvm/llvm-project/pull/203485.diff


3 Files Affected:

- (modified) lldb/source/Plugins/Process/Windows/Common/ExceptionRecord.cpp (+1-1) 
- (modified) lldb/source/Plugins/Process/Windows/Common/ExceptionRecord.h (+2-4) 
- (modified) lldb/source/Plugins/Process/Windows/Common/NativeProcessWindows.cpp (+1-1) 


``````````diff
diff --git a/lldb/source/Plugins/Process/Windows/Common/ExceptionRecord.cpp b/lldb/source/Plugins/Process/Windows/Common/ExceptionRecord.cpp
index 30128a084db98..2842f85956d55 100644
--- a/lldb/source/Plugins/Process/Windows/Common/ExceptionRecord.cpp
+++ b/lldb/source/Plugins/Process/Windows/Common/ExceptionRecord.cpp
@@ -56,7 +56,7 @@ void lldb_private::ExceptionRecord::Dump(llvm::raw_ostream &stream) const {
 
   const int addr_min_width = 2 + 8; // "0x" + 4 address bytes
 
-  const llvm::ArrayRef<unsigned long long> args = GetExceptionArguments();
+  const llvm::ArrayRef<uint64_t> args = GetExceptionArguments();
   switch (GetExceptionValue()) {
   case EXCEPTION_ACCESS_VIOLATION: {
     if (args.size() < 2)
diff --git a/lldb/source/Plugins/Process/Windows/Common/ExceptionRecord.h b/lldb/source/Plugins/Process/Windows/Common/ExceptionRecord.h
index 6dedc836fb199..14961a9716121 100644
--- a/lldb/source/Plugins/Process/Windows/Common/ExceptionRecord.h
+++ b/lldb/source/Plugins/Process/Windows/Common/ExceptionRecord.h
@@ -44,9 +44,7 @@ class ExceptionRecord {
 
   lldb::tid_t GetThreadID() const { return m_thread_id; }
 
-  llvm::ArrayRef<unsigned long long> GetExceptionArguments() const {
-    return m_arguments;
-  }
+  llvm::ArrayRef<uint64_t> GetExceptionArguments() const { return m_arguments; }
 
   void Dump(llvm::raw_ostream &stream) const;
 
@@ -55,7 +53,7 @@ class ExceptionRecord {
   bool m_continuable;
   lldb::addr_t m_exception_addr;
   lldb::tid_t m_thread_id;
-  std::vector<unsigned long long> m_arguments;
+  std::vector<uint64_t> m_arguments;
 };
 }
 
diff --git a/lldb/source/Plugins/Process/Windows/Common/NativeProcessWindows.cpp b/lldb/source/Plugins/Process/Windows/Common/NativeProcessWindows.cpp
index 73d2c480a7f92..f0e88e78e6136 100644
--- a/lldb/source/Plugins/Process/Windows/Common/NativeProcessWindows.cpp
+++ b/lldb/source/Plugins/Process/Windows/Common/NativeProcessWindows.cpp
@@ -538,7 +538,7 @@ NativeProcessWindows::HandleBreakpointException(const ExceptionRecord &record) {
     // This block of code will only be entered in case of a hardware
     // watchpoint or breakpoint hit on AArch64. However, we only handle
     // hardware watchpoints below as breakpoints are not yet supported.
-    const std::vector<ULONG_PTR> &args = record.GetExceptionArguments();
+    const ArrayRef<uint64_t> args = record.GetExceptionArguments();
     // Check that the ExceptionInformation array of EXCEPTION_RECORD
     // contains at least two elements: the first is a read-write flag
     // indicating the type of data access operation (read or write) while

``````````

</details>


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


More information about the lldb-commits mailing list