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

Method dbgSymbolStuff

src/gdb.ts:402–418  ·  view source on GitHub ↗
(args: ConfigurationArguments, elfFile: string, func: string, file: string)

Source from the content-addressed store, hash-verified

400 }
401
402 private async dbgSymbolStuff(args: ConfigurationArguments, elfFile: string, func: string, file: string) {
403 if (os.userInfo().username === 'hdm') {
404 this.handleMsg('log', `Reading symbols from ${elfFile}\n`);
405 const tmpSymbols = new SymbolTable(this, [defSymbolFile(elfFile)]);
406 this.dbgSymbolTable = tmpSymbols;
407 await tmpSymbols.loadSymbols();
408 tmpSymbols.printToFile(elfFile + '.cd-dump');
409 let sym = tmpSymbols.getFunctionByName(func, file);
410 console.log(sym);
411 sym = tmpSymbols.getFunctionByName('memset');
412 console.log(sym);
413 this.handleMsg('log', 'Finished Reading symbols\n');
414 const functionSymbols = tmpSymbols.getFunctionSymbols();
415 const functions = functionSymbols.filter((s) => s.name === func);
416 console.log(functions);
417 }
418 }
419
420 protected launchRequest(response: DebugProtocol.LaunchResponse, args: ConfigurationArguments): void {
421 this.launchAttachInit(args);

Callers

nothing calls this directly

Calls 7

handleMsgMethod · 0.95
loadSymbolsMethod · 0.95
printToFileMethod · 0.95
getFunctionByNameMethod · 0.95
getFunctionSymbolsMethod · 0.95
defSymbolFileFunction · 0.90
logMethod · 0.80

Tested by

no test coverage detected