1
0
mirror of synced 2024-12-23 04:54:50 +01:00
ImHex/plugins/disassembler/include/content/views/view_disassembler.hpp

46 lines
962 B
C++
Raw Normal View History

#pragma once
#include <hex/api/task_manager.hpp>
2023-05-14 21:50:58 +02:00
#include <hex/ui/view.hpp>
#include <ui/widgets.hpp>
#include <content/helpers/disassembler.hpp>
#include <string>
#include <vector>
namespace hex::plugin::disasm {
struct Disassembly {
u64 address;
u64 offset;
size_t size;
std::string bytes;
std::string mnemonic;
std::string operators;
};
class ViewDisassembler : public View::Window {
public:
explicit ViewDisassembler();
~ViewDisassembler() override;
void drawContent() override;
private:
TaskHolder m_disassemblerTask;
u64 m_baseAddress = 0;
ui::RegionType m_range = ui::RegionType::EntireData;
Region m_codeRegion = { 0, 0 };
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();
};
}