[Lldb-commits] [PATCH] D101390: Change Target::ReadMemory to ensure the amount of memory read from the file-cache is the amount requested.

Shafik Yaghmour via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Apr 28 11:35:27 PDT 2021


shafik added inline comments.


================
Comment at: lldb/source/Target/Target.cpp:1778
+        else if (file_cache_bytes_read > 0) {
+          file_cache_read_buffer.reset(malloc(file_cache_bytes_read));
+          std::memcpy(file_cache_read_buffer.get(), dst, file_cache_bytes_read);
----------------
Is there a reason why we need to use `malloc` and `free`?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D101390/new/

https://reviews.llvm.org/D101390



More information about the lldb-commits mailing list