[Lldb-commits] [PATCH] D122684: [lldb] Use the selected and host platform to disambiguate between fat binary architectures

Jim Ingham via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Mar 30 10:42:19 PDT 2022


jingham added inline comments.


================
Comment at: lldb/source/Target/Platform.cpp:1252
+    if (selected_platform_sp) {
+      if (selected_platform_sp->IsCompatibleArchitecture(
+              arch, process_host_arch, false, nullptr)) {
----------------
jingham wrote:
> Why are you passing process_host_arch here?  This is the "selected_platform" so you have no way of knowing a priori that this is the host platform or has the same architecture as the host system.  In the old version, this selected platform part of the processing passed {} instead of the process_host_arch, which seems more correct.
Note, the old code made what seems like the opposite mistake, and DIDN'T pass process_host_arch in the Host Platform section of the code.


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

https://reviews.llvm.org/D122684



More information about the lldb-commits mailing list