summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2017-05-12 04:51:55 +0000
committerZachary Turner <zturner@google.com>2017-05-12 04:51:55 +0000
commit97206d572797bddc1bba71bb1c18c97f19d69053 (patch)
treefdf21d24485672cf97c800264d135b9d5d2ecdce /lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp
parent3086b45a2fae833e8419885e78c598d936cc6429 (diff)
downloadbcm5719-llvm-97206d572797bddc1bba71bb1c18c97f19d69053.tar.gz
bcm5719-llvm-97206d572797bddc1bba71bb1c18c97f19d69053.zip
Rename Error -> Status.
This renames the LLDB error class to Status, as discussed on the lldb-dev mailing list. A change of this magnitude cannot easily be done without find and replace, but that has potential to catch unwanted occurrences of common strings such as "Error". Every effort was made to find all the obvious things such as the word "Error" appearing in a string, etc, but it's possible there are still some lingering occurences left around. Hopefully nothing too serious. llvm-svn: 302872
Diffstat (limited to 'lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp')
-rw-r--r--lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp49
1 files changed, 25 insertions, 24 deletions
diff --git a/lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp b/lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp
index 04b6fe6d71e..b1d13668f32 100644
--- a/lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp
+++ b/lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp
@@ -160,39 +160,40 @@ NativeRegisterContextSP NativeThreadLinux::GetRegisterContext() {
return m_reg_context_sp;
}
-Error NativeThreadLinux::SetWatchpoint(lldb::addr_t addr, size_t size,
- uint32_t watch_flags, bool hardware) {
+Status NativeThreadLinux::SetWatchpoint(lldb::addr_t addr, size_t size,
+ uint32_t watch_flags, bool hardware) {
if (!hardware)
- return Error("not implemented");
+ return Status("not implemented");
if (m_state == eStateLaunching)
- return Error();
- Error error = RemoveWatchpoint(addr);
+ return Status();
+ Status error = RemoveWatchpoint(addr);
if (error.Fail())
return error;
NativeRegisterContextSP reg_ctx = GetRegisterContext();
uint32_t wp_index = reg_ctx->SetHardwareWatchpoint(addr, size, watch_flags);
if (wp_index == LLDB_INVALID_INDEX32)
- return Error("Setting hardware watchpoint failed.");
+ return Status("Setting hardware watchpoint failed.");
m_watchpoint_index_map.insert({addr, wp_index});
- return Error();
+ return Status();
}
-Error NativeThreadLinux::RemoveWatchpoint(lldb::addr_t addr) {
+Status NativeThreadLinux::RemoveWatchpoint(lldb::addr_t addr) {
auto wp = m_watchpoint_index_map.find(addr);
if (wp == m_watchpoint_index_map.end())
- return Error();
+ return Status();
uint32_t wp_index = wp->second;
m_watchpoint_index_map.erase(wp);
if (GetRegisterContext()->ClearHardwareWatchpoint(wp_index))
- return Error();
- return Error("Clearing hardware watchpoint failed.");
+ return Status();
+ return Status("Clearing hardware watchpoint failed.");
}
-Error NativeThreadLinux::SetHardwareBreakpoint(lldb::addr_t addr, size_t size) {
+Status NativeThreadLinux::SetHardwareBreakpoint(lldb::addr_t addr,
+ size_t size) {
if (m_state == eStateLaunching)
- return Error();
+ return Status();
- Error error = RemoveHardwareBreakpoint(addr);
+ Status error = RemoveHardwareBreakpoint(addr);
if (error.Fail())
return error;
@@ -200,27 +201,27 @@ Error NativeThreadLinux::SetHardwareBreakpoint(lldb::addr_t addr, size_t size) {
uint32_t bp_index = reg_ctx->SetHardwareBreakpoint(addr, size);
if (bp_index == LLDB_INVALID_INDEX32)
- return Error("Setting hardware breakpoint failed.");
+ return Status("Setting hardware breakpoint failed.");
m_hw_break_index_map.insert({addr, bp_index});
- return Error();
+ return Status();
}
-Error NativeThreadLinux::RemoveHardwareBreakpoint(lldb::addr_t addr) {
+Status NativeThreadLinux::RemoveHardwareBreakpoint(lldb::addr_t addr) {
auto bp = m_hw_break_index_map.find(addr);
if (bp == m_hw_break_index_map.end())
- return Error();
+ return Status();
uint32_t bp_index = bp->second;
if (GetRegisterContext()->ClearHardwareBreakpoint(bp_index)) {
m_hw_break_index_map.erase(bp);
- return Error();
+ return Status();
}
- return Error("Clearing hardware breakpoint failed.");
+ return Status("Clearing hardware breakpoint failed.");
}
-Error NativeThreadLinux::Resume(uint32_t signo) {
+Status NativeThreadLinux::Resume(uint32_t signo) {
const StateType new_state = StateType::eStateRunning;
MaybeLogStateChange(new_state);
m_state = new_state;
@@ -262,7 +263,7 @@ Error NativeThreadLinux::Resume(uint32_t signo) {
reinterpret_cast<void *>(data));
}
-Error NativeThreadLinux::SingleStep(uint32_t signo) {
+Status NativeThreadLinux::SingleStep(uint32_t signo) {
const StateType new_state = StateType::eStateStepping;
MaybeLogStateChange(new_state);
m_state = new_state;
@@ -422,7 +423,7 @@ void NativeThreadLinux::SetExited() {
m_stop_info.reason = StopReason::eStopReasonThreadExiting;
}
-Error NativeThreadLinux::RequestStop() {
+Status NativeThreadLinux::RequestStop() {
Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_THREAD));
NativeProcessLinux &process = GetProcess();
@@ -435,7 +436,7 @@ Error NativeThreadLinux::RequestStop() {
", tid: %" PRIu64 ")",
__FUNCTION__, pid, tid);
- Error err;
+ Status err;
errno = 0;
if (::tgkill(pid, tid, SIGSTOP) != 0) {
err.SetErrorToErrno();
OpenPOWER on IntegriCloud