LLDB  mainline
RegisterContextPOSIX_s390x.h
Go to the documentation of this file.
1 //===-- RegisterContextPOSIX_s390x.h ----------------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #ifndef LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERCONTEXTPOSIX_S390X_H
10 #define LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERCONTEXTPOSIX_S390X_H
11 
12 #include "RegisterContext_s390x.h"
13 #include "RegisterInfoInterface.h"
16 #include "lldb/Utility/Log.h"
17 
18 class ProcessMonitor;
19 
21 public:
23  lldb_private::Thread &thread, uint32_t concrete_frame_idx,
25 
26  ~RegisterContextPOSIX_s390x() override;
27 
28  void Invalidate();
29 
30  void InvalidateAllRegisters() override;
31 
32  size_t GetRegisterCount() override;
33 
34  virtual unsigned GetRegisterSize(unsigned reg);
35 
36  virtual unsigned GetRegisterOffset(unsigned reg);
37 
38  const lldb_private::RegisterInfo *GetRegisterInfoAtIndex(size_t reg) override;
39 
40  size_t GetRegisterSetCount() override;
41 
42  const lldb_private::RegisterSet *GetRegisterSet(size_t set) override;
43 
44  const char *GetRegisterName(unsigned reg);
45 
46 protected:
47  struct RegInfo {
51 
55  };
56 
58  std::unique_ptr<lldb_private::RegisterInfoInterface> m_register_info_up;
59 
60  virtual bool IsRegisterSetAvailable(size_t set_index);
61 
62  virtual const lldb_private::RegisterInfo *GetRegisterInfo();
63 
64  bool IsGPR(unsigned reg);
65 
66  bool IsFPR(unsigned reg);
67 
68  virtual bool ReadGPR() = 0;
69  virtual bool ReadFPR() = 0;
70  virtual bool WriteGPR() = 0;
71  virtual bool WriteFPR() = 0;
72 };
73 
74 #endif // LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERCONTEXTPOSIX_S390X_H
RegisterInfo interface to patch RegisterInfo structure for archs.
RegisterContextPOSIX_s390x(lldb_private::Thread &thread, uint32_t concrete_frame_idx, lldb_private::RegisterInfoInterface *register_info)
Manages communication with the inferior (debugee) process.
const char * GetRegisterName(unsigned reg)
virtual bool WriteGPR()=0
std::unique_ptr< lldb_private::RegisterInfoInterface > m_register_info_up
virtual unsigned GetRegisterSize(unsigned reg)
virtual unsigned GetRegisterOffset(unsigned reg)
virtual const lldb_private::RegisterInfo * GetRegisterInfo()
const lldb_private::RegisterSet * GetRegisterSet(size_t set) override
virtual bool ReadFPR()=0
virtual bool IsRegisterSetAvailable(size_t set_index)
virtual bool WriteFPR()=0
virtual bool ReadGPR()=0
const lldb_private::RegisterInfo * GetRegisterInfoAtIndex(size_t reg) override