Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
01aabbda
Commit
01aabbda
authored
May 10, 2010
by
hjk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
debugger: rename some breakpoint related functions
parent
6d0b571a
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
18 additions
and
17 deletions
+18
-17
src/plugins/debugger/breakhandler.cpp
src/plugins/debugger/breakhandler.cpp
+2
-2
src/plugins/debugger/breakhandler.h
src/plugins/debugger/breakhandler.h
+2
-2
src/plugins/debugger/breakwindow.cpp
src/plugins/debugger/breakwindow.cpp
+2
-1
src/plugins/debugger/gdb/gdbengine.cpp
src/plugins/debugger/gdb/gdbengine.cpp
+11
-11
src/plugins/debugger/gdb/gdbengine.h
src/plugins/debugger/gdb/gdbengine.h
+1
-1
No files found.
src/plugins/debugger/breakhandler.cpp
View file @
01aabbda
...
...
@@ -357,7 +357,7 @@ void BreakHandler::clear()
m_inserted
.
clear
();
}
int
BreakHandler
::
findBreakpoint
(
const
BreakpointData
&
needle
)
const
int
BreakHandler
::
find
Similar
Breakpoint
(
const
BreakpointData
&
needle
)
const
{
// Search a breakpoint we might refer to.
for
(
int
index
=
0
;
index
!=
size
();
++
index
)
{
...
...
@@ -389,7 +389,7 @@ int BreakHandler::findBreakpoint(const QString &fileName, int lineNumber) const
return
-
1
;
}
BreakpointData
*
BreakHandler
::
findBreakpoint
(
int
bpNumber
)
const
BreakpointData
*
BreakHandler
::
findBreakpoint
ByNumber
(
int
bpNumber
)
const
{
if
(
!
size
())
return
0
;
...
...
src/plugins/debugger/breakhandler.h
View file @
01aabbda
...
...
@@ -69,8 +69,8 @@ public:
int
indexOf
(
BreakpointData
*
data
)
{
return
m_bp
.
indexOf
(
data
);
}
// If lineNumber < 0, interpret fileName as address.
int
findBreakpoint
(
const
QString
&
fileName
,
int
lineNumber
)
const
;
int
findBreakpoint
(
const
BreakpointData
&
data
)
const
;
// Returns index.
BreakpointData
*
findBreakpoint
(
int
bpNumber
)
const
;
int
find
Similar
Breakpoint
(
const
BreakpointData
&
data
)
const
;
// Returns index.
BreakpointData
*
findBreakpoint
ByNumber
(
int
bpNumber
)
const
;
void
updateMarkers
();
QList
<
BreakpointData
*>
insertedBreakpoints
()
const
;
...
...
src/plugins/debugger/breakwindow.cpp
View file @
01aabbda
...
...
@@ -137,8 +137,9 @@ void BreakWindow::resizeEvent(QResizeEvent *ev)
void
BreakWindow
::
mouseDoubleClickEvent
(
QMouseEvent
*
ev
)
{
QModelIndex
indexUnderMouse
=
indexAt
(
ev
->
pos
());
if
(
indexUnderMouse
.
isValid
())
if
(
indexUnderMouse
.
isValid
()
&&
indexUnderMouse
.
column
()
>=
4
)
editBreakpoint
(
QModelIndexList
()
<<
indexUnderMouse
);
QTreeView
::
mouseDoubleClickEvent
(
ev
);
}
void
BreakWindow
::
contextMenuEvent
(
QContextMenuEvent
*
ev
)
...
...
src/plugins/debugger/gdb/gdbengine.cpp
View file @
01aabbda
...
...
@@ -492,8 +492,8 @@ void GdbEngine::handleResponse(const QByteArray &buff)
const
GdbMi
bkpt
=
result
.
findChild
(
"bkpt"
);
const
int
number
=
bkpt
.
findChild
(
"number"
).
data
().
toInt
();
BreakHandler
*
handler
=
manager
()
->
breakHandler
();
BreakpointData
*
data
=
handler
->
findBreakpoint
(
number
);
b
reakpointDataFromOutput
(
data
,
bkpt
);
BreakpointData
*
data
=
handler
->
findBreakpoint
ByNumber
(
number
);
setB
reakpointDataFromOutput
(
data
,
bkpt
);
handler
->
updateMarkers
();
}
else
{
qDebug
()
<<
"IGNORED ASYNC OUTPUT"
...
...
@@ -2088,7 +2088,7 @@ void GdbEngine::setTokenBarrier()
//
//////////////////////////////////////////////////////////////////////
void
GdbEngine
::
b
reakpointDataFromOutput
(
BreakpointData
*
data
,
const
GdbMi
&
bkpt
)
void
GdbEngine
::
setB
reakpointDataFromOutput
(
BreakpointData
*
data
,
const
GdbMi
&
bkpt
)
{
if
(
!
bkpt
.
isValid
())
return
;
...
...
@@ -2241,7 +2241,7 @@ void GdbEngine::handleBreakInsert1(const GdbResponse &response)
if
(
response
.
resultClass
==
GdbResultDone
)
{
// Interesting only on Mac?
GdbMi
bkpt
=
response
.
data
.
findChild
(
"bkpt"
);
b
reakpointDataFromOutput
(
data
,
bkpt
);
setB
reakpointDataFromOutput
(
data
,
bkpt
);
}
else
{
// Some versions of gdb like "GNU gdb (GDB) SUSE (6.8.91.20090930-2.4)"
// know how to do pending breakpoints using CLI but not MI. So try
...
...
@@ -2313,10 +2313,10 @@ void GdbEngine::handleBreakList(const GdbMi &table)
BreakHandler
*
handler
=
manager
()
->
breakHandler
();
for
(
int
index
=
0
;
index
!=
bkpts
.
size
();
++
index
)
{
BreakpointData
temp
;
b
reakpointDataFromOutput
(
&
temp
,
bkpts
.
at
(
index
));
int
found
=
handler
->
findBreakpoint
(
temp
);
setB
reakpointDataFromOutput
(
&
temp
,
bkpts
.
at
(
index
));
int
found
=
handler
->
find
Similar
Breakpoint
(
temp
);
if
(
found
!=
-
1
)
b
reakpointDataFromOutput
(
handler
->
at
(
found
),
bkpts
.
at
(
index
));
setB
reakpointDataFromOutput
(
handler
->
at
(
found
),
bkpts
.
at
(
index
));
//else
//qDebug() << "CANNOT HANDLE RESPONSE" << bkpts.at(index).toString();
}
...
...
@@ -2346,7 +2346,7 @@ void GdbEngine::handleBreakIgnore(const GdbResponse &response)
//
// gdb 6.3 does not produce any console output
BreakHandler
*
handler
=
manager
()
->
breakHandler
();
BreakpointData
*
data
=
handler
->
findBreakpoint
(
bpNumber
);
BreakpointData
*
data
=
handler
->
findBreakpoint
ByNumber
(
bpNumber
);
if
(
response
.
resultClass
==
GdbResultDone
&&
data
)
{
QString
msg
=
_
(
response
.
data
.
findChild
(
"consolestreamoutput"
).
data
());
//if (msg.contains(__("Will stop next time breakpoint"))) {
...
...
@@ -2364,7 +2364,7 @@ void GdbEngine::handleBreakCondition(const GdbResponse &response)
{
int
bpNumber
=
response
.
cookie
.
toInt
();
BreakHandler
*
handler
=
manager
()
->
breakHandler
();
BreakpointData
*
data
=
handler
->
findBreakpoint
(
bpNumber
);
BreakpointData
*
data
=
handler
->
findBreakpoint
ByNumber
(
bpNumber
);
if
(
response
.
resultClass
==
GdbResultDone
)
{
// We just assume it was successful. Otherwise we had to parse
// the output stream data.
...
...
@@ -2447,7 +2447,7 @@ void GdbEngine::handleBreakInfo(const GdbResponse &response)
// constructor.
const
int
bpNumber
=
response
.
cookie
.
toInt
();
const
BreakHandler
*
handler
=
manager
()
->
breakHandler
();
BreakpointData
*
data
=
handler
->
findBreakpoint
(
bpNumber
);
BreakpointData
*
data
=
handler
->
findBreakpoint
ByNumber
(
bpNumber
);
if
(
data
)
{
QString
str
=
QString
::
fromLocal8Bit
(
response
.
data
.
findChild
(
"consolestreamoutput"
).
data
());
...
...
@@ -2464,7 +2464,7 @@ void GdbEngine::handleInfoLine(const GdbResponse &response)
// <_Z10testQStackv+142>.\n"
const
int
bpNumber
=
response
.
cookie
.
toInt
();
const
BreakHandler
*
handler
=
manager
()
->
breakHandler
();
BreakpointData
*
data
=
handler
->
findBreakpoint
(
bpNumber
);
BreakpointData
*
data
=
handler
->
findBreakpoint
ByNumber
(
bpNumber
);
if
(
!
data
)
return
;
QByteArray
ba
=
response
.
data
.
findChild
(
"consolestreamoutput"
).
data
();
...
...
src/plugins/debugger/gdb/gdbengine.h
View file @
01aabbda
...
...
@@ -347,7 +347,7 @@ private: ////////// View & Data Stuff //////////
void
handleWatchInsert
(
const
GdbResponse
&
response
);
void
handleInfoLine
(
const
GdbResponse
&
response
);
void
extractDataFromInfoBreak
(
const
QString
&
output
,
BreakpointData
*
data
);
void
b
reakpointDataFromOutput
(
BreakpointData
*
data
,
const
GdbMi
&
bkpt
);
void
setB
reakpointDataFromOutput
(
BreakpointData
*
data
,
const
GdbMi
&
bkpt
);
QByteArray
breakpointLocation
(
const
BreakpointData
*
data
);
void
sendInsertBreakpoint
(
int
index
);
QString
breakLocation
(
const
QString
&
file
)
const
;
...
...
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