public interface ProgramFragment extends Group, AddressSetViewA
ProgramFragmentis a set of
CodeUnits that have been bundled together with some additional information such as a name, comment, alias, etc. Every code unit in the program is in one and only one fragment so the fragments form a partition of the program. Fragments in turn are the building blocks of
ProgramModules. Program fragments and modules allow the user to overlay a hierarchical structure upon the program which can then be used to control viewing and navigating the program.
All Methods Instance Methods Abstract Methods Modifier and Type Method Description
contains(CodeUnit codeUnit)Returns whether this fragment contains the given code unit.
getCodeUnits()Returns a forward iterator over the code units making up this fragment.
move(Address min, Address max)Moves all of the code units in a given range into this fragment.
Methods inherited from interface ghidra.program.model.address.AddressSetView
contains, contains, contains, findFirstAddressInCommon, getAddresses, getAddresses, getAddressRanges, getAddressRanges, getAddressRanges, getFirstRange, getLastRange, getMaxAddress, getMinAddress, getNumAddresses, getNumAddressRanges, getRangeContaining, hasSameAddresses, intersect, intersectRange, intersects, intersects, isEmpty, iterator, iterator, iterator, subtract, union, xor
Methods inherited from interface ghidra.program.model.listing.Group
getComment, getName, getNumParents, getParentNames, getParents, getTreeName, setComment, setName
boolean contains(CodeUnit codeUnit)Returns whether this fragment contains the given code unit.
CodeUnitIterator getCodeUnits()Returns a forward iterator over the code units making up this fragment.
void move(Address min, Address max) throws NotFoundExceptionMoves all of the code units in a given range into this fragment. Note that
minmust the starting address of a code unit and
maxmust be the ending address of a code unit. Furthermore every address in the given range must exist in program memory.
min- min address of range specifying the code units to move
max- max address of range specifying the code units to move
NotFoundException- thrown if any address between
max(inclusive) does not belong to program memory.