labath 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;
+ }
----------------
asmith wrote:
> 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)
Done in r364744.
================
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;
+ }
----------------
asmith wrote:
> labath wrote:
> > This can't ever be true.
> Copied from Arm64
Done in r364754.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D63165/new/
https://reviews.llvm.org/D63165
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits