labath added inline comments.

================
Comment at: source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp:3500-3518
+  // Create a list of write entries from loadable segments,
+  // using physical addresses if they aren't all null
+  size_t header_count = ParseProgramHeaders();
+  bool should_use_paddr = AnySegmentHasPhysicalAddress();
+  for (size_t i = 1; i <= header_count; ++i) {
+    Process::WriteEntry entry;
+    auto header = GetProgramHeaderByIndex(i);
----------------
This is the only part that's ELF-specific. Could we factor this out into a 
separate function (and leave the common part in ObjectFile)? Besides reducing 
duplication this will also make it easier to remove the 
Target/Process/RegisterContext uses from the ObjectFile in the future, as there 
will be just a single place that needs to be updated.


https://reviews.llvm.org/D42145



_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to