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:
Friedemann Kleint
2011-04-08 16:18:47 +02:00
parent 275e1434da
commit f3cc061dbe
12 changed files with 1211 additions and 31 deletions

View File

@@ -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;