cdt-gdb-adapter
Advanced tools
Comparing version 0.0.16-next.20220822230244.d8c6ab5.0 to 0.0.16-next.20220908234947.bdf98e3.0
@@ -15,13 +15,17 @@ "use strict"; | ||
this.waitReady = resolve; | ||
const lineRegex = /(.*)(\r?\n)/; | ||
const lineBreakRegex = /\r?\n/; | ||
let buff = ''; | ||
stream.on('data', (chunk) => { | ||
buff += chunk.toString(); | ||
let regexArray = lineRegex.exec(buff); | ||
const newChunk = chunk.toString(); | ||
let regexArray = lineBreakRegex.exec(newChunk); | ||
if (regexArray) { | ||
regexArray.index += buff.length; | ||
} | ||
buff += newChunk; | ||
while (regexArray) { | ||
this.line = regexArray[1]; | ||
this.line = buff.slice(0, regexArray.index); | ||
this.pos = 0; | ||
this.handleLine(); | ||
buff = buff.substring(regexArray[1].length + regexArray[2].length); | ||
regexArray = lineRegex.exec(buff); | ||
buff = buff.slice(regexArray.index + regexArray[0].length); | ||
regexArray = lineBreakRegex.exec(buff); | ||
} | ||
@@ -28,0 +32,0 @@ }); |
{ | ||
"name": "cdt-gdb-adapter", | ||
"version": "0.0.16-next.20220822230244.d8c6ab5.0", | ||
"version": "0.0.16-next.20220908234947.bdf98e3.0", | ||
"description": "gdb adapter implementing the debug adapter protocol", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -25,15 +25,17 @@ /********************************************************************* | ||
this.waitReady = resolve; | ||
const lineRegex = /(.*)(\r?\n)/; | ||
const lineBreakRegex = /\r?\n/; | ||
let buff = ''; | ||
stream.on('data', (chunk) => { | ||
buff += chunk.toString(); | ||
let regexArray = lineRegex.exec(buff); | ||
const newChunk = chunk.toString(); | ||
let regexArray = lineBreakRegex.exec(newChunk); | ||
if (regexArray) { | ||
regexArray.index += buff.length; | ||
} | ||
buff += newChunk; | ||
while (regexArray) { | ||
this.line = regexArray[1]; | ||
this.line = buff.slice(0, regexArray.index); | ||
this.pos = 0; | ||
this.handleLine(); | ||
buff = buff.substring( | ||
regexArray[1].length + regexArray[2].length | ||
); | ||
regexArray = lineRegex.exec(buff); | ||
buff = buff.slice(regexArray.index + regexArray[0].length); | ||
regexArray = lineBreakRegex.exec(buff); | ||
} | ||
@@ -40,0 +42,0 @@ }); |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 5 instances in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 5 instances in 1 package
669775
10998