Interface DebuggerAddressTranslator

All Known Subinterfaces:
DebuggerStaticMappingService
All Known Implementing Classes:
IdentityDebuggerAddressTranslator

public interface DebuggerAddressTranslator
This interface provides a mechanism for translating static address to dynamic and vice versa, with respect to each trace's "Static Mappings" table.
  • Method Details

    • getOpenMappedProgramsAtSnap

      Set<Program> getOpenMappedProgramsAtSnap(Trace trace, long snap)
      Collect all the open destination programs relevant for the given trace and snap
      Parameters:
      trace - the trace
      snap - the snap
      Returns:
      the set of open destination programs
    • getOpenMappedLocation

      ProgramLocation getOpenMappedLocation(TraceLocation loc)
      Map the given trace location to a program location, if the destination is open
      Parameters:
      loc - the source location
      Returns:
      the destination location, or null if not mapped, or not open
    • getStaticLocationFromDynamic

      ProgramLocation getStaticLocationFromDynamic(ProgramLocation loc)
      Similar to getOpenMappedLocation(TraceLocation) but preserves details

      The given location's ProgramLocation.getProgram() method must return a TraceProgramView. It derives the trace and snap from that view. Additionally, this will attempt to map over other "location" details, e.g., field, row, column.

      Parameters:
      loc - a location within a trace view
      Returns:
      a mapped location in a program, or null
    • getOpenMappedLocations

      Set<TraceLocation> getOpenMappedLocations(ProgramLocation loc)
      Map the given program location back to open source trace locations
      Parameters:
      loc - the program location
      Returns:
      the, possibly empty, set of trace locations
    • getOpenMappedLocation

      TraceLocation getOpenMappedLocation(Trace trace, ProgramLocation loc, long snap)
      Map the given program location back to a source trace and snap
      Parameters:
      trace - the source trace, to which we are mapping back
      loc - the destination location, from which we are mapping back
      snap - the source snap, to which we are mapping back
      Returns:
      the source of the found mapping, or null if not mapped
    • getDynamicLocationFromStatic

      ProgramLocation getDynamicLocationFromStatic(TraceProgramView view, ProgramLocation loc)
      Similar to getOpenMappedLocation(Trace, ProgramLocation, long) but preserves details

      This method derives the source trace and snap from the given view. Additinoally, this will attempt to map over other "location" details, e.g., field, row, column.

      Parameters:
      view - the view, specifying the source trace and snap, to which we are mapping back
      loc - the destination location, from which we are mapping back.
      Returns:
      the destination of the found mapping, or null if not mapped
    • getOpenMappedViews

      Map<Program, Collection<MappedAddressRange>> getOpenMappedViews(Trace trace, AddressSetView set, long snap)
      Find/compute all destination address sets given a source trace address set
      Parameters:
      trace - the source trace
      set - the source address set
      snap - the source snap
      Returns:
      a map of destination programs to corresponding computed destination address ranges
    • getOpenMappedViews

      Map<TraceSpan, Collection<MappedAddressRange>> getOpenMappedViews(Program program, AddressSetView set)
      Find/compute all source address sets given a destination program address set
      Parameters:
      program - the destination program, from which we are mapping back
      set - the destination address set, from which we are mapping back
      Returns:
      a map of source traces to corresponding computed source address ranges
    • getMappedProgramUrlsInView

      Set<URL> getMappedProgramUrlsInView(Trace trace, AddressSetView set, long snap)
      Get all destination program URLs in mappings intersecting the given source trace, address set, and snap
      Parameters:
      trace - the source trace
      set - the source address set
      snap - the source snap
      Returns:
      the set of destination URLs