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
a4d7fb2f
Commit
a4d7fb2f
authored
Nov 26, 2010
by
Friedemann Kleint
Browse files
Debugger: Fix compilation, centralize breakpoint type detection.
Reviewed-by: hjk
parent
61e99b3d
Changes
10
Hide whitespace changes
Inline
Side-by-side
src/plugins/debugger/cdb/cdbengine.cpp
View file @
a4d7fb2f
...
...
@@ -1197,6 +1197,23 @@ void CdbEngine::selectThread(int index)
}
}
bool
CdbEngine
::
stateAcceptsBreakpointChanges
()
const
{
switch
(
state
())
{
case
InferiorRunOk
:
case
InferiorStopOk
:
return
true
;
default:
break
;
}
return
false
;
}
bool
CdbEngine
::
acceptsBreakpoint
(
BreakpointId
id
)
const
{
return
DebuggerEngine
::
isCppBreakpoint
(
breakHandler
()
->
breakpointData
(
id
));
}
void
CdbEngine
::
attemptBreakpointSynchronization
()
{
if
(
!
m_d
->
m_hDebuggeeProcess
)
// Sometimes called from the breakpoint Window
...
...
@@ -1751,7 +1768,7 @@ void CdbEnginePrivate::updateStackTrace()
void
CdbEnginePrivate
::
updateModules
()
{
QList
<
Module
>
modules
;
Module
s
modules
;
QString
errorMessage
;
if
(
!
getModuleList
(
interfaces
().
debugSymbols
,
&
modules
,
&
errorMessage
))
m_engine
->
warning
(
msgFunctionFailed
(
Q_FUNC_INFO
,
errorMessage
));
...
...
src/plugins/debugger/cdb/cdbengine.h
View file @
a4d7fb2f
...
...
@@ -83,6 +83,8 @@ public:
virtual
void
activateFrame
(
int
index
);
virtual
void
selectThread
(
int
index
);
virtual
bool
stateAcceptsBreakpointChanges
()
const
;
virtual
bool
acceptsBreakpoint
(
BreakpointId
id
)
const
;
virtual
void
attemptBreakpointSynchronization
();
virtual
void
setRegisterValue
(
int
regnr
,
const
QString
&
value
);
...
...
src/plugins/debugger/cdb2/cdbengine2.cpp
View file @
a4d7fb2f
...
...
@@ -1669,6 +1669,23 @@ static inline BreakPointSyncType breakPointSyncType(const BreakHandler *handler,
return
added
?
BreakpointsAdded
:
BreakpointsUnchanged
;
}
bool
CdbEngine
::
stateAcceptsBreakpointChanges
()
const
{
switch
(
state
())
{
case
InferiorRunOk
:
case
InferiorStopOk
:
return
true
;
default:
break
;
}
return
false
;
}
bool
CdbEngine
::
acceptsBreakpoint
(
BreakpointId
id
)
const
{
return
DebuggerEngine
::
isCppBreakpoint
(
breakHandler
()
->
breakpointData
(
id
));
}
void
CdbEngine
::
attemptBreakpointSynchronization
()
{
// Check if there is anything to be done at all.
...
...
src/plugins/debugger/cdb2/cdbengine2.h
View file @
a4d7fb2f
...
...
@@ -101,6 +101,8 @@ public:
virtual
void
activateFrame
(
int
index
);
virtual
void
selectThread
(
int
index
);
virtual
bool
stateAcceptsBreakpointChanges
()
const
;
virtual
bool
acceptsBreakpoint
(
BreakpointId
id
)
const
;
virtual
void
attemptBreakpointSynchronization
();
virtual
void
fetchDisassembler
(
Debugger
::
Internal
::
DisassemblerViewAgent
*
agent
);
...
...
src/plugins/debugger/debuggerengine.cpp
View file @
a4d7fb2f
...
...
@@ -1403,6 +1403,15 @@ void DebuggerEngine::showStoppedByExceptionMessageBox(const QString &description
showMessageBox
(
QMessageBox
::
Information
,
tr
(
"Exception Triggered"
),
msg
);
}
bool
DebuggerEngine
::
isCppBreakpoint
(
const
BreakpointParameters
&
p
)
{
// Qml is currently only file
if
(
p
.
type
!=
BreakpointByFileAndLine
)
return
true
;
return
!
p
.
fileName
.
endsWith
(
QLatin1String
(
".qml"
),
Qt
::
CaseInsensitive
)
&&
!
p
.
fileName
.
endsWith
(
QLatin1String
(
".js"
),
Qt
::
CaseInsensitive
);
}
}
// namespace Debugger
#include "debuggerengine.moc"
src/plugins/debugger/debuggerengine.h
View file @
a4d7fb2f
...
...
@@ -345,6 +345,8 @@ protected:
void
showStoppedBySignalMessageBox
(
const
QString
meaning
,
QString
name
);
void
showStoppedByExceptionMessageBox
(
const
QString
&
description
);
static
bool
isCppBreakpoint
(
const
Internal
::
BreakpointParameters
&
p
);
private:
// Wrapper engine needs access to state of its subengines.
friend
class
QmlCppEngine
;
...
...
src/plugins/debugger/debuggerrunner.cpp
View file @
a4d7fb2f
...
...
@@ -344,7 +344,7 @@ DebuggerEngineType DebuggerRunControlPrivate::engineForExecutable
// We need the CDB debugger in order to be able to debug VS
// executables.
if
(
d
->
checkDebugConfiguration
(
ProjectExplorer
::
ToolChain_MSVC
,
if
(
DebuggerRunControl
::
checkDebugConfiguration
(
ProjectExplorer
::
ToolChain_MSVC
,
&
m_errorMessage
,
0
,
&
m_settingsIdHint
))
{
if
(
enabledEngineTypes
&
CdbEngineType
)
return
CdbEngineType
;
...
...
@@ -372,7 +372,7 @@ DebuggerEngineType DebuggerRunControlPrivate::engineForMode
if
(
startMode
!=
AttachToRemote
&&
(
enabledEngineTypes
&
CdbEngineType
))
return
CdbEngineType
;
if
(
startMode
==
AttachCrashedExternal
)
{
m_errorMessage
=
tr
(
"There is no debugging engine available for post-mortem debugging."
);
m_errorMessage
=
DebuggerRunControl
::
tr
(
"There is no debugging engine available for post-mortem debugging."
);
return
NoEngineType
;
}
return
GdbEngineType
;
...
...
src/plugins/debugger/gdb/abstractgdbadapter.cpp
View file @
a4d7fb2f
...
...
@@ -87,7 +87,7 @@ bool AbstractGdbAdapter::prepareWinCommand()
if
(
perr
!=
Utils
::
QtcProcess
::
SplitOk
)
{
// perr == BadQuoting is never returned on Windows
// FIXME? QTCREATORBUG-2809
m_engine
->
handleAdapterStartFailed
(
QApplication
::
translate
(
"DebuggerEngine"
,
// Same message in CdbEngine
m_engine
->
handleAdapterStartFailed
(
Q
Core
Application
::
translate
(
"DebuggerEngine"
,
// Same message in CdbEngine
"Debugging complex command lines is currently not supported under Windows"
),
QString
());
return
false
;
}
...
...
src/plugins/debugger/gdb/gdbengine.cpp
View file @
a4d7fb2f
...
...
@@ -2568,9 +2568,7 @@ void GdbEngine::attemptBreakpointSynchronization()
bool
GdbEngine
::
acceptsBreakpoint
(
BreakpointId
id
)
const
{
const
QString
fileName
=
breakHandler
()
->
fileName
(
id
);
return
!
fileName
.
endsWith
(
QLatin1String
(
"js"
))
&&
!
fileName
.
endsWith
(
QLatin1String
(
"qml"
));
return
DebuggerEngine
::
isCppBreakpoint
(
breakHandler
()
->
breakpointData
(
id
));
}
void
GdbEngine
::
insertBreakpoint
(
BreakpointId
id
)
...
...
@@ -2733,7 +2731,7 @@ void GdbEngine::handleShowModuleSymbols(const GdbResponse &response)
foreach
(
const
QByteArray
&
line
,
file
.
readAll
().
split
(
'\n'
))
{
if
(
line
.
isEmpty
())
continue
;
if
(
!
line
.
at
(
0
)
=
=
'['
)
if
(
line
.
at
(
0
)
!
=
'['
)
continue
;
int
posCode
=
line
.
indexOf
(
']'
)
+
2
;
int
posAddress
=
line
.
indexOf
(
"0x"
,
posCode
);
...
...
src/plugins/debugger/qml/qmlengine.cpp
View file @
a4d7fb2f
...
...
@@ -496,9 +496,7 @@ void QmlEngine::attemptBreakpointSynchronization()
bool
QmlEngine
::
acceptsBreakpoint
(
BreakpointId
id
)
const
{
const
QString
fileName
=
breakHandler
()
->
fileName
(
id
);
return
fileName
.
endsWith
(
QLatin1String
(
".qml"
))
||
fileName
.
endsWith
(
QLatin1String
(
".js"
));
return
!
DebuggerEngine
::
isCppBreakpoint
(
breakHandler
()
->
breakpointData
(
id
));
}
void
QmlEngine
::
loadSymbols
(
const
QString
&
moduleName
)
...
...
Write
Preview
Supports
Markdown
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