-
Notifications
You must be signed in to change notification settings - Fork 15.2k
[lldb-dap] Change the launch sequence #138219
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -340,6 +340,7 @@ def attach( | |
| exitCommands=None, | ||
| attachCommands=None, | ||
| coreFile=None, | ||
| stopOnAttach=True, | ||
|
||
| disconnectAutomatically=True, | ||
| terminateCommands=None, | ||
| postRunCommands=None, | ||
|
|
@@ -364,6 +365,8 @@ def cleanup(): | |
| self.addTearDownHook(cleanup) | ||
| # Initialize and launch the program | ||
| self.dap_server.request_initialize(sourceInitFile) | ||
| self.dap_server.wait_for_event("initialized") | ||
| self.dap_server.request_configurationDone() | ||
JDevlieghere marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| response = self.dap_server.request_attach( | ||
| program=program, | ||
| pid=pid, | ||
|
|
@@ -376,6 +379,7 @@ def cleanup(): | |
| attachCommands=attachCommands, | ||
| terminateCommands=terminateCommands, | ||
| coreFile=coreFile, | ||
| stopOnAttach=stopOnAttach, | ||
| postRunCommands=postRunCommands, | ||
| sourceMap=sourceMap, | ||
| gdbRemotePort=gdbRemotePort, | ||
|
|
@@ -434,6 +438,9 @@ def cleanup(): | |
|
|
||
| # Initialize and launch the program | ||
| self.dap_server.request_initialize(sourceInitFile) | ||
| self.dap_server.wait_for_event("initialized") | ||
| self.dap_server.request_configurationDone() | ||
kusmour marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| response = self.dap_server.request_launch( | ||
| program, | ||
| args=args, | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -44,9 +44,9 @@ def verify_completions(self, actual_list, expected_list, not_expected_list=[]): | |
| self.assertNotIn(not_expected_item, actual_list) | ||
|
|
||
|
|
||
| def setup_debugee(self): | ||
| def setup_debugee(self, stopOnEntry=False): | ||
| program = self.getBuildArtifact("a.out") | ||
| self.build_and_launch(program) | ||
| self.build_and_launch(program, stopOnEntry=stopOnEntry) | ||
|
|
||
| source = "main.cpp" | ||
| breakpoint1_line = line_number(source, "// breakpoint 1") | ||
|
|
@@ -235,7 +235,7 @@ def test_auto_completions(self): | |
| """ | ||
| Tests completion requests in "repl-mode=auto" | ||
| """ | ||
| self.setup_debugee() | ||
| self.setup_debugee(stopOnEntry=True) | ||
|
||
|
|
||
| res = self.dap_server.request_evaluate( | ||
| "`lldb-dap repl-mode auto", context="repl" | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -88,8 +88,8 @@ def test_stopOnEntry(self): | |
| """ | ||
| program = self.getBuildArtifact("a.out") | ||
| self.build_and_launch(program, stopOnEntry=True) | ||
| self.set_function_breakpoints(["main"]) | ||
| stopped_events = self.continue_to_next_stop() | ||
|
|
||
|
||
| stopped_events = self.dap_server.wait_for_stopped() | ||
| for stopped_event in stopped_events: | ||
| if "body" in stopped_event: | ||
| body = stopped_event["body"] | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we default to
Falsefor attach requests?