Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[lldb] Rename lldb-vscode to lldb-dap #69264

Merged
merged 6 commits into from
Oct 19, 2023

Conversation

JDevlieghere
Copy link
Member

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/

@llvmbot
Copy link

llvmbot commented Oct 16, 2023

@llvm/pr-subscribers-lldb

Author: Jonas Devlieghere (JDevlieghere)

Changes

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 --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]

@github-actions
Copy link

github-actions bot commented Oct 16, 2023

⚠️ C/C++ code formatter, clang-format found issues in your code. ⚠️

You can test this locally with the following command:
git-clang-format --diff 814a79aea67ba50c1b0d9cce01393b6d4e063e3c 301bdfa79bc2d0bd221e898aa92e7cb9eda1295f -- clang/lib/Headers/stdckdint.h clang/test/AST/Interp/cxx23.cpp clang/test/C/C2x/n2683.c clang/test/C/C2x/n2683_2.c clang/test/CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_cntp.c clang/test/CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_pext.c clang/test/CodeGenHipStdPar/unannotated-functions-get-emitted.cpp clang/test/CodeGenHipStdPar/unsupported-ASM.cpp clang/test/CodeGenHipStdPar/unsupported-builtins.cpp clang/test/Headers/stdckdint.c clang/test/Sema/aarch64-sve2p1-intrinsics/acle_sve2p1_imm.cpp compiler-rt/lib/builtins/extendxftf2.c compiler-rt/lib/builtins/trunctfxf2.c compiler-rt/test/builtins/Unit/extendxftf2_test.c compiler-rt/test/builtins/Unit/trunctfxf2_test.c compiler-rt/test/hwasan/TestCases/bcmp.cpp libcxx/benchmarks/stop_token.bench.cpp libcxx/test/std/input.output/string.streams/istringstream/istringstream.members/str.allocator_propagation.pass.cpp libcxx/test/std/input.output/string.streams/ostringstream/ostringstream.members/str.allocator_propagation.pass.cpp libcxx/test/std/input.output/string.streams/stringstream/stringstream.members/str.allocator_propagation.pass.cpp lldb/test/API/tools/lldb-dap/disassemble/main.c lldb/test/API/tools/lldb-dap/module/foo.cpp lldb/test/API/tools/lldb-dap/step/main.cpp lldb/test/API/tools/lldb-dap/terminated-event/foo.cpp llvm/include/llvm/Analysis/WithCache.h llvm/unittests/ADT/IListIteratorBitsTest.cpp mlir/include/mlir/Dialect/SparseTensor/IR/SparseTensorInterfaces.h mlir/lib/Dialect/SparseTensor/IR/SparseTensorInterfaces.cpp clang/include/clang/AST/ExprCXX.h clang/lib/AST/ASTContext.cpp clang/lib/AST/ASTImporter.cpp clang/lib/AST/ExprCXX.cpp clang/lib/AST/Interp/Interp.h clang/lib/ASTMatchers/ASTMatchersInternal.cpp clang/lib/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.cpp clang/lib/CodeGen/BackendUtil.cpp clang/lib/CodeGen/CGBuiltin.cpp clang/lib/CodeGen/CGStmt.cpp clang/lib/CodeGen/CodeGenFunction.cpp clang/lib/CodeGen/CodeGenFunction.h clang/lib/CodeGen/CodeGenModule.cpp clang/lib/Driver/ToolChains/Arch/RISCV.cpp clang/lib/Driver/ToolChains/Cuda.h clang/lib/Format/UnwrappedLineParser.cpp clang/lib/Lex/PPDirectives.cpp clang/lib/Sema/SemaCUDA.cpp clang/lib/Sema/SemaChecking.cpp clang/lib/Sema/SemaDeclCXX.cpp clang/lib/Sema/SemaTemplate.cpp clang/lib/Sema/SemaType.cpp clang/test/AST/Interp/arrays.cpp clang/test/C/C2x/n2359.c clang/test/CodeGen/aarch64-sme-intrinsics/acle_sme_ldr.c clang/test/CodeGen/aarch64-sme-intrinsics/acle_sme_str.c clang/test/Driver/riscv-features.c clang/test/Sema/aarch64-sme-intrinsics/acle_sme_imm.cpp clang/test/Sema/builtins-overflow.c clang/test/SemaCUDA/Inputs/cuda-initializers.h clang/test/SemaTemplate/dependent-expr.cpp clang/unittests/ASTMatchers/ASTMatchersTraversalTest.cpp clang/unittests/Analysis/FlowSensitive/TransferTest.cpp clang/unittests/Analysis/FlowSensitive/TypeErasedDataflowAnalysisTest.cpp clang/unittests/Format/TokenAnnotatorTest.cpp clang/utils/TableGen/SveEmitter.cpp compiler-rt/lib/builtins/fp_extend.h compiler-rt/lib/builtins/fp_trunc.h compiler-rt/lib/hwasan/hwasan_platform_interceptors.h compiler-rt/test/builtins/Unit/addtf3_test.c compiler-rt/test/builtins/Unit/divtf3_test.c compiler-rt/test/builtins/Unit/extenddftf2_test.c compiler-rt/test/builtins/Unit/extendhftf2_test.c compiler-rt/test/builtins/Unit/extendsftf2_test.c compiler-rt/test/builtins/Unit/floatditf_test.c compiler-rt/test/builtins/Unit/floatsitf_test.c compiler-rt/test/builtins/Unit/floatunditf_test.c compiler-rt/test/builtins/Unit/floatunsitf_test.c compiler-rt/test/builtins/Unit/fp_test.h compiler-rt/test/builtins/Unit/multf3_test.c compiler-rt/test/builtins/Unit/subtf3_test.c compiler-rt/test/hwasan/TestCases/deep-recursion.c flang/include/flang/Common/real.h flang/include/flang/Decimal/binary-floating-point.h flang/include/flang/Decimal/decimal.h flang/include/flang/Evaluate/characteristics.h flang/include/flang/ISO_Fortran_binding.h flang/include/flang/Parser/parse-tree.h flang/include/flang/Runtime/descriptor.h flang/lib/Decimal/binary-to-decimal.cpp flang/lib/Decimal/decimal-to-binary.cpp flang/lib/Evaluate/constant.cpp flang/lib/Evaluate/fold-real.cpp flang/lib/Evaluate/fold-reduction.h flang/lib/Lower/Allocatable.cpp flang/lib/Lower/Bridge.cpp flang/lib/Lower/CallInterface.cpp flang/lib/Lower/Coarray.cpp flang/lib/Lower/ConvertExpr.cpp flang/lib/Lower/ConvertExprToHLFIR.cpp flang/lib/Lower/ConvertVariable.cpp flang/lib/Lower/OpenACC.cpp flang/lib/Lower/Runtime.cpp flang/lib/Lower/VectorSubscripts.cpp flang/lib/Parser/executable-parsers.cpp flang/lib/Parser/unparse.cpp flang/lib/Semantics/canonicalize-do.cpp flang/lib/Semantics/compute-offsets.cpp flang/lib/Semantics/data-to-inits.cpp flang/lib/Semantics/data-to-inits.h flang/lib/Semantics/mod-file.cpp flang/lib/Semantics/resolve-labels.cpp flang/lib/Semantics/resolve-names-utils.cpp flang/lib/Semantics/resolve-names.cpp flang/runtime/ISO_Fortran_binding.cpp flang/runtime/allocatable.cpp flang/runtime/derived-api.cpp flang/runtime/descriptor-io.h flang/runtime/descriptor.cpp flang/runtime/edit-input.cpp flang/runtime/edit-output.cpp flang/runtime/edit-output.h flang/runtime/io-stmt.h flang/runtime/namelist.cpp flang/runtime/pointer.cpp flang/runtime/random.cpp flang/runtime/type-info.cpp flang/unittests/Evaluate/ISO-Fortran-binding.cpp flang/unittests/Runtime/NumericalFormatTest.cpp libc/fuzzing/stdio/printf_float_conv_fuzz.cpp libc/src/stdio/printf_core/float_hex_converter.h libc/test/src/stdio/sprintf_test.cpp libcxx/test/std/input.output/string.streams/istringstream/istringstream.members/str.move.pass.cpp libcxx/test/std/input.output/string.streams/ostringstream/ostringstream.members/str.move.pass.cpp libcxx/test/std/input.output/string.streams/stringbuf/stringbuf.members/str.move.pass.cpp libcxx/test/std/input.output/string.streams/stringbuf/stringbuf.members/view.pass.cpp libcxx/test/std/input.output/string.streams/stringstream/stringstream.members/str.move.pass.cpp lld/COFF/Chunks.cpp lld/COFF/Chunks.h lld/COFF/Writer.cpp lld/COFF/Writer.h llvm/include/llvm/ADT/ilist_iterator.h llvm/include/llvm/ADT/ilist_node.h llvm/include/llvm/ADT/ilist_node_options.h llvm/include/llvm/ADT/simple_ilist.h llvm/include/llvm/Analysis/ValueTracking.h llvm/include/llvm/CodeGen/GlobalISel/GIMatchTableExecutor.h llvm/include/llvm/CodeGen/GlobalISel/GIMatchTableExecutorImpl.h llvm/include/llvm/CodeGen/SelectionDAG.h llvm/include/llvm/IR/BasicBlock.h llvm/include/llvm/IR/GlobalAlias.h llvm/include/llvm/IR/GlobalIFunc.h llvm/include/llvm/IR/GlobalVariable.h llvm/include/llvm/IR/Instruction.h llvm/include/llvm/IR/Instructions.h llvm/include/llvm/IR/SymbolTableListTraits.h llvm/include/llvm/IR/ValueSymbolTable.h llvm/include/llvm/Transforms/InstCombine/InstCombiner.h llvm/lib/Analysis/ValueTracking.cpp llvm/lib/CodeGen/PeepholeOptimizer.cpp llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp llvm/lib/DebugInfo/GSYM/DwarfTransformer.cpp llvm/lib/IR/BasicBlock.cpp llvm/lib/IR/Instruction.cpp llvm/lib/IR/Instructions.cpp llvm/lib/IR/SymbolTableListTraitsImpl.h llvm/lib/Support/YAMLParser.cpp llvm/lib/Support/YAMLTraits.cpp llvm/lib/Target/AArch64/AArch64FrameLowering.cpp llvm/lib/Target/AArch64/AArch64ISelLowering.cpp llvm/lib/Target/AArch64/AArch64InstrInfo.cpp llvm/lib/Target/AArch64/AArch64LowerHomogeneousPrologEpilog.cpp llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp llvm/lib/Target/AMDGPU/SIInstrInfo.cpp llvm/lib/Target/M68k/M68kInstrInfo.cpp llvm/lib/Target/M68k/MCTargetDesc/M68kMCCodeEmitter.cpp llvm/lib/Target/RISCV/GISel/RISCVLegalizerInfo.cpp llvm/lib/Target/RISCV/RISCVISelLowering.cpp llvm/lib/Target/X86/X86ISelLowering.cpp llvm/lib/Target/X86/X86InstrInfo.cpp llvm/lib/Target/X86/X86InstrInfo.h llvm/lib/TargetParser/TargetParser.cpp llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp llvm/lib/Transforms/InstCombine/InstCombineInternal.h llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp llvm/lib/Transforms/Vectorize/LoopVectorize.cpp llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp llvm/tools/llvm-rc/ResourceScriptParser.cpp llvm/tools/llvm-rc/ResourceScriptParser.h llvm/unittests/DebugInfo/GSYM/GSYMTest.cpp llvm/unittests/Support/YAMLIOTest.cpp llvm/unittests/Support/YAMLParserTest.cpp llvm/utils/TableGen/GlobalISelCombinerEmitter.cpp llvm/utils/TableGen/GlobalISelMatchTable.cpp llvm/utils/TableGen/GlobalISelMatchTable.h mlir/examples/toy/Ch6/mlir/LowerToLLVM.cpp mlir/examples/toy/Ch7/mlir/LowerToLLVM.cpp mlir/include/mlir/Conversion/TosaToLinalg/TosaToLinalg.h mlir/include/mlir/Dialect/NVGPU/IR/NVGPUDialect.h mlir/include/mlir/Dialect/SparseTensor/IR/Enums.h mlir/include/mlir/Dialect/SparseTensor/IR/SparseTensor.h mlir/include/mlir/Dialect/Tosa/IR/TosaOps.h mlir/include/mlir/Dialect/Tosa/Transforms/Passes.h mlir/include/mlir/ExecutionEngine/SparseTensor/COO.h mlir/include/mlir/ExecutionEngine/SparseTensor/File.h mlir/include/mlir/ExecutionEngine/SparseTensor/Storage.h mlir/include/mlir/ExecutionEngine/SparseTensorRuntime.h mlir/lib/Conversion/GPUCommon/GPUOpsLowering.cpp mlir/lib/Conversion/NVGPUToNVVM/NVGPUToNVVM.cpp mlir/lib/Conversion/NVVMToLLVM/NVVMToLLVM.cpp mlir/lib/Conversion/TosaToLinalg/TosaToLinalgPass.cpp mlir/lib/Dialect/LLVMIR/IR/BasicPtxBuilderInterface.cpp mlir/lib/Dialect/NVGPU/IR/NVGPUDialect.cpp mlir/lib/Dialect/NVGPU/TransformOps/NVGPUTransformOps.cpp mlir/lib/Dialect/OpenACC/IR/OpenACC.cpp mlir/lib/Dialect/SparseTensor/IR/SparseTensorDialect.cpp mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorRewriting.cpp mlir/lib/Dialect/SparseTensor/Transforms/StageSparseOperations.cpp mlir/lib/Dialect/Tosa/IR/TosaOps.cpp mlir/lib/Dialect/Tosa/Transforms/TosaValidation.cpp mlir/lib/Dialect/Transform/Transforms/InterpreterPass.cpp mlir/lib/ExecutionEngine/SparseTensor/Storage.cpp mlir/lib/ExecutionEngine/SparseTensorRuntime.cpp lldb/test/API/tools/lldb-dap/attach/main.c lldb/test/API/tools/lldb-dap/breakpoint-events/foo.cpp lldb/test/API/tools/lldb-dap/breakpoint-events/foo.h lldb/test/API/tools/lldb-dap/breakpoint-events/main.cpp lldb/test/API/tools/lldb-dap/breakpoint/main.cpp lldb/test/API/tools/lldb-dap/breakpoint/other.c lldb/test/API/tools/lldb-dap/completions/main.cpp lldb/test/API/tools/lldb-dap/console/main.cpp lldb/test/API/tools/lldb-dap/coreFile/main.c lldb/test/API/tools/lldb-dap/correct-thread/main.c lldb/test/API/tools/lldb-dap/disconnect/main.cpp lldb/test/API/tools/lldb-dap/evaluate/foo.cpp lldb/test/API/tools/lldb-dap/evaluate/foo.h lldb/test/API/tools/lldb-dap/evaluate/main.cpp lldb/test/API/tools/lldb-dap/exception/main.cpp lldb/test/API/tools/lldb-dap/launch/main.c lldb/test/API/tools/lldb-dap/module/foo.h lldb/test/API/tools/lldb-dap/module/main.cpp lldb/test/API/tools/lldb-dap/optimized/main.cpp lldb/test/API/tools/lldb-dap/restart/main.c lldb/test/API/tools/lldb-dap/runInTerminal/main.c lldb/test/API/tools/lldb-dap/stackTrace/main.c lldb/test/API/tools/lldb-dap/stackTraceMissingFunctionName/main.cpp lldb/test/API/tools/lldb-dap/startDebugging/main.c lldb/test/API/tools/lldb-dap/stop-hooks/main.c lldb/test/API/tools/lldb-dap/terminated-event/foo.h lldb/test/API/tools/lldb-dap/terminated-event/main.cpp lldb/test/API/tools/lldb-dap/variables/main.cpp lldb/tools/lldb-dap/BreakpointBase.cpp lldb/tools/lldb-dap/BreakpointBase.h lldb/tools/lldb-dap/DAP.cpp lldb/tools/lldb-dap/DAP.h lldb/tools/lldb-dap/DAPForward.h lldb/tools/lldb-dap/ExceptionBreakpoint.cpp lldb/tools/lldb-dap/ExceptionBreakpoint.h lldb/tools/lldb-dap/FifoFiles.cpp lldb/tools/lldb-dap/FifoFiles.h lldb/tools/lldb-dap/FunctionBreakpoint.cpp lldb/tools/lldb-dap/FunctionBreakpoint.h lldb/tools/lldb-dap/IOStream.cpp lldb/tools/lldb-dap/IOStream.h lldb/tools/lldb-dap/JSONUtils.cpp lldb/tools/lldb-dap/JSONUtils.h lldb/tools/lldb-dap/LLDBUtils.cpp lldb/tools/lldb-dap/LLDBUtils.h lldb/tools/lldb-dap/OutputRedirector.cpp lldb/tools/lldb-dap/OutputRedirector.h lldb/tools/lldb-dap/ProgressEvent.cpp lldb/tools/lldb-dap/ProgressEvent.h lldb/tools/lldb-dap/RunInTerminal.cpp lldb/tools/lldb-dap/RunInTerminal.h lldb/tools/lldb-dap/SourceBreakpoint.cpp lldb/tools/lldb-dap/SourceBreakpoint.h lldb/tools/lldb-dap/lldb-dap.cpp
View the diff from clang-format here.
diff --git a/lld/COFF/Chunks.h b/lld/COFF/Chunks.h
index d14a258fc81e..ae8fe28c8938 100644
--- a/lld/COFF/Chunks.h
+++ b/lld/COFF/Chunks.h
@@ -24,10 +24,10 @@
 namespace lld::coff {
 
 using llvm::COFF::ImportDirectoryTableEntry;
-using llvm::object::COFFSymbolRef;
-using llvm::object::SectionRef;
 using llvm::object::coff_relocation;
 using llvm::object::coff_section;
+using llvm::object::COFFSymbolRef;
+using llvm::object::SectionRef;
 
 class Baserel;
 class Defined;
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index 01da5c0ec49e..b253e1878c0b 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@ -3747,8 +3747,8 @@ KnownBits SelectionDAG::computeKnownBits(SDValue Op, const APInt &DemandedElts,
 
     Known = computeKnownBits(Op.getOperand(0), DemandedElts, Depth + 1);
     Known2 = computeKnownBits(Op.getOperand(1), DemandedElts, Depth + 1);
-    Known = KnownBits::computeForAddSub(/* Add */ false, /* NSW */ false,
-                                        Known, Known2);
+    Known = KnownBits::computeForAddSub(/* Add */ false, /* NSW */ false, Known,
+                                        Known2);
     break;
   }
   case ISD::UADDO:
diff --git a/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp b/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
index 05c79b610cb3..2a41169443ea 100644
--- a/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
+++ b/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
@@ -9140,8 +9140,7 @@ void AArch64InstrInfo::buildClearRegister(Register Reg, MachineBasicBlock &MBB,
   const AArch64RegisterInfo &TRI = *STI.getRegisterInfo();
 
   if (TRI.isGeneralPurposeRegister(MF, Reg)) {
-    BuildMI(MBB, Iter, DL, get(AArch64::MOVi64imm), Reg)
-      .addImm(0);
+    BuildMI(MBB, Iter, DL, get(AArch64::MOVi64imm), Reg).addImm(0);
   } else if (STI.hasSVE()) {
     BuildMI(MBB, Iter, DL, get(AArch64::DUP_ZI_D), Reg)
       .addImm(0)
diff --git a/llvm/lib/Target/X86/X86InstrInfo.cpp b/llvm/lib/Target/X86/X86InstrInfo.cpp
index f0c46419ab35..406894c170f4 100644
--- a/llvm/lib/Target/X86/X86InstrInfo.cpp
+++ b/llvm/lib/Target/X86/X86InstrInfo.cpp
@@ -10130,8 +10130,7 @@ X86InstrInfo::insertOutlinedCall(Module &M, MachineBasicBlock &MBB,
   return It;
 }
 
-void X86InstrInfo::buildClearRegister(Register Reg,
-                                      MachineBasicBlock &MBB,
+void X86InstrInfo::buildClearRegister(Register Reg, MachineBasicBlock &MBB,
                                       MachineBasicBlock::iterator Iter,
                                       DebugLoc &DL) const {
   const MachineFunction &MF = *MBB.getParent();
@@ -10144,8 +10143,8 @@ void X86InstrInfo::buildClearRegister(Register Reg,
 
   if (TRI.isGeneralPurposeRegister(MF, Reg)) {
     BuildMI(MBB, Iter, DL, get(X86::XOR32rr), Reg)
-      .addReg(Reg, RegState::Undef)
-      .addReg(Reg, RegState::Undef);
+        .addReg(Reg, RegState::Undef)
+        .addReg(Reg, RegState::Undef);
   } else if (X86::VR128RegClass.contains(Reg)) {
     // XMM#
     if (!ST.hasSSE1())
@@ -10179,8 +10178,8 @@ void X86InstrInfo::buildClearRegister(Register Reg,
       return;
 
     BuildMI(MBB, Iter, DL, get(ST.hasBWI() ? X86::KXORQrr : X86::KXORWrr), Reg)
-      .addReg(Reg, RegState::Undef)
-      .addReg(Reg, RegState::Undef);
+        .addReg(Reg, RegState::Undef)
+        .addReg(Reg, RegState::Undef);
   }
 }
 

lldb/tools/lldb-dap/README.md Outdated Show resolved Hide resolved
lldb/tools/lldb-dap/README.md Outdated Show resolved Hide resolved
llvm/docs/ReleaseNotes.rst Outdated Show resolved Hide resolved
lldb/tools/lldb-dap/README.md Show resolved Hide resolved
@DavidSpickett
Copy link
Collaborator

Also I just gave you some conflicts with 4606712. I think only the "type" bit needs changing to "lldb-dap".

@@ -1,5 +1,5 @@
{
"name": "lldb-vscode",
"name": "lldb-dap",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This and others are still in an "lldb-vscode" folder, that doesn't seem right.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This and disassembly.json are still in the wrong place. I think move everything up one level and delete the lldb-vscode folder. As the instructions refer to package.json being in the same directory as the readme.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I had missed this comment.

@DavidSpickett
Copy link
Collaborator

I built this locally and I did not get a bin/lldb-dap only lldb-vscde as before, but it was an existing build folder. So if your clean build is correct you can ignore that part.

I followed the install instructions and got the "LLDB VSCode" extension with type "llda-dap" as expected (symlinking lldb-vscode instead).

Find in files also shows some more references to lldb-vscode that should be checked and/or changed.

@DavidSpickett
Copy link
Collaborator

Actually there was a ninja target for lldb-dap but it wasn't built by default. Again, existing cmake config so if yours is fine then ignore this.

@JDevlieghere
Copy link
Member Author

Actually there was a ninja target for lldb-dap but it wasn't built by default. Again, existing cmake config so if yours is fine then ignore this.

Yes, I had the same thing happen to me with an incremental build, but everything looked correct for a clean build.

@walter-erquinigo
Copy link
Member

@JDevlieghere
Copy link
Member Author

@walter-erquinigo
Copy link
Member

fantastic!

Copy link
Collaborator

@slackito slackito left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for doing this!

lldb/tools/lldb-dap/JSONUtils.h Outdated Show resolved Hide resolved
lldb/tools/lldb-dap/JSONUtils.h Outdated Show resolved Hide resolved
llvm/docs/ReleaseNotes.rst Outdated Show resolved Hide resolved
@JDevlieghere JDevlieghere merged commit 01263c6 into llvm:main Oct 19, 2023
4 checks passed
@JDevlieghere JDevlieghere deleted the jdevlieghere/lldb-dap branch October 19, 2023 16:48
stuij pushed a commit to stuij/gba-llvm-devkit that referenced this pull request Oct 20, 2023
It was renamed to better signal that it is generic,
not just for VS Code.

llvm/llvm-project#69264

Also when I ported some of these instructions back
to LLVM, reviewers suggested I use the "attach" mode
instead.

https://github.com/llvm/llvm-project/tree/main/lldb/tools/lldb-dap#connect-to-a-debug-server-on-the-current-machine

So I've done that too.

For our purposes it's the same effect, but
technically we are attaching not launching.
@clayborg
Copy link
Collaborator

clayborg commented Dec 7, 2023

@JDevlieghere Can you delete the llvm-project/lldb/tools/lldb-vscode directory from git after this commit to clean up our codebase? There are still two copies of the lldb-dap code in the sources:

lldb/tools/lldb-dap
lldb/tools/lldb-vscode

I worry someone might make PR changes to the code in the lldb-vscode directory which is effectively dead at this point.

@bulbazord
Copy link
Member

@JDevlieghere Can you delete the llvm-project/lldb/tools/lldb-vscode directory from git after this commit to clean up our codebase? There are still two copies of the lldb-dap code in the sources:

lldb/tools/lldb-dap
lldb/tools/lldb-vscode

I worry someone might make PR changes to the code in the lldb-vscode directory which is effectively dead at this point.

On my machine, lldb-vscode is a symlink.

alex@alangford lldb % ls -la tools/lldb-vscode
lrwxr-xr-x@ 1 alex  staff  8 Oct 19 13:34 tools/lldb-vscode -> lldb-dap

@clayborg
Copy link
Collaborator

clayborg commented Dec 7, 2023

@JDevlieghere Can you delete the llvm-project/lldb/tools/lldb-vscode directory from git after this commit to clean up our codebase? There are still two copies of the lldb-dap code in the sources:

lldb/tools/lldb-dap
lldb/tools/lldb-vscode

I worry someone might make PR changes to the code in the lldb-vscode directory which is effectively dead at this point.

On my machine, lldb-vscode is a symlink.

alex@alangford lldb % ls -la tools/lldb-vscode
lrwxr-xr-x@ 1 alex  staff  8 Oct 19 13:34 tools/lldb-vscode -> lldb-dap

It is on mine too! interesting. Can we delete this link from git?

@DavidSpickett
Copy link
Collaborator

My intent when asking for this link was that links to the README of lldb-vscode would end up going to the README of lldb-dap (maybe the wrong section, but at least you'd know the name had changed). The audience for it is small but I didn't want to make it even smaller by giving them no signal of the rename.

We could narrow the link to that one file, or remove it once 18 has branched? There is a symlink too in /bin I think? Maybe both can go once 18 has branched.

adrian-prantl pushed a commit to adrian-prantl/llvm-project that referenced this pull request Jan 18, 2024
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/

(cherry picked from commit 01263c6)
RoloEdits added a commit to RoloEdits/helix that referenced this pull request Apr 1, 2024
`LLVM v18.0.0` changed the name here: llvm/llvm-project#69264

Current users of `lldb-vscode` not able to upgrade will have to create a
symlink so that `lldb-dap` links to `lldb-vscode`.

BREAKING CHANGE: debugger looks for `lldb-dap` rather than `lldb-vscode`

closes: helix-editor#9964
pascalkuthe pushed a commit to helix-editor/helix that referenced this pull request Apr 2, 2024
…10091)

`LLVM v18.0.0` changed the name here: llvm/llvm-project#69264

Current users of `lldb-vscode` not able to upgrade will have to create a
symlink so that `lldb-dap` links to `lldb-vscode`.

BREAKING CHANGE: debugger looks for `lldb-dap` rather than `lldb-vscode`

closes: #9964
Desdaemon pushed a commit to Desdaemon/helix that referenced this pull request Apr 3, 2024
…elix-editor#10091)

`LLVM v18.0.0` changed the name here: llvm/llvm-project#69264

Current users of `lldb-vscode` not able to upgrade will have to create a
symlink so that `lldb-dap` links to `lldb-vscode`.

BREAKING CHANGE: debugger looks for `lldb-dap` rather than `lldb-vscode`

closes: helix-editor#9964
postsolar pushed a commit to postsolar/helix that referenced this pull request Apr 4, 2024
…elix-editor#10091)

`LLVM v18.0.0` changed the name here: llvm/llvm-project#69264

Current users of `lldb-vscode` not able to upgrade will have to create a
symlink so that `lldb-dap` links to `lldb-vscode`.

BREAKING CHANGE: debugger looks for `lldb-dap` rather than `lldb-vscode`

closes: helix-editor#9964
postsolar pushed a commit to postsolar/helix that referenced this pull request Apr 4, 2024
…elix-editor#10091)

`LLVM v18.0.0` changed the name here: llvm/llvm-project#69264

Current users of `lldb-vscode` not able to upgrade will have to create a
symlink so that `lldb-dap` links to `lldb-vscode`.

BREAKING CHANGE: debugger looks for `lldb-dap` rather than `lldb-vscode`

closes: helix-editor#9964
postsolar pushed a commit to postsolar/helix that referenced this pull request Apr 4, 2024
…elix-editor#10091)

`LLVM v18.0.0` changed the name here: llvm/llvm-project#69264

Current users of `lldb-vscode` not able to upgrade will have to create a
symlink so that `lldb-dap` links to `lldb-vscode`.

BREAKING CHANGE: debugger looks for `lldb-dap` rather than `lldb-vscode`

closes: helix-editor#9964
postsolar pushed a commit to postsolar/helix that referenced this pull request Apr 4, 2024
…elix-editor#10091)

`LLVM v18.0.0` changed the name here: llvm/llvm-project#69264

Current users of `lldb-vscode` not able to upgrade will have to create a
symlink so that `lldb-dap` links to `lldb-vscode`.

BREAKING CHANGE: debugger looks for `lldb-dap` rather than `lldb-vscode`

closes: helix-editor#9964
postsolar pushed a commit to postsolar/helix that referenced this pull request Apr 20, 2024
…elix-editor#10091)

`LLVM v18.0.0` changed the name here: llvm/llvm-project#69264

Current users of `lldb-vscode` not able to upgrade will have to create a
symlink so that `lldb-dap` links to `lldb-vscode`.

BREAKING CHANGE: debugger looks for `lldb-dap` rather than `lldb-vscode`

closes: helix-editor#9964
mtoohey31 pushed a commit to mtoohey31/helix that referenced this pull request Jun 2, 2024
…elix-editor#10091)

`LLVM v18.0.0` changed the name here: llvm/llvm-project#69264

Current users of `lldb-vscode` not able to upgrade will have to create a
symlink so that `lldb-dap` links to `lldb-vscode`.

BREAKING CHANGE: debugger looks for `lldb-dap` rather than `lldb-vscode`

closes: helix-editor#9964
Vulpesx pushed a commit to Vulpesx/helix that referenced this pull request Jun 7, 2024
…elix-editor#10091)

`LLVM v18.0.0` changed the name here: llvm/llvm-project#69264

Current users of `lldb-vscode` not able to upgrade will have to create a
symlink so that `lldb-dap` links to `lldb-vscode`.

BREAKING CHANGE: debugger looks for `lldb-dap` rather than `lldb-vscode`

closes: helix-editor#9964
smortime pushed a commit to smortime/helix that referenced this pull request Jul 10, 2024
…elix-editor#10091)

`LLVM v18.0.0` changed the name here: llvm/llvm-project#69264

Current users of `lldb-vscode` not able to upgrade will have to create a
symlink so that `lldb-dap` links to `lldb-vscode`.

BREAKING CHANGE: debugger looks for `lldb-dap` rather than `lldb-vscode`

closes: helix-editor#9964
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants