Interface TraceSection

All Superinterfaces:
TraceObjectInterface, TraceUniqueObject
All Known Implementing Classes:
DBTraceSection

public interface TraceSection extends TraceUniqueObject, TraceObjectInterface
An allocated section of a binary module

Note that the model should only present those sections which are allocated in memory. Otherwise strange things may happen, such as zero-length ranges (which AddressRange hates), or overlapping ranges (which Trace hates).

LATER?: Present all sections, but include isAllocated

  • Field Details

  • Method Details

    • getTrace

      Trace getTrace()
      Get the trace containing this section
      Returns:
      the trace
    • getModule

      TraceModule getModule()
      Get the module containing this section
      Returns:
      the module
    • getPath

      String getPath()
      Get the "full name" of this section

      This is a unique key (within a snap) among all sections, and may not be suitable for display on the screen.

      Returns:
      the path
    • setName

      void setName(Lifespan lifespan, String name)
      Set the short name of this section

      The given name should be the section's name from its module's image, which is considered suitable for display on the screen.

      Parameters:
      lifespan - the span of time
      name - the name
    • setName

      void setName(long snap, String name) throws DuplicateNameException
      Set the short name of this section

      The given name should be the section's name from its module's image, which is considered suitable for display on the screen.

      Parameters:
      snap - the snap
      name - the name
      Throws:
      DuplicateNameException - if the specified name would conflict with another section's in this module
    • getName

      String getName(long snap)
      Get the "short name" of this section

      This defaults to the "full name," but can be modified via setName(long, String)

      Parameters:
      snap - the snap
      Returns:
      the name
    • setRange

      void setRange(Lifespan lifespan, AddressRange range)
      Set the virtual memory address range of this section
      Parameters:
      lifespan - the span of time
      range - the span of addresses
    • getRange

      AddressRange getRange(long snap)
      Get the virtual memory address range of this section
      Parameters:
      snap - the snap
      Returns:
      the address range
    • getStart

      default Address getStart(long snap)
      Parameters:
      snap - the snap
      Returns:
      the min address in the range
      See Also:
    • getEnd

      default Address getEnd(long snap)
      Parameters:
      snap - the snap
      Returns:
      the max address in the range
      See Also:
    • delete

      void delete()
      Delete this section from the trace
    • remove

      void remove(long snap)
      Remove this section from the given snap on
      Parameters:
      snap - the snap
    • isValid

      boolean isValid(long snap)
      Check if the section is valid at the given snapshot
      Parameters:
      snap - the snapshot key
      Returns:
      true if valid, false if not