Package ghidra.program.model.listing
Interface ProgramFragment
- All Superinterfaces:
AddressSetView
,Group
,Iterable<AddressRange>
A
ProgramFragment
is a set of CodeUnit
s 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 ProgramModule
s. 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 TypeMethodDescriptionboolean
Returns whether this fragment contains the given code unit.Returns a forward iterator over the code units making up this fragment.void
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, getAddressCountBefore, 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
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
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 thatmin
must the starting address of a code unit andmax
must 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 betweenmin
andmax
(inclusive) does not belong to program memory.
-