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

Method addSymbol

src/backend/symbols.ts:322–339  ·  view source on GitHub ↗
(sym: SymbolInformation)

Source from the content-addressed store, hash-verified

320 private rttSymbol;
321 public readonly rttSymbolName = '_SEGGER_RTT';
322 private addSymbol(sym: SymbolInformation) {
323 if ((sym.length === 0) && /^\$[atdbfpm]$/.test(sym.name)) {
324 // see https://docs.adacore.com/live/wave/binutils-stable/html/as/as.html#ARM-Mapping-Symbols
325 // These are special markers for start of (a)RM, (t)humb, (d)ata sections and other not yet implemented
326 return;
327 }
328
329 if (!this.rttSymbol && (sym.name === this.rttSymbolName) && (sym.type === SymbolType.Object) && (sym.length > 0)) {
330 this.rttSymbol = sym;
331 }
332
333 this.allSymbols.push(sym);
334 if ((sym.type === SymbolType.Function) || (sym.length > 0)) {
335 const treeSym = new SymbolNode(sym, sym.address, sym.address + Math.max(1, sym.length) - 1);
336 this.symbolsAsIntervalTree.insert(treeSym);
337 }
338 this.addSymbolToTrees(sym);
339 }
340
341 private addSymbolToTrees(sym: SymbolInformation) {
342 const add = (symt: AddressToSym, address: number) => {

Callers 1

readObjdumpSymbolLineMethod · 0.95

Calls 1

addSymbolToTreesMethod · 0.95

Tested by

no test coverage detected