Skip to content
GitLab
Menu
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
5e909ccb
Commit
5e909ccb
authored
Aug 18, 2009
by
hjk
Browse files
debugger: add name of current function to disassembler view title
parent
cce7bf9f
Changes
1
Show whitespace changes
Inline
Side-by-side
src/plugins/debugger/debuggeragents.cpp
View file @
5e909ccb
...
...
@@ -139,8 +139,9 @@ public:
struct
DisassemblerViewAgentPrivate
{
QPointer
<
TextEditor
::
ITextEditor
>
editor
;
QPointer
<
IDebuggerEngine
>
engine
;
QString
address
;
QString
function
;
QPointer
<
DebuggerManager
>
manager
;
LocationMark2
*
locationMark
;
};
...
...
@@ -180,8 +181,8 @@ DisassemblerViewAgent::DisassemblerViewAgent(DebuggerManager *manager)
:
QObject
(
manager
),
d
(
new
DisassemblerViewAgentPrivate
)
{
d
->
editor
=
0
;
d
->
engine
=
manager
->
currentEngine
();
d
->
locationMark
=
new
LocationMark2
();
d
->
manager
=
manager
;
}
DisassemblerViewAgent
::~
DisassemblerViewAgent
()
...
...
@@ -193,8 +194,11 @@ DisassemblerViewAgent::~DisassemblerViewAgent()
void
DisassemblerViewAgent
::
setFrame
(
const
StackFrame
&
frame
)
{
d
->
engine
->
fetchDisassembler
(
this
,
frame
);
IDebuggerEngine
*
engine
=
d
->
manager
->
currentEngine
();
QTC_ASSERT
(
engine
,
return
);
engine
->
fetchDisassembler
(
this
,
frame
);
d
->
address
=
frame
.
address
;
d
->
function
=
frame
.
function
;
}
void
DisassemblerViewAgent
::
setContents
(
const
QString
&
contents
)
...
...
@@ -210,6 +214,7 @@ void DisassemblerViewAgent::setContents(const QString &contents)
editorManager
->
openEditorWithContents
(
Core
::
Constants
::
K_DEFAULT_TEXT_EDITOR
,
&
titlePattern
));
QTC_ASSERT
(
d
->
editor
,
return
);
if
((
plainTextEdit
=
qobject_cast
<
QPlainTextEdit
*>
(
d
->
editor
->
widget
())))
(
void
)
new
DisassemblerHighlighter
(
plainTextEdit
);
}
...
...
@@ -221,6 +226,7 @@ void DisassemblerViewAgent::setContents(const QString &contents)
plainTextEdit
->
setPlainText
(
contents
);
d
->
editor
->
markableInterface
()
->
removeMark
(
d
->
locationMark
);
d
->
editor
->
setDisplayName
(
_
(
"Disassembler (%1)"
).
arg
(
d
->
function
));
for
(
int
pos
=
0
,
line
=
0
;
;
++
line
,
++
pos
)
{
if
(
contents
.
midRef
(
pos
,
d
->
address
.
size
())
==
d
->
address
)
{
...
...
Write
Preview
Supports
Markdown
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