Ghidra 11.3.2
Ghidra internal decompiler documentation.
Loading...
Searching...
No Matches
ghidra::BlockSignature Class Reference

A feature rooted in a basic block. More...

#include <signature.hh>

Inheritance diagram for ghidra::BlockSignature:
[legend]
Collaboration diagram for ghidra::BlockSignature:
[legend]

Public Member Functions

 BlockSignature (const BlockBasic *b, hashword h, const PcodeOp *o1, const PcodeOp *o2)
 Constructor.
 
virtual void encode (Encoder &encoder) const
 
virtual void printOrigin (ostream &s) const
 Restore this feature from the given stream.
 
- Public Member Functions inherited from ghidra::Signature
 Signature (hashword h)
 Constructor.
 
uint4 getHash (void) const
 Get the underyling 32-bit hash of the feature.
 
void print (ostream &s) const
 Print the feature hash and a brief description of this feature to the given stream.
 
int4 compare (const Signature *op2) const
 Compare two features.
 
virtual ~Signature (void)
 Destructor.
 
virtual void decode (Decoder &decoder)
 Encode this feature to the given stream.
 

Private Attributes

const BlockBasicbl
 The root basic block.
 
const PcodeOpop1
 (Form 2)The first operation in sequence in the feature
 
const PcodeOpop2
 (Form 2)The second operation in sequence in the feature
 

Additional Inherited Members

- Static Public Member Functions inherited from ghidra::Signature
static bool comparePtr (Signature *a, Signature *b)
 Compare two Signature pointers via their underlying hash values.
 

Detailed Description

A feature rooted in a basic block.

There are two forms of a block feature. Form 1 contains only local control-flow information about the basic block. Form 2 is a feature that combines two operations that occur in sequence within the block. This form incorporates info about the operations and data-flow info about their inputs.

Member Function Documentation

◆ encode()

void ghidra::BlockSignature::encode ( Encoder encoder) const
virtual

The hash value is encoded to the stream, along with any descriptive information about how the feature was formed.

Parameters
encoderis the stream encoder

Reimplemented from ghidra::Signature.

References bl, ghidra::Encoder::closeElement(), ghidra::Address::encode(), ghidra::PcodeOp::encode(), ghidra::Signature::getHash(), ghidra::FlowBlock::getIndex(), ghidra::BlockBasic::getStart(), op1, op2, ghidra::Encoder::openElement(), ghidra::Encoder::writeSignedInteger(), and ghidra::Encoder::writeUnsignedInteger().

◆ printOrigin()

virtual void ghidra::BlockSignature::printOrigin ( ostream &  s) const
inlinevirtual

Restore this feature from the given stream.

Print a brief description of this feature to the given stream

Reimplemented from ghidra::Signature.

References bl, and ghidra::BlockBasic::printHeader().


The documentation for this class was generated from the following files: