[Lldb-commits] [PATCH] Advertise 32 bit support for PlatformRemoteGDBServer on 64 bit systems.

Chaoren Lin chaorenl at google.com
Fri Feb 27 22:57:37 PST 2015


Hi vharron, clayborg, zturner,

http://reviews.llvm.org/D7970

Files:
  source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp

Index: source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp
===================================================================
--- source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp
+++ source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp
@@ -230,13 +230,16 @@
 {
     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;
     }
+    else if (idx == 1 && remote_arch.GetTriple().isArch64Bit())
+    {
+        arch.SetTriple(remote_arch.GetTriple().get32BitArchVariant());
+        return true;
+    }
     return false;
 }

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D7970.20927.patch
Type: text/x-patch
Size: 771 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20150228/6a96c6ef/attachment.bin>


More information about the lldb-commits mailing list