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

Method createPortsMap

src/gdb.ts:960–973  ·  view source on GitHub ↗
(ports: number[])

Source from the content-addressed store, hash-verified

958 }
959
960 private createPortsMap(ports: number[]) {
961 const numProcs = this.args.numberOfProcessors;
962 this.ports = {};
963 let idx = 0;
964 // Ports are allocated so that all ports of same type come consecutively, then next and
965 // so on. This is the method used by most gdb-servers.
966 for (const pName of this.serverController.portsNeeded) {
967 for (let proc = 0; proc < numProcs; proc++) {
968 const nm = createPortName(proc, pName);
969 this.ports[nm] = ports[idx++];
970 }
971 }
972 this.args.pvtPorts = this.ports;
973 }
974
975 protected isMIStatusStopped(): boolean {
976 // We get the status from the MI because we may not have received the event yet

Callers 1

getTCPPortsMethod · 0.95

Calls 1

createPortNameFunction · 0.90

Tested by

no test coverage detected