forked from qt-creator/qt-creator
Fix 'Attach Debugger' in output pane.
Bring back the slot, suppress a warning about empty binaries in the release check. Task-number: QTCREATORBUG-7677 Change-Id: I2f1703b38b68995a1e2533ed8a6c94985cc3b430 Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
@@ -52,6 +52,10 @@ namespace Utils {
|
|||||||
class SavedAction;
|
class SavedAction;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
namespace ProjectExplorer {
|
||||||
|
class RunControl;
|
||||||
|
}
|
||||||
|
|
||||||
namespace Debugger {
|
namespace Debugger {
|
||||||
|
|
||||||
class DebuggerEngine;
|
class DebuggerEngine;
|
||||||
@@ -122,6 +126,9 @@ public:
|
|||||||
|
|
||||||
virtual DebuggerToolTipManager *toolTipManager() const = 0;
|
virtual DebuggerToolTipManager *toolTipManager() const = 0;
|
||||||
virtual QSharedPointer<GlobalDebuggerOptions> globalDebuggerOptions() const = 0;
|
virtual QSharedPointer<GlobalDebuggerOptions> globalDebuggerOptions() const = 0;
|
||||||
|
|
||||||
|
public slots:
|
||||||
|
virtual void attachExternalApplication(ProjectExplorer::RunControl *rc) = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
// This is the only way to access the global object.
|
// This is the only way to access the global object.
|
||||||
|
@@ -888,6 +888,7 @@ public slots:
|
|||||||
void attachToRemoteServer();
|
void attachToRemoteServer();
|
||||||
void attachToProcess(bool startServerOnly);
|
void attachToProcess(bool startServerOnly);
|
||||||
void attachToRunningApplication();
|
void attachToRunningApplication();
|
||||||
|
void attachExternalApplication(ProjectExplorer::RunControl *rc);
|
||||||
void attachToQmlPort();
|
void attachToQmlPort();
|
||||||
void startRemoteEngine();
|
void startRemoteEngine();
|
||||||
void runScheduled();
|
void runScheduled();
|
||||||
@@ -1684,6 +1685,18 @@ void DebuggerPluginPrivate::attachToProcess(bool startServerOnly)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DebuggerPluginPrivate::attachExternalApplication(ProjectExplorer::RunControl *rc)
|
||||||
|
{
|
||||||
|
DebuggerStartParameters sp;
|
||||||
|
fillParameters(&sp);
|
||||||
|
sp.attachPID = rc->applicationProcessHandle().pid();
|
||||||
|
sp.displayName = tr("Process %1").arg(sp.attachPID);
|
||||||
|
sp.startMode = AttachExternal;
|
||||||
|
sp.closeMode = DetachAtClose;
|
||||||
|
sp.toolChainAbi = rc->abi();
|
||||||
|
DebuggerRunControlFactory::createAndScheduleRun(sp);
|
||||||
|
}
|
||||||
|
|
||||||
void DebuggerPluginPrivate::attachToQmlPort()
|
void DebuggerPluginPrivate::attachToQmlPort()
|
||||||
{
|
{
|
||||||
DebuggerStartParameters sp;
|
DebuggerStartParameters sp;
|
||||||
|
@@ -5235,7 +5235,9 @@ bool GdbEngine::attemptQuickStart() const
|
|||||||
|
|
||||||
void GdbEngine::checkForReleaseBuild()
|
void GdbEngine::checkForReleaseBuild()
|
||||||
{
|
{
|
||||||
QString binary = startParameters().executable;
|
const QString binary = startParameters().executable;
|
||||||
|
if (binary.isEmpty())
|
||||||
|
return;
|
||||||
ElfReader reader(binary);
|
ElfReader reader(binary);
|
||||||
ElfData elfData = reader.readHeaders();
|
ElfData elfData = reader.readHeaders();
|
||||||
QString error = reader.errorString();
|
QString error = reader.errorString();
|
||||||
|
Reference in New Issue
Block a user