BBLFactory Type
Per-function factory for basic blocks. Each BBL is memoized so that we do not create multiple BBLs for the same address. As this is a per-function structure, each different function has its own BBLFactory.
Constructors
| Constructor |
Description
|
Full Usage:
BBLFactory(hdl, instrs)
Parameters:
BinHandle
instrs : InstructionCollection
Returns: BBLFactory
|
|
Full Usage:
BBLFactory(hdl, instrs, blkOptimizer)
Parameters:
BinHandle
instrs : InstructionCollection
blkOptimizer : IIRBlockOptimizable
Returns: BBLFactory
|
|
Instance members
| Instance member |
Description
|
|
|
Full Usage:
this.Count
Returns: int
|
Number of BBLs in the factory.
|
|
Find an existing BBL that contains the given program point.
|
Full Usage:
this.PeekBBL
Parameters:
Addr
Returns: Result<IInstruction list, IInstruction list>
|
Peek the BBL at the given address without caching it. This function is useful when we want to check if an arbitrary address contains a meaningful BBL without affecting the BBLFactory state.
|
Full Usage:
this.ScanBBLs
Parameters:
Addr seq
?allowOverlap : bool
Returns: Task<Result<List<ProgramPoint * ProgramPoint>, ErrorCase>>
|
Scan all directly reachable intra-procedural BBLs from the given addresses. This function does not handle indirect branches nor call instructions. It always assumes that a call instruction will never return in order to avoid parsing incorrect BBLs. Fall-through BBLs should be considered only after we know that the target function can return (after a no-return analysis), which is not the scope of BBLFactory. In the end, this function returns a list of divided edges, which are pairs of BBL addresses that have been created from a single BBL by splitting it. A BBL can be divided if there is a new control flow target within the BBL. When the `allowOverlap` argument is true, however, we do not split BBLs and allow overlapping BBLs. This is useful when we analyze EVM binaries, for instance.
|
Full Usage:
this.TryFind
Parameters:
ProgramPoint
Returns: Result<LowUIRBasicBlock, ErrorCase>
|
Find an existing BBL that is located at the given program point. If there is no such BBL, then this function will return an error.
|
B2R2