[Lldb-commits] [PATCH] D63165: Initial support for native debugging of x86/x64 Windows processes
Aaron Smith via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Sun Jun 30 13:38:29 PDT 2019
asmith added inline comments.
================
Comment at: lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows.cpp:31-36
+ if (!data_sp) {
+ error.SetErrorStringWithFormat(
+ "failed to allocate DataBufferHeap instance of size %" PRIu64,
+ data_size);
+ return error;
+ }
----------------
labath wrote:
> `new` doesn't fail. This is dead code.
The code is copied from/following the other targets. Maybe all the targets could be cleaned up in another PR. For example Arm64,
NativeRegisterContextLinux_arm64::ReadAllRegisterValues()
data_sp.reset(new DataBufferHeap(REG_CONTEXT_SIZE, 0));
if (!data_sp)
================
Comment at: lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows.cpp:52-57
+ if (dst == nullptr) {
+ error.SetErrorStringWithFormat("DataBufferHeap instance of size %" PRIu64
+ " returned a null pointer",
+ data_size);
+ return error;
+ }
----------------
labath wrote:
> This can't ever be true.
Copied from Arm64
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D63165/new/
https://reviews.llvm.org/D63165
More information about the lldb-commits
mailing list