diff --git a/src/backend/gdb_expansion.ts b/src/backend/gdb_expansion.ts index 567231c..c99ad95 100644 --- a/src/backend/gdb_expansion.ts +++ b/src/backend/gdb_expansion.ts @@ -12,6 +12,7 @@ const charRegex = /^(\d+) ['"]/; const numberRegex = /^(-)?\d+(\.\d+)?(e-\d+)?/; const pointerCombineChar = "."; const nullTupleRegex = /^(0x[0-9a-fA-F]+)}/; +const logger = require('./log'); export function isExpandable(value: string): number { let match; @@ -146,6 +147,11 @@ export function expandValue(variableCreate: Function, value: string, root: strin stack.push("[0]"); let val = parseValue(); stack.pop(); + + if(val.endsWith('>')){ + val = val.substring(0, val.length-2); + } + values.push(createValue("[0]", val)); const remaining = value; let i = 0; @@ -272,7 +278,7 @@ export function expandValue(variableCreate: Function, value: string, root: strin } value = value.substring(variableMatch[0].length).trim(); - var name = variable = variableMatch[1]; + var name = variable = variableMatch[1].trim(); if (name.charAt(name.length - 1) === ">") { name = name.slice(0, -1); }