summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2011-02-15 21:59:32 +0000
committerGreg Clayton <gclayton@apple.com>2011-02-15 21:59:32 +0000
commit514487e80609921f8451a80965f65c3defbce725 (patch)
tree424c18a67cc664a7d276846b6d84a575f23c99f2 /lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
parent41febc658b62f15983301ebff759c99909f2ecbf (diff)
downloadbcm5719-llvm-514487e80609921f8451a80965f65c3defbce725.tar.gz
bcm5719-llvm-514487e80609921f8451a80965f65c3defbce725.zip
Made lldb_private::ArchSpec contain much more than just an architecture. It
now, in addition to cpu type/subtype and architecture flavor, contains: - byte order (big endian, little endian) - address size in bytes - llvm::Triple for true target triple support and for more powerful plug-in selection. llvm-svn: 125602
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp')
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp34
1 files changed, 10 insertions, 24 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
index cee2d3d1dee..cba0ca162fe 100644
--- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
@@ -638,7 +638,7 @@ ProcessGDBRemote::DidLaunchOrAttach ()
BuildDynamicRegisterInfo (false);
- m_byte_order = m_gdb_comm.GetByteOrder();
+ m_target.GetArchitecture().SetByteOrder (m_gdb_comm.GetByteOrder());
StreamString strm;
@@ -656,33 +656,16 @@ ProcessGDBRemote::DidLaunchOrAttach ()
// defacto architecture in this case.
if (gdb_remote_arch == ArchSpec ("arm") &&
- vendor != NULL &&
- strcmp(vendor, "apple") == 0)
+ vendor && ::strcmp(vendor, "apple") == 0)
{
GetTarget().SetArchitecture (gdb_remote_arch);
target_arch = gdb_remote_arch;
}
- if (!target_arch.IsValid())
- target_arch = gdb_remote_arch;
-
- if (target_arch.IsValid())
- {
- if (vendor == NULL)
- vendor = Host::GetVendorString().AsCString("apple");
-
- if (os_type == NULL)
- os_type = Host::GetOSString().AsCString("darwin");
-
- strm.Printf ("%s-%s-%s", target_arch.AsCString(), vendor, os_type);
-
- std::transform (strm.GetString().begin(),
- strm.GetString().end(),
- strm.GetString().begin(),
- ::tolower);
-
- m_target_triple.SetCString(strm.GetString().c_str());
- }
+ if (vendor)
+ m_target.GetArchitecture().GetTriple().setVendorName(vendor);
+ if (os_type)
+ m_target.GetArchitecture().GetTriple().setOSName(os_type);
}
}
@@ -2557,7 +2540,10 @@ ProcessGDBRemote::GetDispatchQueueNameForThread
}
uint8_t memory_buffer[8];
- DataExtractor data(memory_buffer, sizeof(memory_buffer), GetByteOrder(), GetAddressByteSize());
+ DataExtractor data (memory_buffer,
+ sizeof(memory_buffer),
+ m_target.GetArchitecture().GetByteOrder(),
+ m_target.GetArchitecture().GetAddressByteSize());
// Excerpt from src/queue_private.h
struct dispatch_queue_offsets_s
OpenPOWER on IntegriCloud