[Lldb-commits] [lldb] r141265 - /lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp

Jason Molenda jmolenda at apple.com
Wed Oct 5 18:46:10 PDT 2011


Author: jmolenda
Date: Wed Oct  5 20:45:46 2011
New Revision: 141265

URL: http://llvm.org/viewvc/llvm-project?rev=141265&view=rev
Log:
ProcessGDBRemote::BuildDynamicRegisterInfo() - even if we don't have a Target architecture
set up yet, if we're talking to an Apple arm device set the register set based on the
arm device's attributes; this is a safe assumption to make in this particular environment.

Modified:
    lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp

Modified: lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp?rev=141265&r1=141264&r2=141265&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp Wed Oct  5 20:45:46 2011
@@ -345,8 +345,18 @@
         // We didn't get anything. See if we are debugging ARM and fill with
         // a hard coded register set until we can get an updated debugserver
         // down on the devices.
-        if (GetTarget().GetArchitecture().GetMachine() == llvm::Triple::arm)
+
+        if (!GetTarget().GetArchitecture().IsValid()
+            && m_gdb_comm.GetHostArchitecture().IsValid()
+            && m_gdb_comm.GetHostArchitecture().GetMachine() == llvm::Triple::arm
+            && m_gdb_comm.GetHostArchitecture().GetTriple().getVendor() == llvm::Triple::Apple)
+        {
+            m_register_info.HardcodeARMRegisters();
+        }
+        else if (GetTarget().GetArchitecture().GetMachine() == llvm::Triple::arm)
+        {
             m_register_info.HardcodeARMRegisters();
+        }
     }
     m_register_info.Finalize ();
 }





More information about the lldb-commits mailing list