Commit 9739b8df authored by hjk's avatar hjk Committed by hjk

debugger/remotelinux: new dialog to attach to remote process

Change-Id: I221534561f4bbd299d494ecc902092e2e709770c
Reviewed-by: default avatarChristian Kandeler <christian.kandeler@nokia.com>
parent 676739a8
This diff is collapsed.
......@@ -512,7 +512,9 @@ static QList<DebuggerEngineType> engineTypes(const DebuggerStartParameters &sp)
return result;
}
if (sp.startMode != AttachToRemoteServer && !sp.executable.isEmpty())
if (sp.startMode != AttachToRemoteServer
&& sp.startMode != AttachToRemoteProcess
&& !sp.executable.isEmpty())
result = enginesForExecutable(sp.executable);
if (!result.isEmpty())
return result;
......
......@@ -213,6 +213,7 @@ SshConnectionParameters LinuxDeviceConfiguration::sshParameters() const
}
LinuxDeviceConfiguration::DeviceType LinuxDeviceConfiguration::deviceType() const
{
return d->deviceType;
}
......
......@@ -127,8 +127,7 @@ FORMS += \
linuxdeviceconfigurationssettingswidget.ui \
sshkeycreationdialog.ui \
remotelinuxdeployconfigurationwidget.ui \
profilesupdatedialog.ui \
startgdbserverdialog.ui
profilesupdatedialog.ui
RESOURCES += remotelinux.qrc
......
......@@ -62,6 +62,7 @@ namespace Internal {
RemoteLinuxPlugin::RemoteLinuxPlugin()
{
setObjectName(QLatin1String("RemoteLinuxPlugin"));
}
bool RemoteLinuxPlugin::initialize(const QStringList &arguments,
......@@ -72,6 +73,7 @@ bool RemoteLinuxPlugin::initialize(const QStringList &arguments,
LinuxDeviceConfigurations::instance(this);
addObject(this);
addAutoReleasedObject(new LinuxDeviceConfigurationsSettingsPage);
addAutoReleasedObject(new GenericLinuxDeviceConfigurationFactory);
addAutoReleasedObject(new RemoteLinuxRunConfigurationFactory);
......@@ -89,6 +91,7 @@ bool RemoteLinuxPlugin::initialize(const QStringList &arguments,
void RemoteLinuxPlugin::extensionsInitialized()
{
/*
using namespace Core;
ICore *core = ICore::instance();
ActionManager *am = core->actionManager();
......@@ -111,6 +114,7 @@ void RemoteLinuxPlugin::extensionsInitialized()
cmd->setDefaultText(tr("Attach to Remote Process"));
mstart->addAction(cmd, Debugger::Constants::G_AUTOMATIC_REMOTE);
connect(act, SIGNAL(triggered()), SLOT(startGdbServer()));
*/
}
void RemoteLinuxPlugin::startGdbServer()
......
......@@ -110,6 +110,11 @@ int AbstractRemoteLinuxProcessList::pidAt(int row) const
return d->remoteProcesses.at(row).pid;
}
QString AbstractRemoteLinuxProcessList::commandLineAt(int row) const
{
return d->remoteProcesses.at(row).cmdLine;
}
int AbstractRemoteLinuxProcessList::rowCount(const QModelIndex &parent) const
{
return parent.isValid() ? 0 : d->remoteProcesses.count();
......
......@@ -54,6 +54,7 @@ public:
void update();
void killProcess(int row);
int pidAt(int row) const;
QString commandLineAt(int row) const;
signals:
void error(const QString &errorMsg);
......
......@@ -39,9 +39,7 @@
namespace RemoteLinux {
namespace Internal {
class StartGdbServerDialogPrivate;
} // namespace Internal
namespace Internal { class StartGdbServerDialogPrivate; }
class REMOTELINUX_EXPORT StartGdbServerDialog : public QDialog
{
......@@ -55,9 +53,6 @@ public:
void attachToRemoteProcess();
signals:
void pidSelected(int pid);
void portSelected(int port);
void portOpened(int port);
void processAborted();
private slots:
......@@ -67,7 +62,7 @@ private slots:
void updateProcessList();
void attachToProcess();
void handleProcessKilled();
void handleSelectionChanged();
void updateButtons();
void portGathererError(const QString &errorMessage);
void portListReady();
......@@ -79,6 +74,9 @@ private slots:
private:
void startGdbServerOnPort(int port, int pid);
void reportOpenPort(int port);
void reportFailure();
void logMessage(const QString &line);
Internal::StartGdbServerDialogPrivate *d;
};
......
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>RemoteLinux::Internal::StartGdbServerDialog</class>
<widget class="QDialog" name="RemoteLinux::Internal::StartGdbServerDialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>420</width>
<height>564</height>
</rect>
</property>
<property name="windowTitle">
<string>List of Remote Processes</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2" stretch="0,1,0,0,0">
<item>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Device:</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QComboBox" name="deviceComboBox"/>
</item>
<item row="1" column="0">
<widget class="QLabel" name="filterLabel">
<property name="text">
<string>&amp;Filter by process name:</string>
</property>
<property name="buddy">
<cstring>processFilterLineEdit</cstring>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="processFilterLineEdit"/>
</item>
<item row="1" column="2">
<spacer name="horizontalSpacer_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QTableView" name="tableView">
<property name="showGrid">
<bool>false</bool>
</property>
<property name="sortingEnabled">
<bool>true</bool>
</property>
<attribute name="horizontalHeaderDefaultSectionSize">
<number>100</number>
</attribute>
<attribute name="horizontalHeaderStretchLastSection">
<bool>true</bool>
</attribute>
<attribute name="verticalHeaderVisible">
<bool>false</bool>
</attribute>
</widget>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QPushButton" name="attachProcessButton">
<property name="text">
<string>&amp;Attach to Selected Process</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="updateListButton">
<property name="text">
<string>&amp;Update List</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>242</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item>
<widget class="QTextBrowser" name="textBrowser"/>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Close</set>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<resources/>
<connections>
<connection>
<sender>buttonBox</sender>
<signal>accepted()</signal>
<receiver>RemoteLinux::Internal::StartGdbServerDialog</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
<x>257</x>
<y>290</y>
</hint>
<hint type="destinationlabel">
<x>157</x>
<y>274</y>
</hint>
</hints>
</connection>
<connection>
<sender>buttonBox</sender>
<signal>rejected()</signal>
<receiver>RemoteLinux::Internal::StartGdbServerDialog</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
<x>316</x>
<y>260</y>
</hint>
<hint type="destinationlabel">
<x>286</x>
<y>274</y>
</hint>
</hints>
</connection>
</connections>
</ui>
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