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
This commit is contained in:
Jason Molenda 2011-10-06 01:45:46 +00:00
parent 4f09a0f855
commit c25e959dee
1 changed files with 11 additions and 1 deletions

View File

@ -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 ();
}