Java Code Examples for ghidra.program.model.listing.CodeUnit#getAddress()

The following examples show how to use ghidra.program.model.listing.CodeUnit#getAddress() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: NextPreviousLabelAction.java    From ghidra with Apache License 2.0 5 votes vote down vote up
private Address getAddressOfNextCodeUnit(Program program, Address address) {
	CodeUnit cu = program.getListing().getCodeUnitAfter(address);
	if (cu == null) {
		return null;
	}
	return cu.getAddress();
}
 
Example 2
Source File: NextPreviousLabelAction.java    From ghidra with Apache License 2.0 5 votes vote down vote up
private Address getAddressOfPreviousCodeUnit(Program program, Address address) {
	CodeUnit cu = program.getListing().getCodeUnitBefore(address);
	if (cu == null) {
		return null;
	}
	return cu.getAddress();
}
 
Example 3
Source File: ScalarRowObject.java    From ghidra with Apache License 2.0 4 votes vote down vote up
ScalarRowObject(CodeUnit codeUnit, Scalar scalar) {
	this.codeUnit = Objects.requireNonNull(codeUnit);
	this.address = codeUnit.getAddress();
	this.scalar = Objects.requireNonNull(scalar);
}