mirror of
https://github.com/epasveer/seer.git
synced 2026-08-29 16:40:42 +08:00
Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 34accbd8b9 | |||
| 9fa35d2663 | |||
| e5ea3deeca | |||
| a6c310e374 | |||
| 2ac8f65e7a | |||
| 1f730a1bc7 | |||
| ea3d452816 |
@@ -0,0 +1,9 @@
|
||||
Notes for cmake.
|
||||
|
||||
% cd seer/src/build
|
||||
% cmake -DCMAKE_BUILD_TYPE=Debug ..
|
||||
% cmake -DCMAKE_BUILD_TYPE=Release ..
|
||||
% make clean
|
||||
% make seer
|
||||
% sudo make install
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
Create a tar file to add to github.
|
||||
|
||||
% cd /peak/src
|
||||
% tar --exclude='seer/.git' -zcvf seer-1.0.1.tar.gz seer
|
||||
|
||||
@@ -115,6 +115,8 @@ if(NOT CMAKE_BUILD_TYPE MATCHES Debug) #Release, RelWithDebInfo and MinSizeRel
|
||||
message("System type is" ${SYSTEM_TYPE})
|
||||
endif()
|
||||
|
||||
add_compile_definitions(QT_DEPRECATED_WARNINGS)
|
||||
|
||||
add_executable(${PROJECT_NAME} ${SYSTEM_TYPE} ${SOURCE_FILES})
|
||||
|
||||
install(TARGETS ${PROJECT_NAME} DESTINATION bin)
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#include "SeerBreakpointCreateDialog.h"
|
||||
#include <QtCore/QDebug>
|
||||
|
||||
SeerBreakpointCreateDialog::SeerBreakpointCreateDialog (QWidget* parent) : QDialog(parent) {
|
||||
|
||||
@@ -204,3 +205,4 @@ QString SeerBreakpointCreateDialog::breakpointText () const {
|
||||
|
||||
return breakpointParameters;
|
||||
}
|
||||
|
||||
|
||||
@@ -46,6 +46,35 @@ SeerBreakpointsBrowserWidget::SeerBreakpointsBrowserWidget (QWidget* parent) : Q
|
||||
SeerBreakpointsBrowserWidget::~SeerBreakpointsBrowserWidget () {
|
||||
}
|
||||
|
||||
QStringList SeerBreakpointsBrowserWidget::breakpointsText () const {
|
||||
|
||||
QStringList breakpointList;
|
||||
|
||||
QTreeWidgetItemIterator it(breakpointsTreeWidget);
|
||||
|
||||
while (*it) {
|
||||
|
||||
// Build a breakpoint specification.
|
||||
QString breakpointParameters;
|
||||
|
||||
// Handle all breakpoints as pending.
|
||||
// Some breakpoints may point to source files that have not been
|
||||
// loaded (by programs that use runtime shared libaries).
|
||||
breakpointParameters += " -f " + (*it)->text(11);
|
||||
|
||||
breakpointParameters.replace(" -source ", " --source ");
|
||||
breakpointParameters.replace(" -line ", " --line ");
|
||||
|
||||
breakpointList.append(breakpointParameters);
|
||||
|
||||
//qDebug() << __PRETTY_FUNCTION__ << ":" << breakpointParameters;
|
||||
|
||||
++it;
|
||||
}
|
||||
|
||||
return breakpointList;
|
||||
}
|
||||
|
||||
void SeerBreakpointsBrowserWidget::handleText (const QString& text) {
|
||||
|
||||
// Don't do any work if the widget is hidden.
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
#include <QtWidgets/QWidget>
|
||||
#include <QtCore/QString>
|
||||
#include <QtCore/QStringList>
|
||||
#include "ui_SeerBreakpointsBrowserWidget.h"
|
||||
|
||||
class SeerBreakpointsBrowserWidget : public QWidget, protected Ui::SeerBreakpointsBrowserWidgetForm {
|
||||
@@ -12,6 +13,8 @@ class SeerBreakpointsBrowserWidget : public QWidget, protected Ui::SeerBreakpoin
|
||||
explicit SeerBreakpointsBrowserWidget (QWidget* parent = 0);
|
||||
~SeerBreakpointsBrowserWidget ();
|
||||
|
||||
QStringList breakpointsText () const;
|
||||
|
||||
public slots:
|
||||
void handleText (const QString& text);
|
||||
void handleStoppingPointReached ();
|
||||
|
||||
+12
-3
@@ -54,7 +54,10 @@
|
||||
<string>Open a dialog to select an executable.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset theme="document-open"/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -89,7 +92,10 @@
|
||||
<string>Open a dialog to select a path.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset theme="document-open"/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -212,7 +218,10 @@
|
||||
<string>Open a dialog to select a core file.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset theme="document-open"/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
+85
-36
@@ -1,10 +1,5 @@
|
||||
#include "SeerGdbWidget.h"
|
||||
#include "SeerLogWidget.h"
|
||||
#include "SeerTildeEqualAmpersandLogWidget.h"
|
||||
#include "SeerCaretAsteriskLogWidget.h"
|
||||
#include "SeerConsoleWidget.h"
|
||||
#include "SeerBreakpointsBrowserWidget.h"
|
||||
#include "SeerWatchpointsBrowserWidget.h"
|
||||
#include "SeerMemoryVisualizerWidget.h"
|
||||
#include "SeerUtl.h"
|
||||
#include <QtGui/QFont>
|
||||
@@ -25,6 +20,12 @@ SeerGdbWidget::SeerGdbWidget (QWidget* parent) : QWidget(parent) {
|
||||
_gdbMonitor = 0;
|
||||
_gdbProcess = 0;
|
||||
_consoleWidget = 0;
|
||||
_breakpointsBrowserWidget = 0;
|
||||
_watchpointsBrowserWidget = 0;
|
||||
_gdbOutputLog = 0;
|
||||
_seerOutputLog = 0;
|
||||
|
||||
setNewExecutableFlag(true);
|
||||
|
||||
setupUi(this);
|
||||
|
||||
@@ -34,15 +35,15 @@ SeerGdbWidget::SeerGdbWidget (QWidget* parent) : QWidget(parent) {
|
||||
font.setFixedPitch(true);
|
||||
font.setStyleHint(QFont::TypeWriter);
|
||||
|
||||
SeerBreakpointsBrowserWidget* breakpointsBrowserWidget = new SeerBreakpointsBrowserWidget(this);
|
||||
SeerWatchpointsBrowserWidget* watchpointsBrowserWidget = new SeerWatchpointsBrowserWidget(this);
|
||||
SeerTildeEqualAmpersandLogWidget* gdbOutputLog = new SeerTildeEqualAmpersandLogWidget(this);
|
||||
SeerCaretAsteriskLogWidget* seerOutputLog = new SeerCaretAsteriskLogWidget(this);
|
||||
_breakpointsBrowserWidget = new SeerBreakpointsBrowserWidget(this);
|
||||
_watchpointsBrowserWidget = new SeerWatchpointsBrowserWidget(this);
|
||||
_gdbOutputLog = new SeerTildeEqualAmpersandLogWidget(this);
|
||||
_seerOutputLog = new SeerCaretAsteriskLogWidget(this);
|
||||
|
||||
logsTabWidget->addTab(breakpointsBrowserWidget, "Breakpoints");
|
||||
logsTabWidget->addTab(watchpointsBrowserWidget, "Watchpoints");
|
||||
logsTabWidget->addTab(gdbOutputLog, "GDB output");
|
||||
logsTabWidget->addTab(seerOutputLog, "Seer output");
|
||||
logsTabWidget->addTab(_breakpointsBrowserWidget, "Breakpoints");
|
||||
logsTabWidget->addTab(_watchpointsBrowserWidget, "Watchpoints");
|
||||
logsTabWidget->addTab(_gdbOutputLog, "GDB output");
|
||||
logsTabWidget->addTab(_seerOutputLog, "Seer output");
|
||||
logsTabWidget->setCurrentIndex(0);
|
||||
|
||||
manualCommandComboBox->setFont(font);
|
||||
@@ -65,11 +66,11 @@ SeerGdbWidget::SeerGdbWidget (QWidget* parent) : QWidget(parent) {
|
||||
QObject::connect(_gdbProcess, &QProcess::readyReadStandardError, _gdbMonitor, &GdbMonitor::handleReadyReadStandardError);
|
||||
//QObject::connect(_gdbProcess, static_cast<void (QProcess::*)(int, QProcess::ExitStatus)>(&QProcess::finished), _gdbMonitor, &GdbMonitor::handleFinished); // ??? Do we care about the gdb process ending? For now, terminate Seer.
|
||||
|
||||
QObject::connect(_gdbMonitor, &GdbMonitor::tildeTextOutput, gdbOutputLog, &SeerTildeEqualAmpersandLogWidget::handleText);
|
||||
QObject::connect(_gdbMonitor, &GdbMonitor::equalTextOutput, gdbOutputLog, &SeerTildeEqualAmpersandLogWidget::handleText);
|
||||
QObject::connect(_gdbMonitor, &GdbMonitor::ampersandTextOutput, gdbOutputLog, &SeerTildeEqualAmpersandLogWidget::handleText);
|
||||
QObject::connect(_gdbMonitor, &GdbMonitor::caretTextOutput, seerOutputLog, &SeerCaretAsteriskLogWidget::handleText);
|
||||
QObject::connect(_gdbMonitor, &GdbMonitor::astrixTextOutput, seerOutputLog, &SeerCaretAsteriskLogWidget::handleText);
|
||||
QObject::connect(_gdbMonitor, &GdbMonitor::tildeTextOutput, _gdbOutputLog, &SeerTildeEqualAmpersandLogWidget::handleText);
|
||||
QObject::connect(_gdbMonitor, &GdbMonitor::equalTextOutput, _gdbOutputLog, &SeerTildeEqualAmpersandLogWidget::handleText);
|
||||
QObject::connect(_gdbMonitor, &GdbMonitor::ampersandTextOutput, _gdbOutputLog, &SeerTildeEqualAmpersandLogWidget::handleText);
|
||||
QObject::connect(_gdbMonitor, &GdbMonitor::caretTextOutput, _seerOutputLog, &SeerCaretAsteriskLogWidget::handleText);
|
||||
QObject::connect(_gdbMonitor, &GdbMonitor::astrixTextOutput, _seerOutputLog, &SeerCaretAsteriskLogWidget::handleText);
|
||||
QObject::connect(_gdbMonitor, &GdbMonitor::astrixTextOutput, editorManagerWidget, &SeerEditorManagerWidget::handleText);
|
||||
QObject::connect(_gdbMonitor, &GdbMonitor::caretTextOutput, editorManagerWidget, &SeerEditorManagerWidget::handleText);
|
||||
QObject::connect(_gdbMonitor, &GdbMonitor::caretTextOutput, sourceLibraryManagerWidget->sourceBrowserWidget(), &SeerSourceBrowserWidget::handleText);
|
||||
@@ -79,12 +80,12 @@ SeerGdbWidget::SeerGdbWidget (QWidget* parent) : QWidget(parent) {
|
||||
QObject::connect(_gdbMonitor, &GdbMonitor::caretTextOutput, stackManagerWidget->stackArgumentsBrowserWidget(), &SeerStackArgumentsBrowserWidget::handleText);
|
||||
QObject::connect(_gdbMonitor, &GdbMonitor::caretTextOutput, threadManagerWidget->threadIdsBrowserWidget(), &SeerThreadIdsBrowserWidget::handleText);
|
||||
QObject::connect(_gdbMonitor, &GdbMonitor::caretTextOutput, threadManagerWidget->threadFramesBrowserWidget(), &SeerThreadFramesBrowserWidget::handleText);
|
||||
QObject::connect(_gdbMonitor, &GdbMonitor::caretTextOutput, breakpointsBrowserWidget, &SeerBreakpointsBrowserWidget::handleText);
|
||||
QObject::connect(_gdbMonitor, &GdbMonitor::caretTextOutput, watchpointsBrowserWidget, &SeerWatchpointsBrowserWidget::handleText);
|
||||
QObject::connect(_gdbMonitor, &GdbMonitor::caretTextOutput, _breakpointsBrowserWidget, &SeerBreakpointsBrowserWidget::handleText);
|
||||
QObject::connect(_gdbMonitor, &GdbMonitor::caretTextOutput, _watchpointsBrowserWidget, &SeerWatchpointsBrowserWidget::handleText);
|
||||
QObject::connect(_gdbMonitor, &GdbMonitor::caretTextOutput, variableManagerWidget->registerValuesBrowserWidget(), &SeerRegisterValuesBrowserWidget::handleText);
|
||||
QObject::connect(_gdbMonitor, &GdbMonitor::caretTextOutput, variableManagerWidget->variableTrackerBrowserWidget(), &SeerVariableTrackerBrowserWidget::handleText);
|
||||
QObject::connect(_gdbMonitor, &GdbMonitor::caretTextOutput, variableManagerWidget->variableLoggerBrowserWidget(), &SeerVariableLoggerBrowserWidget::handleText);
|
||||
QObject::connect(_gdbMonitor, &GdbMonitor::astrixTextOutput, watchpointsBrowserWidget, &SeerWatchpointsBrowserWidget::handleText);
|
||||
QObject::connect(_gdbMonitor, &GdbMonitor::astrixTextOutput, _watchpointsBrowserWidget, &SeerWatchpointsBrowserWidget::handleText);
|
||||
QObject::connect(_gdbMonitor, &GdbMonitor::astrixTextOutput, this, &SeerGdbWidget::handleText);
|
||||
|
||||
QObject::connect(editorManagerWidget, &SeerEditorManagerWidget::refreshBreakpointsList, this, &SeerGdbWidget::handleGdbBreakpointWatchpointList);
|
||||
@@ -124,19 +125,19 @@ SeerGdbWidget::SeerGdbWidget (QWidget* parent) : QWidget(parent) {
|
||||
QObject::connect(threadManagerWidget->threadFramesBrowserWidget(), &SeerThreadFramesBrowserWidget::refreshThreadFrames, this, &SeerGdbWidget::handleGdbThreadListFrames);
|
||||
QObject::connect(threadManagerWidget->threadFramesBrowserWidget(), &SeerThreadFramesBrowserWidget::selectedFile, editorManagerWidget, &SeerEditorManagerWidget::handleOpenFile);
|
||||
|
||||
QObject::connect(breakpointsBrowserWidget, &SeerBreakpointsBrowserWidget::refreshBreakpointsList, this, &SeerGdbWidget::handleGdbBreakpointWatchpointList);
|
||||
QObject::connect(breakpointsBrowserWidget, &SeerBreakpointsBrowserWidget::deleteBreakpoints, this, &SeerGdbWidget::handleGdbBreakpointDelete);
|
||||
QObject::connect(breakpointsBrowserWidget, &SeerBreakpointsBrowserWidget::enableBreakpoints, this, &SeerGdbWidget::handleGdbBreakpointEnable);
|
||||
QObject::connect(breakpointsBrowserWidget, &SeerBreakpointsBrowserWidget::disableBreakpoints, this, &SeerGdbWidget::handleGdbBreakpointDisable);
|
||||
QObject::connect(breakpointsBrowserWidget, &SeerBreakpointsBrowserWidget::insertBreakpoint, this, &SeerGdbWidget::handleGdbBreakpointInsert);
|
||||
QObject::connect(breakpointsBrowserWidget, &SeerBreakpointsBrowserWidget::selectedFile, editorManagerWidget, &SeerEditorManagerWidget::handleOpenFile);
|
||||
QObject::connect(_breakpointsBrowserWidget, &SeerBreakpointsBrowserWidget::refreshBreakpointsList, this, &SeerGdbWidget::handleGdbBreakpointWatchpointList);
|
||||
QObject::connect(_breakpointsBrowserWidget, &SeerBreakpointsBrowserWidget::deleteBreakpoints, this, &SeerGdbWidget::handleGdbBreakpointDelete);
|
||||
QObject::connect(_breakpointsBrowserWidget, &SeerBreakpointsBrowserWidget::enableBreakpoints, this, &SeerGdbWidget::handleGdbBreakpointEnable);
|
||||
QObject::connect(_breakpointsBrowserWidget, &SeerBreakpointsBrowserWidget::disableBreakpoints, this, &SeerGdbWidget::handleGdbBreakpointDisable);
|
||||
QObject::connect(_breakpointsBrowserWidget, &SeerBreakpointsBrowserWidget::insertBreakpoint, this, &SeerGdbWidget::handleGdbBreakpointInsert);
|
||||
QObject::connect(_breakpointsBrowserWidget, &SeerBreakpointsBrowserWidget::selectedFile, editorManagerWidget, &SeerEditorManagerWidget::handleOpenFile);
|
||||
|
||||
QObject::connect(watchpointsBrowserWidget, &SeerWatchpointsBrowserWidget::refreshWatchpointsList, this, &SeerGdbWidget::handleGdbBreakpointWatchpointList);
|
||||
QObject::connect(watchpointsBrowserWidget, &SeerWatchpointsBrowserWidget::deleteWatchpoints, this, &SeerGdbWidget::handleGdbWatchpointDelete);
|
||||
QObject::connect(watchpointsBrowserWidget, &SeerWatchpointsBrowserWidget::enableWatchpoints, this, &SeerGdbWidget::handleGdbWatchpointEnable);
|
||||
QObject::connect(watchpointsBrowserWidget, &SeerWatchpointsBrowserWidget::disableWatchpoints, this, &SeerGdbWidget::handleGdbWatchpointDisable);
|
||||
QObject::connect(watchpointsBrowserWidget, &SeerWatchpointsBrowserWidget::insertWatchpoint, this, &SeerGdbWidget::handleGdbWatchpointInsert);
|
||||
QObject::connect(watchpointsBrowserWidget, &SeerWatchpointsBrowserWidget::selectedFile, editorManagerWidget, &SeerEditorManagerWidget::handleOpenFile);
|
||||
QObject::connect(_watchpointsBrowserWidget, &SeerWatchpointsBrowserWidget::refreshWatchpointsList, this, &SeerGdbWidget::handleGdbBreakpointWatchpointList);
|
||||
QObject::connect(_watchpointsBrowserWidget, &SeerWatchpointsBrowserWidget::deleteWatchpoints, this, &SeerGdbWidget::handleGdbWatchpointDelete);
|
||||
QObject::connect(_watchpointsBrowserWidget, &SeerWatchpointsBrowserWidget::enableWatchpoints, this, &SeerGdbWidget::handleGdbWatchpointEnable);
|
||||
QObject::connect(_watchpointsBrowserWidget, &SeerWatchpointsBrowserWidget::disableWatchpoints, this, &SeerGdbWidget::handleGdbWatchpointDisable);
|
||||
QObject::connect(_watchpointsBrowserWidget, &SeerWatchpointsBrowserWidget::insertWatchpoint, this, &SeerGdbWidget::handleGdbWatchpointInsert);
|
||||
QObject::connect(_watchpointsBrowserWidget, &SeerWatchpointsBrowserWidget::selectedFile, editorManagerWidget, &SeerEditorManagerWidget::handleOpenFile);
|
||||
|
||||
QObject::connect(this, &SeerGdbWidget::stoppingPointReached, stackManagerWidget->stackFramesBrowserWidget(), &SeerStackFramesBrowserWidget::handleStoppingPointReached);
|
||||
QObject::connect(this, &SeerGdbWidget::stoppingPointReached, stackManagerWidget->stackLocalsBrowserWidget(), &SeerStackLocalsBrowserWidget::handleStoppingPointReached);
|
||||
@@ -145,8 +146,8 @@ SeerGdbWidget::SeerGdbWidget (QWidget* parent) : QWidget(parent) {
|
||||
QObject::connect(this, &SeerGdbWidget::stoppingPointReached, threadManagerWidget->threadFramesBrowserWidget(), &SeerThreadFramesBrowserWidget::handleStoppingPointReached);
|
||||
QObject::connect(this, &SeerGdbWidget::stoppingPointReached, variableManagerWidget->registerValuesBrowserWidget(), &SeerRegisterValuesBrowserWidget::handleStoppingPointReached);
|
||||
QObject::connect(this, &SeerGdbWidget::stoppingPointReached, variableManagerWidget->variableTrackerBrowserWidget(), &SeerVariableTrackerBrowserWidget::handleStoppingPointReached);
|
||||
QObject::connect(this, &SeerGdbWidget::stoppingPointReached, breakpointsBrowserWidget, &SeerBreakpointsBrowserWidget::handleStoppingPointReached);
|
||||
QObject::connect(this, &SeerGdbWidget::stoppingPointReached, watchpointsBrowserWidget, &SeerWatchpointsBrowserWidget::handleStoppingPointReached);
|
||||
QObject::connect(this, &SeerGdbWidget::stoppingPointReached, _breakpointsBrowserWidget, &SeerBreakpointsBrowserWidget::handleStoppingPointReached);
|
||||
QObject::connect(this, &SeerGdbWidget::stoppingPointReached, _watchpointsBrowserWidget, &SeerWatchpointsBrowserWidget::handleStoppingPointReached);
|
||||
}
|
||||
|
||||
SeerGdbWidget::~SeerGdbWidget () {
|
||||
@@ -175,12 +176,22 @@ QProcess* SeerGdbWidget::gdbProcess () {
|
||||
void SeerGdbWidget::setExecutableName (const QString& executableName) {
|
||||
|
||||
_executableName = executableName;
|
||||
|
||||
setNewExecutableFlag(true);
|
||||
}
|
||||
|
||||
const QString& SeerGdbWidget::executableName () const {
|
||||
return _executableName;
|
||||
}
|
||||
|
||||
void SeerGdbWidget::setNewExecutableFlag (bool flag) {
|
||||
_newExecutableFlag = flag;
|
||||
}
|
||||
|
||||
bool SeerGdbWidget::newExecutableFlag () const {
|
||||
return _newExecutableFlag;
|
||||
}
|
||||
|
||||
void SeerGdbWidget::setExecutableArguments (const QString& executableArguments) {
|
||||
|
||||
_executableArguments = executableArguments;
|
||||
@@ -339,12 +350,26 @@ void SeerGdbWidget::handleGdbRunExecutable () {
|
||||
|
||||
setExecutableLaunchMode("run");
|
||||
|
||||
// Get list of breakpoints.
|
||||
QStringList breakpointsList;
|
||||
if (newExecutableFlag() == false) {
|
||||
breakpointsList = _breakpointsBrowserWidget->breakpointsText();
|
||||
}
|
||||
|
||||
handleGdbExecutableName(); // Load the program into the gdb process.
|
||||
handleGdbExecutableSources(); // Load the program source files.
|
||||
handleGdbExecutableSharedLibraries(); // Load the program shared libraries.
|
||||
handleGdbExecutableArguments(); // Set the program's arguments before running.
|
||||
handleGdbExecutableWorkingDirectory(); // Set the program's working directory before running.
|
||||
handleGdbTtyDeviceName(); // Set the program's tty device for stdin and stdout.
|
||||
|
||||
// Reload old breakpoints.
|
||||
if (newExecutableFlag() == false) {
|
||||
handleGdbBreakpointReload(breakpointsList);
|
||||
}
|
||||
|
||||
setNewExecutableFlag(false);
|
||||
|
||||
handleGdbCommand("-exec-run");
|
||||
}
|
||||
|
||||
@@ -358,6 +383,8 @@ void SeerGdbWidget::handleGdbStartExecutable () {
|
||||
return;
|
||||
}
|
||||
|
||||
//qDebug() << __PRETTY_FUNCTION__ << ": newExecutableFlag = " << newExecutableFlag();
|
||||
|
||||
// Delete old console.
|
||||
deleteConsole();
|
||||
|
||||
@@ -377,12 +404,27 @@ void SeerGdbWidget::handleGdbStartExecutable () {
|
||||
|
||||
setExecutableLaunchMode("start");
|
||||
|
||||
// Get list of breakpoints.
|
||||
QStringList breakpointsList;
|
||||
if (newExecutableFlag() == false) {
|
||||
breakpointsList = _breakpointsBrowserWidget->breakpointsText();
|
||||
}
|
||||
|
||||
handleGdbExecutableName(); // Load the program into the gdb process.
|
||||
handleGdbExecutableSources(); // Load the program source files.
|
||||
handleGdbExecutableSharedLibraries(); // Load the program shared libraries.
|
||||
handleGdbExecutableArguments(); // Set the program's arguments before running.
|
||||
handleGdbExecutableWorkingDirectory(); // Set the program's working directory before running.
|
||||
handleGdbExecutableArguments(); // Set the program's arguments before running.
|
||||
handleGdbTtyDeviceName(); // Set the program's tty device for stdin and stdout.
|
||||
|
||||
// Reload old breakpoints.
|
||||
if (newExecutableFlag() == false) {
|
||||
handleGdbBreakpointReload(breakpointsList);
|
||||
}
|
||||
|
||||
setNewExecutableFlag(false);
|
||||
|
||||
// Run the executable.
|
||||
handleGdbCommand("-exec-run --start");
|
||||
}
|
||||
|
||||
@@ -703,6 +745,13 @@ void SeerGdbWidget::handleGdbBreakpointInsert (QString breakpoint) {
|
||||
handleGdbBreakpointWatchpointList();
|
||||
}
|
||||
|
||||
void SeerGdbWidget::handleGdbBreakpointReload (QStringList breakpointsText) {
|
||||
|
||||
for (int i=0; i<breakpointsText.size(); i++) {
|
||||
handleGdbBreakpointInsert(breakpointsText[i]);
|
||||
}
|
||||
}
|
||||
|
||||
void SeerGdbWidget::handleGdbWatchpointDelete (QString watchpoints) {
|
||||
|
||||
if (executableLaunchMode() == "") {
|
||||
|
||||
+94
-81
@@ -1,6 +1,10 @@
|
||||
#pragma once
|
||||
|
||||
#include "SeerConsoleWidget.h"
|
||||
#include "SeerTildeEqualAmpersandLogWidget.h"
|
||||
#include "SeerCaretAsteriskLogWidget.h"
|
||||
#include "SeerBreakpointsBrowserWidget.h"
|
||||
#include "SeerWatchpointsBrowserWidget.h"
|
||||
#include "GdbMonitor.h"
|
||||
#include <QtCore/QProcess>
|
||||
#include <QtCore/QVector>
|
||||
@@ -16,105 +20,114 @@ class SeerGdbWidget : public QWidget, protected Ui::SeerGdbWidgetForm {
|
||||
explicit SeerGdbWidget (QWidget* parent = 0);
|
||||
~SeerGdbWidget ();
|
||||
|
||||
GdbMonitor* gdbMonitor ();
|
||||
QProcess* gdbProcess ();
|
||||
GdbMonitor* gdbMonitor ();
|
||||
QProcess* gdbProcess ();
|
||||
|
||||
void setExecutableName (const QString& executableName);
|
||||
const QString& executableName () const;
|
||||
void setExecutableName (const QString& executableName);
|
||||
const QString& executableName () const;
|
||||
|
||||
void setExecutableArguments (const QString& executableArguments);
|
||||
const QString& executableArguments () const;
|
||||
void setNewExecutableFlag (bool flag);
|
||||
bool newExecutableFlag () const;
|
||||
|
||||
void setExecutableWorkingDirectory (const QString& executableWorkingDirectory);
|
||||
const QString& executableWorkingDirectory () const;
|
||||
void setExecutableArguments (const QString& executableArguments);
|
||||
const QString& executableArguments () const;
|
||||
|
||||
void setExecutablePid (int pid);
|
||||
int executablePid () const;
|
||||
void setExecutableWorkingDirectory (const QString& executableWorkingDirectory);
|
||||
const QString& executableWorkingDirectory () const;
|
||||
|
||||
void setExecutableHostPort (const QString& hostPort);
|
||||
const QString& executableHostPort () const;
|
||||
void setExecutablePid (int pid);
|
||||
int executablePid () const;
|
||||
|
||||
void setExecutableCoreFilename (const QString& coreFilename);
|
||||
const QString& executableCoreFilename () const;
|
||||
void setExecutableHostPort (const QString& hostPort);
|
||||
const QString& executableHostPort () const;
|
||||
|
||||
void setExecutableLaunchMode (const QString& launchMode);
|
||||
const QString& executableLaunchMode () const;
|
||||
void setExecutableCoreFilename (const QString& coreFilename);
|
||||
const QString& executableCoreFilename () const;
|
||||
|
||||
void setExecutableLaunchMode (const QString& launchMode);
|
||||
const QString& executableLaunchMode () const;
|
||||
|
||||
public slots:
|
||||
void handleText (const QString& text);
|
||||
void handleExecute ();
|
||||
void handleGdbCommand (const QString& command);
|
||||
void handleGdbExit ();
|
||||
void handleGdbRunExecutable ();
|
||||
void handleGdbStartExecutable ();
|
||||
void handleGdbAttachExecutable ();
|
||||
void handleGdbConnectExecutable ();
|
||||
void handleGdbCoreFileExecutable ();
|
||||
void handleGdbRunToLine (QString fullname, int lineno);
|
||||
void handleGdbNext ();
|
||||
void handleGdbStep ();
|
||||
void handleGdbFinish ();
|
||||
void handleGdbContinue ();
|
||||
void handleGdbInterrupt ();
|
||||
void handleGdbExecutableSources ();
|
||||
void handleGdbExecutableSharedLibraries ();
|
||||
void handleGdbExecutableName ();
|
||||
void handleGdbExecutableArguments ();
|
||||
void handleGdbExecutableWorkingDirectory ();
|
||||
void handleGdbTtyDeviceName ();
|
||||
void handleGdbStackListFrames ();
|
||||
void handleGdbStackSelectFrame (int frameno);
|
||||
void handleGdbStackListLocals ();
|
||||
void handleGdbStackListArguments ();
|
||||
void handleGdbBreakpointWatchpointList ();
|
||||
void handleGdbBreakpointDelete (QString breakpoints);
|
||||
void handleGdbBreakpointEnable (QString breakpoints);
|
||||
void handleGdbBreakpointDisable (QString breakpoints);
|
||||
void handleGdbBreakpointInsert (QString breakpoint);
|
||||
void handleGdbWatchpointDelete (QString watchpoints);
|
||||
void handleGdbWatchpointEnable (QString watchpoints);
|
||||
void handleGdbWatchpointDisable (QString watchpoints);
|
||||
void handleGdbWatchpointInsert (QString watchpoint);
|
||||
void handleGdbThreadListIds ();
|
||||
void handleGdbThreadListFrames ();
|
||||
void handleGdbThreadSelectId (int threadid);
|
||||
void handleGdbRegisterListNames ();
|
||||
void handleGdbRegisterListValues ();
|
||||
void handleGdbDataEvaluateExpression (int expressionid, QString expression);
|
||||
void handleGdbDataListValues ();
|
||||
void handleGdbDataListExpressions ();
|
||||
void handleGdbDataAddExpression (QString expression);
|
||||
void handleGdbDataDeleteExpressions (QString expressionids);
|
||||
void handleGdbMemoryAddExpression (QString expression);
|
||||
void handleGdbMemoryEvaluateExpression (int expressionid, QString address, int count);
|
||||
void handleText (const QString& text);
|
||||
void handleExecute ();
|
||||
void handleGdbCommand (const QString& command);
|
||||
void handleGdbExit ();
|
||||
void handleGdbRunExecutable ();
|
||||
void handleGdbStartExecutable ();
|
||||
void handleGdbAttachExecutable ();
|
||||
void handleGdbConnectExecutable ();
|
||||
void handleGdbCoreFileExecutable ();
|
||||
void handleGdbRunToLine (QString fullname, int lineno);
|
||||
void handleGdbNext ();
|
||||
void handleGdbStep ();
|
||||
void handleGdbFinish ();
|
||||
void handleGdbContinue ();
|
||||
void handleGdbInterrupt ();
|
||||
void handleGdbExecutableSources ();
|
||||
void handleGdbExecutableSharedLibraries ();
|
||||
void handleGdbExecutableName ();
|
||||
void handleGdbExecutableArguments ();
|
||||
void handleGdbExecutableWorkingDirectory ();
|
||||
void handleGdbTtyDeviceName ();
|
||||
void handleGdbStackListFrames ();
|
||||
void handleGdbStackSelectFrame (int frameno);
|
||||
void handleGdbStackListLocals ();
|
||||
void handleGdbStackListArguments ();
|
||||
void handleGdbBreakpointWatchpointList ();
|
||||
void handleGdbBreakpointDelete (QString breakpoints);
|
||||
void handleGdbBreakpointEnable (QString breakpoints);
|
||||
void handleGdbBreakpointDisable (QString breakpoints);
|
||||
void handleGdbBreakpointInsert (QString breakpoint);
|
||||
void handleGdbBreakpointReload (QStringList breakpointsText);
|
||||
void handleGdbWatchpointDelete (QString watchpoints);
|
||||
void handleGdbWatchpointEnable (QString watchpoints);
|
||||
void handleGdbWatchpointDisable (QString watchpoints);
|
||||
void handleGdbWatchpointInsert (QString watchpoint);
|
||||
void handleGdbThreadListIds ();
|
||||
void handleGdbThreadListFrames ();
|
||||
void handleGdbThreadSelectId (int threadid);
|
||||
void handleGdbRegisterListNames ();
|
||||
void handleGdbRegisterListValues ();
|
||||
void handleGdbDataEvaluateExpression (int expressionid, QString expression);
|
||||
void handleGdbDataListValues ();
|
||||
void handleGdbDataListExpressions ();
|
||||
void handleGdbDataAddExpression (QString expression);
|
||||
void handleGdbDataDeleteExpressions (QString expressionids);
|
||||
void handleGdbMemoryAddExpression (QString expression);
|
||||
void handleGdbMemoryEvaluateExpression (int expressionid, QString address, int count);
|
||||
|
||||
void handleFinished (int exitCode, QProcess::ExitStatus exitStatus);
|
||||
void handleFinished (int exitCode, QProcess::ExitStatus exitStatus);
|
||||
|
||||
signals:
|
||||
void stoppingPointReached ();
|
||||
void stoppingPointReached ();
|
||||
|
||||
private:
|
||||
bool isGdbRuning () const;
|
||||
void startGdb ();
|
||||
void killGdb ();
|
||||
void createConsole ();
|
||||
void deleteConsole ();
|
||||
bool isGdbRuning () const;
|
||||
void startGdb ();
|
||||
void killGdb ();
|
||||
void createConsole ();
|
||||
void deleteConsole ();
|
||||
|
||||
|
||||
QString _executableName;
|
||||
QString _executableArguments;
|
||||
QString _executableWorkingDirectory;
|
||||
int _executablePid;
|
||||
QString _executableHostPort;
|
||||
QString _executableCoreFilename;
|
||||
QString _executableLaunchMode;
|
||||
QString _executableName;
|
||||
QString _executableArguments;
|
||||
QString _executableWorkingDirectory;
|
||||
int _executablePid;
|
||||
QString _executableHostPort;
|
||||
QString _executableCoreFilename;
|
||||
QString _executableLaunchMode;
|
||||
bool _newExecutableFlag;
|
||||
|
||||
SeerConsoleWidget* _consoleWidget;
|
||||
SeerConsoleWidget* _consoleWidget;
|
||||
SeerBreakpointsBrowserWidget* _breakpointsBrowserWidget;
|
||||
SeerWatchpointsBrowserWidget* _watchpointsBrowserWidget;
|
||||
SeerTildeEqualAmpersandLogWidget* _gdbOutputLog;
|
||||
SeerCaretAsteriskLogWidget* _seerOutputLog;
|
||||
|
||||
GdbMonitor* _gdbMonitor;
|
||||
QProcess* _gdbProcess;
|
||||
GdbMonitor* _gdbMonitor;
|
||||
QProcess* _gdbProcess;
|
||||
|
||||
QVector<int> _dataExpressionId;
|
||||
QVector<QString> _dataExpressionName;
|
||||
QVector<int> _dataExpressionId;
|
||||
QVector<QString> _dataExpressionName;
|
||||
};
|
||||
|
||||
|
||||
@@ -99,7 +99,7 @@ void SeerStackFramesBrowserWidget::handleText (const QString& text) {
|
||||
// ??? Perhaps show the current frame level somehow.
|
||||
stackTreeWidget->clearSelection();
|
||||
|
||||
QList<QTreeWidgetItem*> matches = stackTreeWidget->findItems("0", 0);
|
||||
QList<QTreeWidgetItem*> matches = stackTreeWidget->findItems("0", Qt::MatchExactly, 0);
|
||||
if (matches.size() > 0) {
|
||||
stackTreeWidget->setCurrentItem(matches.first());
|
||||
}
|
||||
|
||||
@@ -141,7 +141,7 @@ void SeerThreadFramesBrowserWidget::handleText (const QString& text) {
|
||||
// Select the current thread id.
|
||||
threadTreeWidget->clearSelection();
|
||||
|
||||
QList<QTreeWidgetItem*> matches = threadTreeWidget->findItems(currentthreadid_text, 0);
|
||||
QList<QTreeWidgetItem*> matches = threadTreeWidget->findItems(currentthreadid_text, Qt::MatchExactly, 0);
|
||||
if (matches.size() > 0) {
|
||||
threadTreeWidget->setCurrentItem(matches.first());
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ void SeerThreadIdsBrowserWidget::handleText (const QString& text) {
|
||||
// Clear the selection and select the one for the current thread-id.
|
||||
idsTreeWidget->clearSelection();
|
||||
|
||||
QList<QTreeWidgetItem*> matches = idsTreeWidget->findItems(currentthreadid_text, 0);
|
||||
QList<QTreeWidgetItem*> matches = idsTreeWidget->findItems(currentthreadid_text, Qt::MatchExactly, 0);
|
||||
if (matches.size() > 0) {
|
||||
idsTreeWidget->setCurrentItem(matches.first());
|
||||
}
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ int main (int argc, char* argv[]) {
|
||||
QApplication app(argc, argv);
|
||||
|
||||
QCoreApplication::setApplicationName("Seer");
|
||||
QCoreApplication::setApplicationVersion("1.0.2 - Ernie Pasveer (c)2021");
|
||||
QCoreApplication::setApplicationVersion("1.0.3 - Ernie Pasveer (c)2021");
|
||||
|
||||
//
|
||||
// Parse arguments.
|
||||
|
||||
Reference in New Issue
Block a user