diff options
author | Greg Clayton <gclayton@apple.com> | 2013-10-17 01:10:23 +0000 |
---|---|---|
committer | Greg Clayton <gclayton@apple.com> | 2013-10-17 01:10:23 +0000 |
commit | 312bcbe8b4820d66feb17949622c7c5cb4a5fb49 (patch) | |
tree | 03d6c3b3547ae98654becccb3880d2f07e1492ca /lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp | |
parent | 8afa543737c102d40302b26f72ea8124353d583e (diff) | |
download | bcm5719-llvm-312bcbe8b4820d66feb17949622c7c5cb4a5fb49.tar.gz bcm5719-llvm-312bcbe8b4820d66feb17949622c7c5cb4a5fb49.zip |
<rdar://problem/14972424>
- Made the dynamic register context for the GDB remote plug-in inherit from the generic DynamicRegisterInfo to avoid code duplication
- Finished up the target definition python setting stuff.
- Added a new "slice" key/value pair that can specify that a register is part of another register:
{ 'name':'eax', 'set':0, 'bitsize':32, 'encoding':eEncodingUint, 'format':eFormatHex, 'slice': 'rax[31:0]' },
- Added a new "composite" key/value pair that can specify that a register is made up of two or more registers:
{ 'name':'d0', 'set':0, 'bitsize':64 , 'encoding':eEncodingIEEE754, 'format':eFormatFloat, 'composite': ['s1', 's0'] },
- Added a new "invalidate-regs" key/value pair for when a register is modified, it can invalidate other registers:
{ 'name':'cpsr', 'set':0, 'bitsize':32 , 'encoding':eEncodingUint, 'format':eFormatHex, 'invalidate-regs': ['r8', 'r9', 'r10', 'r11', 'r12', 'r13', 'r14', 'r15']},
This now completes the feature that allows a GDB remote target to completely describe itself.
llvm-svn: 192858
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp')
-rw-r--r-- | lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp index e44d7a355f3..1b8791c6e74 100644 --- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp @@ -334,7 +334,18 @@ ProcessGDBRemote::ParsePythonTargetDefinition(const FileSpec &target_definition_ if (target_dict) { - if (m_register_info.SetRegisterInfo (target_dict) > 0) + PythonDictionary host_info_dict (target_dict.GetItemForKey("host-info")); + if (host_info_dict) + { + ArchSpec host_arch (host_info_dict.GetItemForKeyAsString(PythonString("triple"))); + + if (!host_arch.IsCompatibleMatch(GetTarget().GetArchitecture())) + { + GetTarget().SetArchitecture(host_arch); + } + + } + if (m_register_info.SetRegisterInfo (target_dict, GetTarget().GetArchitecture().GetByteOrder()) > 0) { return true; } @@ -522,12 +533,12 @@ ProcessGDBRemote::BuildDynamicRegisterInfo (bool force) if (reg_num == 0) { FileSpec target_definition_fspec = GetGlobalPluginProperties()->GetTargetDefinitionFile (); - - // See if we can get register definitions from a python file - if (ParsePythonTargetDefinition (target_definition_fspec)) + + if (target_definition_fspec) { - m_register_info.Finalize (); - return; + // See if we can get register definitions from a python file + if (ParsePythonTargetDefinition (target_definition_fspec)) + return; } } |