lib/mapfiles/map-file.js
/**
     * Retreives information from Map file contents
     *
     * @param {string} contents
     */
Retreives information from Map file contents
@param {string} contents
Retreives information from Map file contents @param { string } contents
loadMapFromString(contents) {
        const mapLines = utils.splitLines(contents);
        let readLineNumbersMode = false;
        let lineIdx = 0;
        while (lineIdx < mapLines.length) {
            const line = mapLines[lineIdx];
            if (!readLineNumbersMode) {
                this.tryReadingPreferredAddress(line);
                this.tryReadingEntryPoint(line);
                this.tryReadingCodeSegmentInfo(line);
                this.tryReadingNamedAddress(line);
                if (this.isStartOfLineNumbers(line)) {
                    readLineNumbersMode = true;
                    lineIdx++;
                }
            } else {
                if (!this.tryReadingLineNumbers(line)) {
                    readLineNumbersMode = false;
                }
            }
            lineIdx++;
        }
        this.reconstructSegmentsFromNamedAddresses();
    }
loadMapFromString ( contents ) { const mapLines = utils . splitLines ( contents ) ; let readLineNumbersMode = false ; let lineIdx = 0 ; while ( lineIdx < mapLines . length ) { const line = mapLines [ lineIdx ] ; if ( ! readLineNumbersMode ) { this . tryReadingPreferredAddress ( line ) ; this . tryReadingEntryPoint ( line ) ; this . tryReadingCodeSegmentInfo ( line ) ; this . tryReadingNamedAddress ( line ) ; if ( this . isStartOfLineNumbers ( line ) ) { readLineNumbersMode = true ; lineIdx ++ ; } } else { if ( ! this . tryReadingLineNumbers ( line ) ) { readLineNumbersMode = false ; } } lineIdx ++ ; } this . reconstructSegmentsFromNamedAddresses ( ) ; }
Retreives information from Map file contents
 @param {string} contents
Retreives information from Map file contents @param { string } contents