Class AddressDecoder

Class to check and decode an address

Constructors

Properties

intervals: number[][] = []
sha: string[] = []
subprograms: SubprogramInfo[][] = []

Methods

  • Parameters

    • cu: CompileUnit
    • address: number
    • dwarfinfo: DWARFInfo

    Returns undefined | AddressLocation

  • decode the address and call the output function with the decoded address

    Parameters

    • address: number

      the address to decode

    • outputFn: ((message) => void)

      the function to call with the decoded address

        • (message): void
        • Parameters

          • message: string

          Returns void

    Returns boolean

    true if the address was decoded, false otherwise

  • Given an address, decode it and return the function name and line

    Parameters

    • address: number

      the address to decode

    Returns undefined | {
        fnName: string;
        line: undefined | AddressLocation;
    }

    the decoded address or undefined if it wasn't decoded

  • load elf file and parse it

    Parameters

    • elfFileBuffer: ArrayBufferLike

      elf file buffer

    Returns Promise<{
        isRom: boolean;
        subprograms: SubprogramInfo[];
    }>

    sorted subprograms

  • Parameters

    • line: string
    • outputFn: ((message) => void)
        • (message): void
        • Parameters

          • message: string

          Returns void

    Returns void

  • load elf files and filter for faster address decoding

    Parameters

    • elfFileBuffers: ArrayBufferLike[]

      elf file buffers

    Returns Promise<void>