|
decompiler 1.0.0
|
A walker extension that allows for on the fly modifications to the constructor tree. More...
#include <context.hh>
Public Member Functions | |
| ParserWalkerChange (ParserContext *c) | |
| Constructor. | |
| ParserContext * | getParserContext (void) |
| Get the currently active context. | |
| ConstructState * | getPoint (void) |
| Get the current. | |
| void | setOffset (uint4 off) |
| Get the current node in the constructor tree. | |
| void | setConstructor (Constructor *c) |
| Set the underlying Constructor for the current node. | |
| void | setCurrentLength (int4 len) |
| Set the length associated with the current constructor. | |
| void | calcCurrentLength (int4 length, int4 numopers) |
| Calculate the length of the current constructor. More... | |
Public Member Functions inherited from ghidra::ParserWalker | |
| ParserWalker (const ParserContext *c) | |
| Constructor. | |
| ParserWalker (const ParserContext *c, const ParserContext *cross) | |
| Constructor for crossbuilds. | |
| const ParserContext * | getParserContext (void) const |
| Get the current context. | |
| void | baseState (void) |
| Initialize for a new walk. | |
| void | setOutOfBandState (Constructor *ct, int4 index, ConstructState *tempstate, const ParserWalker &otherwalker) |
| Initialize this from another walker assuming a given constructor and operand is the current position in the walk. More... | |
| bool | isState (void) const |
| Return true if there are more nodes to traverse. | |
| void | pushOperand (int4 i) |
| Make the indicated child (operand) the current node. More... | |
| void | popOperand (void) |
| Make the parent constructor the current node. | |
| uint4 | getOffset (int4 i) const |
| Get the byte offset of the indicated operand within the instruction stream. | |
| Constructor * | getConstructor (void) const |
| Get the current constructor. | |
| int4 | getOperand (void) const |
| Get the operand index of the next constructor in the walk. | |
| FixedHandle & | getParentHandle (void) |
| Get the resolved value associated with the current constructor. | |
| const FixedHandle & | getFixedHandle (int4 i) const |
| Get the resolved value associated with the indicated child operand. | |
| AddrSpace * | getCurSpace (void) const |
| Get the address space associated with the instruction stream. | |
| AddrSpace * | getConstSpace (void) const |
| Get the constant address space. | |
| const Address & | getAddr (void) const |
| Get the starting address of the instruction. | |
| const Address & | getNaddr (void) const |
| Get the address of the next instruction. | |
| const Address & | getN2addr (void) const |
| Get the address of the instruction after next. | |
| const Address & | getRefAddr (void) const |
| Get the reference address (inst_ref) for the p-code snippet. | |
| const Address & | getDestAddr (void) const |
| Get the destination address (inst_dest) for the overridden call. | |
| int4 | getLength (void) const |
| Get the length of the instruction in bytes. | |
| uintm | getInstructionBytes (int4 byteoff, int4 numbytes) const |
| Get packed instruction bytes associated with the current constructor. More... | |
| uintm | getContextBytes (int4 byteoff, int4 numbytes) const |
| Get packed context bytes from the local context. More... | |
| uintm | getInstructionBits (int4 startbit, int4 size) const |
| Get bits from the instruction stream associated with the current constructor. More... | |
| uintm | getContextBits (int4 startbit, int4 size) const |
| Get a range of bits from the local context. More... | |
Private Attributes | |
| ParserContext * | context |
| The (currently active) context. | |
Friends | |
| class | ParserContext |
Additional Inherited Members | |
Protected Attributes inherited from ghidra::ParserWalker | |
| ConstructState * | point |
| The current node being visited. | |
| int4 | depth |
| Depth of the current node. | |
| int4 | breadcrumb [ParserContext::MAX_DEPTH] |
| Path of operands from root. | |
A walker extension that allows for on the fly modifications to the constructor tree.
This is used to build the constructor tree as the instruction is parsed (Sleigh::resolve)
| void ghidra::ParserWalkerChange::calcCurrentLength | ( | int4 | length, |
| int4 | numopers | ||
| ) |
Calculate the length of the current constructor.
This assumes all the current nodes operands have been parsed into the tree.
| length | is the minimum length of the current constructor |
| numopers | is the number of operands |
References ghidra::ConstructState::length, ghidra::ConstructState::offset, ghidra::ParserWalker::point, and ghidra::ConstructState::resolve.
Referenced by ghidra::Sleigh::resolve().