OpenCores
URL https://opencores.org/ocsvn/riscv_vhdl/riscv_vhdl/trunk

Subversion Repositories riscv_vhdl

[/] [riscv_vhdl/] [trunk/] [debugger/] [src/] [gui_plugin/] [CpuWidgets/] [AsmArea.h] - Blame information for rev 3

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 3 sergeykhbr
/**
2
 * @file
3
 * @copyright  Copyright 2016 GNSS Sensor Ltd. All right reserved.
4
 * @author     Sergey Khabarov - sergeykhbr@gmail.com
5
 * @brief      Disassembler viewer area.
6
 */
7
 
8
#pragma once
9
 
10
#include "api_core.h"   // MUST BE BEFORE QtWidgets.h or any other Qt header.
11
#include "attribute.h"
12
#include "igui.h"
13
#include "iservice.h"
14
#include "coreservices/isocinfo.h"
15
#include "coreservices/isrccode.h"
16
 
17
#include <QtWidgets/QWidget>
18
#include <QtWidgets/QTableWidget>
19
#include <QtGui/QResizeEvent>
20
 
21
namespace debugger {
22
 
23
class AsmArea : public QTableWidget,
24
                public IGuiCmdHandler {
25
    Q_OBJECT
26
public:
27
    explicit AsmArea(IGui *gui, QWidget *parent, uint64_t fixaddr);
28
    virtual ~AsmArea();
29
 
30
    /** IGuiCmdHandler */
31
    virtual void handleResponse(AttributeType *req, AttributeType *resp);
32
 
33
signals:
34
    void signalNpcChanged();
35
    void signalAsmListChanged();
36
    void signalBreakpointsChanged();
37
 
38
public slots:
39
    void slotNpcChanged();
40
    void slotAsmListChanged();
41
    void slotUpdateByTimer();
42
    void slotRedrawDisasm();
43
    void slotCellDoubleClicked(int row, int column);
44
 
45
protected:
46
    void resizeEvent(QResizeEvent *ev) Q_DECL_OVERRIDE;
47
    void wheelEvent(QWheelEvent * ev) Q_DECL_OVERRIDE;
48
 
49
private:
50
    bool isNpcTrackEna();
51
    int getNpcRowIdx();
52
    void selectNpcRow(int idx);
53
    void adjustRowCount();
54
    void outSymbolLine(int idx, AttributeType &data);
55
    void outAsmLine(int idx, AttributeType &data);
56
    void addMemBlock(AttributeType &resp, AttributeType &lines);
57
 
58
private:
59
    enum EColumnNames {
60
        COL_addrline,
61
        COL_code,
62
        COL_label,
63
        COL_mnemonic,
64
        COL_comment,
65
        COL_Total
66
    };
67
 
68
    AttributeType cmdReadMem_;
69
    AttributeType cmdRegs_;
70
    AttributeType asmLines_;
71
    AttributeType asmLinesOut_;
72
    QString name_;
73
    IGui *igui_;
74
 
75
    uint64_t fixaddr_;
76
    int selRowIdx;
77
    int hideLineIdx_;
78
    int lineHeight_;
79
    mutex_def mutexAsmGaurd_;
80
    uint64_t npc_;
81
    int visibleLinesTotal_;
82
    uint64_t startAddr_;
83
    uint64_t endAddr_;
84
    bool waitRegNpc_;
85
};
86
 
87
}  // namespace debugger

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.