[Lldb-commits] [lldb] [lldb-dap] Refactoring lldb-dap to support running in a server mode, allowing multiple connections. (PR #114881)
via lldb-commits
lldb-commits at lists.llvm.org
Tue Nov 5 18:00:27 PST 2024
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {darker}-->
:warning: Python code formatter, darker found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
darker --check --diff -r d2d1b5897e871f7b4873befbe2b85db58744e42b...ec85f0f7397c4790442cf99cd51ce61510da498f lldb/test/API/tools/lldb-dap/server/TestDAP_server.py lldb/packages/Python/lldbsuite/test/lldbtest.py lldb/packages/Python/lldbsuite/test/tools/lldb-dap/dap_server.py lldb/packages/Python/lldbsuite/test/tools/lldb-dap/lldbdap_testcase.py
``````````
</details>
<details>
<summary>
View the diff from darker here.
</summary>
``````````diff
--- packages/Python/lldbsuite/test/tools/lldb-dap/dap_server.py 2024-11-06 01:56:19.000000 +0000
+++ packages/Python/lldbsuite/test/tools/lldb-dap/dap_server.py 2024-11-06 01:59:53.834195 +0000
@@ -1162,11 +1162,15 @@
env=None,
):
self.process = None
if launch:
self.process = DebugAdaptorServer.launch(
- executable, port=port, unix_socket=unix_socket, log_file=log_file, env=env
+ executable,
+ port=port,
+ unix_socket=unix_socket,
+ log_file=log_file,
+ env=env,
)
if port:
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect(("127.0.0.1", port))
--- packages/Python/lldbsuite/test/tools/lldb-dap/lldbdap_testcase.py 2024-11-06 01:56:19.000000 +0000
+++ packages/Python/lldbsuite/test/tools/lldb-dap/lldbdap_testcase.py 2024-11-06 01:59:54.000710 +0000
@@ -28,15 +28,22 @@
log_file=log_file_path,
env=env,
)
def build_and_create_debug_adaptor(
- self, lldbDAPEnv=None, lldbDAPLaunch=True, lldbDAPPort=None, lldbDAPUnixSocket=None
+ self,
+ lldbDAPEnv=None,
+ lldbDAPLaunch=True,
+ lldbDAPPort=None,
+ lldbDAPUnixSocket=None,
):
self.build()
self.create_debug_adaptor(
- lldbDAPEnv, launch=lldbDAPLaunch, port=lldbDAPPort, unix_socket=lldbDAPUnixSocket
+ lldbDAPEnv,
+ launch=lldbDAPLaunch,
+ port=lldbDAPPort,
+ unix_socket=lldbDAPUnixSocket,
)
def set_source_breakpoints(self, source_path, lines, data=None):
"""Sets source breakpoints and returns an array of strings containing
the breakpoint IDs ("1", "2") for each breakpoint that was set.
@@ -487,11 +494,16 @@
lldbDAPLaunch=True,
):
"""Build the default Makefile target, create the DAP debug adaptor,
and launch the process.
"""
- self.build_and_create_debug_adaptor(lldbDAPEnv=lldbDAPEnv, lldbDAPLaunch=lldbDAPLaunch, lldbDAPPort=lldbDAPPort, lldbDAPUnixSocket=lldbDAPUnixSocket)
+ self.build_and_create_debug_adaptor(
+ lldbDAPEnv=lldbDAPEnv,
+ lldbDAPLaunch=lldbDAPLaunch,
+ lldbDAPPort=lldbDAPPort,
+ lldbDAPUnixSocket=lldbDAPUnixSocket,
+ )
self.assertTrue(os.path.exists(program), "executable must exist")
return self.launch(
program,
args,
``````````
</details>
https://github.com/llvm/llvm-project/pull/114881
More information about the lldb-commits
mailing list