Package ghidra.pcode.emu.jit
Record Class JitPassage.ErrBranch
java.lang.Object
java.lang.Record
ghidra.pcode.emu.jit.JitPassage.ErrBranch
- Record Components:
from
- seefrom()
message
- the error message for the exception
- All Implemented Interfaces:
JitPassage.Branch
- Enclosing class:
JitPassage
public static record JitPassage.ErrBranch(PcodeOp from, String message)
extends Record
implements JitPassage.Branch
A "branch" representing an error
When execution encounters this branch, the run
method
throws an exception. This branch is used to encode error conditions that may not actually be
encountered at run time. Some cases are:
- An instruction decode error — synthesized as a
JitPassage.DecodeErrorPcodeOp
- An
unimplemented
instruction - A
call
to an undefined userop
The decoder and translator may encounter such an error, but unless execution actually reaches the error, the emulator need not crash. Thus, we note the error and generate code that will actually throw it in the translation, only if it's actually encountered.
Note that the OpGen
for the specific p-code op generating the error will decide what
exception type to throw.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.from()
Returns the value of thefrom
record component.final int
hashCode()
Returns a hash code value for this object.message()
Returns the value of themessage
record component.final String
toString()
Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface ghidra.pcode.emu.jit.JitPassage.Branch
describeTo, isFall
-
Constructor Details
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object)
. -
from
Returns the value of thefrom
record component.- Specified by:
from
in interfaceJitPassage.Branch
- Returns:
- the value of the
from
record component
-
message
Returns the value of themessage
record component.- Returns:
- the value of the
message
record component
-