Commit fb8e81dd authored by con's avatar con
Browse files

Merge branch 'master' of scm.dev.nokia.troll.no:creator/mainline

parents b69ab309 59b2aac1
......@@ -212,7 +212,7 @@ void AbstractSshChannel::handleChannelRequest(const SshIncomingPacket &packet)
handleExitStatus(packet.extractChannelExitStatus());
else if (requestType == SshIncomingPacket::ExitSignalType)
handleExitSignal(packet.extractChannelExitSignal());
else
else if (requestType != "eow@openssh.com") // Suppress warning for this one, as it's sent all the time.
qWarning("Ignoring unknown request type '%s'", requestType.data());
}
......
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>Debugger::Internal::BreakCondition</class>
<widget class="QDialog" name="BreakCondition">
<widget class="QDialog" name="Debugger::Internal::BreakCondition">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>283</width>
<height>141</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QLabel" name="labelCondition">
<property name="text">
<string>Condition:</string>
<string>&amp;Condition:</string>
</property>
<property name="buddy">
<cstring>lineEditCondition</cstring>
</property>
</widget>
</item>
......@@ -18,17 +29,23 @@
<item row="1" column="0">
<widget class="QLabel" name="labelIgnoreCount">
<property name="text">
<string>Ignore count:</string>
<string>&amp;Ignore count:</string>
</property>
<property name="buddy">
<cstring>spinBoxIgnoreCount</cstring>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="lineEditIgnoreCount"/>
<widget class="QSpinBox" name="spinBoxIgnoreCount"/>
</item>
<item row="2" column="0">
<widget class="QLabel" name="labelThreadSpec">
<property name="text">
<string>Thread specification:</string>
<string>&amp;Thread specification:</string>
</property>
<property name="buddy">
<cstring>lineEditThreadSpec</cstring>
</property>
</widget>
</item>
......@@ -54,7 +71,7 @@
<connection>
<sender>buttonBox</sender>
<signal>accepted()</signal>
<receiver>BreakCondition</receiver>
<receiver>Debugger::Internal::BreakCondition</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
......@@ -70,7 +87,7 @@
<connection>
<sender>buttonBox</sender>
<signal>rejected()</signal>
<receiver>BreakCondition</receiver>
<receiver>Debugger::Internal::BreakCondition</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
......
......@@ -276,6 +276,8 @@ void BreakHandler::saveBreakpoints()
map.insert(_("tracepoint"), one);
if (!data.module.isEmpty())
map.insert(_("module"), data.module);
if (!data.command.isEmpty())
map.insert(_("command"), data.command);
list.append(map);
}
debuggerCore()->setSessionValue("Breakpoints", list);
......@@ -328,6 +330,9 @@ void BreakHandler::loadBreakpoints()
v = map.value(_("module"));
if (v.isValid())
data.module = v.toString();
v = map.value(_("command"));
if (v.isValid())
data.command = v.toString();
appendBreakpoint(data);
}
//qDebug() << "LOADED BREAKPOINTS" << this << list.size();
......@@ -1102,6 +1107,8 @@ bool BreakHandler::BreakpointItem::needsChange() const
return true;
if (data.threadSpec != response.threadSpec)
return true;
if (data.command != response.command)
return true;
return false;
}
......@@ -1221,6 +1228,12 @@ QString BreakHandler::BreakpointItem::toToolTip() const
formatAddress(str, data.address);
str << "</td><td>";
formatAddress(str, response.address);
if (!data.command.isEmpty() || !response.command.isEmpty()) {
str << "</td></tr>"
<< "<tr><td>" << tr("Command:")
<< "</td><td>" << data.command
<< "</td><td>" << response.command<< "</td></tr>";
}
if (!data.condition.isEmpty() || !response.condition.isEmpty()) {
str << "</td></tr>"
<< "<tr><td>" << tr("Condition:")
......
......@@ -64,7 +64,8 @@ bool BreakpointParameters::equals(const BreakpointParameters &rhs) const
&& threadSpec == rhs.threadSpec
&& functionName == rhs.functionName
&& tracepoint == rhs.tracepoint
&& module == rhs.module;
&& module == rhs.module
&& command == rhs.command;
}
bool BreakpointParameters::conditionsMatch(const QByteArray &other) const
......@@ -90,6 +91,7 @@ QString BreakpointParameters::toString() const
ts << " UseFullPath: " << useFullPath;
ts << " Tracepoint: " << tracepoint;
ts << " Module: " << module;
ts << " Command: " << command;
return result;
}
......
......@@ -100,6 +100,7 @@ public:
int threadSpec; // Thread specification.
QString functionName;
QString module; // module for file name
QString command; // command to execute
bool tracepoint;
};
......
......@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>700</width>
<height>401</height>
<width>543</width>
<height>427</height>
</rect>
</property>
<property name="windowTitle">
......@@ -15,182 +15,229 @@
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QFormLayout" name="formLayout">
<item row="0" column="0">
<widget class="QLabel" name="labelType">
<property name="text">
<string>Breakpoint &amp;type:</string>
</property>
<property name="buddy">
<cstring>comboBoxType</cstring>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QComboBox" name="comboBoxType"/>
</item>
<item row="1" column="0">
<widget class="QLabel" name="labelFileName">
<property name="text">
<string>&amp;File name:</string>
</property>
<property name="buddy">
<cstring>pathChooserFileName</cstring>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="Utils::PathChooser" name="pathChooserFileName" native="true"/>
</item>
<item row="2" column="0">
<widget class="QLabel" name="labelLineNumber">
<property name="text">
<string>&amp;Line number:</string>
</property>
<property name="buddy">
<cstring>lineEditLineNumber</cstring>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLineEdit" name="lineEditLineNumber"/>
</item>
<item row="3" column="1">
<widget class="QCheckBox" name="checkBoxEnabled">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="labelEnabled">
<property name="text">
<string>&amp;Enabled:</string>
</property>
<property name="buddy">
<cstring>checkBoxEnabled</cstring>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QCheckBox" name="checkBoxUseFullPath">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="labelUseFullPath">
<property name="text">
<string>&amp;Use full path:</string>
</property>
<property name="buddy">
<cstring>checkBoxUseFullPath</cstring>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="labelAddress">
<property name="text">
<string>&amp;Address:</string>
</property>
<property name="buddy">
<cstring>lineEditAddress</cstring>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QLineEdit" name="lineEditAddress"/>
</item>
<item row="6" column="0">
<widget class="QLabel" name="labelFunction">
<property name="text">
<string>Fun&amp;ction:</string>
</property>
<property name="buddy">
<cstring>lineEditFunction</cstring>
</property>
</widget>
</item>
<item row="6" column="1">
<widget class="QLineEdit" name="lineEditFunction"/>
</item>
<item row="8" column="0">
<widget class="QLabel" name="labelCondition">
<property name="text">
<string>&amp;Condition:</string>
</property>
<property name="buddy">
<cstring>lineEditCondition</cstring>
</property>
</widget>
</item>
<item row="8" column="1">
<widget class="QLineEdit" name="lineEditCondition"/>
</item>
<item row="9" column="0">
<widget class="QLabel" name="labelIgnoreCount">
<property name="text">
<string>&amp;Ignore count:</string>
</property>
<property name="buddy">
<cstring>lineEditIgnoreCount</cstring>
</property>
</widget>
</item>
<item row="9" column="1">
<widget class="QLineEdit" name="lineEditIgnoreCount"/>
</item>
<item row="10" column="0">
<widget class="QLabel" name="labelThreadSpec">
<property name="text">
<string>&amp;Thread specification:</string>
</property>
<property name="buddy">
<cstring>lineEditThreadSpec</cstring>
</property>
</widget>
</item>
<item row="10" column="1">
<widget class="QLineEdit" name="lineEditThreadSpec"/>
</item>
<item row="11" column="1">
<widget class="QCheckBox" name="checkBoxTracepoint">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="11" column="0">
<widget class="QLabel" name="labelTracepoint">
<property name="text">
<string>T&amp;racepoint only:</string>
</property>
<property name="buddy">
<cstring>checkBoxTracepoint</cstring>
</property>
</widget>
</item>
<item row="7" column="0">
<widget class="QLabel" name="labelModule">
<property name="text">
<string>&amp;Module:</string>
</property>
<property name="buddy">
<cstring>lineEditModule</cstring>
</property>
</widget>
</item>
<item row="7" column="1">
<widget class="QLineEdit" name="lineEditModule"/>
</item>
</layout>
<widget class="QGroupBox" name="groupBoxBasic">
<property name="title">
<string>Basic</string>
</property>
<layout class="QFormLayout" name="basicFormLayout">
<item row="0" column="0">
<widget class="QLabel" name="labelType">
<property name="text">
<string>Breakpoint &amp;type:</string>
</property>
<property name="buddy">
<cstring>comboBoxType</cstring>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QComboBox" name="comboBoxType"/>
</item>
<item row="1" column="0">
<widget class="QLabel" name="labelFileName">
<property name="text">
<string>&amp;File name:</string>
</property>
<property name="buddy">
<cstring>pathChooserFileName</cstring>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="Utils::PathChooser" name="pathChooserFileName"/>
</item>
<item row="2" column="0">
<widget class="QLabel" name="labelLineNumber">
<property name="text">
<string>&amp;Line number:</string>
</property>
<property name="buddy">
<cstring>lineEditLineNumber</cstring>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLineEdit" name="lineEditLineNumber"/>
</item>
<item row="3" column="0">
<widget class="QLabel" name="labelEnabled">
<property name="text">
<string>&amp;Enabled:</string>
</property>
<property name="buddy">
<cstring>checkBoxEnabled</cstring>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QCheckBox" name="checkBoxEnabled">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="labelAddress">
<property name="text">
<string>&amp;Address:</string>
</property>
<property name="buddy">
<cstring>lineEditAddress</cstring>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QLineEdit" name="lineEditAddress"/>
</item>
<item row="5" column="0">
<widget class="QLabel" name="labelFunction">
<property name="text">
<string>Fun&amp;ction:</string>
</property>
<property name="buddy">
<cstring>lineEditFunction</cstring>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QLineEdit" name="lineEditFunction"/>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBoxAdvanced">
<property name="title">
<string>Advanced</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<layout class="QFormLayout" name="advancedFormLayout1">
<property name="fieldGrowthPolicy">
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
</property>
<item row="0" column="0">
<widget class="QLabel" name="labelTracepoint">
<property name="text">
<string>T&amp;racepoint only:</string>
</property>
<property name="buddy">
<cstring>checkBoxTracepoint</cstring>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QCheckBox" name="checkBoxTracepoint">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="labelUseFullPath">
<property name="text">
<string>&amp;Use full path:</string>
</property>
<property name="buddy">
<cstring>checkBoxUseFullPath</cstring>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QCheckBox" name="checkBoxUseFullPath">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="labelModule">
<property name="text">
<string>&amp;Module:</string>
</property>
<property name="buddy">
<cstring>lineEditModule</cstring>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLineEdit" name="lineEditModule"/>
</item>
<item row="3" column="0">
<widget class="QLabel" name="labelCommand">
<property name="text">
<string>&amp;Command:</string>
</property>
<property name="buddy">
<cstring>lineEditCommand</cstring>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QLineEdit" name="lineEditCommand"/>
</item>
</layout>
</item>
<item>
<layout class="QFormLayout" name="conditionFormLayout">
<property name="fieldGrowthPolicy">
<enum>QFormLayout::ExpandingFieldsGrow</enum>
</property>
<item row="0" column="0">
<widget class="QLabel" name="labelCondition">
<property name="text">
<string>C&amp;ondition:</string>
</property>
<property name="buddy">
<cstring>lineEditCondition</cstring>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="lineEditCondition"/>
</item>
<item row="1" column="0">
<widget class="QLabel" name="labelIgnoreCount">
<property name="text">
<string>&amp;Ignore count:</string>
</property>
<property name="buddy">
<cstring>spinBoxIgnoreCount</cstring>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QSpinBox" name="spinBoxIgnoreCount"/>
</item>
<item row="2" column="0">
<widget class="QLabel" name="labelThreadSpec">
<property name="text">
<string>T&amp;hread specification:</string>
</property>
<property name="buddy">
<cstring>lineEditThreadSpec</cstring>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLineEdit" name="lineEditThreadSpec"/>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
<item>
......@@ -205,6 +252,13 @@
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>Utils::PathChooser</class>
<extends>QWidget</extends>
<header location="global">utils/pathchooser.h</header>
</customwidget>
</customwidgets>
<resources/>
<connections>
<connection>
......
......@@ -106,6 +106,7 @@ private:
BreakpointDialog::BreakpointDialog(QWidget *parent)
: QDialog(parent), m_previousType(UnknownType), m_firstTypeChange(true)
{
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
// Match BreakpointType (omitting unknown type).
m_ui.setupUi(this);
QStringList types;
......@@ -116,14 +117,19 @@ BreakpointDialog::BreakpointDialog(QWidget *parent)
m_ui.comboBoxType->addItems(types);
m_ui.pathChooserFileName->setExpectedKind(Utils::PathChooser::File);
connect(m_ui.comboBoxType, SIGNAL(activated(int)), SLOT(typeChanged(int)));
m_ui.lineEditIgnoreCount->setValidator(
new QIntValidator(0, 2147483647, m_ui.lineEditIgnoreCount));
const QString moduleToolTip =
tr("Specifying the module (base name of the library or executable)\n"
"for function or file type breakpoints can significantly speed up\n"
"debugger start-up times (CDB, LLDB).");
m_ui.labelModule->setToolTip(moduleToolTip);
m_ui.lineEditModule->setToolTip(moduleToolTip);
const QString commandToolTip =
tr("Debugger command to be executed when the breakpoint is hit.\n"
"gdb allows for specifying a sequence of commands separated by the delimiter '\\n'.");
m_ui.lineEditCommand->setToolTip(commandToolTip);
m_ui.labelCommand->setToolTip(commandToolTip);
m_ui.spinBoxIgnoreCount->setMinimum(0);
m_ui.spinBoxIgnoreCount->setMaximum(2147483647);
}
void BreakpointDialog::setType(BreakpointType type)
......@@ -175,7 +181,7 @@ void BreakpointDialog::setPartsEnabled(unsigned partsMask)
m_ui.labelIgnoreCount->setEnabled(partsMask & ConditionPart);
m_ui<