diff --git a/CblGdbExt/CblGdb/package.json b/CblGdbExt/CblGdb/package.json index 0655f88713376bdcf3f1fc05236e647235d2d429..5b97ccaa138a79ceda634644506c0204fe94b130 100644 --- a/CblGdbExt/CblGdb/package.json +++ b/CblGdbExt/CblGdb/package.json @@ -8,7 +8,7 @@ "debug" ], "license": "COBOLworx", - "version": "4.2.1", + "version": "4.2.2", "publisher": "COBOLworx", "icon": "images/COBOLworx.png", "engines": { diff --git a/CblGdbExt/CblGdb/src/backend/mi2/mi2.ts b/CblGdbExt/CblGdb/src/backend/mi2/mi2.ts index bc7d5e89afe540c536425fa6ce4c6ed541f39b08..bb557c146a714c55d15509feb5728119a851475f 100644 --- a/CblGdbExt/CblGdb/src/backend/mi2/mi2.ts +++ b/CblGdbExt/CblGdb/src/backend/mi2/mi2.ts @@ -376,6 +376,26 @@ export class MI2 extends EventEmitter implements IBackend { // I decided to minimize the impact and just transmogrify it back // here. + // With the advent of using cob_get_field_string() to get the contents + // of variables, I started seeing GDB messages starting with '=' embedded + // along with the information we need, which starts with ~" and which + // has to end with something like 14^done. + + // So, I simply throw away any lines in the multi-line response that + // start with '=' + + //console.log("###1###:" + buf); + var lines = buf.split('\n'); + var lineno:number; + var buf=""; + for(lineno=0; lineno<lines.length; lineno++) { + if( lines[lineno].length > 0 && lines[lineno][0] != '=' ){ + buf += lines[lineno]; + buf += '\n'; + } + } + //console.log("###2###:" + buf); + const leading_variables:string = '~"variables=' ; const leading_value:string = '~"value=' ;