[Lldb-commits] [PATCH] D83512: [lldb/Module] Allow for the creation of memory-only modules

Frederic Riss via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Jul 13 21:54:15 PDT 2020


friss marked 2 inline comments as done.
friss added inline comments.


================
Comment at: lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp:543-544
 
+  if (m_data.ValidOffsetForDataOfSize(offset, size))
+    return DataExtractor(m_data, offset, size);
+
----------------
This seems to work in the test, but I have to admit that I'm not 100% sure it's correct given the comment below about wanting to write this buffer.


================
Comment at: lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp:565
 DataExtractor ObjectFilePECOFF::ReadImageDataByRVA(uint32_t rva, size_t size) {
-  if (m_file) {
-    Address addr = GetAddress(rva);
----------------
I'm not sure why `m_file` was tested here, but this doesn't work with a pure in-memory file.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D83512





More information about the lldb-commits mailing list