summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
diff options
context:
space:
mode:
authorMehdi Amini <mehdi.amini@apple.com>2016-11-11 04:28:40 +0000
committerMehdi Amini <mehdi.amini@apple.com>2016-11-11 04:28:40 +0000
commit41af43092ccc8030bb49cea324d85eecd5ae68a8 (patch)
treef30038673dd27f2d4785068fffd510abe4fb23d7 /lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
parente8e98dcb74cd6d297c31c023bfacdf7f28cdaabc (diff)
downloadbcm5719-llvm-41af43092ccc8030bb49cea324d85eecd5ae68a8.tar.gz
bcm5719-llvm-41af43092ccc8030bb49cea324d85eecd5ae68a8.zip
Make the Error class constructor protected
This is forcing to use Error::success(), which is in a wide majority of cases a lot more readable. Differential Revision: https://reviews.llvm.org/D26481 llvm-svn: 286561
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp')
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
index c0fbccb3e4f..07d30803cbb 100644
--- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
@@ -1252,7 +1252,7 @@ Error ProcessGDBRemote::WillResume() {
m_continue_S_tids.clear();
m_jstopinfo_sp.reset();
m_jthreadsinfo_sp.reset();
- return Error();
+ return Error::success();
}
Error ProcessGDBRemote::DoResume() {
@@ -3246,7 +3246,7 @@ Error ProcessGDBRemote::EstablishConnectionIfNeeded(
const ProcessInfo &process_info) {
// Make sure we aren't already connected?
if (m_gdb_comm.IsConnected())
- return Error();
+ return Error::success();
PlatformSP platform_sp(GetTarget().GetPlatform());
if (platform_sp && !platform_sp->IsHost())
@@ -4408,7 +4408,7 @@ Error ProcessGDBRemote::GetLoadedModuleList(LoadedModuleInfoList &list) {
XMLNode root_element = doc.GetRootElement("library-list-svr4");
if (!root_element)
- return Error();
+ return Error::success();
// main link map structure
llvm::StringRef main_lm = root_element.GetAttributeValue("main-lm");
@@ -4494,7 +4494,7 @@ Error ProcessGDBRemote::GetLoadedModuleList(LoadedModuleInfoList &list) {
XMLNode root_element = doc.GetRootElement("library-list");
if (!root_element)
- return Error();
+ return Error::success();
root_element.ForEachChildElementWithName(
"library", [log, &list](const XMLNode &library) -> bool {
@@ -4538,7 +4538,7 @@ Error ProcessGDBRemote::GetLoadedModuleList(LoadedModuleInfoList &list) {
return Error(0, ErrorType::eErrorTypeGeneric);
}
- return Error();
+ return Error::success();
}
lldb::ModuleSP ProcessGDBRemote::LoadModuleAtAddress(const FileSpec &file,
@@ -4662,7 +4662,7 @@ Error ProcessGDBRemote::GetFileLoadAddress(const FileSpec &file,
// The file is not loaded into the inferior
is_loaded = false;
load_addr = LLDB_INVALID_ADDRESS;
- return Error();
+ return Error::success();
}
return Error(
@@ -4672,7 +4672,7 @@ Error ProcessGDBRemote::GetFileLoadAddress(const FileSpec &file,
if (response.IsNormalResponse()) {
is_loaded = true;
load_addr = response.GetHexMaxU64(false, LLDB_INVALID_ADDRESS);
- return Error();
+ return Error::success();
}
return Error("Unknown error happened during sending the load address packet");
OpenPOWER on IntegriCloud