[Lldb-commits] [lldb] [lldb] Rename lldb-vscode to lldb-dap (PR #69264)

via lldb-commits lldb-commits at lists.llvm.org
Mon Oct 16 16:09:45 PDT 2023


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-lldb

Author: Jonas Devlieghere (JDevlieghere)

<details>
<summary>Changes</summary>

Rename lldb-vscode to lldb-dap. This change is largely mechanical. The following substitutions cover the majority of the changes in this commit:

  s/VSCODE/DAP/
  s/VSCode/DAP/
  s/vscode/dap/
  s/g_vsc/g_dap/

Discourse RFC: https://discourse.llvm.org/t/rfc-rename-lldb-vscode-to-lldb-dap/74075/

---

Patch is 275.66 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/69264.diff


130 Files Affected:

- (modified) lldb/packages/Python/lldbsuite/test/dotest.py (+10-10) 
- (modified) lldb/packages/Python/lldbsuite/test/lldbtest.py (+3-3) 
- (modified) lldb/packages/Python/lldbsuite/test/test_categories.py (+1-1) 
- (renamed) lldb/packages/Python/lldbsuite/test/tools/lldb-dap/dap.py (+1-1) 
- (renamed) lldb/packages/Python/lldbsuite/test/tools/lldb-dap/lldbdap_testcase.py (+52-52) 
- (renamed) lldb/test/API/tools/lldb-dap/attach/Makefile () 
- (renamed) lldb/test/API/tools/lldb-dap/attach/TestDAP_attach.py (+8-8) 
- (renamed) lldb/test/API/tools/lldb-dap/attach/main.c () 
- (renamed) lldb/test/API/tools/lldb-dap/breakpoint-events/Makefile () 
- (renamed) lldb/test/API/tools/lldb-dap/breakpoint-events/TestDAP_breakpointEvents.py (+15-15) 
- (renamed) lldb/test/API/tools/lldb-dap/breakpoint-events/foo.cpp () 
- (renamed) lldb/test/API/tools/lldb-dap/breakpoint-events/foo.h () 
- (renamed) lldb/test/API/tools/lldb-dap/breakpoint-events/main.cpp () 
- (renamed) lldb/test/API/tools/lldb-dap/breakpoint/Makefile () 
- (renamed) lldb/test/API/tools/lldb-dap/breakpoint/TestDAP_logpoints.py (+13-13) 
- (renamed) lldb/test/API/tools/lldb-dap/breakpoint/TestDAP_setBreakpoints.py (+25-25) 
- (renamed) lldb/test/API/tools/lldb-dap/breakpoint/TestDAP_setExceptionBreakpoints.py (+5-5) 
- (renamed) lldb/test/API/tools/lldb-dap/breakpoint/TestDAP_setFunctionBreakpoints.py (+14-14) 
- (renamed) lldb/test/API/tools/lldb-dap/breakpoint/main.cpp () 
- (renamed) lldb/test/API/tools/lldb-dap/breakpoint/other.c () 
- (added) lldb/test/API/tools/lldb-dap/categories (+1) 
- (renamed) lldb/test/API/tools/lldb-dap/completions/Makefile () 
- (renamed) lldb/test/API/tools/lldb-dap/completions/TestDAP_completions.py (+18-18) 
- (renamed) lldb/test/API/tools/lldb-dap/completions/main.cpp () 
- (renamed) lldb/test/API/tools/lldb-dap/console/Makefile () 
- (renamed) lldb/test/API/tools/lldb-dap/console/TestDAP_console.py (+9-9) 
- (renamed) lldb/test/API/tools/lldb-dap/console/TestDAP_redirection_to_console.py (+6-6) 
- (renamed) lldb/test/API/tools/lldb-dap/console/main.cpp () 
- (renamed) lldb/test/API/tools/lldb-dap/coreFile/TestDAP_coreFile.py (+5-5) 
- (renamed) lldb/test/API/tools/lldb-dap/coreFile/linux-x86_64.core () 
- (renamed) lldb/test/API/tools/lldb-dap/coreFile/linux-x86_64.out () 
- (renamed) lldb/test/API/tools/lldb-dap/coreFile/main.c () 
- (renamed) lldb/test/API/tools/lldb-dap/correct-thread/Makefile () 
- (renamed) lldb/test/API/tools/lldb-dap/correct-thread/TestDAP_correct_thread.py (+6-6) 
- (renamed) lldb/test/API/tools/lldb-dap/correct-thread/main.c () 
- (renamed) lldb/test/API/tools/lldb-dap/disassemble/Makefile () 
- (renamed) lldb/test/API/tools/lldb-dap/disassemble/TestDAP_disassemble.py (+4-4) 
- (renamed) lldb/test/API/tools/lldb-dap/disassemble/main.c () 
- (renamed) lldb/test/API/tools/lldb-dap/disconnect/Makefile () 
- (renamed) lldb/test/API/tools/lldb-dap/disconnect/TestDAP_disconnect.py (+8-8) 
- (renamed) lldb/test/API/tools/lldb-dap/disconnect/main.cpp () 
- (renamed) lldb/test/API/tools/lldb-dap/evaluate/Makefile () 
- (renamed) lldb/test/API/tools/lldb-dap/evaluate/TestDAP_evaluate.py (+6-6) 
- (renamed) lldb/test/API/tools/lldb-dap/evaluate/foo.cpp () 
- (renamed) lldb/test/API/tools/lldb-dap/evaluate/foo.h () 
- (renamed) lldb/test/API/tools/lldb-dap/evaluate/main.cpp () 
- (renamed) lldb/test/API/tools/lldb-dap/exception/Makefile () 
- (renamed) lldb/test/API/tools/lldb-dap/exception/TestDAP_exception.py (+4-4) 
- (renamed) lldb/test/API/tools/lldb-dap/exception/main.cpp () 
- (renamed) lldb/test/API/tools/lldb-dap/launch/Makefile () 
- (renamed) lldb/test/API/tools/lldb-dap/launch/TestDAP_launch.py (+17-17) 
- (renamed) lldb/test/API/tools/lldb-dap/launch/main.c () 
- (renamed) lldb/test/API/tools/lldb-dap/module/Makefile () 
- (renamed) lldb/test/API/tools/lldb-dap/module/TestDAP_module.py (+10-10) 
- (renamed) lldb/test/API/tools/lldb-dap/module/foo.cpp () 
- (renamed) lldb/test/API/tools/lldb-dap/module/foo.h () 
- (renamed) lldb/test/API/tools/lldb-dap/module/main.cpp () 
- (renamed) lldb/test/API/tools/lldb-dap/optimized/Makefile () 
- (renamed) lldb/test/API/tools/lldb-dap/optimized/TestDAP_optimized.py (+7-7) 
- (renamed) lldb/test/API/tools/lldb-dap/optimized/main.cpp () 
- (renamed) lldb/test/API/tools/lldb-dap/restart/Makefile () 
- (renamed) lldb/test/API/tools/lldb-dap/restart/TestDAP_restart.py (+18-18) 
- (renamed) lldb/test/API/tools/lldb-dap/restart/TestDAP_restart_runInTerminal.py (+15-15) 
- (renamed) lldb/test/API/tools/lldb-dap/restart/main.c () 
- (renamed) lldb/test/API/tools/lldb-dap/runInTerminal/Makefile () 
- (renamed) lldb/test/API/tools/lldb-dap/runInTerminal/TestDAP_runInTerminal.py (+19-19) 
- (renamed) lldb/test/API/tools/lldb-dap/runInTerminal/main.c () 
- (renamed) lldb/test/API/tools/lldb-dap/stackTrace/Makefile () 
- (renamed) lldb/test/API/tools/lldb-dap/stackTrace/TestDAP_stackTrace.py (+4-4) 
- (renamed) lldb/test/API/tools/lldb-dap/stackTrace/main.c () 
- (renamed) lldb/test/API/tools/lldb-dap/stackTraceMissingFunctionName/Makefile () 
- (renamed) lldb/test/API/tools/lldb-dap/stackTraceMissingFunctionName/TestDAP_stackTraceMissingFunctionName.py (+4-4) 
- (renamed) lldb/test/API/tools/lldb-dap/stackTraceMissingFunctionName/main.cpp () 
- (renamed) lldb/test/API/tools/lldb-dap/startDebugging/Makefile () 
- (renamed) lldb/test/API/tools/lldb-dap/startDebugging/TestDAP_startDebugging.py (+8-8) 
- (renamed) lldb/test/API/tools/lldb-dap/startDebugging/main.c () 
- (renamed) lldb/test/API/tools/lldb-dap/step/Makefile () 
- (renamed) lldb/test/API/tools/lldb-dap/step/TestDAP_step.py (+5-5) 
- (renamed) lldb/test/API/tools/lldb-dap/step/main.cpp () 
- (renamed) lldb/test/API/tools/lldb-dap/stop-hooks/Makefile () 
- (renamed) lldb/test/API/tools/lldb-dap/stop-hooks/TestDAP_stop_hooks.py (+5-5) 
- (renamed) lldb/test/API/tools/lldb-dap/stop-hooks/main.c () 
- (renamed) lldb/test/API/tools/lldb-dap/terminated-event/Makefile () 
- (renamed) lldb/test/API/tools/lldb-dap/terminated-event/TestDAP_terminatedEvent.py (+6-6) 
- (renamed) lldb/test/API/tools/lldb-dap/terminated-event/foo.cpp () 
- (renamed) lldb/test/API/tools/lldb-dap/terminated-event/foo.h () 
- (renamed) lldb/test/API/tools/lldb-dap/terminated-event/main.cpp () 
- (renamed) lldb/test/API/tools/lldb-dap/variables/Makefile () 
- (renamed) lldb/test/API/tools/lldb-dap/variables/TestDAP_variables.py (+44-44) 
- (renamed) lldb/test/API/tools/lldb-dap/variables/main.cpp () 
- (removed) lldb/test/API/tools/lldb-vscode/categories (-1) 
- (renamed) lldb/test/Shell/DAP/TestOptions.test (+1-1) 
- (modified) lldb/test/Shell/helper/toolchain.py (+1-1) 
- (modified) lldb/tools/CMakeLists.txt (+1-1) 
- (renamed) lldb/tools/lldb-dap/BreakpointBase.cpp (+6-6) 
- (renamed) lldb/tools/lldb-dap/BreakpointBase.h (+4-4) 
- (renamed) lldb/tools/lldb-dap/CMakeLists.txt (+8-8) 
- (renamed) lldb/tools/lldb-dap/DAP.cpp (+77-79) 
- (renamed) lldb/tools/lldb-dap/DAP.h (+13-13) 
- (renamed) lldb/tools/lldb-dap/DAPForward.h (+5-5) 
- (renamed) lldb/tools/lldb-dap/ExceptionBreakpoint.cpp (+5-5) 
- (renamed) lldb/tools/lldb-dap/ExceptionBreakpoint.h (+4-4) 
- (renamed) lldb/tools/lldb-dap/FifoFiles.cpp (+2-2) 
- (renamed) lldb/tools/lldb-dap/FifoFiles.h (+5-5) 
- (renamed) lldb/tools/lldb-dap/FunctionBreakpoint.cpp (+4-4) 
- (renamed) lldb/tools/lldb-dap/FunctionBreakpoint.h (+4-4) 
- (renamed) lldb/tools/lldb-dap/IOStream.cpp (+1-1) 
- (renamed) lldb/tools/lldb-dap/IOStream.h (+4-4) 
- (renamed) lldb/tools/lldb-dap/JSONUtils.cpp (+16-16) 
- (renamed) lldb/tools/lldb-dap/JSONUtils.h (+19-22) 
- (renamed) lldb/tools/lldb-dap/LLDBUtils.cpp (+5-5) 
- (renamed) lldb/tools/lldb-dap/LLDBUtils.h (+13-13) 
- (renamed) lldb/tools/lldb-dap/Options.td (+3-3) 
- (renamed) lldb/tools/lldb-dap/OutputRedirector.cpp (+2-2) 
- (renamed) lldb/tools/lldb-dap/OutputRedirector.h (+5-5) 
- (renamed) lldb/tools/lldb-dap/ProgressEvent.cpp (+1-1) 
- (renamed) lldb/tools/lldb-dap/ProgressEvent.h (+4-8) 
- (renamed) lldb/tools/lldb-dap/README.md (+37-36) 
- (renamed) lldb/tools/lldb-dap/RunInTerminal.cpp (+3-3) 
- (renamed) lldb/tools/lldb-dap/RunInTerminal.h (+5-5) 
- (renamed) lldb/tools/lldb-dap/SourceBreakpoint.cpp (+4-4) 
- (renamed) lldb/tools/lldb-dap/SourceBreakpoint.h (+4-4) 
- (renamed) lldb/tools/lldb-dap/lldb-dap-Info.plist.in (+2-2) 
- (renamed) lldb/tools/lldb-dap/lldb-dap.cpp (+308-309) 
- (renamed) lldb/tools/lldb-dap/lldb-vscode/package.json (+7-7) 
- (renamed) lldb/tools/lldb-dap/lldb-vscode/syntaxes/disassembly.json () 
- (renamed) lldb/tools/lldb-dap/syntaxes/arm.disasm () 
- (renamed) lldb/tools/lldb-dap/syntaxes/arm64.disasm () 
- (renamed) lldb/tools/lldb-dap/syntaxes/x86.disasm () 
- (modified) llvm/docs/ReleaseNotes.rst (+1) 


``````````diff
diff --git a/lldb/packages/Python/lldbsuite/test/dotest.py b/lldb/packages/Python/lldbsuite/test/dotest.py
index a27d8cf321f8293..a639714480cf4eb 100644
--- a/lldb/packages/Python/lldbsuite/test/dotest.py
+++ b/lldb/packages/Python/lldbsuite/test/dotest.py
@@ -485,15 +485,15 @@ def setupSysPath():
     os.environ["LLDB_SRC"] = lldbsuite.lldb_root
 
     pluginPath = os.path.join(scriptPath, "plugins")
-    toolsLLDBVSCode = os.path.join(scriptPath, "tools", "lldb-vscode")
+    toolsLLDBDAP = os.path.join(scriptPath, "tools", "lldb-dap")
     toolsLLDBServerPath = os.path.join(scriptPath, "tools", "lldb-server")
     intelpt = os.path.join(scriptPath, "tools", "intelpt")
 
     # Insert script dir, plugin dir and lldb-server dir to the sys.path.
     sys.path.insert(0, pluginPath)
-    # Adding test/tools/lldb-vscode to the path makes it easy to
-    # "import lldb_vscode_testcase" from the VSCode tests
-    sys.path.insert(0, toolsLLDBVSCode)
+    # Adding test/tools/lldb-dap to the path makes it easy to
+    # "import lldb_dap_testcase" from the DAP tests
+    sys.path.insert(0, toolsLLDBDAP)
     # Adding test/tools/lldb-server to the path makes it easy
     # to "import lldbgdbserverutils" from the lldb-server tests
     sys.path.insert(0, toolsLLDBServerPath)
@@ -538,15 +538,15 @@ def setupSysPath():
 
     lldbDir = os.path.dirname(lldbtest_config.lldbExec)
 
-    lldbVSCodeExec = os.path.join(lldbDir, "lldb-vscode")
-    if is_exe(lldbVSCodeExec):
-        os.environ["LLDBVSCODE_EXEC"] = lldbVSCodeExec
+    lldbDAPExec = os.path.join(lldbDir, "lldb-dap")
+    if is_exe(lldbDAPExec):
+        os.environ["LLDBDAP_EXEC"] = lldbDAPExec
     else:
-        if not configuration.shouldSkipBecauseOfCategories(["lldb-vscode"]):
+        if not configuration.shouldSkipBecauseOfCategories(["lldb-dap"]):
             print(
-                "The 'lldb-vscode' executable cannot be located.  The lldb-vscode tests can not be run as a result."
+                "The 'lldb-dap' executable cannot be located.  The lldb-dap tests can not be run as a result."
             )
-            configuration.skip_categories.append("lldb-vscode")
+            configuration.skip_categories.append("lldb-dap")
 
     lldbPythonDir = None  # The directory that contains 'lldb/__init__.py'
 
diff --git a/lldb/packages/Python/lldbsuite/test/lldbtest.py b/lldb/packages/Python/lldbsuite/test/lldbtest.py
index c8670b208ec3f0c..6d736a56ecb89bf 100644
--- a/lldb/packages/Python/lldbsuite/test/lldbtest.py
+++ b/lldb/packages/Python/lldbsuite/test/lldbtest.py
@@ -801,10 +801,10 @@ def setUp(self):
         else:
             self.libcxxPath = None
 
-        if "LLDBVSCODE_EXEC" in os.environ:
-            self.lldbVSCodeExec = os.environ["LLDBVSCODE_EXEC"]
+        if "LLDBDAP_EXEC" in os.environ:
+            self.lldbDAPExec = os.environ["LLDBDAP_EXEC"]
         else:
-            self.lldbVSCodeExec = None
+            self.lldbDAPExec = None
 
         self.lldbOption = " ".join("-o '" + s + "'" for s in self.setUpCommands())
 
diff --git a/lldb/packages/Python/lldbsuite/test/test_categories.py b/lldb/packages/Python/lldbsuite/test/test_categories.py
index 3883c4de5e19957..3f8de175e29df3f 100644
--- a/lldb/packages/Python/lldbsuite/test/test_categories.py
+++ b/lldb/packages/Python/lldbsuite/test/test_categories.py
@@ -31,7 +31,7 @@
     "libc++": "Test for libc++ data formatters",
     "libstdcxx": "Test for libstdcxx data formatters",
     "lldb-server": "Tests related to lldb-server",
-    "lldb-vscode": "Visual Studio Code debug adaptor tests",
+    "lldb-dap": "Tests for the Debug Adaptor Protocol with lldb-dap",
     "llgs": "Tests for the gdb-server functionality of lldb-server",
     "objc": "Tests related to the Objective-C programming language support",
     "pyapi": "Tests related to the Python API",
diff --git a/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/vscode.py b/lldb/packages/Python/lldbsuite/test/tools/lldb-dap/dap.py
similarity index 99%
rename from lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/vscode.py
rename to lldb/packages/Python/lldbsuite/test/tools/lldb-dap/dap.py
index 5ee0800b27a5699..5c4a02114643517 100644
--- a/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/vscode.py
+++ b/lldb/packages/Python/lldbsuite/test/tools/lldb-dap/dap.py
@@ -1024,7 +1024,7 @@ def __init__(
                 adaptor_env.update(env)
 
             if log_file:
-                adaptor_env["LLDBVSCODE_LOG"] = log_file
+                adaptor_env["LLDBDAP_LOG"] = log_file
             self.process = subprocess.Popen(
                 [executable],
                 stdin=subprocess.PIPE,
diff --git a/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/lldbvscode_testcase.py b/lldb/packages/Python/lldbsuite/test/tools/lldb-dap/lldbdap_testcase.py
similarity index 82%
rename from lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/lldbvscode_testcase.py
rename to lldb/packages/Python/lldbsuite/test/tools/lldb-dap/lldbdap_testcase.py
index 8cd4e8454c89099..7fda80d27312bea 100644
--- a/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/lldbvscode_testcase.py
+++ b/lldb/packages/Python/lldbsuite/test/tools/lldb-dap/lldbdap_testcase.py
@@ -1,29 +1,29 @@
 import os
 import time
 
-import vscode
+import dap
 from lldbsuite.test.lldbtest import *
 
 
-class VSCodeTestCaseBase(TestBase):
+class DAPTestCaseBase(TestBase):
     NO_DEBUG_INFO_TESTCASE = True
 
-    def create_debug_adaptor(self, lldbVSCodeEnv=None):
+    def create_debug_adaptor(self, lldbDAPEnv=None):
         """Create the Visual Studio Code debug adaptor"""
         self.assertTrue(
-            is_exe(self.lldbVSCodeExec), "lldb-vscode must exist and be executable"
+            is_exe(self.lldbDAPExec), "lldb-dap must exist and be executable"
         )
-        log_file_path = self.getBuildArtifact("vscode.txt")
-        self.vscode = vscode.DebugAdaptor(
-            executable=self.lldbVSCodeExec,
+        log_file_path = self.getBuildArtifact("dap.txt")
+        self.dap = dap.DebugAdaptor(
+            executable=self.lldbDAPExec,
             init_commands=self.setUpCommands(),
             log_file=log_file_path,
-            env=lldbVSCodeEnv,
+            env=lldbDAPEnv,
         )
 
-    def build_and_create_debug_adaptor(self, lldbVSCodeEnv=None):
+    def build_and_create_debug_adaptor(self, lldbDAPEnv=None):
         self.build()
-        self.create_debug_adaptor(lldbVSCodeEnv)
+        self.create_debug_adaptor(lldbDAPEnv)
 
     def set_source_breakpoints(self, source_path, lines, data=None):
         """Sets source breakpoints and returns an array of strings containing
@@ -32,7 +32,7 @@ def set_source_breakpoints(self, source_path, lines, data=None):
         Each object in data is 1:1 mapping with the entry in lines.
         It contains optional location/hitCondition/logMessage parameters.
         """
-        response = self.vscode.request_setBreakpoints(source_path, lines, data)
+        response = self.dap.request_setBreakpoints(source_path, lines, data)
         if response is None:
             return []
         breakpoints = response["body"]["breakpoints"]
@@ -46,7 +46,7 @@ def set_function_breakpoints(self, functions, condition=None, hitCondition=None)
         and returns an array of strings containing the breakpoint IDs
         ("1", "2") for each breakpoint that was set.
         """
-        response = self.vscode.request_setFunctionBreakpoints(
+        response = self.dap.request_setFunctionBreakpoints(
             functions, condition=condition, hitCondition=hitCondition
         )
         if response is None:
@@ -70,7 +70,7 @@ def verify_breakpoint_hit(self, breakpoint_ids):
         "breakpoint_ids" should be a list of breakpoint ID strings
         (["1", "2"]). The return value from self.set_source_breakpoints()
         or self.set_function_breakpoints() can be passed to this function"""
-        stopped_events = self.vscode.wait_for_stopped()
+        stopped_events = self.dap.wait_for_stopped()
         for stopped_event in stopped_events:
             if "body" in stopped_event:
                 body = stopped_event["body"]
@@ -83,7 +83,7 @@ def verify_breakpoint_hit(self, breakpoint_ids):
                 # Descriptions for breakpoints will be in the form
                 # "breakpoint 1.1", so look for any description that matches
                 # ("breakpoint 1.") in the description field as verification
-                # that one of the breakpoint locations was hit. VSCode doesn't
+                # that one of the breakpoint locations was hit. DAP doesn't
                 # allow breakpoints to have multiple locations, but LLDB does.
                 # So when looking at the description we just want to make sure
                 # the right breakpoint matches and not worry about the actual
@@ -100,7 +100,7 @@ def verify_stop_exception_info(self, expected_description):
         reason is 'exception' and that the description matches
         'expected_description'
         """
-        stopped_events = self.vscode.wait_for_stopped()
+        stopped_events = self.dap.wait_for_stopped()
         for stopped_event in stopped_events:
             if "body" in stopped_event:
                 body = stopped_event["body"]
@@ -150,7 +150,7 @@ def get_dict_value(self, d, key_path):
     def get_stackFrames_and_totalFramesCount(
         self, threadId=None, startFrame=None, levels=None, dump=False
     ):
-        response = self.vscode.request_stackTrace(
+        response = self.dap.request_stackTrace(
             threadId=threadId, startFrame=startFrame, levels=levels, dump=dump
         )
         if response:
@@ -185,16 +185,16 @@ def get_source_and_line(self, threadId=None, frameIndex=0):
         return ("", 0)
 
     def get_stdout(self, timeout=0.0):
-        return self.vscode.get_output("stdout", timeout=timeout)
+        return self.dap.get_output("stdout", timeout=timeout)
 
     def get_console(self, timeout=0.0):
-        return self.vscode.get_output("console", timeout=timeout)
+        return self.dap.get_output("console", timeout=timeout)
 
     def collect_console(self, duration):
-        return self.vscode.collect_output("console", duration=duration)
+        return self.dap.collect_output("console", duration=duration)
 
     def get_local_as_int(self, name, threadId=None):
-        value = self.vscode.get_local_variable_value(name, threadId=threadId)
+        value = self.dap.get_local_variable_value(name, threadId=threadId)
         if value.startswith("0x"):
             return int(value, 16)
         elif value.startswith("0"):
@@ -204,48 +204,48 @@ def get_local_as_int(self, name, threadId=None):
 
     def set_local(self, name, value, id=None):
         """Set a top level local variable only."""
-        return self.vscode.request_setVariable(1, name, str(value), id=id)
+        return self.dap.request_setVariable(1, name, str(value), id=id)
 
     def set_global(self, name, value, id=None):
         """Set a top level global variable only."""
-        return self.vscode.request_setVariable(2, name, str(value), id=id)
+        return self.dap.request_setVariable(2, name, str(value), id=id)
 
     def stepIn(self, threadId=None, waitForStop=True):
-        self.vscode.request_stepIn(threadId=threadId)
+        self.dap.request_stepIn(threadId=threadId)
         if waitForStop:
-            return self.vscode.wait_for_stopped()
+            return self.dap.wait_for_stopped()
         return None
 
     def stepOver(self, threadId=None, waitForStop=True):
-        self.vscode.request_next(threadId=threadId)
+        self.dap.request_next(threadId=threadId)
         if waitForStop:
-            return self.vscode.wait_for_stopped()
+            return self.dap.wait_for_stopped()
         return None
 
     def stepOut(self, threadId=None, waitForStop=True):
-        self.vscode.request_stepOut(threadId=threadId)
+        self.dap.request_stepOut(threadId=threadId)
         if waitForStop:
-            return self.vscode.wait_for_stopped()
+            return self.dap.wait_for_stopped()
         return None
 
     def continue_to_next_stop(self):
-        self.vscode.request_continue()
-        return self.vscode.wait_for_stopped()
+        self.dap.request_continue()
+        return self.dap.wait_for_stopped()
 
     def continue_to_breakpoints(self, breakpoint_ids):
-        self.vscode.request_continue()
+        self.dap.request_continue()
         self.verify_breakpoint_hit(breakpoint_ids)
 
     def continue_to_exception_breakpoint(self, filter_label):
-        self.vscode.request_continue()
+        self.dap.request_continue()
         self.assertTrue(
             self.verify_stop_exception_info(filter_label),
             'verify we got "%s"' % (filter_label),
         )
 
     def continue_to_exit(self, exitCode=0):
-        self.vscode.request_continue()
-        stopped_events = self.vscode.wait_for_stopped()
+        self.dap.request_continue()
+        stopped_events = self.dap.wait_for_stopped()
         self.assertEquals(
             len(stopped_events), 1, "stopped_events = {}".format(stopped_events)
         )
@@ -266,10 +266,10 @@ def disassemble(self, threadId=None, frameIndex=None):
         memoryReference = stackFrames[0]["instructionPointerReference"]
         self.assertIsNotNone(memoryReference)
 
-        if memoryReference not in self.vscode.disassembled_instructions:
-            self.vscode.request_disassemble(memoryReference=memoryReference)
+        if memoryReference not in self.dap.disassembled_instructions:
+            self.dap.request_disassemble(memoryReference=memoryReference)
 
-        return self.vscode.disassembled_instructions[memoryReference]
+        return self.dap.disassembled_instructions[memoryReference]
 
     def attach(
         self,
@@ -289,22 +289,22 @@ def attach(
         sourceMap=None,
         sourceInitFile=False,
     ):
-        """Build the default Makefile target, create the VSCode debug adaptor,
+        """Build the default Makefile target, create the DAP debug adaptor,
         and attach to the process.
         """
 
-        # Make sure we disconnect and terminate the VSCode debug adaptor even
+        # Make sure we disconnect and terminate the DAP debug adaptor even
         # if we throw an exception during the test case.
         def cleanup():
             if disconnectAutomatically:
-                self.vscode.request_disconnect(terminateDebuggee=True)
-            self.vscode.terminate()
+                self.dap.request_disconnect(terminateDebuggee=True)
+            self.dap.terminate()
 
         # Execute the cleanup function during test case tear down.
         self.addTearDownHook(cleanup)
         # Initialize and launch the program
-        self.vscode.request_initialize(sourceInitFile)
-        response = self.vscode.request_attach(
+        self.dap.request_initialize(sourceInitFile)
+        response = self.dap.request_attach(
             program=program,
             pid=pid,
             waitFor=waitFor,
@@ -352,21 +352,21 @@ def launch(
         enableAutoVariableSummaries=False,
         enableSyntheticChildDebugging=False,
     ):
-        """Sending launch request to vscode"""
+        """Sending launch request to dap"""
 
-        # Make sure we disconnect and terminate the VSCode debug adapter,
+        # Make sure we disconnect and terminate the DAP debug adapter,
         # if we throw an exception during the test case
         def cleanup():
             if disconnectAutomatically:
-                self.vscode.request_disconnect(terminateDebuggee=True)
-            self.vscode.terminate()
+                self.dap.request_disconnect(terminateDebuggee=True)
+            self.dap.terminate()
 
         # Execute the cleanup function during test case tear down.
         self.addTearDownHook(cleanup)
 
         # Initialize and launch the program
-        self.vscode.request_initialize(sourceInitFile)
-        response = self.vscode.request_launch(
+        self.dap.request_initialize(sourceInitFile)
+        response = self.dap.request_launch(
             program,
             args=args,
             cwd=cwd,
@@ -422,14 +422,14 @@ def build_and_launch(
         runInTerminal=False,
         disconnectAutomatically=True,
         postRunCommands=None,
-        lldbVSCodeEnv=None,
+        lldbDAPEnv=None,
         enableAutoVariableSummaries=False,
         enableSyntheticChildDebugging=False,
     ):
-        """Build the default Makefile target, create the VSCode debug adaptor,
+        """Build the default Makefile target, create the DAP debug adaptor,
         and launch the process.
         """
-        self.build_and_create_debug_adaptor(lldbVSCodeEnv)
+        self.build_and_create_debug_adaptor(lldbDAPEnv)
         self.assertTrue(os.path.exists(program), "executable must exist")
 
         return self.launch(
diff --git a/lldb/test/API/tools/lldb-vscode/attach/Makefile b/lldb/test/API/tools/lldb-dap/attach/Makefile
similarity index 100%
rename from lldb/test/API/tools/lldb-vscode/attach/Makefile
rename to lldb/test/API/tools/lldb-dap/attach/Makefile
diff --git a/lldb/test/API/tools/lldb-vscode/attach/TestVSCode_attach.py b/lldb/test/API/tools/lldb-dap/attach/TestDAP_attach.py
similarity index 96%
rename from lldb/test/API/tools/lldb-vscode/attach/TestVSCode_attach.py
rename to lldb/test/API/tools/lldb-dap/attach/TestDAP_attach.py
index a53dac77e39d3bd..d4ef7b5c838f6ed 100644
--- a/lldb/test/API/tools/lldb-vscode/attach/TestVSCode_attach.py
+++ b/lldb/test/API/tools/lldb-dap/attach/TestDAP_attach.py
@@ -1,13 +1,13 @@
 """
-Test lldb-vscode setBreakpoints request
+Test lldb-dap setBreakpoints request
 """
 
 
-import vscode
+import dap
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
-import lldbvscode_testcase
+import lldbdap_testcase
 import os
 import shutil
 import subprocess
@@ -25,7 +25,7 @@ def spawn_and_wait(program, delay):
     process.wait()
 
 
-class TestVSCode_attach(lldbvscode_testcase.VSCodeTestCaseBase):
+class TestDAP_attach(lldbdap_testcase.DAPTestCaseBase):
     def set_and_hit_breakpoint(self, continueToExit=True):
         source = "main.c"
         breakpoint1_line = line_number(source, "// breakpoint 1")
@@ -190,10 +190,10 @@ def test_commands(self):
         # Continue after launch and hit the "pause()" call and stop the target.
         # Get output from the console. This should contain both the
         # "stopCommands" that were run after we stop.
-        self.vscode.request_continue()
+        self.dap.request_continue()
         time.sleep(0.5)
-        self.vscode.request_pause()
-        self.vscode.wait_for_stopped()
+        self.dap.request_pause()
+        self.dap.wait_for_stopped()
         output = self.get_console(timeout=1.0)
         self.verify_commands("stopCommands", output, stopCommands)
 
@@ -236,6 +236,6 @@ def test_terminate_commands(self):
         self.get_console()
         # Once it's disconnected the console should contain the
         # "terminateCommands"
-        self.vscode.request_disconnect(terminateDebuggee=True)
+        self.dap.request_disconnect(terminateDebuggee=True)
         output = self.collect_console(duration=1.0)
         self.verify_commands("terminateCommands", output, terminateCommands)
diff --git a/lldb/test/API/tools/lldb-vscode/attach/main.c b/lldb/test/API/tools/lldb-dap/attach/main.c
similarity index 100%
rename from lldb/test/API/tools/lldb-vscode/attach/main.c
rename to lldb/test/API/tools/lldb-dap/attach/main.c
diff --git a/lldb/test/API/tools/lldb-vscode/breakpoint-events/Makefile b/lldb/test/API/tools/lldb-dap/breakpoint-events/Makefile
similarity index 100%
rename from lldb/test/API/tools/lldb-vscode/breakpoint-events/Makefile
rename to lldb/test/API/tools/lldb-dap/breakpoint-events/Makefile
diff --git a/lldb/test/API/tools/lldb-vscode/breakpoint-events/TestVSCode_breakpointEvents.py b/lldb/test/API/tools/lldb-dap/breakpoint-events/TestDAP_breakpointEvents.py
similarity index 84%
rename from lldb/test/API/tools/lldb-vscode/breakpoint-events/TestVSCode_breakpointEvents.py
rename to lldb/test/API/tools/lldb-dap/breakpoint-events/TestDAP_breakpointEvents.py
index 51996d03d9b1704..aafb8ce310a4d94 100644
--- a/lldb/test/API/tools/lldb-vscode/breakpoint-events/TestVSCode_breakpointEvents.py
+++ b/lldb/test/A...
[truncated]

``````````

</details>


https://github.com/llvm/llvm-project/pull/69264


More information about the lldb-commits mailing list