[Lldb-commits] [PATCH] D58405: Make educated guess when constructing module from memory

Greg Clayton via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Feb 19 14:05:21 PST 2019


clayborg added inline comments.


================
Comment at: source/Target/Process.cpp:2638-2639
   }
-  ModuleSP module_sp(new Module(file_spec, ArchSpec()));
+  ModuleSP module_sp(new Module(
+      file_spec, GetTarget().GetExecutableModule()->GetArchitecture()));
   if (module_sp) {
----------------
Is the MergeFrom in the first part not enough? I am worried about the case where we don't have even an executable, no one has set the architecture on the target, or worse yet, they have set the wrong architecture on the target. We want to correct the architecture on the target if we didn't specify it or the target was wrong. I am worried if we do this here we might hose up things in those cases.


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

https://reviews.llvm.org/D58405





More information about the lldb-commits mailing list