@@ -52,12 +52,23 @@ function SessionOutput(session, stream, timeout) {
5252 if ( ! this . waiting )
5353 break
5454
55- let index = buf . indexOf ( '\n' ) ;
55+ let line = '' ;
56+ let index = 0 ;
57+
58+ let inv = buf . indexOf ( 'invalid_expr' ) ;
59+ if ( inv !== - 1 ) {
60+ line = buf ;
61+ index = buf . length ;
62+ } else {
63+
64+ index = buf . indexOf ( '\n' ) ;
65+
66+ if ( index === - 1 )
67+ break ;
68+
69+ line = buf . slice ( 0 , index ) ;
70+ }
5671
57- if ( index === - 1 )
58- break ;
59-
60- const line = buf . slice ( 0 , index ) ;
6172 buf = buf . slice ( index + 1 ) ;
6273
6374 if ( / p r o c e s s \d + e x i t e d / i. test ( line ) )
@@ -107,6 +118,7 @@ SessionOutput.prototype.wait = function wait(regexp, callback, allLines) {
107118 const lines = [ ] ;
108119
109120 function onLine ( line ) {
121+ // console.log(line);
110122 lines . push ( line ) ;
111123 if ( self . session )
112124 debug ( `[LINE][${ self . session . lldb . pid } ]` , line ) ;
@@ -197,9 +209,14 @@ function Session(options) {
197209 this . stderr = new SessionOutput ( this , this . lldb . stderr , timeout ) ;
198210
199211 this . stderr . on ( 'line' , ( line ) => {
200- debug ( '[stderr]' , line ) ;
212+ console . log ( "stderrorline:" + line ) ;
213+ } ) ;
214+
215+ this . stdout . on ( 'line' , ( line ) => {
216+
201217 } ) ;
202218
219+
203220 // Map these methods to stdout for compatibility with legacy tests.
204221 this . wait = SessionOutput . prototype . wait . bind ( this . stdout ) ;
205222 this . waitError = SessionOutput . prototype . wait . bind ( this . stderr ) ;
0 commit comments