[Lldb-commits] [lldb] 4270c9c - [lldb] Stop passing both i386 and i686 in parallel as architectures on Windows

Martin Storsjö via lldb-commits lldb-commits at lists.llvm.org
Wed Jul 6 02:15:13 PDT 2022


Author: Martin Storsjö
Date: 2022-07-06T12:13:36+03:00
New Revision: 4270c9cd44f2703bc5376ff085d0add156af9080

URL: https://github.com/llvm/llvm-project/commit/4270c9cd44f2703bc5376ff085d0add156af9080
DIFF: https://github.com/llvm/llvm-project/commit/4270c9cd44f2703bc5376ff085d0add156af9080.diff

LOG: [lldb] Stop passing both i386 and i686 in parallel as architectures on Windows

When an object file returns multiple architectures, it is treated
as a fat binary - which really isn't the case of i386 vs i686 where
the object file actually has one architecture.

This allows getting rid of hardcoded architecture triples in
PlatformWindows.

The parallel i386 and i686 architecture strings stem from
5e6f45201f0b62c1e7a24fc396f3ea6e10dc880d / D7120 and
ad587ae4ca143d388c0ec4ef2faa1b5eddedbf67 / D4658.

Differential Revision: https://reviews.llvm.org/D128617

Added: 
    

Modified: 
    lldb/source/Plugins/ObjectFile/PDB/ObjectFilePDB.cpp
    lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
    lldb/source/Plugins/Platform/Windows/PlatformWindows.cpp
    lldb/test/Shell/ObjectFile/PECOFF/settings-abi-i686.yaml

Removed: 
    


################################################################################
diff  --git a/lldb/source/Plugins/ObjectFile/PDB/ObjectFilePDB.cpp b/lldb/source/Plugins/ObjectFile/PDB/ObjectFilePDB.cpp
index 1c10efed95640..44c708676e529 100644
--- a/lldb/source/Plugins/ObjectFile/PDB/ObjectFilePDB.cpp
+++ b/lldb/source/Plugins/ObjectFile/PDB/ObjectFilePDB.cpp
@@ -137,8 +137,6 @@ size_t ObjectFilePDB::GetModuleSpecifications(
   case PDB_Machine::x86:
     module_arch.SetTriple("i386-pc-windows");
     specs.Append(module_spec);
-    module_arch.SetTriple("i686-pc-windows");
-    specs.Append(module_spec);
     break;
   case PDB_Machine::ArmNT:
     module_arch.SetTriple("armv7-pc-windows");

diff  --git a/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp b/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
index fd34ac65970ba..45593e95863a2 100644
--- a/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
+++ b/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
@@ -337,9 +337,6 @@ size_t ObjectFilePECOFF::GetModuleSpecifications(
     spec.SetTriple("i386-pc-windows");
     spec.GetTriple().setEnvironment(env);
     specs.Append(module_spec);
-    spec.SetTriple("i686-pc-windows");
-    spec.GetTriple().setEnvironment(env);
-    specs.Append(module_spec);
     break;
   case MachineArmNt:
     spec.SetTriple("armv7-pc-windows");

diff  --git a/lldb/source/Plugins/Platform/Windows/PlatformWindows.cpp b/lldb/source/Plugins/Platform/Windows/PlatformWindows.cpp
index 38f387dfdb29d..e5e235881e58a 100644
--- a/lldb/source/Plugins/Platform/Windows/PlatformWindows.cpp
+++ b/lldb/source/Plugins/Platform/Windows/PlatformWindows.cpp
@@ -124,11 +124,9 @@ PlatformWindows::PlatformWindows(bool is_host) : RemoteAwarePlatform(is_host) {
     if (spec.IsValid())
       m_supported_architectures.push_back(spec);
   };
-  AddArch(ArchSpec("i686-pc-windows"));
   AddArch(HostInfo::GetArchitecture(HostInfo::eArchKindDefault));
   AddArch(HostInfo::GetArchitecture(HostInfo::eArchKind32));
   AddArch(HostInfo::GetArchitecture(HostInfo::eArchKind64));
-  AddArch(ArchSpec("i386-pc-windows"));
 }
 
 Status PlatformWindows::ConnectRemote(Args &args) {

diff  --git a/lldb/test/Shell/ObjectFile/PECOFF/settings-abi-i686.yaml b/lldb/test/Shell/ObjectFile/PECOFF/settings-abi-i686.yaml
index ca2bac38027fa..561210455010b 100644
--- a/lldb/test/Shell/ObjectFile/PECOFF/settings-abi-i686.yaml
+++ b/lldb/test/Shell/ObjectFile/PECOFF/settings-abi-i686.yaml
@@ -18,7 +18,7 @@
 # RUN:   FileCheck -DABI=gnu -DFILENAME=%basename_t.tmp %s
 
 # CHECK-LABEL: image list --triple --basename
-# CHECK-NEXT: i686-pc-windows-[[ABI]] [[FILENAME]]
+# CHECK-NEXT: i386-pc-windows-[[ABI]] [[FILENAME]]
 
 --- !COFF
 OptionalHeader:


        


More information about the lldb-commits mailing list