[Lldb-commits] [lldb] r230906 - Advertise 32 bit support for PlatformRemoteGDBServer on 64 bit systems.
Chaoren Lin
chaorenl at google.com
Sun Mar 1 12:48:18 PST 2015
Author: chaoren
Date: Sun Mar 1 14:48:18 2015
New Revision: 230906
URL: http://llvm.org/viewvc/llvm-project?rev=230906&view=rev
Log:
Advertise 32 bit support for PlatformRemoteGDBServer on 64 bit systems.
Reviewers: vharron, clayborg, zturner
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D7970
Modified:
lldb/trunk/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp
Modified: lldb/trunk/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp?rev=230906&r1=230905&r2=230906&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp Sun Mar 1 14:48:18 2015
@@ -230,12 +230,15 @@ PlatformRemoteGDBServer::GetSupportedArc
{
ArchSpec remote_arch = m_gdb_client.GetSystemArchitecture();
- // TODO: 64 bit systems should also advertize support for 32 bit arch
- // unknown CPU, we just support the one arch
if (idx == 0)
{
arch = remote_arch;
- return true;
+ return arch.IsValid();
+ }
+ else if (idx == 1 && remote_arch.IsValid() && remote_arch.GetTriple().isArch64Bit())
+ {
+ arch.SetTriple(remote_arch.GetTriple().get32BitArchVariant());
+ return arch.IsValid();
}
return false;
}
More information about the lldb-commits
mailing list