aboutsummaryrefslogtreecommitdiff
path: root/source/Host/common/NativeBreakpointList.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/Host/common/NativeBreakpointList.cpp')
-rw-r--r--source/Host/common/NativeBreakpointList.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/source/Host/common/NativeBreakpointList.cpp b/source/Host/common/NativeBreakpointList.cpp
index 60608a0bbc55..ce5eb94a8d1f 100644
--- a/source/Host/common/NativeBreakpointList.cpp
+++ b/source/Host/common/NativeBreakpointList.cpp
@@ -19,9 +19,9 @@ using namespace lldb_private;
NativeBreakpointList::NativeBreakpointList() : m_mutex() {}
-Error NativeBreakpointList::AddRef(lldb::addr_t addr, size_t size_hint,
- bool hardware,
- CreateBreakpointFunc create_func) {
+Status NativeBreakpointList::AddRef(lldb::addr_t addr, size_t size_hint,
+ bool hardware,
+ CreateBreakpointFunc create_func) {
Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_BREAKPOINTS));
if (log)
log->Printf("NativeBreakpointList::%s addr = 0x%" PRIx64
@@ -40,7 +40,7 @@ Error NativeBreakpointList::AddRef(lldb::addr_t addr, size_t size_hint,
__FUNCTION__, addr);
iter->second->AddRef();
- return Error();
+ return Status();
}
// Create a new breakpoint using the given create func.
@@ -51,7 +51,7 @@ Error NativeBreakpointList::AddRef(lldb::addr_t addr, size_t size_hint,
__FUNCTION__, addr, size_hint, hardware ? "true" : "false");
NativeBreakpointSP breakpoint_sp;
- Error error = create_func(addr, size_hint, hardware, breakpoint_sp);
+ Status error = create_func(addr, size_hint, hardware, breakpoint_sp);
if (error.Fail()) {
if (log)
log->Printf(
@@ -70,8 +70,8 @@ Error NativeBreakpointList::AddRef(lldb::addr_t addr, size_t size_hint,
return error;
}
-Error NativeBreakpointList::DecRef(lldb::addr_t addr) {
- Error error;
+Status NativeBreakpointList::DecRef(lldb::addr_t addr) {
+ Status error;
Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_BREAKPOINTS));
if (log)
@@ -142,7 +142,7 @@ Error NativeBreakpointList::DecRef(lldb::addr_t addr) {
return error;
}
-Error NativeBreakpointList::EnableBreakpoint(lldb::addr_t addr) {
+Status NativeBreakpointList::EnableBreakpoint(lldb::addr_t addr) {
Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_BREAKPOINTS));
if (log)
log->Printf("NativeBreakpointList::%s addr = 0x%" PRIx64, __FUNCTION__,
@@ -157,14 +157,14 @@ Error NativeBreakpointList::EnableBreakpoint(lldb::addr_t addr) {
if (log)
log->Printf("NativeBreakpointList::%s addr = 0x%" PRIx64 " -- NOT FOUND",
__FUNCTION__, addr);
- return Error("breakpoint not found");
+ return Status("breakpoint not found");
}
// Enable it.
return iter->second->Enable();
}
-Error NativeBreakpointList::DisableBreakpoint(lldb::addr_t addr) {
+Status NativeBreakpointList::DisableBreakpoint(lldb::addr_t addr) {
Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_BREAKPOINTS));
if (log)
log->Printf("NativeBreakpointList::%s addr = 0x%" PRIx64, __FUNCTION__,
@@ -179,15 +179,15 @@ Error NativeBreakpointList::DisableBreakpoint(lldb::addr_t addr) {
if (log)
log->Printf("NativeBreakpointList::%s addr = 0x%" PRIx64 " -- NOT FOUND",
__FUNCTION__, addr);
- return Error("breakpoint not found");
+ return Status("breakpoint not found");
}
// Disable it.
return iter->second->Disable();
}
-Error NativeBreakpointList::GetBreakpoint(lldb::addr_t addr,
- NativeBreakpointSP &breakpoint_sp) {
+Status NativeBreakpointList::GetBreakpoint(lldb::addr_t addr,
+ NativeBreakpointSP &breakpoint_sp) {
Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_BREAKPOINTS));
if (log)
log->Printf("NativeBreakpointList::%s addr = 0x%" PRIx64, __FUNCTION__,
@@ -200,16 +200,16 @@ Error NativeBreakpointList::GetBreakpoint(lldb::addr_t addr,
if (iter == m_breakpoints.end()) {
// Not found!
breakpoint_sp.reset();
- return Error("breakpoint not found");
+ return Status("breakpoint not found");
}
// Disable it.
breakpoint_sp = iter->second;
- return Error();
+ return Status();
}
-Error NativeBreakpointList::RemoveTrapsFromBuffer(lldb::addr_t addr, void *buf,
- size_t size) const {
+Status NativeBreakpointList::RemoveTrapsFromBuffer(lldb::addr_t addr, void *buf,
+ size_t size) const {
for (const auto &map : m_breakpoints) {
lldb::addr_t bp_addr = map.first;
// Breapoint not in range, ignore
@@ -225,5 +225,5 @@ Error NativeBreakpointList::RemoveTrapsFromBuffer(lldb::addr_t addr, void *buf,
auto opcode_size = software_bp_sp->m_opcode_size;
::memcpy(opcode_addr, saved_opcodes, opcode_size);
}
- return Error();
+ return Status();
}