Made lldb_private::ArchSpec more generic so that it can take a mach-o cpu
type and sub-type, or an ELF e_machine value. Also added a generic CPU type
to the arch spec class so we can have a single arch definition that the LLDB
core code can use. Previously a lot of places in the code were using the
mach-o definitions from a macosx header file.
Switches over to using "llvm/Support/MachO.h" for the llvm::MachO::XXX for the
CPU types and sub types for mach-o ArchSpecs. Added "llvm/Support/ELF.h" so
we can use the "llvm::ELF::XXX" defines for the ELF ArchSpecs.
Got rid of all CPU_TYPE_ and CPU_SUBTYPE_ defines that were previously being
used in LLDB.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@105806 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Host/macosx/Symbols.cpp b/source/Host/macosx/Symbols.cpp
index ff28157..2b8026f 100644
--- a/source/Host/macosx/Symbols.cpp
+++ b/source/Host/macosx/Symbols.cpp
@@ -65,7 +65,7 @@
// Check the architecture if we have a valid arch pointer
if (arch)
{
- ArchSpec file_arch(cputype, cpusubtype);
+ ArchSpec file_arch(eArchTypeMachO, cputype, cpusubtype);
if (file_arch != *arch)
return false;
@@ -150,7 +150,7 @@
// Only process this slice if the cpu type/subtype matches
if (arch)
{
- ArchSpec fat_arch(arch_cputype, arch_cpusubtype);
+ ArchSpec fat_arch(eArchTypeMachO, arch_cputype, arch_cpusubtype);
if (fat_arch != *arch)
continue;
}