forked from revng/revng
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathptcdump.h
41 lines (34 loc) · 1.26 KB
/
ptcdump.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#ifndef _PTCDUMP_H
#define _PTCDUMP_H
//
// This file is distributed under the MIT License. See LICENSE.md for details.
//
// Standard includes
#include <cstdint>
#include <iostream>
// Local includes
#include "ptc.h"
/// Write to a stream the string representation of the PTC instruction with the
/// specified index within the instruction list.
///
/// \param Result the output stream.
/// \param Instructions the instruction list.
/// \param Index the index of the target instruction in the instruction list.
///
/// \return EXIT_SUCCESS in case of success, EXIT_FAILURE otherwise.
int dumpInstruction(std::ostream& Result, PTCInstructionList *Instructions,
unsigned Index);
/// Write to a stream all the instructions in an instruction list.
///
/// \param Result the output stream.
/// \param Instructions the instruction list.
///
/// \return EXIT_SUCCESS in case of success, EXIT_FAILURE otherwise.
int dumpTranslation(std::ostream& Result, PTCInstructionList *Instructions);
/// Write to a stream the dissasembled version of the instruction at the
/// specified program counter.
///
/// \param Result the output stream
/// \param PC the program counter in the current context.
void disassembleOriginal(std::ostream& Result, uint64_t PC);
#endif // _PTCDUMP_H