30 lines
836 B
C++
30 lines
836 B
C++
//---
|
|
// fxos.disasm-passes.cfg: Control Flow Graph construction
|
|
//
|
|
// This pass explores functions and computes the [jmptarget] field of concrete
|
|
// instructions as it goes. This is required for other passes that work by
|
|
// traversing the CFG, such as the abstract interpretor.
|
|
//
|
|
// This is the main exploration pass. Other passes do not typically load new
|
|
// instructions from the underlying disassembly. Straightforward passes such as
|
|
// [print] iterate on instructions loaded by this pass.
|
|
//---
|
|
|
|
#ifndef LIBFXOS_DISASM_PASSES_CFG_H
|
|
#define LIBFXOS_DISASM_PASSES_CFG_H
|
|
|
|
#include <fxos/disassembly.h>
|
|
|
|
namespace FxOS {
|
|
|
|
class CfgPass: public DisassemblyPass
|
|
{
|
|
public:
|
|
CfgPass(Disassembly &disasm);
|
|
void analyze(uint32_t pc, ConcreteInstruction &inst) override;
|
|
};
|
|
|
|
} /* namespace FxOS */
|
|
|
|
#endif /* LIBFXOS_DISASM_PASSES_CFG_H */
|