Package ghidra.program.model.listing
Interface ProgramFragment
- All Superinterfaces:
AddressSetView,Group,Iterable<AddressRange>
A
ProgramFragment is 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.-
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns whether this fragment contains the given code unit.Returns a forward iterator over the code units making up this fragment.voidMoves 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, getAddressCountBefore, getAddresses, getAddresses, getAddressRanges, getAddressRanges, getAddressRanges, getFirstRange, getLastRange, getMaxAddress, getMinAddress, getNumAddresses, getNumAddressRanges, getRangeContaining, hasSameAddresses, intersect, intersectRange, intersects, intersects, isEmpty, iterator, iterator, iterator, spliterator, spliterator, spliterator, stream, stream, stream, subtract, union, xorMethods inherited from interface ghidra.program.model.listing.Group
getComment, getGroupPath, getMaxAddress, getMinAddress, getName, getNumParents, getParentNames, getParents, getTreeName, isDeleted, setComment, setName
-
Method Details
-
contains
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
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.
-