Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
flatpak-qt-creator
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
8882e8e4
Commit
8882e8e4
authored
Oct 22, 2009
by
Oswald Buddenhagen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
clearer and less inefficient
parent
231eac88
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
15 deletions
+17
-15
src/plugins/debugger/gdb/gdbengine.cpp
src/plugins/debugger/gdb/gdbengine.cpp
+17
-15
No files found.
src/plugins/debugger/gdb/gdbengine.cpp
View file @
8882e8e4
...
...
@@ -489,12 +489,13 @@ void GdbEngine::handleResponse(const QByteArray &buff)
}
// Show some messages to give the impression something happens.
if
(
data
.
startsWith
(
"Reading symbols from "
))
if
(
data
.
startsWith
(
"Reading symbols from "
))
{
showStatusMessage
(
tr
(
"Reading %1..."
).
arg
(
_
(
data
.
mid
(
21
))),
1000
);
if
(
data
.
endsWith
(
'\n'
))
data
.
chop
(
1
);
if
(
data
.
startsWith
(
"[New "
)
||
data
.
startsWith
(
"[Thread "
))
}
else
if
(
data
.
startsWith
(
"[New "
)
||
data
.
startsWith
(
"[Thread "
))
{
if
(
data
.
endsWith
(
'\n'
))
data
.
chop
(
1
);
showStatusMessage
(
_
(
data
),
1000
);
}
break
;
}
...
...
@@ -875,13 +876,15 @@ void GdbEngine::handleQuerySources(const GdbResponse &response)
foreach
(
const
GdbMi
&
item
,
files
.
children
())
{
QString
fileName
=
QString
::
fromLocal8Bit
(
item
.
findChild
(
"file"
).
data
());
GdbMi
fullName
=
item
.
findChild
(
"fullname"
);
QString
full
=
QString
::
fromLocal8Bit
(
fullName
.
data
());
#ifdef Q_OS_WIN
full
=
QDir
::
cleanPath
(
full
);
#endif
if
(
fullName
.
isValid
()
&&
QFileInfo
(
full
).
isReadable
())
{
m_shortToFullName
[
fileName
]
=
full
;
m_fullToShortName
[
full
]
=
fileName
;
if
(
fullName
.
isValid
())
{
QString
full
=
QString
::
fromLocal8Bit
(
fullName
.
data
());
if
(
QFileInfo
(
full
).
isReadable
())
{
#ifdef Q_OS_WIN
full
=
QDir
::
cleanPath
(
full
);
#endif
m_shortToFullName
[
fileName
]
=
full
;
m_fullToShortName
[
full
]
=
fileName
;
}
}
}
if
(
m_shortToFullName
!=
oldShortToFull
)
...
...
@@ -1150,12 +1153,11 @@ void GdbEngine::handleStop1(const GdbResponse &response)
void
GdbEngine
::
handleStop1
(
const
GdbMi
&
data
)
{
QByteArray
reason
=
data
.
findChild
(
"reason"
).
data
();
if
(
m_modulesListOutdated
)
{
reloadModules
();
m_modulesListOutdated
=
false
;
}
// Need another round trip
QByteArray
reason
=
data
.
findChild
(
"reason"
).
data
();
if
(
reason
==
"breakpoint-hit"
)
{
showStatusMessage
(
tr
(
"Stopped at breakpoint."
));
GdbMi
frame
=
data
.
findChild
(
"frame"
);
...
...
@@ -4064,14 +4066,14 @@ QString GdbEngine::parseDisassembler(const GdbMi &lines)
foreach
(
const
GdbMi
&
child
,
lines
.
children
())
{
if
(
child
.
hasName
(
"src_and_asm_line"
))
{
// mixed mode
int
line
=
child
.
findChild
(
"line"
).
data
().
toInt
();
QString
fileName
=
QFile
::
decodeName
(
child
.
findChild
(
"file"
).
data
());
if
(
!
fileLoaded
)
{
QString
fileName
=
QFile
::
decodeName
(
child
.
findChild
(
"file"
).
data
());
QFile
file
(
fullName
(
fileName
));
file
.
open
(
QIODevice
::
ReadOnly
);
fileContents
=
file
.
readAll
().
split
(
'\n'
);
fileLoaded
=
true
;
}
int
line
=
child
.
findChild
(
"line"
).
data
().
toInt
();
if
(
line
>=
0
&&
line
<
fileContents
.
size
())
ba
+=
" "
+
fileContents
.
at
(
line
)
+
'\n'
;
GdbMi
insn
=
child
.
findChild
(
"line_asm_insn"
);
...
...
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