Fix GDB expansion of structures/arrays containing floating point values.
This commit is contained in:
parent
d39cdc9633
commit
2219810715
2 changed files with 12 additions and 1 deletions
|
|
@ -7,7 +7,7 @@ const referenceStringRegex = /^(0x[0-9a-fA-F]+\s*)"/;
|
|||
const referenceRegex = /^0x[0-9a-fA-F]+/;
|
||||
const nullpointerRegex = /^0x0+\b/;
|
||||
const charRegex = /^(\d+) ['"]/;
|
||||
const numberRegex = /^\d+/;
|
||||
const numberRegex = /^\d+(\.\d+)?/;
|
||||
const pointerCombineChar = ".";
|
||||
|
||||
export function isExpandable(value: string): number {
|
||||
|
|
|
|||
|
|
@ -292,4 +292,15 @@ suite("GDB Value Expansion", () => {
|
|||
}
|
||||
]);
|
||||
});
|
||||
test("float values", () => {
|
||||
let node = `{ intval1 = 123, floatval1 = 123.456, intval2 = 3, floatval2 = 234.45 }`;
|
||||
let variables = expandValue(variableCreate, node);
|
||||
|
||||
assert.deepEqual(variables, [
|
||||
{ name: "intval1", value: "123", variablesReference: 0 },
|
||||
{ name: "floatval1", value: "123.456", variablesReference: 0 },
|
||||
{ name: "intval2", value: "3", variablesReference: 0 },
|
||||
{ name: "floatval2", value: "234.45", variablesReference: 0 }
|
||||
]);
|
||||
});
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue