mirror of
https://github.com/epasveer/seer.git
synced 2026-08-29 08:34:42 +08:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| cccc8fcb6d | |||
| 841cca2952 |
@@ -695,7 +695,7 @@ QJsonDocument SeerDebugDialog::makeJsonDoc() const {
|
|||||||
QJsonObject modeJson;
|
QJsonObject modeJson;
|
||||||
// Main Tab
|
// Main Tab
|
||||||
modeJson["openocdExe"] = executableOpenOCDPathLineEdit->text();
|
modeJson["openocdExe"] = executableOpenOCDPathLineEdit->text();
|
||||||
modeJson["openocdCommand"] = openOCDCommandLineEdit->toPlainText();
|
modeJson["openocdOptions"] = openOCDOptionsLineEdit->toPlainText();
|
||||||
|
|
||||||
// Symbol File Tab
|
// Symbol File Tab
|
||||||
modeJson["symbolFile"] = symbolFileLineEdit->text();
|
modeJson["symbolFile"] = symbolFileLineEdit->text();
|
||||||
@@ -894,7 +894,7 @@ bool SeerDebugDialog::loadJsonDoc (const QJsonDocument& jsonDoc, const QString&
|
|||||||
if (openocdModeJson.isEmpty() == false) {
|
if (openocdModeJson.isEmpty() == false) {
|
||||||
// Main Tab
|
// Main Tab
|
||||||
executableOpenOCDPathLineEdit ->setText(openocdModeJson["openocdExe"].toString());
|
executableOpenOCDPathLineEdit ->setText(openocdModeJson["openocdExe"].toString());
|
||||||
openOCDCommandLineEdit ->setPlainText(openocdModeJson["openocdCommand"].toString());
|
openOCDOptionsLineEdit ->setPlainText(openocdModeJson["openocdOptions"].toString());
|
||||||
|
|
||||||
// Symbol file Tab
|
// Symbol file Tab
|
||||||
symbolFileLineEdit ->setText(openocdModeJson["symbolFile"].toString());
|
symbolFileLineEdit ->setText(openocdModeJson["symbolFile"].toString());
|
||||||
@@ -927,16 +927,16 @@ void SeerDebugDialog::setOpenocdExe(const QString& path)
|
|||||||
executableOpenOCDPathLineEdit->setText(path);
|
executableOpenOCDPathLineEdit->setText(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
const QString SeerDebugDialog::openocdCommand()
|
const QString SeerDebugDialog::openocdOptions()
|
||||||
{
|
{
|
||||||
QString tmp = openOCDCommandLineEdit->toPlainText();
|
QString tmp = openOCDOptionsLineEdit->toPlainText();
|
||||||
tmp.replace("\n", " ");
|
tmp.replace("\n", " ");
|
||||||
return tmp;
|
return tmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SeerDebugDialog::setOpenocdCommand(const QString& command)
|
void SeerDebugDialog::setOpenocdOptions(const QString& options)
|
||||||
{
|
{
|
||||||
openOCDCommandLineEdit->setPlainText(command);
|
openOCDOptionsLineEdit->setPlainText(options);
|
||||||
}
|
}
|
||||||
|
|
||||||
// ::Symbol Files
|
// ::Symbol Files
|
||||||
|
|||||||
+17
-17
@@ -95,25 +95,25 @@ class SeerDebugDialog : public QDialog, protected Ui::SeerDebugDialogForm {
|
|||||||
|
|
||||||
// openocd get and set functions
|
// openocd get and set functions
|
||||||
// ::Main
|
// ::Main
|
||||||
const QString openocdExe ();
|
const QString openocdExe ();
|
||||||
void setOpenocdExe (const QString& path);
|
void setOpenocdExe (const QString& path);
|
||||||
const QString openocdCommand ();
|
const QString openocdOptions ();
|
||||||
void setOpenocdCommand (const QString& command);
|
void setOpenocdOptions (const QString& options);
|
||||||
// ::GDB Multiarch
|
// ::GDB Multiarch
|
||||||
const QString openocdGdbExe ();
|
const QString openocdGdbExe ();
|
||||||
void setOpenocdGdbExe (const QString& path);
|
void setOpenocdGdbExe (const QString& path);
|
||||||
const QString openocdGdbPort ();
|
const QString openocdGdbPort ();
|
||||||
void setOpenocdGdbPort (const QString& port);
|
void setOpenocdGdbPort (const QString& port);
|
||||||
const QString openocdGdbCommand ();
|
const QString openocdGdbOptions ();
|
||||||
void setOpenocdGdbCommand (const QString& command);
|
void setOpenocdGdbOptions (const QString& options);
|
||||||
// ::Symbol Files
|
// ::Symbol Files
|
||||||
const QString symbolFile ();
|
const QString symbolFile ();
|
||||||
void setSymbolFile (const QString& path);
|
void setSymbolFile (const QString& path);
|
||||||
const QString workingDirectory ();
|
const QString workingDirectory ();
|
||||||
void setWorkingDirectory (const QString& path);
|
void setWorkingDirectory (const QString& path);
|
||||||
bool hasLoadAddress ();
|
bool hasLoadAddress ();
|
||||||
const QString loadAddress ();
|
const QString loadAddress ();
|
||||||
void setLoadAddress (const QString& address);
|
void setLoadAddress (const QString& address);
|
||||||
|
|
||||||
protected slots:
|
protected slots:
|
||||||
void handleExecutableNameToolButton ();
|
void handleExecutableNameToolButton ();
|
||||||
|
|||||||
+358
-510
File diff suppressed because it is too large
Load Diff
@@ -3992,14 +3992,14 @@ void SeerGdbWidget::setOpenocdExe (const QString& path)
|
|||||||
_openocdExe = path;
|
_openocdExe = path;
|
||||||
}
|
}
|
||||||
|
|
||||||
const QString& SeerGdbWidget::openocdCommand ()
|
const QString& SeerGdbWidget::openocdOptions ()
|
||||||
{
|
{
|
||||||
return _openocdCommands;
|
return _openocdOptions;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SeerGdbWidget::setOpenocdCommand (const QString& command)
|
void SeerGdbWidget::setOpenocdOptions (const QString& options)
|
||||||
{
|
{
|
||||||
_openocdCommands = command;
|
_openocdOptions = options;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ::GDB Multiarch
|
// ::GDB Multiarch
|
||||||
@@ -4099,11 +4099,11 @@ void SeerGdbWidget::handleGdbMultiarchOpenOCDExecutable ()
|
|||||||
|
|
||||||
_openocdWidget->createOpenOCDConsole(commandLogsWidget->logsTabWidgetInstance());
|
_openocdWidget->createOpenOCDConsole(commandLogsWidget->logsTabWidgetInstance());
|
||||||
// Start OpenOCD with the given path and command
|
// Start OpenOCD with the given path and command
|
||||||
bool foo = _openocdWidget->startOpenOCD(openocdExe(), openocdCommand());
|
bool foo = _openocdWidget->startOpenOCD(openocdExe(), openocdOptions());
|
||||||
if (foo == false) {
|
if (foo == false) {
|
||||||
QMessageBox::warning(this, "Seer",
|
QMessageBox::warning(this, "Seer",
|
||||||
QString("Unable to launch the OpenOCD program.\n\n") +
|
QString("Unable to launch the OpenOCD program.\n\n") +
|
||||||
QString("'%1 %2'").arg(SeerGdbWidget::openocdExe()).arg(SeerGdbWidget::openocdCommand()) + "\n\n" +
|
QString("'%1 %2'").arg(SeerGdbWidget::openocdExe()).arg(SeerGdbWidget::openocdOptions()) + "\n\n" +
|
||||||
QString("Please check your OpenOCD configuration."),
|
QString("Please check your OpenOCD configuration."),
|
||||||
QMessageBox::Ok);
|
QMessageBox::Ok);
|
||||||
_openocdWidget->terminate();
|
_openocdWidget->terminate();
|
||||||
|
|||||||
+22
-22
@@ -216,31 +216,31 @@ class SeerGdbWidget : public QWidget, protected Ui::SeerGdbWidgetForm {
|
|||||||
|
|
||||||
// OpenOCD
|
// OpenOCD
|
||||||
// ::Main
|
// ::Main
|
||||||
const QString& openocdExe ();
|
const QString& openocdExe ();
|
||||||
void setOpenocdExe (const QString& path);
|
void setOpenocdExe (const QString& path);
|
||||||
const QString& openocdCommand ();
|
const QString& openocdOptions ();
|
||||||
void setOpenocdCommand (const QString& command);
|
void setOpenocdOptions (const QString& options);
|
||||||
// ::GDB Multiarch
|
// ::GDB Multiarch
|
||||||
const QString& openocdGdbExe ();
|
const QString& openocdGdbExe ();
|
||||||
void setOpenocdGdbExe (const QString& path);
|
void setOpenocdGdbExe (const QString& path);
|
||||||
const QString& openocdGdbPort ();
|
const QString& openocdGdbPort ();
|
||||||
void setOpenocdGdbPort (const QString& port);
|
void setOpenocdGdbPort (const QString& port);
|
||||||
const QString& openocdTelnetPort ();
|
const QString& openocdTelnetPort ();
|
||||||
void setOpenocdTelnetPort (const QString& port);
|
void setOpenocdTelnetPort (const QString& port);
|
||||||
const QString& openocdGdbCommand ();
|
const QString& openocdGdbCommand ();
|
||||||
void setOpenocdGdbCommand (const QString& command);
|
void setOpenocdGdbCommand (const QString& command);
|
||||||
|
|
||||||
// ::Symbol Files
|
// ::Symbol Files
|
||||||
void setSymbolFile (const QString& file);
|
void setSymbolFile (const QString& file);
|
||||||
const QString& symbolFile (void);
|
const QString& symbolFile (void);
|
||||||
void setLoadAddressEnabled (bool flag);
|
void setLoadAddressEnabled (bool flag);
|
||||||
bool loadAddressEnabled (void);
|
bool loadAddressEnabled (void);
|
||||||
void setLoadAddress (const QString& address);
|
void setLoadAddress (const QString& address);
|
||||||
const QString& loadAddress (void);
|
const QString& loadAddress (void);
|
||||||
void setSourcePath (const QString& path);
|
void setSourcePath (const QString& path);
|
||||||
const QString& sourcePath (void);
|
const QString& sourcePath (void);
|
||||||
|
|
||||||
void handleGdbMultiarchOpenOCDExecutable ();
|
void handleGdbMultiarchOpenOCDExecutable ();
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void handleText (const QString& text);
|
void handleText (const QString& text);
|
||||||
@@ -484,7 +484,7 @@ class SeerGdbWidget : public QWidget, protected Ui::SeerGdbWidgetForm {
|
|||||||
QString _openocdRunningState;
|
QString _openocdRunningState;
|
||||||
// OpenOCD
|
// OpenOCD
|
||||||
QString _openocdExe;
|
QString _openocdExe;
|
||||||
QString _openocdCommands;
|
QString _openocdOptions;
|
||||||
// GDB Multiarch
|
// GDB Multiarch
|
||||||
QString _openocdGdbExe;
|
QString _openocdGdbExe;
|
||||||
QString _openocdGdbPort;
|
QString _openocdGdbPort;
|
||||||
|
|||||||
@@ -661,9 +661,10 @@ void SeerMainWindow::handleFileDebug (bool loadDefaultProject) {
|
|||||||
dlg.setCoreFilename(executableCoreFilename());
|
dlg.setCoreFilename(executableCoreFilename());
|
||||||
dlg.setPreGdbCommands(executablePreGdbCommands());
|
dlg.setPreGdbCommands(executablePreGdbCommands());
|
||||||
dlg.setPostGdbCommands(executablePostGdbCommands());
|
dlg.setPostGdbCommands(executablePostGdbCommands());
|
||||||
|
|
||||||
// OpenOCD
|
// OpenOCD
|
||||||
dlg.setOpenocdExe(openocdExe());
|
dlg.setOpenocdExe(openocdExe());
|
||||||
dlg.setOpenocdCommand(openocdCommand());
|
dlg.setOpenocdOptions(openocdOptions());
|
||||||
dlg.setSymbolFile(symbolFile());
|
dlg.setSymbolFile(symbolFile());
|
||||||
|
|
||||||
// If there's a project, use it.
|
// If there's a project, use it.
|
||||||
@@ -713,7 +714,7 @@ void SeerMainWindow::handleFileDebug (bool loadDefaultProject) {
|
|||||||
|
|
||||||
// read openocd variables
|
// read openocd variables
|
||||||
setOpenocdExe(dlg.openocdExe());
|
setOpenocdExe(dlg.openocdExe());
|
||||||
setOpenocdCommand(dlg.openocdCommand());
|
setOpenocdOptions(dlg.openocdOptions());
|
||||||
setSymbolFile(dlg.symbolFile());
|
setSymbolFile(dlg.symbolFile());
|
||||||
|
|
||||||
launchExecutable(launchMode, breakMode);
|
launchExecutable(launchMode, breakMode);
|
||||||
@@ -2264,12 +2265,12 @@ void SeerMainWindow::setOpenocdExe (const QString& path) {
|
|||||||
gdbWidget->setOpenocdExe(path);
|
gdbWidget->setOpenocdExe(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
const QString& SeerMainWindow::openocdCommand() {
|
const QString& SeerMainWindow::openocdOptions() {
|
||||||
return gdbWidget->openocdCommand();
|
return gdbWidget->openocdOptions();
|
||||||
}
|
}
|
||||||
|
|
||||||
void SeerMainWindow::setOpenocdCommand (const QString& command){
|
void SeerMainWindow::setOpenocdOptions (const QString& options){
|
||||||
gdbWidget->setOpenocdCommand(command);
|
gdbWidget->setOpenocdOptions(options);
|
||||||
}
|
}
|
||||||
|
|
||||||
// ::GDB Multiarch
|
// ::GDB Multiarch
|
||||||
|
|||||||
@@ -83,8 +83,8 @@ class SeerMainWindow : public QMainWindow, protected Ui::SeerMainWindowForm {
|
|||||||
// ::Main
|
// ::Main
|
||||||
const QString& openocdExe ();
|
const QString& openocdExe ();
|
||||||
void setOpenocdExe (const QString& path);
|
void setOpenocdExe (const QString& path);
|
||||||
const QString& openocdCommand ();
|
const QString& openocdOptions ();
|
||||||
void setOpenocdCommand (const QString& command);
|
void setOpenocdOptions (const QString& options);
|
||||||
// ::GDB Multiarch
|
// ::GDB Multiarch
|
||||||
const QString& openocdGdbExe ();
|
const QString& openocdGdbExe ();
|
||||||
void setOpenocdGdbExe (const QString& path);
|
void setOpenocdGdbExe (const QString& path);
|
||||||
|
|||||||
Reference in New Issue
Block a user