Skip to content

Commit de5627a

Browse files
committed
Adaptor -> Adapter in the tests
1 parent 1e5b4a5 commit de5627a

File tree

16 files changed

+61
-61
lines changed

16 files changed

+61
-61
lines changed

lldb/packages/Python/lldbsuite/test/test_categories.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"libc++": "Test for libc++ data formatters",
3232
"libstdcxx": "Test for libstdcxx data formatters",
3333
"lldb-server": "Tests related to lldb-server",
34-
"lldb-dap": "Tests for the Debug Adaptor Protocol with lldb-dap",
34+
"lldb-dap": "Tests for the Debug Adapter Protocol with lldb-dap",
3535
"llgs": "Tests for the gdb-server functionality of lldb-server",
3636
"pexpect": "Tests requiring the pexpect library to be available",
3737
"objc": "Tests related to the Objective-C programming language support",

lldb/packages/Python/lldbsuite/test/tools/lldb-dap/dap_server.py

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def read_packet(f, verbose=False, trace_file=None):
7676
if verbose:
7777
print('json: "%s"' % (json_str))
7878
if trace_file:
79-
trace_file.write("from adaptor:\n%s\n" % (json_str))
79+
trace_file.write("from adapter:\n%s\n" % (json_str))
8080
# Decode the JSON bytes into a python dictionary
8181
return json.loads(json_str)
8282

@@ -259,23 +259,23 @@ def handle_recv_packet(self, packet):
259259
def send_packet(self, command_dict, set_sequence=True):
260260
"""Take the "command_dict" python dictionary and encode it as a JSON
261261
string and send the contents as a packet to the VSCode debug
262-
adaptor"""
262+
adapter"""
263263
# Set the sequence ID for this command automatically
264264
if set_sequence:
265265
command_dict["seq"] = self.sequence
266266
self.sequence += 1
267267
# Encode our command dictionary as a JSON string
268268
json_str = json.dumps(command_dict, separators=(",", ":"))
269269
if self.trace_file:
270-
self.trace_file.write("to adaptor:\n%s\n" % (json_str))
270+
self.trace_file.write("to adapter:\n%s\n" % (json_str))
271271
length = len(json_str)
272272
if length > 0:
273273
# Send the encoded JSON packet and flush the 'send' file
274274
self.send.write(self.encode_content(json_str))
275275
self.send.flush()
276276

277277
def recv_packet(self, filter_type=None, filter_event=None, timeout=None):
278-
"""Get a JSON packet from the VSCode debug adaptor. This function
278+
"""Get a JSON packet from the VSCode debug adapter. This function
279279
assumes a thread that reads packets is running and will deliver
280280
any received packets by calling handle_recv_packet(...). This
281281
function will wait for the packet to arrive and return it when
@@ -1184,7 +1184,7 @@ def request_setInstructionBreakpoints(self, memory_reference=[]):
11841184
return self.send_recv(command_dict)
11851185

11861186

1187-
class DebugAdaptorServer(DebugCommunication):
1187+
class DebugAdapterServer(DebugCommunication):
11881188
def __init__(
11891189
self,
11901190
executable=None,
@@ -1196,7 +1196,7 @@ def __init__(
11961196
self.process = None
11971197
self.connection = None
11981198
if executable is not None:
1199-
process, connection = DebugAdaptorServer.launch(
1199+
process, connection = DebugAdapterServer.launch(
12001200
executable=executable, connection=connection, env=env, log_file=log_file
12011201
)
12021202
self.process = process
@@ -1224,12 +1224,12 @@ def __init__(
12241224

12251225
@classmethod
12261226
def launch(cls, /, executable, env=None, log_file=None, connection=None):
1227-
adaptor_env = os.environ.copy()
1227+
adapter_env = os.environ.copy()
12281228
if env is not None:
1229-
adaptor_env.update(env)
1229+
adapter_env.update(env)
12301230

12311231
if log_file:
1232-
adaptor_env["LLDBDAP_LOG"] = log_file
1232+
adapter_env["LLDBDAP_LOG"] = log_file
12331233
args = [executable]
12341234

12351235
if connection is not None:
@@ -1241,7 +1241,7 @@ def launch(cls, /, executable, env=None, log_file=None, connection=None):
12411241
stdin=subprocess.PIPE,
12421242
stdout=subprocess.PIPE,
12431243
stderr=subprocess.PIPE,
1244-
env=adaptor_env,
1244+
env=adapter_env,
12451245
)
12461246

12471247
if connection is None:
@@ -1271,7 +1271,7 @@ def get_pid(self):
12711271
return -1
12721272

12731273
def terminate(self):
1274-
super(DebugAdaptorServer, self).terminate()
1274+
super(DebugAdapterServer, self).terminate()
12751275
if self.process is not None:
12761276
self.process.terminate()
12771277
self.process.wait()
@@ -1347,7 +1347,7 @@ def run_vscode(dbg, args, options):
13471347
def main():
13481348
parser = optparse.OptionParser(
13491349
description=(
1350-
"A testing framework for the Visual Studio Code Debug Adaptor protocol"
1350+
"A testing framework for the Visual Studio Code Debug Adapter protocol"
13511351
)
13521352
)
13531353

@@ -1357,7 +1357,7 @@ def main():
13571357
dest="vscode_path",
13581358
help=(
13591359
"The path to the command line program that implements the "
1360-
"Visual Studio Code Debug Adaptor protocol."
1360+
"Visual Studio Code Debug Adapter protocol."
13611361
),
13621362
default=None,
13631363
)
@@ -1407,7 +1407,7 @@ def main():
14071407
dest="replay",
14081408
help=(
14091409
"Specify a file containing a packet log to replay with the "
1410-
"current Visual Studio Code Debug Adaptor executable."
1410+
"current Visual Studio Code Debug Adapter executable."
14111411
),
14121412
default=None,
14131413
)
@@ -1418,7 +1418,7 @@ def main():
14181418
action="store_true",
14191419
dest="debug",
14201420
default=False,
1421-
help="Pause waiting for a debugger to attach to the debug adaptor",
1421+
help="Pause waiting for a debugger to attach to the debug adapter",
14221422
)
14231423

14241424
parser.add_option(
@@ -1581,11 +1581,11 @@ def main():
15811581
if options.vscode_path is None and options.connection is None:
15821582
print(
15831583
"error: must either specify a path to a Visual Studio Code "
1584-
"Debug Adaptor vscode executable path using the --vscode "
1584+
"Debug Adapter vscode executable path using the --vscode "
15851585
"option, or using the --connection option"
15861586
)
15871587
return
1588-
dbg = DebugAdaptorServer(
1588+
dbg = DebugAdapterServer(
15891589
executable=options.vscode_path, connection=options.connection
15901590
)
15911591
if options.debug:

lldb/packages/Python/lldbsuite/test/tools/lldb-dap/lldbdap_testcase.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,23 @@ class DAPTestCaseBase(TestBase):
1414
timeoutval = 10 * (10 if ("ASAN_OPTIONS" in os.environ) else 1)
1515
NO_DEBUG_INFO_TESTCASE = True
1616

17-
def create_debug_adaptor(self, lldbDAPEnv=None, connection=None):
18-
"""Create the Visual Studio Code debug adaptor"""
17+
def create_debug_adapter(self, lldbDAPEnv=None, connection=None):
18+
"""Create the Visual Studio Code debug adapter"""
1919
self.assertTrue(
2020
is_exe(self.lldbDAPExec), "lldb-dap must exist and be executable"
2121
)
2222
log_file_path = self.getBuildArtifact("dap.txt")
23-
self.dap_server = dap_server.DebugAdaptorServer(
23+
self.dap_server = dap_server.DebugAdapterServer(
2424
executable=self.lldbDAPExec,
2525
connection=connection,
2626
init_commands=self.setUpCommands(),
2727
log_file=log_file_path,
2828
env=lldbDAPEnv,
2929
)
3030

31-
def build_and_create_debug_adaptor(self, lldbDAPEnv=None):
31+
def build_and_create_debug_adapter(self, lldbDAPEnv=None):
3232
self.build()
33-
self.create_debug_adaptor(lldbDAPEnv)
33+
self.create_debug_adapter(lldbDAPEnv)
3434

3535
def set_source_breakpoints(self, source_path, lines, data=None):
3636
"""Sets source breakpoints and returns an array of strings containing
@@ -324,11 +324,11 @@ def attach(
324324
gdbRemotePort=None,
325325
gdbRemoteHostname=None,
326326
):
327-
"""Build the default Makefile target, create the DAP debug adaptor,
327+
"""Build the default Makefile target, create the DAP debug adapter,
328328
and attach to the process.
329329
"""
330330

331-
# Make sure we disconnect and terminate the DAP debug adaptor even
331+
# Make sure we disconnect and terminate the DAP debug adapter even
332332
# if we throw an exception during the test case.
333333
def cleanup():
334334
if disconnectAutomatically:
@@ -479,10 +479,10 @@ def build_and_launch(
479479
launchCommands=None,
480480
expectFailure=False,
481481
):
482-
"""Build the default Makefile target, create the DAP debug adaptor,
482+
"""Build the default Makefile target, create the DAP debug adapter,
483483
and launch the process.
484484
"""
485-
self.build_and_create_debug_adaptor(lldbDAPEnv)
485+
self.build_and_create_debug_adapter(lldbDAPEnv)
486486
self.assertTrue(os.path.exists(program), "executable must exist")
487487

488488
return self.launch(

lldb/test/API/tools/lldb-dap/attach/TestDAP_attach.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def test_by_pid(self):
4444
"""
4545
Tests attaching to a process by process ID.
4646
"""
47-
self.build_and_create_debug_adaptor()
47+
self.build_and_create_debug_adapter()
4848
program = self.getBuildArtifact("a.out")
4949
self.process = subprocess.Popen(
5050
[program],
@@ -60,7 +60,7 @@ def test_by_name(self):
6060
"""
6161
Tests attaching to a process by process name.
6262
"""
63-
self.build_and_create_debug_adaptor()
63+
self.build_and_create_debug_adapter()
6464
orig_program = self.getBuildArtifact("a.out")
6565
# Since we are going to attach by process name, we need a unique
6666
# process name that has minimal chance to match a process that is
@@ -101,7 +101,7 @@ def test_by_name_waitFor(self):
101101
next instance of a process to be launched, ingoring all current
102102
ones.
103103
"""
104-
self.build_and_create_debug_adaptor()
104+
self.build_and_create_debug_adapter()
105105
program = self.getBuildArtifact("a.out")
106106
self.spawn_thread = threading.Thread(
107107
target=spawn_and_wait,
@@ -137,7 +137,7 @@ def test_commands(self):
137137
"terminateCommands" are a list of LLDB commands that get executed when
138138
the debugger session terminates.
139139
"""
140-
self.build_and_create_debug_adaptor()
140+
self.build_and_create_debug_adapter()
141141
program = self.getBuildArtifact("a.out")
142142
# Here we just create a target and launch the process as a way to test
143143
# if we are able to use attach commands to create any kind of a target
@@ -211,7 +211,7 @@ def test_terminate_commands(self):
211211
Tests that the "terminateCommands", that can be passed during
212212
attach, are run when the debugger is disconnected.
213213
"""
214-
self.build_and_create_debug_adaptor()
214+
self.build_and_create_debug_adapter()
215215
program = self.getBuildArtifact("a.out")
216216
# Here we just create a target and launch the process as a way to test
217217
# if we are able to use attach commands to create any kind of a target

lldb/test/API/tools/lldb-dap/attach/TestDAP_attachByPortNum.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def test_by_port(self):
6060
"""
6161
Tests attaching to a process by port.
6262
"""
63-
self.build_and_create_debug_adaptor()
63+
self.build_and_create_debug_adapter()
6464
program = self.getBuildArtifact("a.out")
6565

6666
debug_server_tool = self.getBuiltinDebugServerTool()
@@ -92,7 +92,7 @@ def test_by_port_and_pid(self):
9292
"""
9393
Tests attaching to a process by process ID and port number.
9494
"""
95-
self.build_and_create_debug_adaptor()
95+
self.build_and_create_debug_adapter()
9696
program = self.getBuildArtifact("a.out")
9797

9898
# It is not necessary to launch "lldb-server" to obtain the actual port and pid for attaching.
@@ -120,7 +120,7 @@ def test_by_invalid_port(self):
120120
"""
121121
Tests attaching to a process by invalid port number 0.
122122
"""
123-
self.build_and_create_debug_adaptor()
123+
self.build_and_create_debug_adapter()
124124
program = self.getBuildArtifact("a.out")
125125

126126
port = 0
@@ -139,7 +139,7 @@ def test_by_illegal_port(self):
139139
"""
140140
Tests attaching to a process by illegal/greater port number 65536
141141
"""
142-
self.build_and_create_debug_adaptor()
142+
self.build_and_create_debug_adapter()
143143
program = self.getBuildArtifact("a.out")
144144

145145
port = 65536

lldb/test/API/tools/lldb-dap/breakpoint-events/TestDAP_breakpointEvents.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def test_breakpoint_events(self):
4141
foo_bp1_line = line_number("foo.cpp", "foo breakpoint 1")
4242
foo_bp2_line = line_number("foo.cpp", "foo breakpoint 2")
4343

44-
# Visual Studio Code Debug Adaptors have no way to specify the file
44+
# Visual Studio Code Debug Adapters have no way to specify the file
4545
# without launching or attaching to a process, so we must start a
4646
# process in order to be able to set breakpoints.
4747
program = self.getBuildArtifact("a.out")

lldb/test/API/tools/lldb-dap/breakpoint/TestDAP_setBreakpoints.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def test_source_map(self):
2727
with the corresponding source maps to have breakpoints and frames
2828
working.
2929
"""
30-
self.build_and_create_debug_adaptor()
30+
self.build_and_create_debug_adapter()
3131

3232
other_basename = "other-copy.c"
3333
other_path = self.getBuildArtifact(other_basename)
@@ -100,7 +100,7 @@ def test_source_map(self):
100100
@skipIfWindows
101101
def test_set_and_clear(self):
102102
"""Tests setting and clearing source file and line breakpoints.
103-
This packet is a bit tricky on the debug adaptor side since there
103+
This packet is a bit tricky on the debug adapter side since there
104104
is no "clearBreakpoints" packet. Source file and line breakpoints
105105
are set by sending a "setBreakpoints" packet with a source file
106106
specified and zero or more source lines. If breakpoints have been
@@ -116,7 +116,7 @@ def test_set_and_clear(self):
116116
third_line = line_number("main.cpp", "break 14")
117117
lines = [first_line, third_line, second_line]
118118

119-
# Visual Studio Code Debug Adaptors have no way to specify the file
119+
# Visual Studio Code Debug Adapters have no way to specify the file
120120
# without launching or attaching to a process, so we must start a
121121
# process in order to be able to set breakpoints.
122122
program = self.getBuildArtifact("a.out")
@@ -257,7 +257,7 @@ def test_clear_breakpoints_unset_breakpoints(self):
257257
line_number("main.cpp", "break 13"),
258258
]
259259

260-
# Visual Studio Code Debug Adaptors have no way to specify the file
260+
# Visual Studio Code Debug Adapters have no way to specify the file
261261
# without launching or attaching to a process, so we must start a
262262
# process in order to be able to set breakpoints.
263263
program = self.getBuildArtifact("a.out")

lldb/test/API/tools/lldb-dap/breakpoint/TestDAP_setExceptionBreakpoints.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class TestDAP_setExceptionBreakpoints(lldbdap_testcase.DAPTestCaseBase):
1414
@skipIfWindows
1515
def test_functionality(self):
1616
"""Tests setting and clearing exception breakpoints.
17-
This packet is a bit tricky on the debug adaptor side since there
17+
This packet is a bit tricky on the debug adapter side since there
1818
is no "clear exception breakpoints" packet. Exception breakpoints
1919
are set by sending a "setExceptionBreakpoints" packet with zero or
2020
more exception filters. If exception breakpoints have been set
@@ -26,7 +26,7 @@ def test_functionality(self):
2626
and the functionality of each breakpoint, like 'conditions' and
2727
x'hitCondition' settings.
2828
"""
29-
# Visual Studio Code Debug Adaptors have no way to specify the file
29+
# Visual Studio Code Debug Adapters have no way to specify the file
3030
# without launching or attaching to a process, so we must start a
3131
# process in order to be able to set breakpoints.
3232
program = self.getBuildArtifact("a.out")

lldb/test/API/tools/lldb-dap/breakpoint/TestDAP_setFunctionBreakpoints.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class TestDAP_setFunctionBreakpoints(lldbdap_testcase.DAPTestCaseBase):
1414
@skipIfWindows
1515
def test_set_and_clear(self):
1616
"""Tests setting and clearing function breakpoints.
17-
This packet is a bit tricky on the debug adaptor side since there
17+
This packet is a bit tricky on the debug adapter side since there
1818
is no "clearFunction Breakpoints" packet. Function breakpoints
1919
are set by sending a "setFunctionBreakpoints" packet with zero or
2020
more function names. If function breakpoints have been set before,
@@ -25,7 +25,7 @@ def test_set_and_clear(self):
2525
correctly. It doesn't test hitting breakpoints and the functionality
2626
of each breakpoint, like 'conditions' and 'hitCondition' settings.
2727
"""
28-
# Visual Studio Code Debug Adaptors have no way to specify the file
28+
# Visual Studio Code Debug Adapters have no way to specify the file
2929
# without launching or attaching to a process, so we must start a
3030
# process in order to be able to set breakpoints.
3131
program = self.getBuildArtifact("a.out")

lldb/test/API/tools/lldb-dap/commands/TestDAP_commands.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def test_command_directive_abort_on_error_attach_commands(self):
7575
"settings set target.show-hex-variable-values-with-leading-zeroes false"
7676
)
7777
command_abort_on_error = "settings set foo bar"
78-
self.build_and_create_debug_adaptor()
78+
self.build_and_create_debug_adapter()
7979
self.attach(
8080
program,
8181
attachCommands=["?!" + command_quiet, "!" + command_abort_on_error],

0 commit comments

Comments
 (0)