Skip to content
GitLab
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
d7a75dff
Commit
d7a75dff
authored
Nov 16, 2010
by
hjk
Browse files
debugger: breakpoint code cosmetics
parent
78a560a6
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/plugins/debugger/breakhandler.cpp
View file @
d7a75dff
...
...
@@ -439,10 +439,10 @@ QVariant BreakHandler::data(const QModelIndex &mi, int role) const
data
.
isWatchpoint
()
?
data
.
address
:
response
.
address
;
if
(
address
)
displayValue
+=
QString
::
fromAscii
(
"0x%1"
).
arg
(
address
,
0
,
16
);
if
(
!
response
.
state
.
isEmpty
())
{
if
(
!
response
.
extra
.
isEmpty
())
{
if
(
!
displayValue
.
isEmpty
())
displayValue
+=
QLatin1Char
(
' '
);
displayValue
+=
QString
::
fromAscii
(
response
.
state
);
displayValue
+=
QString
::
fromAscii
(
response
.
extra
);
}
return
displayValue
;
}
...
...
@@ -960,8 +960,8 @@ QString BreakHandler::BreakpointItem::toToolTip() const
<<
"</td><td>"
<<
response
.
number
<<
"</td></tr>"
<<
"<tr><td>"
<<
tr
(
"Breakpoint Type:"
)
<<
"</td><td>"
<<
t
<<
"</td></tr>"
<<
"<tr><td>"
<<
tr
(
"
State
:"
)
<<
"</td><td>"
<<
response
.
state
<<
"</td></tr>"
<<
"<tr><td>"
<<
tr
(
"
Extra Information
:"
)
<<
"</td><td>"
<<
response
.
extra
<<
"</td></tr>"
<<
"</table><br><hr><table>"
<<
"<tr><th>"
<<
tr
(
"Property"
)
<<
"</th><th>"
<<
tr
(
"Requested"
)
...
...
src/plugins/debugger/breakpoint.cpp
View file @
d7a75dff
...
...
@@ -44,23 +44,22 @@ namespace Internal {
BreakpointParameters
::
BreakpointParameters
(
BreakpointType
t
)
:
type
(
t
),
enabled
(
true
),
useFullPath
(
false
),
ignoreCount
(
0
),
lineNumber
(
0
),
address
(
0
)
{
}
{}
bool
BreakpointParameters
::
equals
(
const
BreakpointParameters
&
rhs
)
const
{
return
type
==
rhs
.
type
&&
enabled
==
rhs
.
enabled
&&
useFullPath
==
rhs
.
useFullPath
&&
fileName
==
rhs
.
fileName
&&
condition
==
rhs
.
condition
&&
ignoreCount
==
rhs
.
ignoreCount
&&
lineNumber
==
rhs
.
lineNumber
&&
address
==
rhs
.
address
&&
threadSpec
==
rhs
.
threadSpec
&&
functionName
==
rhs
.
functionName
;
return
type
==
rhs
.
type
&&
enabled
==
rhs
.
enabled
&&
useFullPath
==
rhs
.
useFullPath
&&
fileName
==
rhs
.
fileName
&&
condition
==
rhs
.
condition
&&
ignoreCount
==
rhs
.
ignoreCount
&&
lineNumber
==
rhs
.
lineNumber
&&
address
==
rhs
.
address
&&
threadSpec
==
rhs
.
threadSpec
&&
functionName
==
rhs
.
functionName
;
}
BreakpointResponse
::
BreakpointResponse
()
:
number
(
0
),
multiple
(
false
)
{}
bool
BreakpointParameters
::
conditionsMatch
(
const
QByteArray
&
other
)
const
{
// Some versions of gdb "beautify" the passed condition.
...
...
@@ -85,6 +84,17 @@ QString BreakpointParameters::toString() const
return
result
;
}
//////////////////////////////////////////////////////////////////
//
// BreakpointParameters
//
//////////////////////////////////////////////////////////////////
BreakpointResponse
::
BreakpointResponse
()
:
number
(
0
),
multiple
(
false
)
{}
QString
BreakpointResponse
::
toString
()
const
{
QString
result
;
...
...
@@ -107,7 +117,7 @@ void BreakpointResponse::fromParameters(const BreakpointParameters &p)
number
=
0
;
fullName
.
clear
();
multiple
=
false
;
state
.
clear
();
extra
.
clear
();
}
}
// namespace Internal
...
...
src/plugins/debugger/breakpoint.h
View file @
d7a75dff
...
...
@@ -112,7 +112,7 @@ public:
int
number
;
// Breakpoint number assigned by the debugger engine.
QString
fullName
;
// Full file name acknowledged by the debugger engine.
bool
multiple
;
// Happens in constructors/gdb.
QByteArray
state
;
// gdb: <PENDING>, <MULTIPLE>
QByteArray
extra
;
// gdb: <PENDING>, <MULTIPLE>
};
typedef
QList
<
BreakpointId
>
BreakpointIds
;
...
...
src/plugins/debugger/gdb/gdbengine.cpp
View file @
d7a75dff
...
...
@@ -2074,7 +2074,7 @@ void GdbEngine::setBreakpointDataFromOutput(BreakpointId id, const GdbMi &bkpt)
if
(
child
.
data
().
startsWith
(
"0x"
))
{
response
.
address
=
child
.
data
().
mid
(
2
).
toULongLong
(
0
,
16
);
}
else
{
response
.
state
=
child
.
data
();
response
.
extra
=
child
.
data
();
if
(
child
.
data
()
==
"<MULTIPLE>"
)
response
.
multiple
=
true
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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