Class DWARFRange

java.lang.Object
ghidra.app.util.bin.format.dwarf.DWARFRange
All Implemented Interfaces:
Comparable<DWARFRange>

public class DWARFRange extends Object implements Comparable<DWARFRange>
Holds the start (inclusive) and end (exclusive, 1 past the last included address) addresses of a range.

DWARF ranges are slightly different than Ghidra ranges because the end address of a Ghidra AddressRange is inclusive, and the DWARF range is exclusive.

DWARF ranges can represent an empty range, Ghidra AddressRanges can not.
Ghidra AddressRanges can include the maximum 64bit address (0xffffffffffffffff), but DWARF ranges can not include that.

  • Field Details

  • Constructor Details

    • DWARFRange

      public DWARFRange(long start, long end)
      Constructs a new DWARFRange using start and end values.
      Parameters:
      start - long starting address, inclusive
      end - long ending address, exclusive
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • compareTo

      public int compareTo(DWARFRange other)
      Specified by:
      compareTo in interface Comparable<DWARFRange>
    • isEmpty

      public boolean isEmpty()
    • contains

      public boolean contains(long addr)
    • getFrom

      public long getFrom()
      Returns starting address.
      Returns:
      long starting address
    • getTo

      public long getTo()
      Returns ending address, exclusive.
      Returns:
      long ending address, exclusive.