mirror of
https://github.com/epasveer/seer.git
synced 2026-08-30 17:10:44 +08:00
Add a -b argument to load a breakpoint file from the command line.
Also, add a line int the SeerDebugDialog to do the same.
This commit is contained in:
@@ -23,6 +23,7 @@ SeerDebugDialog::SeerDebugDialog (QWidget* parent) : QDialog(parent) {
|
||||
// Setup the widgets
|
||||
setExecutableName("");
|
||||
setExecutableArguments("");
|
||||
setBreakpointsFilename("");
|
||||
setExecutableWorkingDirectory(QDir::currentPath());
|
||||
setBreakInMain(true);
|
||||
setAttachPid(0);
|
||||
@@ -32,6 +33,7 @@ SeerDebugDialog::SeerDebugDialog (QWidget* parent) : QDialog(parent) {
|
||||
// Connect things.
|
||||
QObject::connect(executableNameToolButton, &QToolButton::clicked, this, &SeerDebugDialog::handleExecutableNameToolButton);
|
||||
QObject::connect(executableWorkingDirectoryToolButton, &QToolButton::clicked, this, &SeerDebugDialog::handleExecutableWorkingDirectoryToolButton);
|
||||
QObject::connect(loadBreakpointsFilenameToolButton, &QToolButton::clicked, this, &SeerDebugDialog::handleLoadBreakpointsFilenameToolButton);
|
||||
QObject::connect(loadCoreFilenameToolButton, &QToolButton::clicked, this, &SeerDebugDialog::handleLoadCoreFilenameToolButton);
|
||||
QObject::connect(attachProgramPidToolButton, &QToolButton::clicked, this, &SeerDebugDialog::handleProgramPidToolButton);
|
||||
QObject::connect(_runModeButtonGroup, QOverload<int>::of(&QButtonGroup::buttonClicked), this, &SeerDebugDialog::handleRunModeChanged);
|
||||
@@ -67,6 +69,14 @@ QString SeerDebugDialog::executableArguments () const {
|
||||
return runProgramArgumentsLineEdit->text();
|
||||
}
|
||||
|
||||
void SeerDebugDialog::setBreakpointsFilename (const QString& breakpointsFilename) {
|
||||
loadBreakpointsFilenameLineEdit->setText(breakpointsFilename);
|
||||
}
|
||||
|
||||
QString SeerDebugDialog::breakpointsFilename () const {
|
||||
return loadBreakpointsFilenameLineEdit->text();
|
||||
}
|
||||
|
||||
void SeerDebugDialog::setBreakInMain (bool flag) {
|
||||
runProgramBreakInMainCheckBox->setChecked(flag);
|
||||
}
|
||||
@@ -238,6 +248,15 @@ void SeerDebugDialog::handleExecutableWorkingDirectoryToolButton () {
|
||||
}
|
||||
}
|
||||
|
||||
void SeerDebugDialog::handleLoadBreakpointsFilenameToolButton () {
|
||||
|
||||
QString name = QFileDialog::getOpenFileName(this, "Select a breakpoints file to load.", breakpointsFilename(), "Breakpoints (*.brk);;All files (*.*)", nullptr, QFileDialog::DontUseNativeDialog);
|
||||
|
||||
if (name != "") {
|
||||
setBreakpointsFilename(name);
|
||||
}
|
||||
}
|
||||
|
||||
void SeerDebugDialog::handleLoadCoreFilenameToolButton () {
|
||||
|
||||
QString name = QFileDialog::getOpenFileName(this, "Select a core file to debug.", coreFilename(), "Core Files (core core.*)", nullptr, QFileDialog::DontUseNativeDialog);
|
||||
|
||||
Reference in New Issue
Block a user