forked from junjiexing/Saber
-
Notifications
You must be signed in to change notification settings - Fork 5
/
DisasmView.h
39 lines (29 loc) · 845 Bytes
/
DisasmView.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
#pragma once
#include <QAbstractScrollArea>
#include <vector>
#include "DebugCore.h"
class DebugCore;
class DisasmView : public QAbstractScrollArea
{
Q_OBJECT
public:
explicit DisasmView(QWidget *parent = 0);
~DisasmView();
public slots:
void gotoAddress(uint64_t address);
void setRegion(uint64_t address);
void analysis();
void setDebugCore(std::shared_ptr<DebugCore> debugCore);
void updateContent();
protected:
void paintEvent(QPaintEvent *e) override;
void mousePressEvent(QMouseEvent *event) override;
virtual void wheelEvent(QWheelEvent *event) override;
private:
uint64_t m_regionStart;
uint64_t m_regionSize;
std::vector<uint64_t> m_insnStart;
uint64_t m_currentAddress;
bool m_foundIndex;
std::weak_ptr<DebugCore> m_debugCore;
};