Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
EditorManager.
* Fixed regression when order of message tabs not being preserved between
sessions.
* Connect mode to a gdb server now supports 'remote' and 'extended-remote'.
* Connect mode's 'pre' commands are executed before the 'target connect'.

## [2.5] - 2024-12-24
* Console now supports a subset of ANSI color codes.
Expand Down
10 changes: 10 additions & 0 deletions src/SeerConfigDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,16 @@ bool SeerConfigDialog::gdbEnablePrettyPrinting () const {
return _gdbConfigPage->gdbEnablePrettyPrinting();
}

void SeerConfigDialog::setGdbRemoteTargetType (const QString& type) {

_gdbConfigPage->setGdbRemoteTargetType(type);
}

QString SeerConfigDialog::gdbRemoteTargetType () const {

return _gdbConfigPage->gdbRemoteTargetType();
}

void SeerConfigDialog::setEditorFont (const QFont& font) {

_editorConfigPage->setEditorFont(font);
Expand Down
3 changes: 3 additions & 0 deletions src/SeerConfigDialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ class SeerConfigDialog : public QDialog, protected Ui::SeerConfigDialogForm {
void setGdbEnablePrettyPrinting (bool flag);
bool gdbEnablePrettyPrinting () const;

void setGdbRemoteTargetType (const QString& type);
QString gdbRemoteTargetType () const;

// Editor settings.
void setEditorFont (const QFont& font);
const QFont& editorFont () const;
Expand Down
13 changes: 13 additions & 0 deletions src/SeerDebugDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,14 @@ QString SeerDebugDialog::connectHostPort () const {
return connectProgramHostPortLineEdit->text();
}

void SeerDebugDialog::setConnectRemoteTargetType (const QString& type) {
connectRemoteTargetTypeCombo->setCurrentText(type);
}

QString SeerDebugDialog::connectRemoteTargetType () const {
return connectRemoteTargetTypeCombo->currentText();
}

void SeerDebugDialog::setRRTraceDirectory (const QString& rrTraceDirectory) {
rrTraceDirectoryLineEdit->setText(rrTraceDirectory);
}
Expand Down Expand Up @@ -611,6 +619,10 @@ void SeerDebugDialog::loadProject (const QString& filename, bool notify) {

connectProgramHostPortLineEdit->setText(connectModeJson["gdbserver"].toString());

if (connectModeJson.contains("targettype")) {
connectRemoteTargetTypeCombo->setCurrentText(connectModeJson["targettype"].toString());
}

setLaunchMode("connect");
}

Expand Down Expand Up @@ -723,6 +735,7 @@ void SeerDebugDialog::handleSaveProjectToolButton () {
QJsonObject modeJson;

modeJson["gdbserver"] = connectProgramHostPortLineEdit->text();
modeJson["targettype"] = connectRemoteTargetTypeCombo->currentText();

seerProjectJson["connectmode"] = modeJson;
}
Expand Down
3 changes: 3 additions & 0 deletions src/SeerDebugDialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ class SeerDebugDialog : public QDialog, protected Ui::SeerDebugDialogForm {
// Connectect to a GDB server. "connect".
void setConnectHostPort (const QString& connectHostPort);
QString connectHostPort () const;
void setConnectRemoteTargetType (const QString& type);
QString connectRemoteTargetType () const;


// Connectect to a RR server. "rr".
void setRRTraceDirectory (const QString& rrTraceDirectory);
Expand Down
193 changes: 117 additions & 76 deletions src/SeerDebugDialog.ui
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>806</width>
<height>1040</height>
<width>619</width>
<height>845</height>
</rect>
</property>
<property name="windowTitle">
Expand Down Expand Up @@ -593,95 +593,137 @@
<attribute name="title">
<string>Connect</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_10">
<item row="0" column="0">
<layout class="QGridLayout" name="gridLayout_5">
<item row="0" column="0" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout_6">
<item>
<widget class="QLabel" name="label_2">
<property name="text">
<string>Connect to a gdbserver (or similar) session.</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>248</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QToolButton" name="helpConnectToolButton">
<property name="toolTip">
<string>Help for Connect launch method.</string>
</property>
<property name="text">
<string>...</string>
</property>
<property name="icon">
<iconset resource="resource.qrc">
<normaloff>:/seer/resources/RelaxLightIcons/help-about.svg</normaloff>:/seer/resources/RelaxLightIcons/help-about.svg</iconset>
</property>
</widget>
</item>
</layout>
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_6">
<item>
<widget class="QLabel" name="label_2">
<property name="text">
<string>Connect to a gdbserver (or similar) session.</string>
</property>
</widget>
</item>
<item row="2" column="1">
<spacer name="verticalSpacer">
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
<width>248</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="0" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QToolButton" name="helpConnectToolButton">
<property name="toolTip">
<string>Help for Connect launch method.</string>
</property>
<property name="text">
<string>...</string>
</property>
<property name="icon">
<iconset resource="resource.qrc">
<normaloff>:/seer/resources/RelaxLightIcons/help-about.svg</normaloff>:/seer/resources/RelaxLightIcons/help-about.svg</iconset>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QGridLayout" name="gridLayout_5">
<item row="0" column="0">
<widget class="QLabel" name="connectProgramHostPortLabel">
<property name="text">
<string>Gdbserver</string>
</property>
</widget>
</item>
<item row="0" column="1" colspan="2">
<widget class="QLineEdit" name="connectProgramHostPortLineEdit">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>100</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>How to access the gdbserver.</string>
</property>
<property name="text">
<string/>
</property>
<property name="placeholderText">
<string>host:port or /dev/serialport</string>
</property>
<property name="clearButtonEnabled">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="connectRemoteTargetTypeLabel">
<property name="text">
<string>Remote target type</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QComboBox" name="connectRemoteTargetTypeCombo">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>Select the type of remote target connection.</string>
</property>
<item>
<widget class="QLabel" name="connectProgramHostPortLabel">
<property name="text">
<string>Gdbserver</string>
</property>
</widget>
<property name="text">
<string>remote</string>
</property>
</item>
<item>
<widget class="QLineEdit" name="connectProgramHostPortLineEdit">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>100</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>How to access the gdbserver.</string>
</property>
<property name="text">
<string/>
</property>
<property name="placeholderText">
<string>host:port or /dev/serialport</string>
</property>
<property name="clearButtonEnabled">
<bool>true</bool>
</property>
</widget>
<property name="text">
<string>extended-remote</string>
</property>
</item>
</layout>
</widget>
</item>
<item row="1" column="2">
<spacer name="horizontalSpacer_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>468</width>
<height>17</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>151</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<widget class="QWidget" name="rrTab">
Expand Down Expand Up @@ -977,7 +1019,6 @@
<tabstop>attachProgramPidLineEdit</tabstop>
<tabstop>attachProgramPidToolButton</tabstop>
<tabstop>helpConnectToolButton</tabstop>
<tabstop>connectProgramHostPortLineEdit</tabstop>
<tabstop>helpRRToolButton</tabstop>
<tabstop>rrTraceDirectoryLineEdit</tabstop>
<tabstop>rrLoadTraceDirectoryToolButton</tabstop>
Expand Down
10 changes: 10 additions & 0 deletions src/SeerGdbConfigPage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ bool SeerGdbConfigPage::gdbEnablePrettyPrinting () const {
return gdbEnablePrettyPrintingCheckBox->isChecked();
}

QString SeerGdbConfigPage::gdbRemoteTargetType () const {

return gdbRemoteTargetTypeCombo->currentText();
}

void SeerGdbConfigPage::setGdbProgram (const QString& program) {

gdbProgramLineEdit->setText(program);
Expand Down Expand Up @@ -88,6 +93,11 @@ void SeerGdbConfigPage::setGdbEnablePrettyPrinting (bool flag) {
gdbEnablePrettyPrintingCheckBox->setChecked(flag);
}

void SeerGdbConfigPage::setGdbRemoteTargetType (const QString& type) {

gdbRemoteTargetTypeCombo->setCurrentText(type);
}

void SeerGdbConfigPage::reset () {

setGdbProgram("/usr/bin/gdb");
Expand Down
3 changes: 3 additions & 0 deletions src/SeerGdbConfigPage.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ class SeerGdbConfigPage : public QWidget, protected Ui::SeerGdbConfigPage {
bool gdbHandleTerminatingException () const;
bool gdbRandomizeStartAddress () const;
bool gdbEnablePrettyPrinting () const;
QString gdbRemoteTargetType () const;


void setGdbProgram (const QString& program);
void setGdbArguments (const QString& arguments);
Expand All @@ -27,6 +29,7 @@ class SeerGdbConfigPage : public QWidget, protected Ui::SeerGdbConfigPage {
void setGdbHandleTerminatingException (bool flag);
void setGdbRandomizeStartAddress (bool flag);
void setGdbEnablePrettyPrinting (bool flag);
void setGdbRemoteTargetType (const QString& type);

void reset ();

Expand Down
Loading
Loading