Package mars.util
Class MemoryDump
java.lang.Object
mars.util.MemoryDump
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic int[]Get the MIPS memory base address(es) of the specified segment name(s).static int[]Get the MIPS memory limit address(es) of the specified segment name(s).static Integer[]getSegmentBounds(String segment) Return array with segment address bounds for specified segment.static String[]Get the names of segments available for memory dump.
- 
Constructor Details- 
MemoryDumppublic MemoryDump()
 
- 
- 
Method Details- 
getSegmentBoundsReturn 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.
 
- 
getSegmentNamesGet the names of segments available for memory dump.- Returns:
- array of Strings, each string is segment name (e.g. ".text", ".data")
 
- 
getBaseAddressespublic 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.
 
- 
getLimitAddressespublic 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.
 
 
-