Skip to content

Commit 76f3aac

Browse files
committed
[cleanup] replace offensive terminology
1 parent 6eb8c56 commit 76f3aac

File tree

7 files changed

+20
-20
lines changed

7 files changed

+20
-20
lines changed

BUILD

+2-2
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,8 @@ 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",
194+
"Headers/DebugServer2/GDBRemote/WorkerSessionImpl.h",
195195
"Headers/DebugServer2/Host/Channel.h",
196196
"Headers/DebugServer2/Host/File.h",
197197
"Headers/DebugServer2/Host/Platform.h",
@@ -339,8 +339,8 @@ filegroup(
339339
"Sources/GDBRemote/ProtocolInterpreter.cpp",
340340
"Sources/GDBRemote/Session.cpp",
341341
"Sources/GDBRemote/SessionBase.cpp",
342-
"Sources/GDBRemote/SlaveSessionImpl.cpp",
343342
"Sources/GDBRemote/Structures.cpp",
343+
"Sources/GDBRemote/WorkerSessionImpl.cpp",
344344
"Sources/Host/Common/Channel.cpp",
345345
"Sources/Host/Common/Platform.cpp",
346346
"Sources/Host/Common/QueueChannel.cpp",

CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,8 @@ 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
193+
Sources/GDBRemote/WorkerSessionImpl.cpp
194194

195195
Sources/Host/Common/Channel.cpp
196196
Sources/Host/Common/Platform.cpp

Headers/DebugServer2/GDBRemote/SlaveSessionImpl.h renamed to Headers/DebugServer2/GDBRemote/WorkerSessionImpl.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
namespace ds2 {
1616
namespace GDBRemote {
1717

18-
class SlaveSessionImpl : public DebugSessionImpl {
18+
class WorkerSessionImpl : public DebugSessionImpl {
1919
public:
20-
SlaveSessionImpl();
20+
WorkerSessionImpl();
2121
};
2222
} // namespace GDBRemote
2323
} // namespace ds2

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("worker");
105105
if (GetLogLevel() == kLogLevelDebug) {
106106
args.push_back("--debug");
107107
} else if (GetLogLevel() == kLogLevelPacket) {

Sources/GDBRemote/SlaveSessionImpl.cpp renamed to Sources/GDBRemote/WorkerSessionImpl.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
// PATENTS file in the same directory.
99
//
1010

11-
#include "DebugServer2/GDBRemote/SlaveSessionImpl.h"
11+
#include "DebugServer2/GDBRemote/WorkerSessionImpl.h"
1212

1313
namespace ds2 {
1414
namespace GDBRemote {
1515

16-
SlaveSessionImpl::SlaveSessionImpl() = default;
16+
WorkerSessionImpl::WorkerSessionImpl() = default;
1717
} // namespace GDBRemote
1818
} // namespace ds2

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

+7-7
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#include "DebugServer2/GDBRemote/DebugSessionImpl.h"
1414
#include "DebugServer2/GDBRemote/PlatformSessionImpl.h"
1515
#include "DebugServer2/GDBRemote/ProtocolHelpers.h"
16-
#include "DebugServer2/GDBRemote/SlaveSessionImpl.h"
16+
#include "DebugServer2/GDBRemote/WorkerSessionImpl.h"
1717
#include "DebugServer2/Host/Platform.h"
1818
#include "DebugServer2/Host/QueueChannel.h"
1919
#include "DebugServer2/Host/Socket.h"
@@ -47,7 +47,7 @@ using ds2::GDBRemote::DebugSessionImpl;
4747
using ds2::GDBRemote::PlatformSessionImpl;
4848
using ds2::GDBRemote::Session;
4949
using ds2::GDBRemote::SessionDelegate;
50-
using ds2::GDBRemote::SlaveSessionImpl;
50+
using ds2::GDBRemote::WorkerSessionImpl;
5151
using ds2::Host::Platform;
5252
using ds2::Host::QueueChannel;
5353
using ds2::Host::Socket;
@@ -564,7 +564,7 @@ static int PlatformMain(int argc, char **argv) {
564564
} while (true);
565565
}
566566

567-
static int SlaveMain(int argc, char **argv) {
567+
static int WorkerMain(int argc, char **argv) {
568568
DS2ASSERT(argv[1][0] == 's');
569569

570570
ds2::OptParse opts;
@@ -581,7 +581,7 @@ static int SlaveMain(int argc, char **argv) {
581581
}
582582

583583
if (pid == 0) {
584-
// When in slave mode, output is suppressed but for standard error.
584+
// When in worker mode, output is suppressed but for standard error.
585585
close(0);
586586
close(1);
587587

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

591591
std::unique_ptr<Socket> client = server->accept();
592592

593-
SlaveSessionImpl impl;
593+
WorkerSessionImpl impl;
594594
return RunDebugServer(client.get(), &impl);
595595
} else {
596596
// Write to the standard output to let our parent know
@@ -666,8 +666,8 @@ int main(int argc, char **argv) {
666666
#if !defined(OS_WIN32)
667667
case 'p':
668668
return PlatformMain(argc, argv);
669-
case 's':
670-
return SlaveMain(argc, argv);
669+
case 'w':
670+
return WorkerMain(argc, argv);
671671
#endif
672672
case 'v':
673673
return VersionMain(argc, argv);

0 commit comments

Comments
 (0)