32 lines
741 B
C++
32 lines
741 B
C++
//---
|
|
// fxos.disasm-passes.syscall: Detection and substitution of syscall addresses
|
|
//
|
|
// This passes looks for insruction arguments that evaluate to syscall
|
|
// addresses, and substitutes to that the syscall number and (hopefully) the
|
|
// syscall name will be shown by the print pass if it's available in the
|
|
// documentation.
|
|
//---
|
|
|
|
#ifndef FXOS_DISASM_PASSES_SYSCALL_H
|
|
#define FXOS_DISASM_PASSES_SYSCALL_H
|
|
|
|
#include <fxos/disassembly.h>
|
|
#include <fxos/os.h>
|
|
|
|
namespace FxOS {
|
|
|
|
class SyscallPass: public InstructionDisassemblyPass
|
|
{
|
|
public:
|
|
SyscallPass(Disassembly &disasm, OS *os);
|
|
|
|
void analyze(uint32_t pc, ConcreteInstruction &inst) override;
|
|
|
|
private:
|
|
OS *m_os;
|
|
};
|
|
|
|
} /* namespace FxOS */
|
|
|
|
#endif /* FXOS_DISASM_PASSES_SYSCALL_H */
|