diff options
Diffstat (limited to 'lldb/source/Plugins')
-rw-r--r-- | lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp | 8 | ||||
-rw-r--r-- | lldb/source/Plugins/Process/Utility/DynamicRegisterInfo.cpp | 10 |
2 files changed, 12 insertions, 6 deletions
diff --git a/lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp b/lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp index dc6665fd1bf..c798449aa74 100644 --- a/lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp +++ b/lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp @@ -95,7 +95,7 @@ OperatingSystemPython::OperatingSystemPython (lldb_private::Process *process) : { m_python_object = object_sp->GetObject(); - // GetDynamicRegisterInfo (); // Only for testing should this be done here + //GetDynamicRegisterInfo (); // COMMENT THIS LINE OUT PRIOR TO CHECKIN!!! } } } @@ -156,9 +156,9 @@ OperatingSystemPython::UpdateThreadList (ThreadList &old_thread_list, ThreadList auto object_sp = m_interpreter->OSPlugin_QueryForThreadsInfo(m_interpreter->MakeScriptObject(m_python_object)); if (!object_sp) return NULL; - PythonDataObject dictionary_data_obj((PyObject*)object_sp->GetObject()); - PythonDataDictionary dictionary = dictionary_data_obj.GetDictionaryObject(); - if(!dictionary) + PythonDataObject pyobj((PyObject*)object_sp->GetObject()); + PythonDataArray array = pyobj.GetArrayObject(); + if(!array) return NULL; // TODO: read from the dict diff --git a/lldb/source/Plugins/Process/Utility/DynamicRegisterInfo.cpp b/lldb/source/Plugins/Process/Utility/DynamicRegisterInfo.cpp index 10bfd2e9ee8..ede2c5a3bbc 100644 --- a/lldb/source/Plugins/Process/Utility/DynamicRegisterInfo.cpp +++ b/lldb/source/Plugins/Process/Utility/DynamicRegisterInfo.cpp @@ -132,18 +132,24 @@ DynamicRegisterInfo::SetRegisterInfo (const lldb_private::PythonDataDictionary & reg_info.encoding = eEncodingUint; const int64_t set = reg_info_dict.GetItemForKeyAsInteger(set_pystr, -1); - if (set == -1) + if (set >= m_sets.size()) { Clear(); return 0; } - m_set_reg_nums[set].push_back(i); reg_info.kinds[lldb::eRegisterKindLLDB] = i; reg_info.kinds[lldb::eRegisterKindGDB] = i; reg_info.kinds[lldb::eRegisterKindGCC] = reg_info_dict.GetItemForKeyAsInteger(gcc_pystr, LLDB_INVALID_REGNUM); reg_info.kinds[lldb::eRegisterKindDWARF] = reg_info_dict.GetItemForKeyAsInteger(dwarf_pystr, LLDB_INVALID_REGNUM); reg_info.kinds[lldb::eRegisterKindGeneric] = Args::StringToGenericRegister (reg_info_dict.GetItemForKeyAsString(generic_pystr)); + const size_t end_reg_offset = reg_info.byte_offset + reg_info.byte_size; + if (m_reg_data_byte_size < end_reg_offset) + m_reg_data_byte_size = end_reg_offset; + + m_regs.push_back (reg_info); + m_set_reg_nums[set].push_back(i); + } else { |