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
f0b6bce0
Commit
f0b6bce0
authored
Dec 16, 2010
by
hjk
Browse files
debugger: start with some infrastructure for tracepoint support
parent
be1f6621
Changes
8
Hide whitespace changes
Inline
Side-by-side
src/plugins/debugger/breakhandler.cpp
View file @
f0b6bce0
...
...
@@ -83,6 +83,12 @@ QIcon BreakHandler::watchpointIcon()
return
icon
;
}
QIcon
BreakHandler
::
tracepointIcon
()
{
static
QIcon
icon
(
_
(
":/debugger/images/tracepoint.png"
));
return
icon
;
}
QIcon
BreakHandler
::
emptyIcon
()
{
static
QIcon
icon
(
_
(
":/debugger/images/breakpoint_pending_16.png"
));
...
...
@@ -1064,6 +1070,8 @@ QIcon BreakHandler::BreakpointItem::icon() const
{
// FIXME: This seems to be called on each cursor blink as soon as the
// cursor is near a line with a breakpoint marker (+/- 2 lines or so).
if
(
data
.
isTracepoint
())
return
BreakHandler
::
tracepointIcon
();
if
(
data
.
type
==
Watchpoint
)
return
BreakHandler
::
watchpointIcon
();
if
(
!
data
.
enabled
)
...
...
src/plugins/debugger/breakhandler.h
View file @
f0b6bce0
...
...
@@ -89,6 +89,7 @@ public:
static
QIcon
pendingBreakpointIcon
();
static
QIcon
emptyIcon
();
static
QIcon
watchpointIcon
();
static
QIcon
tracepointIcon
();
BreakpointId
findBreakpointByFileAndLine
(
const
QString
&
fileName
,
int
lineNumber
,
bool
useMarkerPosition
=
true
);
...
...
src/plugins/debugger/breakpoint.cpp
View file @
f0b6bce0
...
...
@@ -43,7 +43,8 @@ namespace Internal {
BreakpointParameters
::
BreakpointParameters
(
BreakpointType
t
)
:
type
(
t
),
enabled
(
true
),
useFullPath
(
false
),
ignoreCount
(
0
),
lineNumber
(
0
),
address
(
0
),
threadSpec
(
-
1
)
ignoreCount
(
0
),
lineNumber
(
0
),
address
(
0
),
threadSpec
(
-
1
),
tracepoint
(
false
)
{}
bool
BreakpointParameters
::
equals
(
const
BreakpointParameters
&
rhs
)
const
...
...
@@ -57,7 +58,8 @@ bool BreakpointParameters::equals(const BreakpointParameters &rhs) const
&&
lineNumber
==
rhs
.
lineNumber
&&
address
==
rhs
.
address
&&
threadSpec
==
rhs
.
threadSpec
&&
functionName
==
rhs
.
functionName
;
&&
functionName
==
rhs
.
functionName
&&
tracepoint
==
rhs
.
tracepoint
;
}
bool
BreakpointParameters
::
conditionsMatch
(
const
QByteArray
&
other
)
const
...
...
@@ -81,6 +83,7 @@ QString BreakpointParameters::toString() const
ts
<<
" Address: "
<<
address
;
ts
<<
" FunctionName: "
<<
functionName
;
ts
<<
" UseFullPath: "
<<
useFullPath
;
ts
<<
" Tracepoint: "
<<
tracepoint
;
return
result
;
}
...
...
src/plugins/debugger/breakpoint.h
View file @
f0b6bce0
...
...
@@ -77,7 +77,9 @@ public:
bool
equals
(
const
BreakpointParameters
&
rhs
)
const
;
bool
conditionsMatch
(
const
QByteArray
&
other
)
const
;
bool
isWatchpoint
()
const
{
return
type
==
Watchpoint
;
}
bool
isBreakpoint
()
const
{
return
type
!=
Watchpoint
;
}
// Enough for now.
// Enough for now.
bool
isBreakpoint
()
const
{
return
type
!=
Watchpoint
&&
!
tracepoint
;
}
bool
isTracepoint
()
const
{
return
tracepoint
;
}
QString
toString
()
const
;
bool
operator
==
(
const
BreakpointParameters
&
p
)
const
{
return
equals
(
p
);
}
...
...
@@ -93,6 +95,7 @@ public:
quint64
address
;
// Address for watchpoints.
int
threadSpec
;
// Thread specification.
QString
functionName
;
bool
tracepoint
;
};
...
...
src/plugins/debugger/breakpoint.ui
View file @
f0b6bce0
...
...
@@ -124,6 +124,20 @@
<item
row=
"9"
column=
"1"
>
<widget
class=
"QLineEdit"
name=
"lineEditThreadSpec"
/>
</item>
<item
row=
"10"
column=
"1"
>
<widget
class=
"QCheckBox"
name=
"checkBoxTracepoint"
>
<property
name=
"text"
>
<string/>
</property>
</widget>
</item>
<item
row=
"10"
column=
"0"
>
<widget
class=
"QLabel"
name=
"labelTracepoint"
>
<property
name=
"text"
>
<string>
Tracepoint only:
</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
...
...
src/plugins/debugger/breakwindow.cpp
View file @
f0b6bce0
...
...
@@ -196,6 +196,7 @@ void BreakpointDialog::clearParts(unsigned partsMask)
void
BreakpointDialog
::
getParts
(
unsigned
partsMask
,
BreakpointParameters
*
data
)
const
{
data
->
enabled
=
m_ui
.
checkBoxEnabled
->
isChecked
();
data
->
tracepoint
=
m_ui
.
checkBoxTracepoint
->
isChecked
();
if
(
partsMask
&
FileAndLinePart
)
{
data
->
lineNumber
=
m_ui
.
lineEditLineNumber
->
text
().
toInt
();
...
...
@@ -212,11 +213,12 @@ void BreakpointDialog::getParts(unsigned partsMask, BreakpointParameters *data)
void
BreakpointDialog
::
setParts
(
unsigned
mask
,
const
BreakpointParameters
&
data
)
{
m_ui
.
checkBoxEnabled
->
setChecked
(
data
.
enabled
);
m_ui
.
checkBoxUseFullPath
->
setChecked
(
data
.
useFullPath
);
if
(
mask
&
FileAndLinePart
)
{
m_ui
.
pathChooserFileName
->
setPath
(
data
.
fileName
);
m_ui
.
lineEditLineNumber
->
setText
(
QString
::
number
(
data
.
lineNumber
));
m_ui
.
checkBox
UseFullPath
->
setChecked
(
data
.
useFullPath
);
m_ui
.
checkBox
Tracepoint
->
setChecked
(
data
.
tracepoint
);
}
if
(
mask
&
FunctionPart
)
...
...
src/plugins/debugger/debugger.qrc
View file @
f0b6bce0
...
...
@@ -19,6 +19,7 @@
<file>images/debugger_stop.png</file>
<file>images/debugger_stop_small.png</file>
<file>images/watchpoint.png</file>
<file>images/tracepoint.png</file>
<file>images/breakpoint_16.png</file>
<file>images/breakpoint_24.png</file>
<file>images/breakpoint_disabled_16.png</file>
...
...
src/plugins/debugger/images/tracepoint.png
0 → 100644
View file @
f0b6bce0
641 Bytes
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