When an executable is loaded be prepared for some messages from gdb,
[kdbg.git] / kdbg / brkpt.h
blobba13798dd073f899bd38a0475989e0993e0df956
1 // $Id$
3 // Copyright by Johannes Sixt
4 // This file is under GPL, the GNU General Public Licence
6 // the list of breakpoints
8 #ifndef BRKPT_H
9 #define BRKPT_H
11 #include <qlistview.h>
12 #include <qlayout.h>
13 #include <qpushbutton.h>
14 #include <qlineedit.h>
15 #include "valarray.h"
17 class KDebugger;
18 class BreakpointItem;
21 class BreakpointTable : public QWidget
23 Q_OBJECT
24 public:
25 BreakpointTable(QWidget* parent, const char* name);
26 ~BreakpointTable();
27 void setDebugger(KDebugger* deb) { m_debugger = deb; }
29 protected:
30 KDebugger* m_debugger;
31 QLineEdit m_bpEdit;
32 QListView m_list;
33 QPushButton m_btAddBP;
34 QPushButton m_btAddWP;
35 QPushButton m_btRemove;
36 QPushButton m_btEnaDis;
37 QPushButton m_btViewCode;
38 QPushButton m_btConditional;
39 QHBoxLayout m_layout;
40 QVBoxLayout m_listandedit;
41 QVBoxLayout m_buttons;
42 ValArray<QPixmap> m_icons;
44 void insertBreakpoint(int num, bool temp, bool enabled, QString location,
45 QString fileName = 0, int lineNo = -1,
46 int hits = 0, uint ignoreCount = 0,
47 QString condition = QString());
48 void initListAndIcons();
49 void updateBreakpointCondition(int id, const QString& condition,
50 int ignoreCount);
51 virtual bool eventFilter(QObject* ob, QEvent* ev);
53 friend class BreakpointItem;
55 signals:
56 /**
57 * This signal is emitted when the user wants to go to the source code
58 * where the current breakpoint is in.
60 * @param file specifies the file; this is not necessarily a full path
61 * name, and if it is relative, you won't know relative to what, you
62 * can only guess.
63 * @param lineNo specifies the line number (0-based!).
64 * @param address specifies the exact address of the breakpoint.
66 void activateFileLine(const QString& file, int lineNo, const DbgAddr& address);
67 public slots:
68 virtual void addBP();
69 virtual void addWP();
70 virtual void removeBP();
71 virtual void enadisBP();
72 virtual void viewBP();
73 virtual void conditionalBP();
74 void updateUI();
75 void updateBreakList();
78 #endif // BRKPT_H