Class MachoProgramBuilder

  • Direct Known Subclasses:
    MachoPrelinkProgramBuilder

    public class MachoProgramBuilder
    extends java.lang.Object
    Builds up a Mach-O Program by parsing the Mach-O headers.

Constructor Detail

  • Method Detail

    • buildProgram

      public static void buildProgram​(Program program,
                                      ByteProvider provider,
                                      MessageLog log,
                                      MemoryConflictHandler memoryConflictHandler,
                                      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.
      log - The log.
      memoryConflictHandler - How to handle memory conflicts that may occur.
      monitor - A cancelable task monitor.
      Throws:
      java.lang.Exception - if a problem occurs.
    • build NEW

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

      protected void processMemoryBlocks​(MachHeader header,
                                         java.lang.String source,
                                         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.
      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 NEW

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