aboutsummaryrefslogtreecommitdiff
path: root/include/lldb/Host/common
diff options
context:
space:
mode:
Diffstat (limited to 'include/lldb/Host/common')
-rw-r--r--include/lldb/Host/common/NativeBreakpointList.h3
-rw-r--r--include/lldb/Host/common/NativeProcessProtocol.h20
-rw-r--r--include/lldb/Host/common/NativeRegisterContext.h19
-rw-r--r--include/lldb/Host/common/SoftwareBreakpoint.h2
4 files changed, 39 insertions, 5 deletions
diff --git a/include/lldb/Host/common/NativeBreakpointList.h b/include/lldb/Host/common/NativeBreakpointList.h
index 51617330d075..aba2f8a74cdc 100644
--- a/include/lldb/Host/common/NativeBreakpointList.h
+++ b/include/lldb/Host/common/NativeBreakpointList.h
@@ -42,6 +42,9 @@ namespace lldb_private
Error
GetBreakpoint (lldb::addr_t addr, NativeBreakpointSP &breakpoint_sp);
+ Error
+ RemoveTrapsFromBuffer(lldb::addr_t addr, void *buf, size_t size) const;
+
private:
typedef std::map<lldb::addr_t, NativeBreakpointSP> BreakpointMap;
diff --git a/include/lldb/Host/common/NativeProcessProtocol.h b/include/lldb/Host/common/NativeProcessProtocol.h
index 83c14a5ab37a..f6a685aae147 100644
--- a/include/lldb/Host/common/NativeProcessProtocol.h
+++ b/include/lldb/Host/common/NativeProcessProtocol.h
@@ -16,6 +16,7 @@
#include "lldb/lldb-types.h"
#include "lldb/Core/Error.h"
#include "lldb/Host/Mutex.h"
+#include "llvm/ADT/StringRef.h"
#include "NativeBreakpointList.h"
#include "NativeWatchpointList.h"
@@ -90,13 +91,16 @@ namespace lldb_private
GetMemoryRegionInfo (lldb::addr_t load_addr, MemoryRegionInfo &range_info);
virtual Error
- ReadMemory (lldb::addr_t addr, void *buf, lldb::addr_t size, lldb::addr_t &bytes_read) = 0;
+ ReadMemory(lldb::addr_t addr, void *buf, size_t size, size_t &bytes_read) = 0;
virtual Error
- WriteMemory (lldb::addr_t addr, const void *buf, lldb::addr_t size, lldb::addr_t &bytes_written) = 0;
+ ReadMemoryWithoutTrap(lldb::addr_t addr, void *buf, size_t size, size_t &bytes_read) = 0;
virtual Error
- AllocateMemory (lldb::addr_t size, uint32_t permissions, lldb::addr_t &addr) = 0;
+ WriteMemory(lldb::addr_t addr, const void *buf, size_t size, size_t &bytes_written) = 0;
+
+ virtual Error
+ AllocateMemory(size_t size, uint32_t permissions, lldb::addr_t &addr) = 0;
virtual Error
DeallocateMemory (lldb::addr_t addr) = 0;
@@ -283,6 +287,16 @@ namespace lldb_private
bool
UnregisterNativeDelegate (NativeDelegate &native_delegate);
+ // Called before termination of NativeProcessProtocol's instance.
+ virtual void
+ Terminate ();
+
+ virtual Error
+ GetLoadedModuleFileSpec(const char* module_path, FileSpec& file_spec) = 0;
+
+ virtual Error
+ GetFileLoadAddress(const llvm::StringRef& file_name, lldb::addr_t& load_addr) = 0;
+
protected:
lldb::pid_t m_pid;
diff --git a/include/lldb/Host/common/NativeRegisterContext.h b/include/lldb/Host/common/NativeRegisterContext.h
index e9c03e3c20a4..098f148f95d0 100644
--- a/include/lldb/Host/common/NativeRegisterContext.h
+++ b/include/lldb/Host/common/NativeRegisterContext.h
@@ -99,14 +99,26 @@ public:
virtual Error
ClearAllHardwareWatchpoints ();
+ virtual Error
+ IsWatchpointHit(uint32_t wp_index, bool &is_hit);
+
+ virtual Error
+ GetWatchpointHitIndex(uint32_t &wp_index, lldb::addr_t trap_addr);
+
+ virtual Error
+ IsWatchpointVacant (uint32_t wp_index, bool &is_vacant);
+
+ virtual lldb::addr_t
+ GetWatchpointAddress (uint32_t wp_index);
+
virtual bool
HardwareSingleStep (bool enable);
virtual Error
- ReadRegisterValueFromMemory (const lldb_private::RegisterInfo *reg_info, lldb::addr_t src_addr, lldb::addr_t src_len, RegisterValue &reg_value);
+ ReadRegisterValueFromMemory (const lldb_private::RegisterInfo *reg_info, lldb::addr_t src_addr, size_t src_len, RegisterValue &reg_value);
virtual Error
- WriteRegisterValueToMemory (const lldb_private::RegisterInfo *reg_info, lldb::addr_t dst_addr, lldb::addr_t dst_len, const RegisterValue &reg_value);
+ WriteRegisterValueToMemory (const lldb_private::RegisterInfo *reg_info, lldb::addr_t dst_addr, size_t dst_len, const RegisterValue &reg_value);
//------------------------------------------------------------------
// Subclasses should not override these
@@ -129,6 +141,9 @@ public:
lldb::addr_t
GetPC (lldb::addr_t fail_value = LLDB_INVALID_ADDRESS);
+ virtual lldb::addr_t
+ GetPCfromBreakpointLocation (lldb::addr_t fail_value = LLDB_INVALID_ADDRESS);
+
Error
SetPC (lldb::addr_t pc);
diff --git a/include/lldb/Host/common/SoftwareBreakpoint.h b/include/lldb/Host/common/SoftwareBreakpoint.h
index 1fed19eca612..83b3d18aa768 100644
--- a/include/lldb/Host/common/SoftwareBreakpoint.h
+++ b/include/lldb/Host/common/SoftwareBreakpoint.h
@@ -17,6 +17,8 @@ namespace lldb_private
{
class SoftwareBreakpoint : public NativeBreakpoint
{
+ friend class NativeBreakpointList;
+
public:
static Error
CreateSoftwareBreakpoint (NativeProcessProtocol &process, lldb::addr_t addr, size_t size_hint, NativeBreakpointSP &breakpoint_spn);