Ghidra 11.3.2
Ghidra internal decompiler documentation.
Loading...
Searching...
No Matches
signature.hh File Reference

Classes for generating feature vectors representing individual functions. More...

#include "funcdata.hh"
Include dependency graph for signature.hh:
This graph shows which files directly or indirectly include this file:

Classes

class  ghidra::Signature
 A feature describing some aspect of a function or other unit of code. More...
 
class  ghidra::SignatureEntry
 A node for data-flow feature generation. More...
 
struct  ghidra::SignatureEntry::DFSNode
 A path node for doing depth first traversals of data-flow informed by SignatureEntry. More...
 
class  ghidra::BlockSignatureEntry
 A node for control-flow feature generation. More...
 
class  ghidra::VarnodeSignature
 A feature representing a portion of the data-flow graph rooted at a particular Varnode. More...
 
class  ghidra::BlockSignature
 A feature rooted in a basic block. More...
 
class  ghidra::CopySignature
 A feature representing 1 or more stand-alone copies in a basic block. More...
 
class  ghidra::SigManager
 A container for collecting a set of features (a feature vector) for a single function. More...
 
class  ghidra::GraphSigManager
 A manager for generating Signatures/features on function data-flow and control-flow. More...
 

Typedefs

typedef uint8 ghidra::hashword
 Data-type for containing hash information.
 

Functions

void ghidra::simpleSignature (Funcdata *fd, Encoder &encoder)
 Generate features for a single function.
 
void ghidra::debugSignature (Funcdata *fd, Encoder &encoder)
 Generate features (with debug info) for a single function.
 

Detailed Description

Classes for generating feature vectors representing individual functions.

Function Documentation

◆ debugSignature()

void ghidra::debugSignature ( Funcdata fd,
Encoder encoder 
)

Generate features (with debug info) for a single function.

Features are generated for the function and a complete description of each feature is written to the encoder. The function must have been previously decompiled.

Parameters
fdis the function to extract features from
encoderis the stream encoder to write output to

◆ simpleSignature()

void ghidra::simpleSignature ( Funcdata fd,
Encoder encoder 
)

Generate features for a single function.

Features are generated for the function and written to the encoder as a simple sequence of hash values. No additional information about the features is written to the encoder. The function must have been previously decompiled. If function decompilation failed due to either: flow into bad data or unimplemented instructions, an error condition is encoded to the stream.

Parameters
fdis the function to extract features from
encoderis the stream encoder to write output to