003 File Manager
Current Path:
/usr/src/contrib/llvm-project/lldb/source/Plugins/Process/gdb-remote
usr
/
src
/
contrib
/
llvm-project
/
lldb
/
source
/
Plugins
/
Process
/
gdb-remote
/
📁
..
📄
GDBRemoteClientBase.cpp
(13.01 KB)
📄
GDBRemoteClientBase.h
(4.96 KB)
📄
GDBRemoteCommunication.cpp
(50.81 KB)
📄
GDBRemoteCommunication.h
(8.6 KB)
📄
GDBRemoteCommunicationClient.cpp
(141.85 KB)
📄
GDBRemoteCommunicationClient.h
(22.16 KB)
📄
GDBRemoteCommunicationHistory.cpp
(3.61 KB)
📄
GDBRemoteCommunicationHistory.h
(2.55 KB)
📄
GDBRemoteCommunicationReplayServer.cpp
(10.53 KB)
📄
GDBRemoteCommunicationReplayServer.h
(2.72 KB)
📄
GDBRemoteCommunicationServer.cpp
(5.23 KB)
📄
GDBRemoteCommunicationServer.h
(3.28 KB)
📄
GDBRemoteCommunicationServerCommon.cpp
(45.9 KB)
📄
GDBRemoteCommunicationServerCommon.h
(5.44 KB)
📄
GDBRemoteCommunicationServerLLGS.cpp
(117.81 KB)
📄
GDBRemoteCommunicationServerLLGS.h
(7.57 KB)
📄
GDBRemoteCommunicationServerPlatform.cpp
(18.26 KB)
📄
GDBRemoteCommunicationServerPlatform.h
(3.56 KB)
📄
GDBRemoteRegisterContext.cpp
(56.19 KB)
📄
GDBRemoteRegisterContext.h
(4.14 KB)
📄
ProcessGDBRemote.cpp
(204.79 KB)
📄
ProcessGDBRemote.h
(15.91 KB)
📄
ProcessGDBRemoteLog.cpp
(1.72 KB)
📄
ProcessGDBRemoteLog.h
(1.62 KB)
📄
ProcessGDBRemoteProperties.td
(906 B)
📄
ThreadGDBRemote.cpp
(11.54 KB)
📄
ThreadGDBRemote.h
(3.35 KB)
Editing: GDBRemoteRegisterContext.h
//===-- GDBRemoteRegisterContext.h ------------------------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// #ifndef LLDB_SOURCE_PLUGINS_PROCESS_GDB_REMOTE_GDBREMOTEREGISTERCONTEXT_H #define LLDB_SOURCE_PLUGINS_PROCESS_GDB_REMOTE_GDBREMOTEREGISTERCONTEXT_H #include <vector> #include "Plugins/Process/Utility/DynamicRegisterInfo.h" #include "lldb/Target/RegisterContext.h" #include "lldb/Utility/ConstString.h" #include "lldb/Utility/DataExtractor.h" #include "lldb/lldb-enumerations.h" #include "lldb/lldb-private.h" #include "GDBRemoteCommunicationClient.h" class StringExtractor; namespace lldb_private { namespace process_gdb_remote { class ThreadGDBRemote; class ProcessGDBRemote; class GDBRemoteDynamicRegisterInfo : public DynamicRegisterInfo { public: GDBRemoteDynamicRegisterInfo() : DynamicRegisterInfo() {} ~GDBRemoteDynamicRegisterInfo() override = default; void HardcodeARMRegisters(bool from_scratch); }; class GDBRemoteRegisterContext : public RegisterContext { public: GDBRemoteRegisterContext(ThreadGDBRemote &thread, uint32_t concrete_frame_idx, GDBRemoteDynamicRegisterInfo ®_info, bool read_all_at_once, bool write_all_at_once); ~GDBRemoteRegisterContext() override; void InvalidateAllRegisters() override; size_t GetRegisterCount() override; const RegisterInfo *GetRegisterInfoAtIndex(size_t reg) override; size_t GetRegisterSetCount() override; const RegisterSet *GetRegisterSet(size_t reg_set) override; bool ReadRegister(const RegisterInfo *reg_info, RegisterValue &value) override; bool WriteRegister(const RegisterInfo *reg_info, const RegisterValue &value) override; bool ReadAllRegisterValues(lldb::DataBufferSP &data_sp) override; bool WriteAllRegisterValues(const lldb::DataBufferSP &data_sp) override; bool ReadAllRegisterValues(RegisterCheckpoint ®_checkpoint) override; bool WriteAllRegisterValues(const RegisterCheckpoint ®_checkpoint) override; uint32_t ConvertRegisterKindToRegisterNumber(lldb::RegisterKind kind, uint32_t num) override; protected: friend class ThreadGDBRemote; bool ReadRegisterBytes(const RegisterInfo *reg_info, DataExtractor &data); bool WriteRegisterBytes(const RegisterInfo *reg_info, DataExtractor &data, uint32_t data_offset); bool PrivateSetRegisterValue(uint32_t reg, llvm::ArrayRef<uint8_t> data); bool PrivateSetRegisterValue(uint32_t reg, uint64_t val); void SetAllRegisterValid(bool b); bool GetRegisterIsValid(uint32_t reg) const { assert(reg < m_reg_valid.size()); if (reg < m_reg_valid.size()) return m_reg_valid[reg]; return false; } void SetRegisterIsValid(const RegisterInfo *reg_info, bool valid) { if (reg_info) return SetRegisterIsValid(reg_info->kinds[lldb::eRegisterKindLLDB], valid); } void SetRegisterIsValid(uint32_t reg, bool valid) { assert(reg < m_reg_valid.size()); if (reg < m_reg_valid.size()) m_reg_valid[reg] = valid; } GDBRemoteDynamicRegisterInfo &m_reg_info; std::vector<bool> m_reg_valid; DataExtractor m_reg_data; bool m_read_all_at_once; bool m_write_all_at_once; private: // Helper function for ReadRegisterBytes(). bool GetPrimordialRegister(const RegisterInfo *reg_info, GDBRemoteCommunicationClient &gdb_comm); // Helper function for WriteRegisterBytes(). bool SetPrimordialRegister(const RegisterInfo *reg_info, GDBRemoteCommunicationClient &gdb_comm); GDBRemoteRegisterContext(const GDBRemoteRegisterContext &) = delete; const GDBRemoteRegisterContext & operator=(const GDBRemoteRegisterContext &) = delete; }; } // namespace process_gdb_remote } // namespace lldb_private #endif // LLDB_SOURCE_PLUGINS_PROCESS_GDB_REMOTE_GDBREMOTEREGISTERCONTEXT_H
Upload File
Create Folder