10b57cec5SDimitry Andric //===-- RegisterContextDummy.h ----------------------------------------*- C++ 20b57cec5SDimitry Andric //-*-===// 30b57cec5SDimitry Andric // 40b57cec5SDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 50b57cec5SDimitry Andric // See https://llvm.org/LICENSE.txt for license information. 60b57cec5SDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 70b57cec5SDimitry Andric // 80b57cec5SDimitry Andric //===----------------------------------------------------------------------===// 90b57cec5SDimitry Andric 105ffd83dbSDimitry Andric #ifndef LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERCONTEXTDUMMY_H 115ffd83dbSDimitry Andric #define LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERCONTEXTDUMMY_H 120b57cec5SDimitry Andric 130b57cec5SDimitry Andric #include <vector> 140b57cec5SDimitry Andric 150b57cec5SDimitry Andric #include "lldb/Symbol/SymbolContext.h" 160b57cec5SDimitry Andric #include "lldb/Target/RegisterContext.h" 170b57cec5SDimitry Andric #include "lldb/lldb-private.h" 180b57cec5SDimitry Andric 190b57cec5SDimitry Andric namespace lldb_private { 200b57cec5SDimitry Andric 210b57cec5SDimitry Andric class RegisterContextDummy : public lldb_private::RegisterContext { 220b57cec5SDimitry Andric public: 230b57cec5SDimitry Andric typedef std::shared_ptr<RegisterContextDummy> SharedPtr; 240b57cec5SDimitry Andric 250b57cec5SDimitry Andric RegisterContextDummy(Thread &thread, uint32_t concrete_frame_idx, 260b57cec5SDimitry Andric uint32_t address_byte_size); 270b57cec5SDimitry Andric 280b57cec5SDimitry Andric ~RegisterContextDummy() override; 290b57cec5SDimitry Andric 300b57cec5SDimitry Andric void InvalidateAllRegisters() override; 310b57cec5SDimitry Andric 320b57cec5SDimitry Andric size_t GetRegisterCount() override; 330b57cec5SDimitry Andric 340b57cec5SDimitry Andric const lldb_private::RegisterInfo *GetRegisterInfoAtIndex(size_t reg) override; 350b57cec5SDimitry Andric 360b57cec5SDimitry Andric size_t GetRegisterSetCount() override; 370b57cec5SDimitry Andric 380b57cec5SDimitry Andric const lldb_private::RegisterSet *GetRegisterSet(size_t reg_set) override; 390b57cec5SDimitry Andric 400b57cec5SDimitry Andric bool ReadRegister(const lldb_private::RegisterInfo *reg_info, 410b57cec5SDimitry Andric lldb_private::RegisterValue &value) override; 420b57cec5SDimitry Andric 430b57cec5SDimitry Andric bool WriteRegister(const lldb_private::RegisterInfo *reg_info, 440b57cec5SDimitry Andric const lldb_private::RegisterValue &value) override; 450b57cec5SDimitry Andric 46*81ad6265SDimitry Andric bool ReadAllRegisterValues(lldb::WritableDataBufferSP &data_sp) override; 470b57cec5SDimitry Andric 480b57cec5SDimitry Andric bool WriteAllRegisterValues(const lldb::DataBufferSP &data_sp) override; 490b57cec5SDimitry Andric 500b57cec5SDimitry Andric uint32_t ConvertRegisterKindToRegisterNumber(lldb::RegisterKind kind, 510b57cec5SDimitry Andric uint32_t num) override; 520b57cec5SDimitry Andric 530b57cec5SDimitry Andric private: 540b57cec5SDimitry Andric // For RegisterContextLLDB only 550b57cec5SDimitry Andric 560b57cec5SDimitry Andric lldb_private::RegisterSet m_reg_set0; // register set 0 (PC only) 570b57cec5SDimitry Andric lldb_private::RegisterInfo m_pc_reg_info; 580b57cec5SDimitry Andric 595ffd83dbSDimitry Andric RegisterContextDummy(const RegisterContextDummy &) = delete; 605ffd83dbSDimitry Andric const RegisterContextDummy &operator=(const RegisterContextDummy &) = delete; 610b57cec5SDimitry Andric }; 620b57cec5SDimitry Andric 630b57cec5SDimitry Andric } // namespace lldb_private 640b57cec5SDimitry Andric 655ffd83dbSDimitry Andric #endif // LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERCONTEXTDUMMY_H 66