[Lldb-commits] [PATCH] D128226: [lldb] Remove an outdated comment. NFC.
Martin Storsjö via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Mon Jun 20 14:23:34 PDT 2022
mstorsjo created this revision.
mstorsjo added reviewers: labath, DavidSpickett, omjavaid, alvinhochun.
Herald added a project: All.
mstorsjo requested review of this revision.
Herald added a project: LLDB.
This comment became outdated in 053eb35651906e693906fad6c695fce11415ade7
(but was moved along); that commit moved the code and the comment
to a separate function, with a separate local variable
`num_of_bytes_read`. On error, the possibly garbage value is never
copied back to the caller's reference, thus the comment is no longer
relevant (and slightly confusing as is).
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D128226
Files:
lldb/source/Plugins/Process/Windows/Common/ProcessDebugger.cpp
Index: lldb/source/Plugins/Process/Windows/Common/ProcessDebugger.cpp
===================================================================
--- lldb/source/Plugins/Process/Windows/Common/ProcessDebugger.cpp
+++ lldb/source/Plugins/Process/Windows/Common/ProcessDebugger.cpp
@@ -281,10 +281,6 @@
SIZE_T num_of_bytes_read = 0;
if (!::ReadProcessMemory(process.GetNativeProcess().GetSystemHandle(), addr,
buf, size, &num_of_bytes_read)) {
- // Reading from the process can fail for a number of reasons - set the
- // error code and make sure that the number of bytes read is set back to 0
- // because in some scenarios the value of bytes_read returned from the API
- // is garbage.
error.SetError(GetLastError(), eErrorTypeWin32);
LLDB_LOG(log, "reading failed with error: {0}", error);
} else {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D128226.438476.patch
Type: text/x-patch
Size: 851 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20220620/648b61c5/attachment.bin>
More information about the lldb-commits
mailing list