diff options
author | Ed Maste <emaste@FreeBSD.org> | 2015-02-09 01:44:09 +0000 |
---|---|---|
committer | Ed Maste <emaste@FreeBSD.org> | 2015-02-09 01:44:09 +0000 |
commit | 12bd4897ff0678fa663e09d78ebc22dd255ceb86 (patch) | |
tree | a8f4b3abea3e6937e60728991c736e6e3d322fc1 /include/lldb/Host/common/NativeBreakpoint.h | |
parent | 205afe679855a4ce8149cdaa94d3f0868ce796dc (diff) |
Notes
Diffstat (limited to 'include/lldb/Host/common/NativeBreakpoint.h')
-rw-r--r-- | include/lldb/Host/common/NativeBreakpoint.h | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/include/lldb/Host/common/NativeBreakpoint.h b/include/lldb/Host/common/NativeBreakpoint.h new file mode 100644 index 0000000000000..367003b94e357 --- /dev/null +++ b/include/lldb/Host/common/NativeBreakpoint.h @@ -0,0 +1,66 @@ +//===-- NativeBreakpoint.h --------------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef liblldb_NativeBreakpoint_h_ +#define liblldb_NativeBreakpoint_h_ + +#include "lldb/lldb-types.h" + +namespace lldb_private +{ + class NativeBreakpointList; + + class NativeBreakpoint + { + friend class NativeBreakpointList; + + public: + // The assumption is that derived breakpoints are enabled when created. + NativeBreakpoint (lldb::addr_t addr); + + virtual + ~NativeBreakpoint (); + + Error + Enable (); + + Error + Disable (); + + lldb::addr_t + GetAddress () const { return m_addr; } + + bool + IsEnabled () const { return m_enabled; } + + virtual bool + IsSoftwareBreakpoint () const = 0; + + protected: + const lldb::addr_t m_addr; + int32_t m_ref_count; + + virtual Error + DoEnable () = 0; + + virtual Error + DoDisable () = 0; + + private: + bool m_enabled; + + // ----------------------------------------------------------- + // interface for NativeBreakpointList + // ----------------------------------------------------------- + void AddRef (); + int32_t DecRef (); + }; +} + +#endif // ifndef liblldb_NativeBreakpoint_h_ |