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
f9cd211d
Commit
f9cd211d
authored
Nov 15, 2010
by
hjk
Browse files
debugger: fix setting of breakpoint types on session loading
parent
47905482
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/plugins/debugger/breakhandler.cpp
View file @
f9cd211d
...
...
@@ -204,8 +204,7 @@ void BreakHandler::setWatchpointByAddress(quint64 address)
{
const
int
id
=
findWatchpointByAddress
(
address
);
if
(
id
==
-
1
)
{
BreakpointData
data
;
data
.
setType
(
Watchpoint
);
BreakpointData
data
(
Watchpoint
);
data
.
setAddress
(
address
);
appendBreakpoint
(
data
);
scheduleSynchronization
();
...
...
@@ -296,7 +295,7 @@ void BreakHandler::loadBreakpoints()
if
(
v
.
isValid
())
data
.
setUseFullPath
(
bool
(
v
.
toInt
()));
v
=
map
.
value
(
_
(
"type"
));
if
(
v
.
isValid
())
if
(
v
.
isValid
()
&&
v
.
toInt
()
!=
UnknownType
)
data
.
setType
(
BreakpointType
(
v
.
toInt
()));
data
.
setMarkerFileName
(
data
.
fileName
());
data
.
setMarkerLineNumber
(
data
.
lineNumber
());
...
...
@@ -623,6 +622,8 @@ void BreakHandler::removeBreakpoint(BreakpointId id)
void
BreakHandler
::
appendBreakpoint
(
const
BreakpointData
&
data
)
{
QTC_ASSERT
(
data
.
type
()
!=
UnknownType
,
return
);
// Ok to be not thread-safe. The order does not matter and only the gui
// produces authoritative ids.
static
quint64
currentId
=
0
;
...
...
@@ -652,8 +653,10 @@ void BreakHandler::toggleBreakpoint(const QString &fileName, int lineNumber,
}
else
{
BreakpointData
data
;
if
(
address
)
{
data
.
setType
(
BreakpointByAddress
);
data
.
setAddress
(
address
);
}
else
{
data
.
setType
(
BreakpointByFileAndLine
);
data
.
setFileName
(
fileName
);
data
.
setLineNumber
(
lineNumber
);
}
...
...
@@ -687,8 +690,7 @@ void BreakHandler::breakByFunction(const QString &functionName)
&&
data
.
ignoreCount
()
==
0
)
return
;
}
BreakpointData
data
;
data
.
setType
(
BreakpointByFunction
);
BreakpointData
data
(
BreakpointByFunction
);
data
.
setFunctionName
(
functionName
);
appendBreakpoint
(
data
);
}
...
...
src/plugins/debugger/breakwindow.cpp
View file @
f9cd211d
...
...
@@ -363,14 +363,12 @@ void BreakWindow::contextMenuEvent(QContextMenuEvent *ev)
else
if
(
act
==
addBreakpointAction
)
addBreakpoint
();
else
if
(
act
==
breakAtThrowAction
)
{
BreakpointData
data
;
data
.
setType
(
BreakpointByFunction
);
BreakpointData
data
(
BreakpointByFunction
);
data
.
setFunctionName
(
BreakpointData
::
throwFunction
);
handler
->
appendBreakpoint
(
data
);
}
else
if
(
act
==
breakAtCatchAction
)
{
// FIXME: Use the proper breakpoint type instead.
BreakpointData
data
;
data
.
setType
(
BreakpointByFunction
);
BreakpointData
data
(
BreakpointByFunction
);
data
.
setFunctionName
(
BreakpointData
::
catchFunction
);
handler
->
appendBreakpoint
(
data
);
}
...
...
@@ -405,7 +403,7 @@ void BreakWindow::editBreakpoint(BreakpointId id, QWidget *parent)
void
BreakWindow
::
addBreakpoint
()
{
BreakpointData
data
;
BreakpointData
data
(
BreakpointByFileAndLine
)
;
BreakpointDialog
dialog
(
this
);
if
(
dialog
.
showDialog
(
&
data
))
breakHandler
()
->
appendBreakpoint
(
data
);
...
...
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