@@ -1191,17 +1191,18 @@ async function handleCrashFileRead(crashDirectory: string, crashFile: string, cr
11911191 let crashLog : string = "" ;
11921192 let crashStackStartLine : number = 0 ;
11931193 if ( lines [ 0 ] === "LOG" ) {
1194- let crashLogLine : number = 0 ;
1194+ let crashLogLine : number = 1 ;
11951195 for ( ; crashLogLine < lines . length ; ++ crashLogLine ) {
11961196 if ( lines [ crashLogLine ] === "ENDLOG" ) {
11971197 break ;
11981198 }
11991199 crashLog += lines [ crashLogLine ] + "\n" ;
12001200 }
1201+ crashLog = crashLog . trimEnd ( ) ;
12011202 crashStackStartLine = ++ crashLogLine ;
12021203 }
12031204 if ( lines [ crashStackStartLine ] . startsWith ( "SIG" ) ) {
1204- signalType = lines [ 0 ] ;
1205+ signalType = lines [ crashStackStartLine ] ;
12051206 } else {
12061207 // The signal type may fail to be written.
12071208 signalType = "SIG-??\n" ; // Intentionally different from SIG-? from cpptools.
@@ -1290,7 +1291,7 @@ async function handleCrashFileRead(crashDirectory: string, crashFile: string, cr
12901291 const settings : vscode . WorkspaceConfiguration = vscode . workspace . getConfiguration ( "C_Cpp" , null ) ;
12911292 if ( lines . length >= 6 && util . getNumericLoggingLevel ( settings . get < string > ( "loggingLevel" ) ) >= 1 ) {
12921293 const out : vscode . OutputChannel = getCrashCallStacksChannel ( ) ;
1293- out . appendLine ( `\n${ isCppToolsSrv ? "cpptools-srv" : "cpptools" } \n${ crashDate . toLocaleString ( ) } \n${ signalType } ${ crashCallStack } ${ crashLog } ` ) ;
1294+ out . appendLine ( `\n${ isCppToolsSrv ? "cpptools-srv" : "cpptools" } \n${ crashDate . toLocaleString ( ) } \n${ signalType } ${ crashCallStack } \n\n ${ crashLog } \n\n ` ) ;
12941295 }
12951296 }
12961297
0 commit comments