File tree 2 files changed +5
-11
lines changed
test/API/tools/lldb-dap/output 2 files changed +5
-11
lines changed Original file line number Diff line number Diff line change 2
2
Test lldb-dap output events
3
3
"""
4
4
5
- import dap_server
6
5
from lldbsuite .test .decorators import *
7
6
from lldbsuite .test .lldbtest import *
8
- from lldbsuite .test import lldbutil
9
7
import lldbdap_testcase
10
- import re
11
8
12
9
13
10
class TestDAP_output (lldbdap_testcase .DAPTestCaseBase ):
14
11
def test_output (self ):
15
12
program = self .getBuildArtifact ("a.out" )
16
13
self .build_and_launch (program )
17
14
source = "main.c"
18
- main_source_path = self .getSourcePath (source )
19
15
lines = [line_number (source , "// breakpoint 1" )]
20
16
breakpoint_ids = self .set_source_breakpoints (source , lines )
21
17
self .continue_to_breakpoints (breakpoint_ids )
22
18
23
- output = self .collect_stdout (
24
- timeout_secs = 1.0 ,
25
- pattern = "abcdef"
26
- )
19
+ # Ensure partial messages are still sent.
20
+ output = self .collect_stdout (timeout_secs = 1.0 , pattern = "abcdef" )
27
21
self .assertTrue (output and len (output ) > 0 , "expect no program output" )
28
22
29
23
self .continue_to_exit ()
@@ -33,5 +27,5 @@ def test_output(self):
33
27
self .assertIn (
34
28
"abcdefghi\r \n hello world\r \n " ,
35
29
output ,
36
- 'full output not found in: ' + output
37
- )
30
+ 'full output not found in: ' + output ,
31
+ )
Original file line number Diff line number Diff line change @@ -399,7 +399,7 @@ void SendProcessEvent(LaunchMethod launch_method) {
399
399
// Grab any STDOUT and STDERR from the process and send it up to VS Code
400
400
// via an "output" event to the "stdout" and "stderr" categories.
401
401
void SendStdOutStdErr (lldb::SBProcess &process) {
402
- char buffer[1024 ];
402
+ char buffer[4096 ];
403
403
size_t count;
404
404
while ((count = process.GetSTDOUT (buffer, sizeof (buffer))) > 0 )
405
405
g_dap.SendOutput (OutputType::Stdout, llvm::StringRef (buffer, count));
You can’t perform that action at this time.
0 commit comments