From c25e959deeaee70990ba1978d1defeb922033f5b Mon Sep 17 00:00:00 2001 From: Jason Molenda Date: Thu, 6 Oct 2011 01:45:46 +0000 Subject: [PATCH] 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. llvm-svn: 141265 --- .../Plugins/Process/gdb-remote/ProcessGDBRemote.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp index d39fbe4d6225..beed1f28f378 100644 --- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp @@ -345,8 +345,18 @@ ProcessGDBRemote::BuildDynamicRegisterInfo (bool force) // 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 (); }