Package ghidra.trace.model.modules

# 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 Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final String`
  `KEY_MODULE`
  `static final String`
  `KEY_RANGE`

  ### Fields inherited from interface ghidra.trace.model.target.iface.TraceObjectInterface

  `KEY_COMMENT, KEY_DISPLAY, KEY_KIND, KEY_MODIFIED, KEY_ORDER, KEY_SHORT_DISPLAY, KEY_TYPE, KEY_VALUE`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `delete()`
  Delete this section from the trace
  `default Address`
  `getEnd(long snap)`
  `TraceModule`
  `getModule()`
  Get the module containing this section
  `String`
  `getName(long snap)`
  Get the "short name" of this section
  `String`
  `getPath()`
  Get the "full name" of this section
  `AddressRange`
  `getRange(long snap)`
  Get the virtual memory address range of this section
  `default Address`
  `getStart(long snap)`
  `Trace`
  `getTrace()`
  Get the trace containing this section
  `boolean`
  `isValid(long snap)`
  Check if the section is valid at the given snapshot
  `void`
  `remove(long snap)`
  Remove this section from the given snap on
  `void`
  `setName(long snap, String name)`
  Set the short name of this section
  `void`
  `setName(Lifespan lifespan, String name)`
  Set the short name of this section
  `void`
  `setRange(Lifespan lifespan, AddressRange range)`
  Set the virtual memory address range of this section

  ### Methods inherited from interface ghidra.trace.model.target.iface.TraceObjectInterface

  `getObject`

  ### Methods inherited from interface ghidra.trace.model.TraceUniqueObject

  `getObjectKey, isDeleted`

- ## Field Details

  - ### KEY_MODULE

    static final String KEY_MODULE
    See Also:
      - Constant Field Values

  - ### KEY_RANGE

    static final String KEY_RANGE
    See Also:
      - Constant Field Values

- ## 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:
      - `getRange(long)`

  - ### getEnd

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

  - ### 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