Class MachoProgramBuilder

    • Constructor Detail

    • Method Detail

      • buildProgram

        public static void buildProgram​(Program program,
                                        ByteProvider provider,
                                        FileBytes fileBytes,
                                        MessageLog log,
                                        TaskMonitor monitor)
                                 throws java.lang.Exception
        Builds up a Mach-O Program.
        Parameters:
        program - The Program to build up.
        provider - The ByteProvider that contains the Mach-O's bytes.
        fileBytes - Where the Mach-O's bytes came from.
        log - The log.
        monitor - A cancelable task monitor.
        Throws:
        java.lang.Exception - if a problem occurs.
      • build

        protected void build()
                      throws java.lang.Exception
        Throws:
        java.lang.Exception
      • processMemoryBlocks

        protected void processMemoryBlocks​(MachHeader header,
                                           java.lang.String source,
                                           boolean processSections,
                                           boolean allowZeroAddr)
                                    throws java.lang.Exception
        Creates memory blocks for the given header.
        Parameters:
        header - The Mach-O header to process for memory block creation.
        source - A name that represents where the memory blocks came from.
        processSections - True to split segments into their sections.
        allowZeroAddr - True if memory blocks at address 0 should be processed; otherwise, false.
        Throws:
        java.lang.Exception - If there was a problem processing the memory blocks.
      • markupHeaders

        protected void markupHeaders​(MachHeader header,
                                     Address headerAddr)
                              throws java.lang.Exception
        Throws:
        java.lang.Exception