1
0
mirror of synced 2024-11-30 18:34:29 +01:00
ImHex/plugins/builtin/include/content/views/view_disassembler.hpp

44 lines
902 B
C++
Raw Normal View History

#pragma once
#include <hex/ui/view.hpp>
2021-12-07 22:47:41 +01:00
#include <hex/helpers/disassembler.hpp>
#include <cstdio>
#include <string>
#include <vector>
2021-12-07 22:47:41 +01:00
namespace hex::plugin::builtin {
struct Disassembly {
u64 address;
u64 offset;
size_t size;
std::string bytes;
std::string mnemonic;
std::string operators;
};
class ViewDisassembler : public View {
public:
explicit ViewDisassembler();
~ViewDisassembler() override;
void drawContent() override;
private:
2021-02-22 11:56:33 +01:00
bool m_disassembling = false;
2022-02-01 22:09:44 +01:00
u64 m_baseAddress = 0;
u64 m_codeRegion[2] = { 0 };
bool m_shouldMatchSelection = false;
Architecture m_architecture = Architecture::ARM;
2022-02-01 22:09:44 +01:00
cs_mode m_mode = cs_mode(0);
std::vector<Disassembly> m_disassembly;
2021-02-22 11:56:33 +01:00
void disassemble();
};
}