Module openj9.dtfj

Interface IAbstractAddressSpace

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      int bytesPerPointer​(int asid)
      Provided so that callers can determine more complicated memory geometry than what can be expressed with offsets and the above scalar data readers.
      long findPattern​(byte[] whatBytes, int alignment, long startFrom)
      This method is provided to appease JExtract by emulating part of the old API which is used by the JExtract natives.
      byte getByteAt​(int asid, long address)  
      ByteOrder getByteOrder()
      Return the byte order of this address space.
      int getBytesAt​(int asid, long address, byte[] buffer)  
      int getIntAt​(int asid, long address)  
      long getLongAt​(int asid, long address)  
      byte[] getMemoryBytes​(long vaddr, int size)
      This method is provided to appease JExtract by emulating part of the old API which is used by the JExtract natives.
      Iterator getMemoryRanges()  
      long getPointerAt​(int asid, long address)  
      short getShortAt​(int asid, long address)  
      boolean isExecutable​(int asid, long address)  
      boolean isReadOnly​(int asid, long address)  
      boolean isShared​(int asid, long address)  
    • Method Detail

      • getMemoryRanges

        Iterator getMemoryRanges()
        Returns:
        An iterator of the MemoryRange objects making up the address space
        See Also:
        MemoryRange
      • isExecutable

        boolean isExecutable​(int asid,
                             long address)
                      throws MemoryAccessException
        Parameters:
        asid - an address space ID
        address - a byte-offset into the asid
        Returns:
        true if this memory address is within an executable page
        Throws:
        MemoryAccessException - if the memory cannot be read
      • isReadOnly

        boolean isReadOnly​(int asid,
                           long address)
                    throws MemoryAccessException
        Parameters:
        asid - an address space ID
        address - a byte-offset into the asid
        Returns:
        true if write access to this memory address was disabled in the image
        Throws:
        MemoryAccessException - if the memory cannot be read
      • isShared

        boolean isShared​(int asid,
                         long address)
                  throws MemoryAccessException
        Parameters:
        asid - an address space ID
        address - a byte-offset into the asid
        Returns:
        true if this memory address is shared between processes
        Throws:
        MemoryAccessException - if the memory cannot be read
      • getLongAt

        long getLongAt​(int asid,
                       long address)
                throws MemoryAccessException
        Parameters:
        asid - an address space ID
        address - a byte-offset into the asid
        Returns:
        the 64-bit long stored at address in asid
        Throws:
        MemoryAccessException - if the memory cannot be read
      • getIntAt

        int getIntAt​(int asid,
                     long address)
              throws MemoryAccessException
        Parameters:
        asid - an address space ID
        address - a byte-offset into the asid
        Returns:
        the 32-bit int stored at address in asid
        Throws:
        MemoryAccessException - if the memory cannot be read
      • getShortAt

        short getShortAt​(int asid,
                         long address)
                  throws MemoryAccessException
        Parameters:
        asid - an address space ID
        address - a byte-offset into the asid
        Returns:
        the 16-bit short stored at address in asid
        Throws:
        MemoryAccessException - if the memory cannot be read
      • getByteOrder

        ByteOrder getByteOrder()
        Return the byte order of this address space.
        Returns:
        the byte order of this address space
      • getByteAt

        byte getByteAt​(int asid,
                       long address)
                throws MemoryAccessException
        Parameters:
        asid - an address space ID
        address - a byte-offset into the asid
        Returns:
        the 8-bit byte stored at address in asid
        Throws:
        MemoryAccessException - if the memory cannot be read
      • getPointerAt

        long getPointerAt​(int asid,
                          long address)
                   throws MemoryAccessException
        Parameters:
        asid - an address space ID
        address - a byte-offset into the asid
        Returns:
        the pointer stored at address in asid
        Throws:
        MemoryAccessException - if the memory cannot be read
      • getBytesAt

        int getBytesAt​(int asid,
                       long address,
                       byte[] buffer)
                throws MemoryAccessException
        Parameters:
        asid - an address space ID
        address - a byte-offset into the asid
        buffer - a byte array to receive the bytes
        Returns:
        the number of bytes read into buffer
        Throws:
        MemoryAccessException - if the memory cannot be read
      • bytesPerPointer

        int bytesPerPointer​(int asid)
        Provided so that callers can determine more complicated memory geometry than what can be expressed with offsets and the above scalar data readers.
        Parameters:
        asid - The address space id.
        Returns:
        The number of bytes which are required to express a native pointer in the underlying address space.
      • findPattern

        long findPattern​(byte[] whatBytes,
                         int alignment,
                         long startFrom)
        This method is provided to appease JExtract by emulating part of the old API which is used by the JExtract natives. Also used to search for the J9RAS structure in J9RASReader.java
        Parameters:
        whatBytes - The pattern to search for
        alignment - The alignment boundary where the pattern can be expected to start
        startFrom - The first memory address to start searching in
        Returns:
      • getMemoryBytes

        byte[] getMemoryBytes​(long vaddr,
                              int size)
        This method is provided to appease JExtract by emulating part of the old API which is used by the JExtract natives.
        Parameters:
        vaddr -
        size -
        Returns: