[Lldb-commits] [lldb] [lldb][windows] bound ReadProcessMemory (PR #200230)

Charles Zablit via lldb-commits lldb-commits at lists.llvm.org
Mon Jun 1 05:31:59 PDT 2026


================
@@ -614,44 +614,82 @@ static std::optional<std::string> GetFileNameByLoadAddress(HANDLE hProcess,
   return dos_path;
 }
 
+// Determine how many bytes can be read at `addr` in `hProcess` before crossing
+// out of the committed memory region containing it. Returns 0 if the address is
+// not within a committed region.
+static SIZE_T BytesReadableAt(HANDLE hProcess, LPCVOID addr) {
----------------
charles-zablit wrote:

There are a lot of variables following the Windows API's style. I think we should sync all of those cases to use the llvm style. `process` would be the better option.

Should we refactor all of them in a follow up commit?

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


More information about the lldb-commits mailing list