Class AddressFormatter
java.lang.Object
com.pnfsoftware.jeb.core.units.code.asm.render.AddressFormatter
A native memory address formatter.
The formatter can generate different types of addresses:
- As an absolute address (always in hexadecimal form)
- As a label (using a
INativeCodeUnit
) - As a relative address in hexadecimal/decimal
As an example: loc_400248
-> 400248h
-> PC+10h
/
PC+16
.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionAddressFormatter
(AddressFormatter.AddressBase base, String pcName, NumberFormatter.HexaNotationType hexNotation) -
Method Summary
Modifier and TypeMethodDescriptionformat
(int bitsize, long address, IInstructionOperandGeneric opnd) format
(INativeCodeUnit<?> unit, int bitsize, long address, IInstructionOperandGeneric opnd) Format a number using the formatter's current settings.format
(INativeCodeUnit<?> unit, int bitsize, long address, IInstructionOperandGeneric opnd, AddressFormatter.AddressBase base) getBase()
void
void
setHexaNotationType
(NumberFormatter.HexaNotationType hexaNotationType) void
setRelativePrefix
(String relativePrefix)
-
Constructor Details
-
AddressFormatter
public AddressFormatter() -
AddressFormatter
public AddressFormatter(AddressFormatter.AddressBase base, String pcName, NumberFormatter.HexaNotationType hexNotation)
-
-
Method Details
-
setBase
-
getBase
-
setRelativePrefix
-
getRelativePrefix
-
setHexaNotationType
-
getHexaNotationType
-
format
public String format(INativeCodeUnit<?> unit, int bitsize, long address, IInstructionOperandGeneric opnd) Format a number using the formatter's current settings. -
format
-
format
public String format(INativeCodeUnit<?> unit, int bitsize, long address, IInstructionOperandGeneric opnd, AddressFormatter.AddressBase base)
-