Debugger: Rework register handling

Use register names as handle, not their index in the view.
Store the raw real values, not some stringified version
as primary data.  Use subentries to break down bigger
registers into smaller entities. Also remember the
previous value of a register and show it in a tooltip.

Change-Id: I8ae3cc8766a7b211bc7cc827c734e5cf6060825c
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
hjk
2014-12-17 13:14:29 +01:00
parent b2bb7ea2da
commit 3743211e54
23 changed files with 881 additions and 745 deletions

View File

@@ -34,11 +34,10 @@
#include "debuggerconstants.h"
#include <QObject>
#include <QPoint>
#include <QPointer>
#include <QColor>
QT_FORWARD_DECLARE_CLASS(QPoint)
namespace Core { class IEditor; }
namespace ProjectExplorer { class Abi; }
@@ -62,6 +61,20 @@ public:
QString toolTip;
};
class MemoryViewSetupData
{
public:
MemoryViewSetupData() : parent(0), startAddress(0), flags(0) {}
QWidget *parent;
quint64 startAddress;
QByteArray registerName;
unsigned flags;
QList<Internal::MemoryMarkup> markup;
QPoint pos;
QString title;
};
class MemoryAgent : public QObject
{
Q_OBJECT
@@ -80,9 +93,7 @@ public:
public slots:
// Called by engine to create a new view.
void createBinEditor(quint64 startAddr, unsigned flags,
const QList<MemoryMarkup> &ml, const QPoint &pos,
const QString &title, QWidget *parent);
void createBinEditor(const MemoryViewSetupData &data);
void createBinEditor(quint64 startAddr);
// Called by engine to create a tooltip.
void addLazyData(QObject *editorToken, quint64 addr, const QByteArray &data);
@@ -101,9 +112,7 @@ private slots:
private:
void connectBinEditorWidget(QWidget *w);
bool doCreateBinEditor(quint64 startAddr, unsigned flags,
const QList<MemoryMarkup> &ml, const QPoint &pos,
QString title, QWidget *parent);
bool doCreateBinEditor(const MemoryViewSetupData &data);
QList<QPointer<Core::IEditor> > m_editors;
QList<QPointer<MemoryView> > m_views;