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

Subversion Repositories riscv_vhdl

[/] [riscv_vhdl/] [trunk/] [debugger/] [src/] [gui_plugin/] [MainWindow/] [DbgMainWindow.h] - Blame information for rev 2

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 sergeykhbr
/**
2
 * @file
3
 * @copyright  Copyright 2016 GNSS Sensor Ltd. All right reserved.
4
 * @author     Sergey Khabarov - sergeykhbr@gmail.com
5
 * @brief      Debugger Main Window form.
6
 */
7
 
8
#pragma once
9
 
10
#include "api_core.h"   // MUST BE BEFORE QtWidgets.h or any other Qt header.
11
#include "igui.h"
12
#include "ebreakhandler.h"
13
 
14
#include <QtWidgets/QMainWindow>
15
#include <QtWidgets/QMenu>
16
#include <QtWidgets/QAction>
17
#include "MdiAreaWidget.h"
18
 
19
namespace debugger {
20
 
21
class DbgMainWindow : public QMainWindow,
22
                      public IGuiCmdHandler {
23
    Q_OBJECT
24
 
25
public:
26
    DbgMainWindow(IGui *igui, event_def *init_done);
27
    virtual ~DbgMainWindow();
28
 
29
    /** IGuiCmdHandler */
30
    virtual void handleResponse(AttributeType *req, AttributeType *resp);
31
 
32
    /** Global methods */
33
    void postInit(AttributeType *cfg);
34
    void getConfiguration(AttributeType &cfg);
35
    void callExit();
36
 
37
signals:
38
    void signalPostInit(AttributeType *cfg);
39
    void signalUpdateByTimer();
40
    void signalTargetStateChanged(bool);
41
    void signalRedrawDisasm();
42
    void signalExit();
43
 
44
protected:
45
    virtual void closeEvent(QCloseEvent *ev_);
46
 
47
private slots:
48
    void slotPostInit(AttributeType *cfg);
49
    void slotConfigDone();
50
    void slotUpdateByTimer();
51
    void slotActionAbout();
52
    void slotActionTargetRun();
53
    void slotActionTargetHalt();
54
    void slotActionTargetStepInto();
55
    void slotActionTriggerUart0(bool val);
56
    void slotActionTriggerRegs(bool val);
57
    void slotActionTriggerCpuAsmView(bool val);
58
    void slotActionTriggerStackTraceView(bool val);
59
    void slotActionTriggerMemView(bool val);
60
    void slotActionTriggerGpio(bool val);
61
    void slotActionTriggerPnp(bool val);
62
    void slotActionTriggerGnssMap(bool val);
63
    void slotActionTriggerSymbolBrowser();
64
    void slotOpenDisasm(uint64_t addr, uint64_t sz);
65
    void slotOpenMemory(uint64_t addr, uint64_t sz);
66
    void slotBreakpointsChanged();
67
    void slotExit();
68
 
69
private:
70
    void createActions();
71
    void createMenus();
72
    void createStatusBar();
73
    void createMdiWindow();
74
    void addWidgets();
75
 
76
private:
77
    QAction *actionAbout_;
78
    QAction *actionQuit_;
79
    QAction *actionRun_;
80
    QAction *actionHalt_;
81
    QAction *actionStep_;
82
    QAction *actionSymbolBrowser_;
83
    QAction *actionRegs_;
84
    QMdiSubWindow *viewRegs_;
85
    QAction *actionCpuAsm_;
86
    QMdiSubWindow *viewCpuAsm_;
87
    QAction *actionStackTrace_;
88
    QMdiSubWindow *viewStackTrace_;
89
    QAction *actionMem_;
90
    QMdiSubWindow *viewMem_;
91
    QAction *actionGpio_;
92
    QMdiSubWindow *viewGpio_;
93
    QAction *actionPnp_;
94
    QMdiSubWindow *viewPnp_;
95
    QAction *actionSerial_;
96
    QMdiSubWindow *viewUart0_;
97
    QAction *actionGnssMap_;
98
    QMdiSubWindow *viewGnssMap_;
99
    QTimer *tmrGlobal_;
100
    MdiAreaWidget *mdiArea_;
101
 
102
    AttributeType config_;
103
    AttributeType listConsoleListeners_;
104
    AttributeType cmdStatus_;
105
    AttributeType cmdRun_;
106
    AttributeType cmdHalt_;
107
    AttributeType cmdStep_;
108
 
109
    IGui *igui_;
110
    event_def *initDone_;
111
    bool statusRequested_;
112
    EBreakHandler *ebreak_;
113
};
114
 
115
}  // namespace debugger

powered by: WebSVN 2.1.0

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