Skip to content

Commit 2750279

Browse files
committed
[cleanup] replace offensive terminology
1 parent 8cc6ded commit 2750279

File tree

7 files changed

+10
-56
lines changed

7 files changed

+10
-56
lines changed

BUILD

-2
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,6 @@ filegroup(
190190
"Headers/DebugServer2/GDBRemote/Session.h",
191191
"Headers/DebugServer2/GDBRemote/SessionBase.h",
192192
"Headers/DebugServer2/GDBRemote/SessionDelegate.h",
193-
"Headers/DebugServer2/GDBRemote/SlaveSessionImpl.h",
194193
"Headers/DebugServer2/GDBRemote/Types.h",
195194
"Headers/DebugServer2/Host/Channel.h",
196195
"Headers/DebugServer2/Host/File.h",
@@ -339,7 +338,6 @@ filegroup(
339338
"Sources/GDBRemote/ProtocolInterpreter.cpp",
340339
"Sources/GDBRemote/Session.cpp",
341340
"Sources/GDBRemote/SessionBase.cpp",
342-
"Sources/GDBRemote/SlaveSessionImpl.cpp",
343341
"Sources/GDBRemote/Structures.cpp",
344342
"Sources/Host/Common/Channel.cpp",
345343
"Sources/Host/Common/Platform.cpp",

CMakeLists.txt

-1
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,6 @@ add_executable(ds2
189189
Sources/GDBRemote/ProtocolInterpreter.cpp
190190
Sources/GDBRemote/Session.cpp
191191
Sources/GDBRemote/SessionBase.cpp
192-
Sources/GDBRemote/SlaveSessionImpl.cpp
193192
Sources/GDBRemote/Structures.cpp
194193

195194
Sources/Host/Common/Channel.cpp

Headers/DebugServer2/GDBRemote/SlaveSessionImpl.h

-23
This file was deleted.

Sources/GDBRemote/PlatformSessionImpl.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ ErrorCode PlatformSessionImplBase::onLaunchDebugServer(Session &session,
101101
StringCollection args;
102102

103103
ps.setExecutable(Platform::GetSelfExecutablePath());
104-
args.push_back("slave");
104+
args.push_back("server");
105105
if (GetLogLevel() == kLogLevelDebug) {
106106
args.push_back("--debug");
107107
} else if (GetLogLevel() == kLogLevelPacket) {

Sources/GDBRemote/SlaveSessionImpl.cpp

-18
This file was deleted.

Sources/Host/POSIX/ProcessSpawner.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ namespace Host {
3434

3535
static bool open_terminal(int fds[2]) {
3636
#if defined(OS_FREEBSD) || defined(OS_DARWIN)
37-
char *slave;
37+
char *worker;
3838
#else
39-
char slave[PATH_MAX];
39+
char worker[PATH_MAX];
4040
#endif
4141

4242
fds[0] = ::posix_openpt(O_RDWR | O_NOCTTY);
@@ -50,13 +50,13 @@ static bool open_terminal(int fds[2]) {
5050
goto error_fd0;
5151

5252
#if defined(OS_FREEBSD) || defined(OS_DARWIN)
53-
slave = ptsname(fds[0]);
53+
worker = ptsname(fds[0]);
5454
#else
55-
if (::ptsname_r(fds[0], slave, sizeof(slave)) != 0)
55+
if (::ptsname_r(fds[0], worker, sizeof(worker)) != 0)
5656
goto error_fd0;
5757
#endif
5858

59-
fds[1] = ::open(slave, O_RDWR);
59+
fds[1] = ::open(worker, O_RDWR);
6060
if (fds[1] == -1)
6161
goto error_fd0;
6262

Sources/main.cpp

+4-6
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
#include "DebugServer2/GDBRemote/DebugSessionImpl.h"
1414
#include "DebugServer2/GDBRemote/PlatformSessionImpl.h"
1515
#include "DebugServer2/GDBRemote/ProtocolHelpers.h"
16-
#include "DebugServer2/GDBRemote/SlaveSessionImpl.h"
1716
#include "DebugServer2/Host/Platform.h"
1817
#include "DebugServer2/Host/QueueChannel.h"
1918
#include "DebugServer2/Host/Socket.h"
@@ -47,7 +46,6 @@ using ds2::GDBRemote::DebugSessionImpl;
4746
using ds2::GDBRemote::PlatformSessionImpl;
4847
using ds2::GDBRemote::Session;
4948
using ds2::GDBRemote::SessionDelegate;
50-
using ds2::GDBRemote::SlaveSessionImpl;
5149
using ds2::Host::Platform;
5250
using ds2::Host::QueueChannel;
5351
using ds2::Host::Socket;
@@ -564,7 +562,7 @@ static int PlatformMain(int argc, char **argv) {
564562
} while (true);
565563
}
566564

567-
static int SlaveMain(int argc, char **argv) {
565+
static int ServerMain(int argc, char **argv) {
568566
DS2ASSERT(argv[1][0] == 's');
569567

570568
ds2::OptParse opts;
@@ -581,7 +579,7 @@ static int SlaveMain(int argc, char **argv) {
581579
}
582580

583581
if (pid == 0) {
584-
// When in slave mode, output is suppressed but for standard error.
582+
// When in server mode, output is suppressed but for standard error.
585583
close(0);
586584
close(1);
587585

@@ -590,7 +588,7 @@ static int SlaveMain(int argc, char **argv) {
590588

591589
std::unique_ptr<Socket> client = server->accept();
592590

593-
SlaveSessionImpl impl;
591+
DebugSessionImpl impl;
594592
return RunDebugServer(client.get(), &impl);
595593
} else {
596594
// Write to the standard output to let our parent know
@@ -667,7 +665,7 @@ int main(int argc, char **argv) {
667665
case 'p':
668666
return PlatformMain(argc, argv);
669667
case 's':
670-
return SlaveMain(argc, argv);
668+
return ServerMain(argc, argv);
671669
#endif
672670
case 'v':
673671
return VersionMain(argc, argv);

0 commit comments

Comments
 (0)