Package mars.util

Class MemoryDump

java.lang.Object
mars.util.MemoryDump

public class MemoryDump extends Object
  • Constructor Details

    • MemoryDump

      public MemoryDump()
  • Method Details

    • getSegmentBounds

      public static Integer[] getSegmentBounds(String segment)
      Return array with segment address bounds for specified segment.
      Parameters:
      segment - String with segment name (initially ".text" and ".data")
      Returns:
      array of two Integer, the base and limit address for that segment. Null if parameter name does not match a known segment name.
    • getSegmentNames

      public static String[] getSegmentNames()
      Get the names of segments available for memory dump.
      Returns:
      array of Strings, each string is segment name (e.g. ".text", ".data")
    • getBaseAddresses

      public static int[] getBaseAddresses()
      Get the MIPS memory base address(es) of the specified segment name(s). If invalid segment name is provided, will throw NullPointerException, so I recommend getting segment names from getSegmentNames().
      Returns:
      Array of int containing corresponding base addresses.
    • getLimitAddresses

      public static int[] getLimitAddresses()
      Get the MIPS memory limit address(es) of the specified segment name(s). If invalid segment name is provided, will throw NullPointerException, so I recommend getting segment names from getSegmentNames().
      Returns:
      Array of int containing corresponding limit addresses.