forked from qt-creator/qt-creator
Debugger: Add memory views.
Add a separate memory view tool window available from the context menus of: Locals view: If the debugger provides size information, colors the areas of member variables for inspecting class layouts. Registers view: Tracks the area pointed to by a register. The view has a context menu allowing to open subviews referenced by the pointer at the location using the toolchain abi's word with/endianness. Rubber-stamped-by: hjk
This commit is contained in:
@@ -37,15 +37,22 @@
|
||||
#include <QtCore/QObject>
|
||||
#include <QtCore/QPointer>
|
||||
|
||||
QT_FORWARD_DECLARE_CLASS(QPoint)
|
||||
|
||||
namespace Core {
|
||||
class IEditor;
|
||||
}
|
||||
|
||||
namespace ProjectExplorer {
|
||||
class Abi;
|
||||
}
|
||||
|
||||
namespace Debugger {
|
||||
|
||||
class DebuggerEngine;
|
||||
|
||||
namespace Internal {
|
||||
class MemoryViewWidget;
|
||||
|
||||
class MemoryAgent : public QObject
|
||||
{
|
||||
@@ -58,9 +65,14 @@ public:
|
||||
enum { BinBlockSize = 1024 };
|
||||
bool hasVisibleEditor() const;
|
||||
|
||||
static bool isBigEndian(const ProjectExplorer::Abi &a);
|
||||
static quint64 readInferiorPointerValue(const unsigned char *data, const ProjectExplorer::Abi &a);
|
||||
|
||||
public slots:
|
||||
// Called by engine to create a new view.
|
||||
void createBinEditor(quint64 startAddr);
|
||||
// Called by engine to create a tooltip.
|
||||
void addMemoryView(MemoryViewWidget *w);
|
||||
// Called by engine to trigger update of contents.
|
||||
void updateContents();
|
||||
// Called by engine to pass updated contents.
|
||||
@@ -73,6 +85,8 @@ private slots:
|
||||
void handleEndOfFileRequested(Core::IEditor *editor);
|
||||
void handleDataChanged(Core::IEditor *editor, quint64 address,
|
||||
const QByteArray &data);
|
||||
void updateMemoryView(quint64 address, quint64 length);
|
||||
void openMemoryView(quint64 address, quint64 length, const QPoint &pos);
|
||||
|
||||
private:
|
||||
QList<QPointer<Core::IEditor> > m_editors;
|
||||
|
||||
Reference in New Issue
Block a user