[Lldb-commits] [PATCH] D149987: ObjectFile: introduce a COFF object file plugin

Alex Langford via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri May 5 13:05:18 PDT 2023


bulbazord added a comment.

We're definitely going to want a test for this, either a shell test or a unit test.



================
Comment at: lldb/source/Plugins/ObjectFile/COFF/ObjectFileCOFF.cpp:103-104
+
+  return new ObjectFileCOFF(module_sp, data_sp, data_offset, file, file_offset,
+                            length);
+}
----------------
Reading the implementation of the constructor, it looks like the constructor can fail to initialize correctly (specifically `m_object` may not be correctly populated). What are callers supposed to do in the way of validation here? Maybe there is further validation we can do in this function so that the constructor is only invoked if we're absolutely sure it will work?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D149987



More information about the lldb-commits mailing list