MCPcopy Create free account
hub / github.com/Marus/cortex-debug / findOrCreateVariable

Method findOrCreateVariable

src/gdb.ts:2768–2778  ·  view source on GitHub ↗
(varObj: VariableObject)

Source from the content-addressed store, hash-verified

2766 }
2767
2768 private findOrCreateVariable(varObj: VariableObject): number {
2769 let id: number;
2770 if (this.variableHandlesReverse.hasOwnProperty(varObj.name)) {
2771 id = this.variableHandlesReverse[varObj.name];
2772 }
2773 else {
2774 id = this.createVariable(varObj);
2775 this.variableHandlesReverse[varObj.name] = id;
2776 }
2777 return varObj.isCompound() ? id : 0;
2778 }
2779
2780 protected createStackVarName(name: string, varRef: number) {
2781 return `var_${name}_${varRef}`;

Callers 2

variablesRequestMethod · 0.95

Calls 2

createVariableMethod · 0.95
isCompoundMethod · 0.80

Tested by

no test coverage detected