Package ghidra.program.model.listing
Interface ProgramFragment
-
- All Superinterfaces:
AddressSetView,Group,java.lang.Iterable<AddressRange>
public interface ProgramFragment extends Group, AddressSetView
AProgramFragmentis a set ofCodeUnits 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 ofProgramModules. 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.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleancontains(CodeUnit codeUnit)Returns whether this fragment contains the given code unit.CodeUnitIteratorgetCodeUnits()Returns a forward iterator over the code units making up this fragment.voidmove(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
-
-
-
-
Method Detail
-
contains
boolean contains(CodeUnit codeUnit)
Returns whether this fragment contains the given code unit.
-
getCodeUnits
CodeUnitIterator getCodeUnits()
Returns a forward iterator over the code units making up this fragment.
-
move
void move(Address min, Address max) throws NotFoundException
Moves all of the code units in a given range into this fragment. Note thatminmust the starting address of a code unit andmaxmust be the ending address of a code unit. Furthermore every address in the given range must exist in program memory.- Parameters:
min- min address of range specifying the code units to movemax- max address of range specifying the code units to move- Throws:
NotFoundException- thrown if any address betweenminandmax(inclusive) does not belong to program memory.
-
-