summaryrefslogtreecommitdiffstats
path: root/lldb/tools/lldb-server/lldb-gdbserver.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/tools/lldb-server/lldb-gdbserver.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/tools/lldb-server/lldb-gdbserver.cpp')
-rw-r--r--lldb/tools/lldb-server/lldb-gdbserver.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/lldb/tools/lldb-server/lldb-gdbserver.cpp b/lldb/tools/lldb-server/lldb-gdbserver.cpp
index 59f5a44ce4e..6139bfabee3 100644
--- a/lldb/tools/lldb-server/lldb-gdbserver.cpp
+++ b/lldb/tools/lldb-server/lldb-gdbserver.cpp
@@ -35,7 +35,7 @@
#include "lldb/Host/Pipe.h"
#include "lldb/Host/Socket.h"
#include "lldb/Host/StringConvert.h"
-#include "lldb/Utility/Error.h"
+#include "lldb/Utility/Status.h"
#ifndef LLGS_PROGRAM_NAME
#define LLGS_PROGRAM_NAME "lldb-server"
@@ -112,7 +112,7 @@ static void display_usage(const char *progname, const char *subcommand) {
void handle_attach_to_pid(GDBRemoteCommunicationServerLLGS &gdb_server,
lldb::pid_t pid) {
- Error error = gdb_server.AttachToProcess(pid);
+ Status error = gdb_server.AttachToProcess(pid);
if (error.Fail()) {
fprintf(stderr, "error: failed to attach to pid %" PRIu64 ": %s\n", pid,
error.AsCString());
@@ -145,7 +145,7 @@ void handle_attach(GDBRemoteCommunicationServerLLGS &gdb_server,
void handle_launch(GDBRemoteCommunicationServerLLGS &gdb_server, int argc,
const char *const argv[]) {
- Error error;
+ Status error;
error = gdb_server.SetLaunchArguments(argv, argc);
if (error.Fail()) {
fprintf(stderr, "error: failed to set launch args for '%s': %s\n", argv[0],
@@ -170,15 +170,15 @@ void handle_launch(GDBRemoteCommunicationServerLLGS &gdb_server, int argc,
}
}
-Error writeSocketIdToPipe(Pipe &port_pipe, const std::string &socket_id) {
+Status writeSocketIdToPipe(Pipe &port_pipe, const std::string &socket_id) {
size_t bytes_written = 0;
// Write the port number as a C string with the NULL terminator.
return port_pipe.Write(socket_id.c_str(), socket_id.size() + 1,
bytes_written);
}
-Error writeSocketIdToPipe(const char *const named_pipe_path,
- const std::string &socket_id) {
+Status writeSocketIdToPipe(const char *const named_pipe_path,
+ const std::string &socket_id) {
Pipe port_name_pipe;
// Wait for 10 seconds for pipe to be opened.
auto error = port_name_pipe.OpenAsWriterWithTimeout(named_pipe_path, false,
@@ -188,9 +188,9 @@ Error writeSocketIdToPipe(const char *const named_pipe_path,
return writeSocketIdToPipe(port_name_pipe, socket_id);
}
-Error writeSocketIdToPipe(int unnamed_pipe_fd, const std::string &socket_id) {
+Status writeSocketIdToPipe(int unnamed_pipe_fd, const std::string &socket_id) {
#if defined(_WIN32)
- return Error("Unnamed pipes are not supported on Windows.");
+ return Status("Unnamed pipes are not supported on Windows.");
#else
Pipe port_pipe{Pipe::kInvalidDescriptor, unnamed_pipe_fd};
return writeSocketIdToPipe(port_pipe, socket_id);
@@ -202,7 +202,7 @@ void ConnectToRemote(MainLoop &mainloop,
bool reverse_connect, const char *const host_and_port,
const char *const progname, const char *const subcommand,
const char *const named_pipe_path, int unnamed_pipe_fd) {
- Error error;
+ Status error;
if (host_and_port && host_and_port[0]) {
// Parse out host and port.
@@ -311,7 +311,7 @@ void ConnectToRemote(MainLoop &mainloop,
// main
//----------------------------------------------------------------------
int main_gdbserver(int argc, char *argv[]) {
- Error error;
+ Status error;
MainLoop mainloop;
#ifndef _WIN32
// Setup signal handlers first thing.
OpenPOWER on IntegriCloud