Class DWARFAmbigNumericAttribute
java.lang.Object
ghidra.app.util.bin.format.dwarf4.attribs.DWARFNumericAttribute
ghidra.app.util.bin.format.dwarf4.attribs.DWARFAmbigNumericAttribute
- All Implemented Interfaces:
DWARFAttributeValue
Stores a integer value (with ambiguous signedness) in a long, with a mask that will
allow the consumer at a later time to treat the value as signed or unsigned.
When supplied with a long value that was originally a smaller integer with its high-bit set, java will sign-extend the value to 64 bits. To treat this as an unsigned value, the mask needs to match the bitwidth of the supplied value, and is used to return the relevant number of bits from the value. (See NumberUtil.UNSIGNED_BYTE_MASK, etc)
This allows us to simplify the storage of a variable sized int value (1 byte, 2 byte, 4 byte, 8 byte) using just a 8 byte long and an 8 byte mask.
-
Field Summary
Fields inherited from class ghidra.app.util.bin.format.dwarf4.attribs.DWARFNumericAttribute
value
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class ghidra.app.util.bin.format.dwarf4.attribs.DWARFNumericAttribute
getValue
-
Constructor Details
-
DWARFAmbigNumericAttribute
public DWARFAmbigNumericAttribute(long value, long mask)
-
-
Method Details
-
getUnsignedValue
public long getUnsignedValue()- Overrides:
getUnsignedValue
in classDWARFNumericAttribute
-
toString
- Overrides:
toString
in classDWARFNumericAttribute
-