Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
5adb6559
Commit
5adb6559
authored
Jun 23, 2010
by
hjk
Browse files
debugger: attempt to fix symbian output connections
parent
bbf4acf4
Changes
7
Hide whitespace changes
Inline
Side-by-side
src/plugins/debugger/debuggerplugin.cpp
View file @
5adb6559
...
...
@@ -843,7 +843,7 @@ public slots:
QVariant
configValue
(
const
QString
&
name
)
const
{
return
settings
()
->
value
(
name
);
}
ProjectExplorer
::
RunControl
*
createDebugger
(
const
DebuggerStartParameters
&
sp
);
Debugger
RunControl
*
createDebugger
(
const
DebuggerStartParameters
&
sp
);
void
startDebugger
(
ProjectExplorer
::
RunControl
*
runControl
);
void
dumpLog
();
...
...
@@ -1914,7 +1914,7 @@ void DebuggerPluginPrivate::showToolTip(ITextEditor *editor, const QPoint &point
notifyCurrentEngine
(
RequestToolTipByExpressionRole
,
list
);
}
ProjectExplorer
::
RunControl
*
Debugger
RunControl
*
DebuggerPluginPrivate
::
createDebugger
(
const
DebuggerStartParameters
&
sp
)
{
return
m_debuggerRunControlFactory
->
create
(
sp
);
...
...
@@ -1922,8 +1922,8 @@ DebuggerPluginPrivate::createDebugger(const DebuggerStartParameters &sp)
void
DebuggerPluginPrivate
::
startDebugger
(
ProjectExplorer
::
RunControl
*
rc
)
{
QTC_ASSERT
(
rc
,
return
);
DebuggerRunControl
*
runControl
=
qobject_cast
<
DebuggerRunControl
*>
(
rc
);
qDebug
()
<<
"START DEBUGGER: "
<<
runControl
<<
rc
;
QTC_ASSERT
(
runControl
,
return
);
activateDebugMode
();
connectEngine
(
runControl
->
engine
());
...
...
@@ -2576,7 +2576,7 @@ QWidget *DebuggerPlugin::mainWindow() const
return
d
->
m_uiSwitcher
->
mainWindow
();
}
ProjectExplorer
::
RunControl
*
Debugger
RunControl
*
DebuggerPlugin
::
createDebugger
(
const
DebuggerStartParameters
&
sp
)
{
return
instance
()
->
d
->
createDebugger
(
sp
);
...
...
src/plugins/debugger/debuggerplugin.h
View file @
5adb6559
...
...
@@ -83,8 +83,7 @@ public:
void
readSettings
();
void
writeSettings
()
const
;
static
ProjectExplorer
::
RunControl
*
createDebugger
(
const
DebuggerStartParameters
&
sp
);
static
DebuggerRunControl
*
createDebugger
(
const
DebuggerStartParameters
&
sp
);
static
void
startDebugger
(
ProjectExplorer
::
RunControl
*
runControl
);
QMessageBox
*
showMessageBox
(
int
icon
,
const
QString
&
title
,
...
...
src/plugins/debugger/debuggerrunner.cpp
View file @
5adb6559
...
...
@@ -171,7 +171,7 @@ RunControl *DebuggerRunControlFactory::create
return
create
(
sp
,
runConfiguration
);
}
RunControl
*
DebuggerRunControlFactory
::
create
(
const
DebuggerStartParameters
&
sp
,
Debugger
RunControl
*
DebuggerRunControlFactory
::
create
(
const
DebuggerStartParameters
&
sp
,
RunConfiguration
*
runConfiguration
)
{
DebuggerRunControl
*
runControl
=
new
DebuggerRunControl
(
runConfiguration
);
...
...
@@ -369,7 +369,7 @@ void DebuggerRunControl::createEngine(const DebuggerStartParameters &sp)
break
;
default:
{
// Could not find anything suitable.
emit
debuggingFinished
();
debuggingFinished
();
// Create Message box with possibility to go to settings
const
QString
msg
=
tr
(
"Cannot debug '%1' (tool chain: '%2'): %3"
)
.
arg
(
sp
.
executable
,
toolChainName
(
sp
.
toolChainType
),
m_errorMessage
);
...
...
src/plugins/debugger/debuggerrunner.h
View file @
5adb6559
...
...
@@ -42,6 +42,7 @@ class Environment;
namespace
Debugger
{
class
DebuggerRunControl
;
class
DebuggerStartParameters
;
namespace
Internal
{
...
...
@@ -69,7 +70,7 @@ public:
// This is used by the "Non-Standard" scenarios, e.g. Attach to Core.
// FIXME: What to do in case of a 0 runConfiguration?
ProjectExplorer
::
RunControl
*
create
(
const
DebuggerStartParameters
&
sp
,
Debugger
RunControl
*
create
(
const
DebuggerStartParameters
&
sp
,
ProjectExplorer
::
RunConfiguration
*
runConfiguration
=
0
);
private:
...
...
src/plugins/qt4projectmanager/qt-maemo/maemoruncontrol.cpp
View file @
5adb6559
...
...
@@ -64,6 +64,7 @@ namespace Internal {
using
ProjectExplorer
::
RunConfiguration
;
using
ProjectExplorer
::
ToolChain
;
using
namespace
Debugger
;
AbstractMaemoRunControl
::
AbstractMaemoRunControl
(
RunConfiguration
*
rc
,
QString
mode
)
:
RunControl
(
rc
,
mode
)
...
...
@@ -383,17 +384,17 @@ void MaemoRunControl::handleRemoteOutput(const QString &output)
MaemoDebugRunControl
::
MaemoDebugRunControl
(
RunConfiguration
*
runConfiguration
)
:
AbstractMaemoRunControl
(
runConfiguration
,
ProjectExplorer
::
Constants
::
DEBUGMODE
)
,
m_debuggerRunControl
(
0
)
,
m_startParams
(
new
Debugger
::
DebuggerStartParameters
)
,
m_startParams
(
new
DebuggerStartParameters
)
{
#ifdef USE_GDBSERVER
m_startParams
->
startMode
=
Debugger
::
AttachToRemote
;
m_startParams
->
startMode
=
AttachToRemote
;
m_startParams
->
executable
=
executableOnHost
();
m_startParams
->
debuggerCommand
=
m_runConfig
->
gdbCmd
();
m_startParams
->
remoteChannel
=
m_devConfig
.
server
.
host
%
QLatin1Char
(
':'
)
%
gdbServerPort
();
m_startParams
->
remoteArchitecture
=
QLatin1String
(
"arm"
);
#else
m_startParams
->
startMode
=
Debugger
::
StartRemoteGdb
;
m_startParams
->
startMode
=
StartRemoteGdb
;
m_startParams
->
executable
=
executableFilePathOnTarget
();
m_startParams
->
debuggerCommand
=
QLatin1String
(
"/usr/bin/gdb"
);
m_startParams
->
sshserver
=
m_devConfig
.
server
;
...
...
@@ -405,8 +406,7 @@ MaemoDebugRunControl::MaemoDebugRunControl(RunConfiguration *runConfiguration)
m_startParams
->
remoteDumperLib
=
remoteDir
().
toUtf8
()
+
'/'
+
QFileInfo
(
m_runConfig
->
dumperLib
()).
fileName
().
toUtf8
();
m_debuggerRunControl
=
qobject_cast
<
Debugger
::
DebuggerRunControl
*>
(
Debugger
::
DebuggerPlugin
::
createDebugger
(
*
m_startParams
.
data
()));
m_debuggerRunControl
=
DebuggerPlugin
::
createDebugger
(
*
m_startParams
.
data
());
connect
(
m_debuggerRunControl
,
SIGNAL
(
finished
()),
this
,
SLOT
(
debuggingFinished
()),
Qt
::
QueuedConnection
);
}
...
...
@@ -453,7 +453,7 @@ void MaemoDebugRunControl::handleRemoteOutput(const QString &output)
void
MaemoDebugRunControl
::
startDebugging
()
{
Debugger
::
DebuggerPlugin
::
startDebugger
(
m_debuggerRunControl
);
DebuggerPlugin
::
startDebugger
(
m_debuggerRunControl
);
}
void
MaemoDebugRunControl
::
stopInternal
()
...
...
@@ -464,7 +464,7 @@ void MaemoDebugRunControl::stopInternal()
bool
MaemoDebugRunControl
::
isRunning
()
const
{
return
AbstractMaemoRunControl
::
isRunning
()
||
m_debuggerRunControl
->
state
()
!=
Debugger
::
DebuggerNotReady
;
||
m_debuggerRunControl
->
state
()
!=
DebuggerNotReady
;
}
void
MaemoDebugRunControl
::
debuggingFinished
()
...
...
src/plugins/qt4projectmanager/qt-s60/s60devicerunconfiguration.cpp
View file @
5adb6559
...
...
@@ -886,20 +886,13 @@ void S60DeviceRunControl::printRunFailNotice(const QString &errorMessage) {
// ======== S60DeviceDebugRunControl
S60DeviceDebugRunControl
::
S60DeviceDebugRunControl
(
S60DeviceRunConfiguration
*
runConfiguration
,
QString
mode
)
:
S60DeviceRunControlBase
(
runConfiguration
,
mode
),
m_startParams
(
new
Debugger
::
DebuggerStartParameters
)
S60DeviceDebugRunControl
::
S60DeviceDebugRunControl
(
S60DeviceRunConfiguration
*
rc
,
QString
mode
)
:
S60DeviceRunControlBase
(
rc
,
mode
),
m_startParams
(
new
Debugger
::
DebuggerStartParameters
),
m_debuggerRunControl
(
0
)
{
setReleaseDeviceAfterLauncherFinish
(
true
);
// Debugger controls device after install
Debugger
::
DebuggerPlugin
*
dm
=
Debugger
::
DebuggerPlugin
::
instance
();
S60DeviceRunConfiguration
*
rc
=
qobject_cast
<
S60DeviceRunConfiguration
*>
(
runConfiguration
);
QTC_ASSERT
(
dm
&&
rc
,
return
);
connect
(
dm
,
SIGNAL
(
debuggingFinished
()),
this
,
SLOT
(
debuggingFinished
()),
Qt
::
QueuedConnection
);
connect
(
dm
,
SIGNAL
(
applicationOutputAvailable
(
QString
,
bool
)),
this
,
SLOT
(
printApplicationOutput
(
QString
,
bool
)),
Qt
::
QueuedConnection
);
QTC_ASSERT
(
rc
,
return
);
m_startParams
->
remoteChannel
=
rc
->
serialPortName
();
m_startParams
->
processArgs
=
rc
->
commandLineArguments
();
...
...
@@ -913,19 +906,17 @@ S60DeviceDebugRunControl::S60DeviceDebugRunControl(S60DeviceRunConfiguration *ru
}
}
void
S60DeviceDebugRunControl
::
stop
()
S60DeviceDebugRunControl
::
~
S60DeviceDebugRunControl
()
{
S60DeviceRunControlBase
::
stop
();
Debugger
::
DebuggerPlugin
*
dm
=
Debugger
::
DebuggerPlugin
::
instance
();
QTC_ASSERT
(
dm
,
return
)
// FIXME: ABC: that should use the RunControl present in
// handleLauncherFinished
if
(
dm
->
state
()
==
Debugger
::
DebuggerNotReady
)
dm
->
exitDebugger
();
// FIXME: Needed? m_debuggerRunControl->deleteLater();
}
S60DeviceDebugRunControl
::
~
S60DeviceDebugRunControl
()
void
S60DeviceDebugRunControl
::
stop
()
{
S60DeviceRunControlBase
::
stop
();
QTC_ASSERT
(
m_debuggerRunControl
,
return
)
if
(
m_debuggerRunControl
->
state
()
==
Debugger
::
DebuggerNotReady
)
m_debuggerRunControl
->
stop
();
}
void
S60DeviceDebugRunControl
::
initLauncher
(
const
QString
&
executable
,
trk
::
Launcher
*
launcher
)
...
...
@@ -949,9 +940,18 @@ void S60DeviceDebugRunControl::handleLauncherFinished()
{
using
namespace
Debugger
;
emit
appendMessage
(
this
,
tr
(
"Launching debugger..."
),
false
);
ProjectExplorer
::
RunControl
*
rc
=
DebuggerPlugin
::
createDebugger
(
*
m_startParams
.
data
());
DebuggerPlugin
::
startDebugger
(
rc
);
QTC_ASSERT
(
m_debuggerRunControl
==
0
,
/* Should happen only once. */
);
m_debuggerRunControl
=
DebuggerPlugin
::
createDebugger
(
*
m_startParams
.
data
());
connect
(
m_debuggerRunControl
,
SIGNAL
(
finished
()),
SLOT
(
debuggingFinished
()),
Qt
::
QueuedConnection
);
connect
(
m_debuggerRunControl
,
SIGNAL
(
addToOutputWindowInline
(
ProjectExplorer
::
RunControl
,
QString
,
bool
)),
SIGNAL
(
addToOutputWindowInline
(
ProjectExplorer
::
RunControl
,
QString
,
bool
)),
Qt
::
QueuedConnection
);
DebuggerPlugin
::
startDebugger
(
m_debuggerRunControl
);
}
void
S60DeviceDebugRunControl
::
debuggingFinished
()
...
...
src/plugins/qt4projectmanager/qt-s60/s60devicerunconfiguration.h
View file @
5adb6559
...
...
@@ -45,6 +45,7 @@ QT_END_NAMESPACE
namespace
Debugger
{
class
DebuggerStartParameters
;
class
DebuggerRunControl
;
}
namespace
SymbianUtils
{
...
...
@@ -245,6 +246,7 @@ private slots:
void
debuggingFinished
();
private:
QSharedPointer
<
Debugger
::
DebuggerStartParameters
>
m_startParams
;
Debugger
::
DebuggerRunControl
*
m_debuggerRunControl
;
QString
m_localExecutableFileName
;
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment