Commit 9ae53e49 authored by hjk's avatar hjk

debugger: rename 'AttachRemote' to 'StartRemote'

parent 6e22eda3
......@@ -77,7 +77,6 @@ SOURCES += \
gdboptionspage.cpp
FORMS += attachexternaldialog.ui \
attachremotedialog.ui \
attachcoredialog.ui \
breakbyfunction.ui \
breakcondition.ui \
......@@ -85,6 +84,7 @@ FORMS += attachexternaldialog.ui \
gdboptionspage.ui \
commonoptionspage.ui \
startexternaldialog.ui \
startremotedialog.ui \
RESOURCES += debugger.qrc
......
......@@ -31,8 +31,8 @@
#include "ui_attachcoredialog.h"
#include "ui_attachexternaldialog.h"
#include "ui_attachremotedialog.h"
#include "ui_startexternaldialog.h"
#include "ui_startremotedialog.h"
#ifdef Q_OS_WIN
# include "dbgwinutils.h"
......@@ -302,13 +302,13 @@ void AttachExternalDialog::pidChanged(const QString &pid)
///////////////////////////////////////////////////////////////////////
//
// AttachRemoteDialog
// StartRemoteDialog
//
///////////////////////////////////////////////////////////////////////
AttachRemoteDialog::AttachRemoteDialog(QWidget *parent)
StartRemoteDialog::StartRemoteDialog(QWidget *parent)
: QDialog(parent),
m_ui(new Ui::AttachRemoteDialog)
m_ui(new Ui::StartRemoteDialog)
{
m_ui->setupUi(this);
m_ui->buttonBox->button(QDialogButtonBox::Ok)->setDefault(true);
......@@ -317,22 +317,22 @@ AttachRemoteDialog::AttachRemoteDialog(QWidget *parent)
connect(m_ui->buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
}
AttachRemoteDialog::~AttachRemoteDialog()
StartRemoteDialog::~StartRemoteDialog()
{
delete m_ui;
}
void AttachRemoteDialog::setRemoteChannel(const QString &channel)
void StartRemoteDialog::setRemoteChannel(const QString &channel)
{
m_ui->channelLineEdit->setText(channel);
}
QString AttachRemoteDialog::remoteChannel() const
QString StartRemoteDialog::remoteChannel() const
{
return m_ui->channelLineEdit->text();
}
void AttachRemoteDialog::setRemoteArchitectures(const QStringList &list)
void StartRemoteDialog::setRemoteArchitectures(const QStringList &list)
{
m_ui->architectureComboBox->clear();
if (!list.isEmpty()) {
......@@ -341,14 +341,14 @@ void AttachRemoteDialog::setRemoteArchitectures(const QStringList &list)
}
}
void AttachRemoteDialog::setRemoteArchitecture(const QString &arch)
void StartRemoteDialog::setRemoteArchitecture(const QString &arch)
{
int index = m_ui->architectureComboBox->findText(arch);
if (index != -1)
m_ui->architectureComboBox->setCurrentIndex(index);
}
QString AttachRemoteDialog::remoteArchitecture() const
QString StartRemoteDialog::remoteArchitecture() const
{
int index = m_ui->architectureComboBox->currentIndex();
return m_ui->architectureComboBox->itemText(index);
......
......@@ -40,8 +40,8 @@ class QPushButton;
namespace Ui {
class AttachCoreDialog;
class AttachExternalDialog;
class AttachRemoteDialog;
class StartExternalDialog;
class StartRemoteDialog;
} // namespace Ui
QT_END_NAMESPACE
......@@ -101,13 +101,13 @@ private:
ProcessListFilterModel *m_model;
};
class AttachRemoteDialog : public QDialog
class StartRemoteDialog : public QDialog
{
Q_OBJECT
public:
explicit AttachRemoteDialog(QWidget *parent);
~AttachRemoteDialog();
explicit StartRemoteDialog(QWidget *parent);
~StartRemoteDialog();
void setRemoteChannel(const QString &host);
void setRemoteArchitecture(const QString &arch);
......@@ -116,7 +116,7 @@ public:
QString remoteArchitecture() const;
private:
Ui::AttachRemoteDialog *m_ui;
Ui::StartRemoteDialog *m_ui;
};
class StartExternalDialog : public QDialog
......
......@@ -929,8 +929,8 @@ void DebuggerManager::startNewDebugger(DebuggerRunControl *runControl)
m_attachedPID = -1;
break;
}
case AttachRemote: {
AttachRemoteDialog dlg(mainWindow());
case StartRemote: {
StartRemoteDialog dlg(mainWindow());
QStringList arches;
arches.append(_("i386:x86-64:intel"));
dlg.setRemoteArchitectures(arches);
......
......@@ -113,7 +113,7 @@ enum DebuggerStartMode
StartExternal, // Start binary found in file system
AttachExternal, // Attach to running process
AttachCore, // Attach to a core file
AttachRemote // Attach to a remote process
StartRemote // Start and attach to a remote process
};
class IDebuggerEngine;
......
......@@ -480,10 +480,10 @@ bool DebuggerPlugin::initialize(const QStringList &arguments, QString *errorMess
m_attachCoreAction->setText(tr("Attach to Core..."));
connect(m_attachCoreAction, SIGNAL(triggered()), this, SLOT(attachCore()));
m_attachRemoteAction = new QAction(this);
m_attachRemoteAction->setText(tr("Attach to Running Remote Application..."));
connect(m_attachRemoteAction, SIGNAL(triggered()),
this, SLOT(attachRemoteApplication()));
m_startRemoteAction = new QAction(this);
m_startRemoteAction->setText(tr("Start and Attach to Remote Application..."));
connect(m_startRemoteAction, SIGNAL(triggered()),
this, SLOT(startRemoteApplication()));
Core::ActionContainer *mdebug =
......@@ -502,12 +502,9 @@ bool DebuggerPlugin::initialize(const QStringList &arguments, QString *errorMess
Constants::ATTACHCORE, globalcontext);
mdebug->addAction(cmd, Core::Constants::G_DEFAULT_ONE);
#if 1
// FIXME: not yet functional
cmd = am->registerAction(m_attachRemoteAction,
cmd = am->registerAction(m_startRemoteAction,
Constants::ATTACHREMOTE, globalcontext);
mdebug->addAction(cmd, Core::Constants::G_DEFAULT_ONE);
#endif
cmd = am->registerAction(m_manager->m_continueAction,
ProjectExplorer::Constants::DEBUG, QList<int>() << m_gdbRunningContext);
......@@ -1090,11 +1087,11 @@ void DebuggerPlugin::attachCore()
runControl->start();
}
void DebuggerPlugin::attachRemoteApplication()
void DebuggerPlugin::startRemoteApplication()
{
QSharedPointer<RunConfiguration> rc = activeRunConfiguration();
if (RunControl *runControl = m_debuggerRunner
->run(rc, ProjectExplorer::Constants::DEBUGMODE, AttachRemote))
->run(rc, ProjectExplorer::Constants::DEBUGMODE, StartRemote))
runControl->start();
}
......
......@@ -98,9 +98,9 @@ private slots:
void showSettingsDialog();
void startExternalApplication();
void startRemoteApplication();
void attachExternalApplication();
void attachCore();
void attachRemoteApplication();
private:
void readSettings();
......@@ -122,9 +122,9 @@ private:
QAction *m_toggleLockedAction;
QAction *m_startExternalAction;
QAction *m_startRemoteAction;
QAction *m_attachExternalAction;
QAction *m_attachCoreAction;
QAction *m_attachRemoteAction;
};
} // namespace Internal
......
......@@ -535,7 +535,7 @@ void GdbEngine::interruptInferior()
return;
}
if (q->startMode() == AttachRemote) {
if (q->startMode() == StartRemote) {
execCommand(_("-exec-interrupt"));
return;
}
......@@ -1313,7 +1313,7 @@ void GdbEngine::exitDebugger()
qDebug() << "STATUS ON EXITDEBUGGER: " << q->status());
interruptInferior();
}
if (q->startMode() == AttachExternal || q->startMode() == AttachRemote)
if (q->startMode() == AttachExternal || q->startMode() == StartRemote)
execCommand(_("detach"));
else
execCommand(_("kill"));
......@@ -1357,7 +1357,7 @@ bool GdbEngine::startDebugger()
if (q->startMode() == AttachCore || q->startMode() == AttachExternal) {
// nothing to do
} else if (q->startMode() == AttachRemote) {
} else if (q->startMode() == StartRemote) {
// nothing to do
} else if (q->m_useTerminal) {
m_stubProc.stop(); // We leave the console open, so recycle it now.
......@@ -1495,7 +1495,7 @@ bool GdbEngine::startDebugger()
execCommand(_("-file-exec-and-symbols ") + fileName);
execCommand(_("target core ") + coreName, CB(handleTargetCore));
qq->breakHandler()->removeAllBreakpoints();
} else if (q->startMode() == AttachRemote) {
} else if (q->startMode() == StartRemote) {
execCommand(_("set architecture %1").arg(q->m_remoteArchitecture));
qq->breakHandler()->setAllPending();
//QFileInfo fi(q->m_executable);
......
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>AttachRemoteDialog</class>
<widget class="QDialog" name="AttachRemoteDialog">
<class>StartRemoteDialog</class>
<widget class="QDialog" name="StartRemoteDialog">
<property name="geometry">
<rect>
<x>0</x>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment