~ubuntu-branches/ubuntu/trusty/openmsx-debugger/trusty

« back to all changes in this revision

Viewing changes to src/DebuggerForm.h

  • Committer: Bazaar Package Importer
  • Author(s): Joost Yervante Damad
  • Date: 2007-08-10 18:32:50 UTC
  • Revision ID: james.westby@ubuntu.com-20070810183250-hepyzcrl39slr4x1
Tags: upstream-0.0.0.svn20070518
ImportĀ upstreamĀ versionĀ 0.0.0.svn20070518

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// $Id: DebuggerForm.h 6484 2007-05-18 11:44:34Z edwinv $
 
2
 
 
3
#ifndef DEBUGGERFORM_H
 
4
#define DEBUGGERFORM_H
 
5
 
 
6
#include "DockManager.h"
 
7
#include "DebuggerData.h"
 
8
#include "SymbolTable.h"
 
9
#include <QMainWindow>
 
10
 
 
11
class DockableWidgetArea;
 
12
class DisasmViewer;
 
13
class HexViewer;
 
14
class CPURegsViewer;
 
15
class FlagsViewer;
 
16
class StackViewer;
 
17
class SlotViewer;
 
18
class CommClient;
 
19
class QAction;
 
20
class QMenu;
 
21
class QToolBar;
 
22
class QSplitter;
 
23
 
 
24
class DebuggerForm : public QMainWindow
 
25
{
 
26
        Q_OBJECT;
 
27
public:
 
28
        DebuggerForm(QWidget* parent = 0);
 
29
        ~DebuggerForm();
 
30
 
 
31
protected:
 
32
        void closeEvent( QCloseEvent *e );
 
33
 
 
34
public slots:
 
35
        void showAbout();
 
36
 
 
37
private:
 
38
        QMenu* systemMenu;
 
39
        QMenu* viewMenu;
 
40
        QMenu* executeMenu;
 
41
        QMenu* breakpointMenu;
 
42
        QMenu* helpMenu;
 
43
 
 
44
        QToolBar* systemToolbar;
 
45
        QToolBar* executeToolbar;
 
46
 
 
47
        QAction* systemConnectAction;
 
48
        QAction* systemDisconnectAction;
 
49
        QAction* systemPauseAction;
 
50
        QAction* systemSymbolManagerAction;
 
51
        QAction* systemPreferencesAction;
 
52
        QAction* systemQuitAction;
 
53
 
 
54
        QAction* viewRegistersAction;
 
55
        QAction* viewFlagsAction;
 
56
        QAction* viewStackAction;
 
57
        QAction* viewSlotsAction;
 
58
        QAction* viewMemoryAction;
 
59
        QAction* viewDebuggableViewerAction;
 
60
        
 
61
        QAction* executeBreakAction;
 
62
        QAction* executeRunAction;
 
63
        QAction* executeStepAction;
 
64
        QAction* executeStepOverAction;
 
65
        QAction* executeRunToAction;
 
66
        QAction* executeStepOutAction;
 
67
 
 
68
        QAction* breakpointToggleAction;
 
69
        QAction* breakpointAddAction;
 
70
 
 
71
        QAction* helpAboutAction;
 
72
 
 
73
        DockManager dockMan;
 
74
        DockableWidgetArea *mainArea;
 
75
        
 
76
        DisasmViewer* disasmView;
 
77
        HexViewer* hexView;
 
78
        CPURegsViewer* regsView;
 
79
        FlagsViewer* flagsView;
 
80
        StackViewer* stackView;
 
81
        SlotViewer* slotView;
 
82
 
 
83
        CommClient& comm;
 
84
        Breakpoints breakpoints;
 
85
        MemoryLayout memLayout;
 
86
        SymbolTable symTable;
 
87
        unsigned char* mainMemory;
 
88
 
 
89
        QMap<QString, int> debuggables;
 
90
        
 
91
        void createActions();
 
92
        void createMenus();
 
93
        void createToolbars();
 
94
        void createStatusbar();
 
95
        void createForm();
 
96
 
 
97
        void finalizeConnection(bool halted);
 
98
        void pauseStatusChanged(bool isPaused);
 
99
        void breakOccured();
 
100
        void setBreakMode();
 
101
        void setRunMode();
 
102
        void updateData();
 
103
        
 
104
        void refreshBreakpoints();
 
105
 
 
106
private slots:
 
107
        void systemConnect();
 
108
        void systemDisconnect();
 
109
        void systemPause();
 
110
        void systemSymbolManager();
 
111
        void systemPreferences();
 
112
        void toggleRegisterDisplay();
 
113
        void toggleFlagsDisplay();
 
114
        void toggleStackDisplay();
 
115
        void toggleSlotsDisplay();
 
116
        void toggleMemoryDisplay();
 
117
        void addDebuggableViewer();
 
118
        void executeBreak();
 
119
        void executeRun();
 
120
        void executeStep();
 
121
        void executeStepOver();
 
122
        void executeRunTo();
 
123
        void executeStepOut();
 
124
        void breakpointToggle(int addr = -1);
 
125
        void breakpointAdd();
 
126
 
 
127
        void toggleView( DockableWidget* widget );
 
128
        void initConnection();
 
129
        void handleUpdate(const QString& type, const QString& name, const QString& message);
 
130
        void setDebuggables( const QString& list );
 
131
        void setDebuggableSize(  const QString& debuggable, int size );
 
132
        void connectionClosed();
 
133
        void dockWidgetVisibilityChanged( DockableWidget *w );
 
134
        void updateViewMenu();
 
135
 
 
136
        friend class QueryPauseHandler;
 
137
        friend class QueryBreakedHandler;
 
138
        friend class ListBreakPointsHandler;
 
139
        friend class CPURegRequest;
 
140
        friend class ListDebuggablesHandler;
 
141
        friend class DebuggableSizeHandler;
 
142
        
 
143
signals:
 
144
        void settingsChanged();
 
145
        void symbolsChanged();
 
146
        void debuggablesChanged( const QMap<QString,int>& list );
 
147
        void emulationChanged();
 
148
};
 
149
 
 
150
#endif // DEBUGGERFORM_H