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
fb837b52
Commit
fb837b52
authored
Dec 14, 2010
by
hjk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
debugger: s/*ViewAgent/*Agent/ to reduce noise and match file names
parent
b90bb97f
Changes
17
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
101 additions
and
102 deletions
+101
-102
src/plugins/debugger/cdb/cdbengine.cpp
src/plugins/debugger/cdb/cdbengine.cpp
+2
-2
src/plugins/debugger/cdb/cdbengine.h
src/plugins/debugger/cdb/cdbengine.h
+3
-3
src/plugins/debugger/cdb2/cdbengine2.cpp
src/plugins/debugger/cdb2/cdbengine2.cpp
+9
-9
src/plugins/debugger/cdb2/cdbengine2.h
src/plugins/debugger/cdb2/cdbengine2.h
+3
-3
src/plugins/debugger/debuggerengine.cpp
src/plugins/debugger/debuggerengine.cpp
+16
-17
src/plugins/debugger/debuggerengine.h
src/plugins/debugger/debuggerengine.h
+4
-4
src/plugins/debugger/debuggerplugin.cpp
src/plugins/debugger/debuggerplugin.cpp
+3
-3
src/plugins/debugger/disassembleragent.cpp
src/plugins/debugger/disassembleragent.cpp
+23
-23
src/plugins/debugger/disassembleragent.h
src/plugins/debugger/disassembleragent.h
+6
-6
src/plugins/debugger/gdb/gdbengine.cpp
src/plugins/debugger/gdb/gdbengine.cpp
+6
-6
src/plugins/debugger/gdb/gdbengine.h
src/plugins/debugger/gdb/gdbengine.h
+2
-2
src/plugins/debugger/lldb/ipcenginehost.cpp
src/plugins/debugger/lldb/ipcenginehost.cpp
+2
-2
src/plugins/debugger/lldb/ipcenginehost.h
src/plugins/debugger/lldb/ipcenginehost.h
+2
-2
src/plugins/debugger/memoryagent.cpp
src/plugins/debugger/memoryagent.cpp
+11
-11
src/plugins/debugger/memoryagent.h
src/plugins/debugger/memoryagent.h
+3
-3
src/plugins/debugger/qml/qmlcppengine.cpp
src/plugins/debugger/qml/qmlcppengine.cpp
+4
-4
src/plugins/debugger/qml/qmlcppengine.h
src/plugins/debugger/qml/qmlcppengine.h
+2
-2
No files found.
src/plugins/debugger/cdb/cdbengine.cpp
View file @
fb837b52
...
...
@@ -1361,7 +1361,7 @@ bool CdbEngine::attemptBreakpointSynchronizationI(QString *errorMessage)
return
true
;
}
void
CdbEngine
::
fetchDisassembler
(
Disassembler
View
Agent
*
agent
)
void
CdbEngine
::
fetchDisassembler
(
DisassemblerAgent
*
agent
)
{
enum
{
ContextLines
=
40
};
QString
errorMessage
;
...
...
@@ -1387,7 +1387,7 @@ void CdbEngine::fetchDisassembler(DisassemblerViewAgent *agent)
agent
->
setContents
(
lines
);
}
void
CdbEngine
::
fetchMemory
(
Memory
View
Agent
*
agent
,
QObject
*
token
,
quint64
addr
,
quint64
length
)
void
CdbEngine
::
fetchMemory
(
MemoryAgent
*
agent
,
QObject
*
token
,
quint64
addr
,
quint64
length
)
{
if
(
!
m_d
->
m_hDebuggeeProcess
&&
!
length
)
return
;
...
...
src/plugins/debugger/cdb/cdbengine.h
View file @
fb837b52
...
...
@@ -37,7 +37,7 @@
namespace
Debugger
{
namespace
Internal
{
class
Disassembler
View
Agent
;
class
DisassemblerAgent
;
class
CdbDebugEventCallback
;
class
CdbDebugOutput
;
class
CdbEnginePrivate
;
...
...
@@ -88,8 +88,8 @@ public:
virtual
void
attemptBreakpointSynchronization
();
virtual
void
setRegisterValue
(
int
regnr
,
const
QString
&
value
);
virtual
void
fetchDisassembler
(
Disassembler
View
Agent
*
agent
);
virtual
void
fetchMemory
(
Memory
View
Agent
*
,
QObject
*
,
quint64
addr
,
quint64
length
);
virtual
void
fetchDisassembler
(
DisassemblerAgent
*
agent
);
virtual
void
fetchMemory
(
MemoryAgent
*
,
QObject
*
,
quint64
addr
,
quint64
length
);
virtual
void
reloadModules
();
virtual
void
loadSymbols
(
const
QString
&
moduleName
);
...
...
src/plugins/debugger/cdb2/cdbengine2.cpp
View file @
fb837b52
...
...
@@ -71,8 +71,8 @@
#include <cctype>
Q_DECLARE_METATYPE
(
Debugger
::
Internal
::
Disassembler
View
Agent
*
)
Q_DECLARE_METATYPE
(
Debugger
::
Internal
::
Memory
View
Agent
*
)
Q_DECLARE_METATYPE
(
Debugger
::
Internal
::
DisassemblerAgent
*
)
Q_DECLARE_METATYPE
(
Debugger
::
Internal
::
MemoryAgent
*
)
enum
{
debug
=
0
};
enum
{
debugLocals
=
0
};
...
...
@@ -115,11 +115,11 @@ static const char localsPrefixC[] = "local.";
using
namespace
Debugger
::
Internal
;
struct
MemoryViewCookie
{
explicit
MemoryViewCookie
(
Memory
View
Agent
*
a
=
0
,
QObject
*
e
=
0
,
explicit
MemoryViewCookie
(
MemoryAgent
*
a
=
0
,
QObject
*
e
=
0
,
quint64
addr
=
0
,
quint64
l
=
0
)
:
agent
(
a
),
editorToken
(
e
),
address
(
addr
),
length
(
l
)
{}
Memory
View
Agent
*
agent
;
MemoryAgent
*
agent
;
QObject
*
editorToken
;
quint64
address
;
quint64
length
;
...
...
@@ -1022,28 +1022,28 @@ void CdbEngine::selectThread(int index)
postBuiltinCommand
(
cmd
,
0
,
&
CdbEngine
::
dummyHandler
,
CommandListStack
);
}
void
CdbEngine
::
fetchDisassembler
(
Debugger
::
Internal
::
Disassembler
View
Agent
*
agent
)
void
CdbEngine
::
fetchDisassembler
(
Debugger
::
Internal
::
DisassemblerAgent
*
agent
)
{
QTC_ASSERT
(
m_accessible
,
return
;)
QByteArray
cmd
;
ByteArrayInputStream
str
(
cmd
);
str
<<
"u "
<<
hex
<<
hexPrefixOn
<<
agent
->
address
()
<<
" L40"
;
const
QVariant
cookie
=
qVariantFromValue
<
Debugger
::
Internal
::
Disassembler
View
Agent
*>
(
agent
);
const
QVariant
cookie
=
qVariantFromValue
<
Debugger
::
Internal
::
DisassemblerAgent
*>
(
agent
);
postBuiltinCommand
(
cmd
,
0
,
&
CdbEngine
::
handleDisassembler
,
0
,
cookie
);
}
// Parse: "00000000`77606060 cc int 3"
void
CdbEngine
::
handleDisassembler
(
const
CdbBuiltinCommandPtr
&
command
)
{
QTC_ASSERT
(
qVariantCanConvert
<
Debugger
::
Internal
::
Disassembler
View
Agent
*>
(
command
->
cookie
),
return
;)
Debugger
::
Internal
::
Disassembler
View
Agent
*
agent
=
qvariant_cast
<
Debugger
::
Internal
::
Disassembler
View
Agent
*>
(
command
->
cookie
);
QTC_ASSERT
(
qVariantCanConvert
<
Debugger
::
Internal
::
DisassemblerAgent
*>
(
command
->
cookie
),
return
;)
Debugger
::
Internal
::
DisassemblerAgent
*
agent
=
qvariant_cast
<
Debugger
::
Internal
::
DisassemblerAgent
*>
(
command
->
cookie
);
DisassemblerLines
disassemblerLines
;
foreach
(
const
QByteArray
&
line
,
command
->
reply
)
disassemblerLines
.
appendLine
(
DisassemblerLine
(
QString
::
fromLatin1
(
line
)));
agent
->
setContents
(
disassemblerLines
);
}
void
CdbEngine
::
fetchMemory
(
Debugger
::
Internal
::
Memory
View
Agent
*
agent
,
QObject
*
editor
,
quint64
addr
,
quint64
length
)
void
CdbEngine
::
fetchMemory
(
Debugger
::
Internal
::
MemoryAgent
*
agent
,
QObject
*
editor
,
quint64
addr
,
quint64
length
)
{
QTC_ASSERT
(
m_accessible
,
return
;)
if
(
debug
)
...
...
src/plugins/debugger/cdb2/cdbengine2.h
View file @
fb837b52
...
...
@@ -41,7 +41,7 @@
namespace
Debugger
{
namespace
Cdb
{
class
Disassembler
View
Agent
;
class
DisassemblerAgent
;
struct
CdbBuiltinCommand
;
struct
CdbExtensionCommand
;
struct
CdbOptions
;
...
...
@@ -106,8 +106,8 @@ public:
virtual
bool
acceptsBreakpoint
(
BreakpointId
id
)
const
;
virtual
void
attemptBreakpointSynchronization
();
virtual
void
fetchDisassembler
(
Debugger
::
Internal
::
Disassembler
View
Agent
*
agent
);
virtual
void
fetchMemory
(
Debugger
::
Internal
::
Memory
View
Agent
*
,
QObject
*
,
quint64
addr
,
quint64
length
);
virtual
void
fetchDisassembler
(
Debugger
::
Internal
::
DisassemblerAgent
*
agent
);
virtual
void
fetchMemory
(
Debugger
::
Internal
::
MemoryAgent
*
,
QObject
*
,
quint64
addr
,
quint64
length
);
virtual
void
reloadModules
();
virtual
void
loadSymbols
(
const
QString
&
moduleName
);
...
...
src/plugins/debugger/debuggerengine.cpp
View file @
fb837b52
...
...
@@ -214,8 +214,8 @@ public:
m_threadsHandler
(),
m_watchHandler
(
engine
),
m_isSlaveEngine
(
false
),
m_disassembler
View
Agent
(
engine
),
m_memory
View
Agent
(
engine
)
m_disassemblerAgent
(
engine
),
m_memoryAgent
(
engine
)
{
connect
(
&
m_locationTimer
,
SIGNAL
(
timeout
()),
SLOT
(
doRemoveLocationMark
()));
}
...
...
@@ -306,8 +306,8 @@ public:
QFutureInterface
<
void
>
m_progress
;
bool
m_isSlaveEngine
;
Disassembler
View
Agent
m_disassembler
View
Agent
;
Memory
View
Agent
m_memory
View
Agent
;
DisassemblerAgent
m_disassemblerAgent
;
MemoryAgent
m_memoryAgent
;
QScopedPointer
<
TextEditor
::
BaseTextMark
>
m_locationMark
;
QTimer
m_locationTimer
;
};
...
...
@@ -452,7 +452,7 @@ QAbstractItemModel *DebuggerEngine::sourceFilesModel() const
return
model
;
}
void
DebuggerEngine
::
fetchMemory
(
Memory
View
Agent
*
,
QObject
*
,
void
DebuggerEngine
::
fetchMemory
(
MemoryAgent
*
,
QObject
*
,
quint64
addr
,
quint64
length
)
{
Q_UNUSED
(
addr
);
...
...
@@ -532,7 +532,7 @@ void DebuggerEngine::breakByFunction(const QString &functionName)
void
DebuggerEngine
::
resetLocation
()
{
d
->
m_disassembler
View
Agent
.
resetLocation
();
d
->
m_disassemblerAgent
.
resetLocation
();
d
->
removeLocationMark
();
}
...
...
@@ -559,7 +559,7 @@ void DebuggerEngine::gotoLocation(const QString &file, int line, bool setMarker)
void
DebuggerEngine
::
gotoLocation
(
const
StackFrame
&
frame
,
bool
setMarker
)
{
if
(
debuggerCore
()
->
boolSetting
(
OperateByInstruction
)
||
!
frame
.
isUsable
())
d
->
m_disassembler
View
Agent
.
setFrame
(
frame
,
true
,
setMarker
);
d
->
m_disassemblerAgent
.
setFrame
(
frame
,
true
,
setMarker
);
else
gotoLocation
(
frame
.
file
,
frame
.
line
,
setMarker
);
}
...
...
@@ -1154,8 +1154,7 @@ void DebuggerEngine::setToolTipExpression
{
}
void
DebuggerEngine
::
updateWatchData
(
const
Internal
::
WatchData
&
,
const
Internal
::
WatchUpdateFlags
&
)
void
DebuggerEngine
::
updateWatchData
(
const
WatchData
&
,
const
WatchUpdateFlags
&
)
{
}
...
...
@@ -1163,7 +1162,7 @@ void DebuggerEngine::watchPoint(const QPoint &)
{
}
void
DebuggerEngine
::
fetchDisassembler
(
Internal
::
Disassembler
View
Agent
*
)
void
DebuggerEngine
::
fetchDisassembler
(
DisassemblerAgent
*
)
{
}
...
...
@@ -1292,7 +1291,7 @@ void DebuggerEngine::attemptBreakpointSynchronization()
}
if
(
done
)
d
->
m_disassembler
View
Agent
.
updateBreakpointMarkers
();
d
->
m_disassemblerAgent
.
updateBreakpointMarkers
();
}
void
DebuggerEngine
::
insertBreakpoint
(
BreakpointId
id
)
...
...
@@ -1320,8 +1319,8 @@ void DebuggerEngine::selectThread(int)
{
}
void
DebuggerEngine
::
assignValueInDebugger
(
const
Internal
::
WatchData
*
,
const
QString
&
,
const
QVariant
&
)
void
DebuggerEngine
::
assignValueInDebugger
(
const
WatchData
*
,
const
QString
&
,
const
QVariant
&
)
{
}
...
...
@@ -1383,7 +1382,7 @@ void DebuggerEngine::executeDebuggerCommand(const QString &)
{
}
Internal
::
BreakHandler
*
DebuggerEngine
::
breakHandler
()
const
BreakHandler
*
DebuggerEngine
::
breakHandler
()
const
{
return
debuggerCore
()
->
breakHandler
();
}
...
...
@@ -1478,17 +1477,17 @@ bool DebuggerEngine::isCppBreakpoint(const BreakpointParameters &p)
void
DebuggerEngine
::
openMemoryView
(
quint64
address
)
{
d
->
m_memory
View
Agent
.
createBinEditor
(
address
);
d
->
m_memoryAgent
.
createBinEditor
(
address
);
}
void
DebuggerEngine
::
updateMemoryViews
()
{
d
->
m_memory
View
Agent
.
updateContents
();
d
->
m_memoryAgent
.
updateContents
();
}
void
DebuggerEngine
::
openDisassemblerView
(
const
StackFrame
&
frame
)
{
Disassembler
View
Agent
*
agent
=
new
Disassembler
View
Agent
(
this
);
DisassemblerAgent
*
agent
=
new
DisassemblerAgent
(
this
);
agent
->
setFrame
(
frame
,
true
,
false
);
}
...
...
src/plugins/debugger/debuggerengine.h
View file @
fb837b52
...
...
@@ -122,8 +122,8 @@ DEBUGGER_EXPORT QDebug operator<<(QDebug str, DebuggerState state);
namespace
Internal
{
class
DebuggerPluginPrivate
;
class
Disassembler
View
Agent
;
class
Memory
View
Agent
;
class
DisassemblerAgent
;
class
MemoryAgent
;
class
WatchData
;
class
BreakHandler
;
class
ModulesHandler
;
...
...
@@ -164,11 +164,11 @@ public:
virtual
void
watchPoint
(
const
QPoint
&
);
virtual
void
openMemoryView
(
quint64
addr
);
virtual
void
fetchMemory
(
Internal
::
Memory
View
Agent
*
,
QObject
*
,
virtual
void
fetchMemory
(
Internal
::
MemoryAgent
*
,
QObject
*
,
quint64
addr
,
quint64
length
);
virtual
void
updateMemoryViews
();
virtual
void
openDisassemblerView
(
const
Internal
::
StackFrame
&
frame
);
virtual
void
fetchDisassembler
(
Internal
::
Disassembler
View
Agent
*
);
virtual
void
fetchDisassembler
(
Internal
::
DisassemblerAgent
*
);
virtual
void
activateFrame
(
int
index
);
virtual
void
reloadModules
();
...
...
src/plugins/debugger/debuggerplugin.cpp
View file @
fb837b52
...
...
@@ -1789,7 +1789,7 @@ void DebuggerPluginPrivate::requestContextMenu(TextEditor::ITextEditor *editor,
.
section
(
'\n'
,
lineNumber
-
1
,
lineNumber
-
1
);
BreakpointResponse
needle
;
needle
.
type
=
BreakpointByAddress
;
needle
.
address
=
Disassembler
View
Agent
::
addressFromDisassemblyLine
(
line
);
needle
.
address
=
DisassemblerAgent
::
addressFromDisassemblyLine
(
line
);
address
=
needle
.
address
;
needle
.
lineNumber
=
-
1
;
id
=
breakHandler
()
->
findSimilarBreakpoint
(
needle
);
...
...
@@ -1872,7 +1872,7 @@ void DebuggerPluginPrivate::toggleBreakpoint()
if
(
textEditor
->
property
(
"DisassemblerView"
).
toBool
())
{
QString
line
=
textEditor
->
contents
()
.
section
(
'\n'
,
lineNumber
-
1
,
lineNumber
-
1
);
quint64
address
=
Disassembler
View
Agent
::
addressFromDisassemblyLine
(
line
);
quint64
address
=
DisassemblerAgent
::
addressFromDisassemblyLine
(
line
);
toggleBreakpointByAddress
(
address
);
}
else
if
(
lineNumber
>=
0
)
{
toggleBreakpointByFileAndLine
(
textEditor
->
file
()
->
fileName
(),
lineNumber
);
...
...
@@ -1919,7 +1919,7 @@ void DebuggerPluginPrivate::requestMark(ITextEditor *editor, int lineNumber)
if
(
editor
->
property
(
"DisassemblerView"
).
toBool
())
{
QString
line
=
editor
->
contents
()
.
section
(
'\n'
,
lineNumber
-
1
,
lineNumber
-
1
);
quint64
address
=
Disassembler
View
Agent
::
addressFromDisassemblyLine
(
line
);
quint64
address
=
DisassemblerAgent
::
addressFromDisassemblyLine
(
line
);
toggleBreakpointByAddress
(
address
);
}
else
if
(
editor
->
file
())
{
toggleBreakpointByFileAndLine
(
editor
->
file
()
->
fileName
(),
lineNumber
);
...
...
src/plugins/debugger/disassembleragent.cpp
View file @
fb837b52
...
...
@@ -59,7 +59,7 @@ namespace Internal {
///////////////////////////////////////////////////////////////////////
//
// Disassembler
View
Agent
// DisassemblerAgent
//
///////////////////////////////////////////////////////////////////////
...
...
@@ -91,11 +91,11 @@ private:
};
class
Disassembler
View
AgentPrivate
class
DisassemblerAgentPrivate
{
public:
Disassembler
View
AgentPrivate
();
~
Disassembler
View
AgentPrivate
();
DisassemblerAgentPrivate
();
~
DisassemblerAgentPrivate
();
void
configureMimeType
();
public:
...
...
@@ -111,7 +111,7 @@ public:
QString
mimeType
;
};
Disassembler
View
AgentPrivate
::
Disassembler
View
AgentPrivate
()
DisassemblerAgentPrivate
::
DisassemblerAgentPrivate
()
:
editor
(
0
),
tryMixed
(
true
),
setMarker
(
true
),
...
...
@@ -120,7 +120,7 @@ DisassemblerViewAgentPrivate::DisassemblerViewAgentPrivate()
{
}
Disassembler
View
AgentPrivate
::~
Disassembler
View
AgentPrivate
()
DisassemblerAgentPrivate
::~
DisassemblerAgentPrivate
()
{
if
(
editor
)
{
EditorManager
*
editorManager
=
EditorManager
::
instance
();
...
...
@@ -131,31 +131,31 @@ DisassemblerViewAgentPrivate::~DisassemblerViewAgentPrivate()
}
/*!
\class Disassembler
View
Agent
\class DisassemblerAgent
Objects from this class are created in response to user actions in
the Gui for showing disassembled memory from the inferior. After creation
it handles communication between the engine and the editor.
*/
Disassembler
View
Agent
::
Disassembler
View
Agent
(
DebuggerEngine
*
engine
)
:
QObject
(
0
),
d
(
new
Disassembler
View
AgentPrivate
)
DisassemblerAgent
::
DisassemblerAgent
(
DebuggerEngine
*
engine
)
:
QObject
(
0
),
d
(
new
DisassemblerAgentPrivate
)
{
d
->
engine
=
engine
;
}
Disassembler
View
Agent
::~
Disassembler
View
Agent
()
DisassemblerAgent
::~
DisassemblerAgent
()
{
delete
d
;
d
=
0
;
}
void
Disassembler
View
Agent
::
cleanup
()
void
DisassemblerAgent
::
cleanup
()
{
d
->
cache
.
clear
();
}
void
Disassembler
View
Agent
::
resetLocation
()
void
DisassemblerAgent
::
resetLocation
()
{
if
(
!
d
->
editor
)
return
;
...
...
@@ -167,12 +167,12 @@ QString frameKey(const StackFrame &frame)
return
_
(
"%1:%2:%3"
).
arg
(
frame
.
function
).
arg
(
frame
.
file
).
arg
(
frame
.
from
);
}
const
StackFrame
&
Disassembler
View
Agent
::
frame
()
const
const
StackFrame
&
DisassemblerAgent
::
frame
()
const
{
return
d
->
frame
;
}
bool
Disassembler
View
Agent
::
isMixed
()
const
bool
DisassemblerAgent
::
isMixed
()
const
{
return
d
->
tryMixed
&&
d
->
frame
.
line
>
0
...
...
@@ -180,7 +180,7 @@ bool DisassemblerViewAgent::isMixed() const
&&
d
->
frame
.
function
!=
_
(
"??"
);
}
void
Disassembler
View
Agent
::
setFrame
(
const
StackFrame
&
frame
,
void
DisassemblerAgent
::
setFrame
(
const
StackFrame
&
frame
,
bool
tryMixed
,
bool
setMarker
)
{
d
->
frame
=
frame
;
...
...
@@ -202,7 +202,7 @@ void DisassemblerViewAgent::setFrame(const StackFrame &frame,
d
->
engine
->
fetchDisassembler
(
this
);
}
void
Disassembler
View
AgentPrivate
::
configureMimeType
()
void
DisassemblerAgentPrivate
::
configureMimeType
()
{
QTC_ASSERT
(
editor
,
return
);
...
...
@@ -222,12 +222,12 @@ void DisassemblerViewAgentPrivate::configureMimeType()
qWarning
(
"Assembler mimetype '%s' not found."
,
qPrintable
(
mimeType
));
}
QString
Disassembler
View
Agent
::
mimeType
()
const
QString
DisassemblerAgent
::
mimeType
()
const
{
return
d
->
mimeType
;
}
void
Disassembler
View
Agent
::
setMimeType
(
const
QString
&
mt
)
void
DisassemblerAgent
::
setMimeType
(
const
QString
&
mt
)
{
if
(
mt
==
d
->
mimeType
)
return
;
...
...
@@ -236,7 +236,7 @@ void DisassemblerViewAgent::setMimeType(const QString &mt)
d
->
configureMimeType
();
}
void
Disassembler
View
Agent
::
setContents
(
const
DisassemblerLines
&
contents
)
void
DisassemblerAgent
::
setContents
(
const
DisassemblerLines
&
contents
)
{
QTC_ASSERT
(
d
,
return
);
using
namespace
Core
;
...
...
@@ -287,7 +287,7 @@ void DisassemblerViewAgent::setContents(const DisassemblerLines &contents)
updateLocationMarker
();
}
void
Disassembler
View
Agent
::
updateLocationMarker
()
void
DisassemblerAgent
::
updateLocationMarker
()
{
QTC_ASSERT
(
d
->
editor
,
return
);
...
...
@@ -309,7 +309,7 @@ void DisassemblerViewAgent::updateLocationMarker()
plainTextEdit
->
setTextCursor
(
tc
);
}
void
Disassembler
View
Agent
::
updateBreakpointMarkers
()
void
DisassemblerAgent
::
updateBreakpointMarkers
()
{
if
(
!
d
->
editor
)
return
;
...
...
@@ -337,13 +337,13 @@ void DisassemblerViewAgent::updateBreakpointMarkers()
}
}
quint64
Disassembler
View
Agent
::
address
()
const
quint64
DisassemblerAgent
::
address
()
const
{
return
d
->
frame
.
address
;
}
// Return address of an assembly line "0x0dfd bla"
quint64
Disassembler
View
Agent
::
addressFromDisassemblyLine
(
const
QString
&
line
)
quint64
DisassemblerAgent
::
addressFromDisassemblyLine
(
const
QString
&
line
)
{
return
DisassemblerLine
(
line
).
address
;
}
...
...
src/plugins/debugger/disassembleragent.h
View file @
fb837b52
...
...
@@ -46,17 +46,17 @@ class DebuggerEngine;
namespace
Internal
{
class
StackFrame
;
class
Disassembler
View
Agent
;
class
Disassembler
View
AgentPrivate
;
class
DisassemblerAgent
;
class
DisassemblerAgentPrivate
;
class
Disassembler
View
Agent
:
public
QObject
class
DisassemblerAgent
:
public
QObject
{
Q_OBJECT
Q_PROPERTY
(
QString
mimeType
READ
mimeType
WRITE
setMimeType
)
public:
// Called from Gui
explicit
Disassembler
View
Agent
(
DebuggerEngine
*
engine
);
~
Disassembler
View
Agent
();
explicit
DisassemblerAgent
(
DebuggerEngine
*
engine
);
~
DisassemblerAgent
();
void
setFrame
(
const
StackFrame
&
frame
,
bool
tryMixed
,
bool
setMarker
);
const
StackFrame
&
frame
()
const
;
...
...
@@ -78,7 +78,7 @@ public:
static
quint64
addressFromDisassemblyLine
(
const
QString
&
data
);
private:
Disassembler
View
AgentPrivate
*
d
;
DisassemblerAgentPrivate
*
d
;
};
...
...
src/plugins/debugger/gdb/gdbengine.cpp
View file @
fb837b52
...
...
@@ -3661,15 +3661,15 @@ void GdbEngine::handleWatchPoint(const GdbResponse &response)
struct
MemoryAgentCookie
{
MemoryAgentCookie
()
:
agent
(
0
),
token
(
0
),
address
(
0
)
{}
MemoryAgentCookie
(
Memory
View
Agent
*
agent_
,
QObject
*
token_
,
quint64
address_
)
MemoryAgentCookie
(
MemoryAgent
*
agent_
,
QObject
*
token_
,
quint64
address_
)
:
agent
(
agent_
),
token
(
token_
),
address
(
address_
)
{}
QPointer
<
Memory
View
Agent
>
agent
;
QPointer
<
MemoryAgent
>
agent
;
QPointer
<
QObject
>
token
;
quint64
address
;
};
void
GdbEngine
::
fetchMemory
(
Memory
View
Agent
*
agent
,
QObject
*
token
,
quint64
addr
,
void
GdbEngine
::
fetchMemory
(
MemoryAgent
*
agent
,
QObject
*
token
,
quint64
addr
,
quint64
length
)
{
//qDebug() << "GDB MEMORY FETCH" << agent << addr << length;
...
...
@@ -3708,17 +3708,17 @@ class DisassemblerAgentCookie
{
public:
DisassemblerAgentCookie
()
:
agent
(
0
),
attempts
(
0
)
{}
DisassemblerAgentCookie
(
Disassembler
View
Agent
*
agent_
)
DisassemblerAgentCookie
(
DisassemblerAgent
*
agent_
)
:
agent
(
agent_
),
attempts
(
0
)
{}
public:
QPointer
<
Disassembler
View
Agent
>
agent
;
QPointer
<
DisassemblerAgent
>
agent
;
int
attempts
;
};
// FIXME: add agent->frame() accessor and use that
void
GdbEngine
::
fetchDisassembler
(
Disassembler
View
Agent
*
agent
)
void
GdbEngine
::
fetchDisassembler
(
DisassemblerAgent
*
agent
)
{
fetchDisassemblerByCli
(
agent
,
agent
->
isMixed
());
/*
...
...
src/plugins/debugger/gdb/gdbengine.h
View file @
fb837b52
...
...
@@ -397,7 +397,7 @@ private: ////////// View & Data Stuff //////////
//
// Disassembler specific stuff
//
void
fetchDisassembler
(
Disassembler
View
Agent
*
agent
);
void
fetchDisassembler
(
DisassemblerAgent
*
agent
);
void
fetchDisassemblerByAddress
(
const
DisassemblerAgentCookie
&
ac
,
bool
useMixedMode
);
void
fetchDisassemblerByCli
(
const
DisassemblerAgentCookie
&
ac
,
...
...
@@ -455,7 +455,7 @@ private: ////////// View & Data Stuff //////////
virtual
void
assignValueInDebugger
(
const
WatchData
*
data
,
const
QString
&
expr
,
const
QVariant
&
value
);
virtual
void
fetchMemory
(
Memory
View
Agent
*
agent
,
QObject
*
token
,
virtual
void
fetchMemory
(
MemoryAgent
*
agent
,
QObject
*
token
,
quint64
addr
,
quint64
length
);
void
handleFetchMemory
(
const
GdbResponse
&
response
);
...
...
src/plugins/debugger/lldb/ipcenginehost.cpp
View file @
fb837b52
...
...
@@ -234,7 +234,7 @@ void IPCEngineHost::selectThread(int index)
rpcCall
(
SelectThread
,
p
);
}
void
IPCEngineHost
::
fetchDisassembler
(
Disassembler
View
Agent
*
v
)
void
IPCEngineHost
::
fetchDisassembler
(
DisassemblerAgent
*
v
)
{
quint64
address
=
v
->
frame
().
address
;
m_frameToDisassemblerAgent
.
insert
(
address
,
v
);
...
...
@@ -468,7 +468,7 @@ void IPCEngineHost::rpcCallback(quint64 f, QByteArray payload)
DisassemblerLines
lines
;
s
>>
pc
;
s
>>
lines
;
Disassembler
View
Agent
*
view
=
m_frameToDisassemblerAgent
.
take
(
pc
);
DisassemblerAgent
*
view
=
m_frameToDisassemblerAgent
.
take
(
pc
);
if
(
view
)
view
->
setContents
(
lines
);
}
...
...
src/plugins/debugger/lldb/ipcenginehost.h
View file @
fb837b52
...
...
@@ -105,7 +105,7 @@ public:
void
executeJumpToLine
(
const
QString
&
fileName
,
int
lineNumber
);
void
activateFrame
(
int
index
);
void
selectThread
(
int
index
);
void
fetchDisassembler
(
Disassembler
View
Agent
*
);
void
fetchDisassembler
(
DisassemblerAgent
*
);
bool
acceptsBreakpoint
(
BreakpointId
)
const
{
return
true
;
}
// FIXME
void
insertBreakpoint
(
BreakpointId
id
);
void
removeBreakpoint
(
BreakpointId
id
);
...
...
@@ -129,7 +129,7 @@ private:
quint64
m_nextMessagePayloadSize
;
quint64
m_cookie
;
QIODevice
*
m_device
;
QHash
<
quint64
,
Disassembler
View
Agent
*>
m_frameToDisassemblerAgent
;
QHash
<
quint64
,
DisassemblerAgent
*>
m_frameToDisassemblerAgent
;
QHash
<
QString
,
SourceAgent
*>
m_sourceAgents
;
};
...
...
src/plugins/debugger/memoryagent.cpp
View file @
fb837b52
...
...
@@ -48,12 +48,12 @@ namespace Internal {
///////////////////////////////////////////////////////////////////////
//
// Memory
View
Agent
// MemoryAgent
//
///////////////////////////////////////////////////////////////////////
/*!
\class Memory
View
Agent
\class MemoryAgent
Objects form this class are created in response to user actions in
the Gui for showing raw memory from the inferior. After creation
...
...
@@ -62,13 +62,13 @@ namespace Internal {
namespace
{
const
int
DataRange
=
1024
*
1024
;
}
Memory
View
Agent
::
Memory
View
Agent
(
Debugger
::
DebuggerEngine
*
engine
)
MemoryAgent
::
MemoryAgent
(
Debugger
::
DebuggerEngine
*
engine
)
:
QObject
(
engine
),
m_engine
(
engine
)
{
QTC_ASSERT
(
engine
,
/**/
);
}
Memory
View
Agent
::~
Memory
View
Agent
()
MemoryAgent
::~
MemoryAgent
()
{
QList
<
IEditor
*>
editors
;