forked from qt-creator/qt-creator
Debugger: Enable attaching with -client option.
Make it possible to trigger a debug-attach in a running instance of Qt Creator by means of -client, use that in qtcdebugger, thus enabling it to attaching to crashing executables in run mode (Windows/CDB). Modify IPlugin and application so that the complete command line is serialized and transmitted to a running instance via QtSingleApplication if -client is specified. Introduce IPlugin::remoteArgument and use that in core for opening files and in the debugger for attaching. Use -client in qtcdebugger with some logic to keep it alive as long as the debuggee, make CDB break in that case as the events are not replayed correctly in case the debugger is not spawned by the registered handler. Rubber-stamped-by: con <qtc-committer@nokia.com>
This commit is contained in:
@@ -87,16 +87,15 @@ void CorePlugin::extensionsInitialized()
|
||||
m_mainWindow->extensionsInitialized();
|
||||
}
|
||||
|
||||
void CorePlugin::remoteArgument(const QString& arg)
|
||||
void CorePlugin::remoteCommand(const QStringList & /* options */, const QStringList &args)
|
||||
{
|
||||
// An empty argument is sent to trigger activation
|
||||
// of the window via QtSingleApplication. It should be
|
||||
// the last of a sequence.
|
||||
if (arg.isEmpty()) {
|
||||
m_mainWindow->activateWindow();
|
||||
} else {
|
||||
m_mainWindow->openFiles(QStringList(arg));
|
||||
}
|
||||
m_mainWindow->openFiles(args);
|
||||
m_mainWindow->activateWindow();
|
||||
}
|
||||
|
||||
void CorePlugin::fileOpenRequest(const QString &f)
|
||||
{
|
||||
remoteCommand(QStringList(), QStringList(f));
|
||||
}
|
||||
|
||||
void CorePlugin::shutdown()
|
||||
|
||||
Reference in New Issue
Block a user