forked from qt-creator/qt-creator
debugger: make qt source path configurable
This commit is contained in:
@@ -126,6 +126,7 @@ QWidget *CommonOptionsPage::createPage(QWidget *parent)
|
|||||||
m_group.insert(debuggerCore()->action(VerboseLog), 0);
|
m_group.insert(debuggerCore()->action(VerboseLog), 0);
|
||||||
m_group.insert(debuggerCore()->action(BreakOnThrow), 0);
|
m_group.insert(debuggerCore()->action(BreakOnThrow), 0);
|
||||||
m_group.insert(debuggerCore()->action(BreakOnCatch), 0);
|
m_group.insert(debuggerCore()->action(BreakOnCatch), 0);
|
||||||
|
m_group.insert(debuggerCore()->action(QtSourcesLocation), 0);
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
Utils::SavedAction *registerAction = debuggerCore()->action(RegisterForPostMortem);
|
Utils::SavedAction *registerAction = debuggerCore()->action(RegisterForPostMortem);
|
||||||
m_group.insert(registerAction,
|
m_group.insert(registerAction,
|
||||||
|
@@ -129,6 +129,32 @@
|
|||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QGroupBox" name="sourcesBox">
|
||||||
|
<property name="title">
|
||||||
|
<string>Sources</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="sourcesGridLayout">
|
||||||
|
<item row="7" column="0">
|
||||||
|
<widget class="QLabel" name="labelMaximalStackDepth">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Qt Sources:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="7" column="1">
|
||||||
|
<widget class="Utils::PathChooser" name="qtSourcesChooser" native="true">
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<spacer name="verticalSpacer">
|
<spacer name="verticalSpacer">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
@@ -147,6 +173,13 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
|
<customwidgets>
|
||||||
|
<customwidget>
|
||||||
|
<class>Utils::PathChooser</class>
|
||||||
|
<extends>QWidget</extends>
|
||||||
|
<header location="global">utils/pathchooser.h</header>
|
||||||
|
</customwidget>
|
||||||
|
</customwidgets>
|
||||||
<resources/>
|
<resources/>
|
||||||
<connections/>
|
<connections/>
|
||||||
</ui>
|
</ui>
|
||||||
|
@@ -400,6 +400,11 @@ DebuggerSettings::DebuggerSettings(QSettings *settings)
|
|||||||
item->setSettingsKey(debugModeGroup, QLatin1String("WatchdogTimeout"));
|
item->setSettingsKey(debugModeGroup, QLatin1String("WatchdogTimeout"));
|
||||||
item->setDefaultValue(20);
|
item->setDefaultValue(20);
|
||||||
insertItem(GdbWatchdogTimeout, item);
|
insertItem(GdbWatchdogTimeout, item);
|
||||||
|
|
||||||
|
item = new SavedAction(this);
|
||||||
|
item->setSettingsKey(debugModeGroup, QLatin1String("QtSourcesLocation"));
|
||||||
|
item->setDefaultValue(QString());
|
||||||
|
insertItem(QtSourcesLocation, item);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -88,6 +88,7 @@ enum DebuggerActionCode
|
|||||||
UseDebuggingHelpers,
|
UseDebuggingHelpers,
|
||||||
UseCustomDebuggingHelperLocation,
|
UseCustomDebuggingHelperLocation,
|
||||||
CustomDebuggingHelperLocation,
|
CustomDebuggingHelperLocation,
|
||||||
|
QtSourcesLocation,
|
||||||
|
|
||||||
UseCodeModel,
|
UseCodeModel,
|
||||||
ShowThreadNames,
|
ShowThreadNames,
|
||||||
|
@@ -601,10 +601,6 @@ static DebuggerStartParameters localStartParameters(RunConfiguration *runConfigu
|
|||||||
//qDebug() << "DUMPER: " << sp.dumperLibrary << sp.dumperLibraryLocations;
|
//qDebug() << "DUMPER: " << sp.dumperLibrary << sp.dumperLibraryLocations;
|
||||||
sp.displayName = rc->displayName();
|
sp.displayName = rc->displayName();
|
||||||
|
|
||||||
// Find qtInstallPath.
|
|
||||||
QString qmakePath = DebuggingHelperLibrary::findSystemQt(rc->environment());
|
|
||||||
if (!qmakePath.isEmpty())
|
|
||||||
sp.qtInstallPath = findQtInstallPath(qmakePath);
|
|
||||||
return sp;
|
return sp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -117,7 +117,6 @@ public:
|
|||||||
|
|
||||||
QString debuggerCommand;
|
QString debuggerCommand;
|
||||||
ProjectExplorer::Abi toolChainAbi;
|
ProjectExplorer::Abi toolChainAbi;
|
||||||
QString qtInstallPath;
|
|
||||||
|
|
||||||
QString dumperLibrary;
|
QString dumperLibrary;
|
||||||
QStringList dumperLibraryLocations;
|
QStringList dumperLibraryLocations;
|
||||||
|
@@ -4492,7 +4492,8 @@ void GdbEngine::notifyInferiorSetupFailed()
|
|||||||
void GdbEngine::handleInferiorPrepared()
|
void GdbEngine::handleInferiorPrepared()
|
||||||
{
|
{
|
||||||
QTC_ASSERT(state() == InferiorSetupRequested, qDebug() << state());
|
QTC_ASSERT(state() == InferiorSetupRequested, qDebug() << state());
|
||||||
const QByteArray qtInstallPath = startParameters().qtInstallPath.toLocal8Bit();
|
const QByteArray qtInstallPath =
|
||||||
|
debuggerCore()->action(QtSourcesLocation)->value().toString().toLocal8Bit();
|
||||||
if (!qtInstallPath.isEmpty()) {
|
if (!qtInstallPath.isEmpty()) {
|
||||||
QByteArray qtBuildPath;
|
QByteArray qtBuildPath;
|
||||||
#if defined(Q_OS_WIN)
|
#if defined(Q_OS_WIN)
|
||||||
|
@@ -2060,14 +2060,6 @@ struct Ty
|
|||||||
};
|
};
|
||||||
|
|
||||||
void testStuff()
|
void testStuff()
|
||||||
{
|
|
||||||
char *x = "0\032\0333";
|
|
||||||
char *y = "0\032\0333";
|
|
||||||
char *z = "0\032\0333";
|
|
||||||
int i = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
void testStuff5()
|
|
||||||
{
|
{
|
||||||
using namespace std;
|
using namespace std;
|
||||||
typedef map<string, list<string> > map_t;
|
typedef map<string, list<string> > map_t;
|
||||||
|
Reference in New Issue
Block a user