From 55e8db971cf6e51e4d3aaf8e7e8551c5b94f531e Mon Sep 17 00:00:00 2001 From: adrian Date: Mon, 27 Aug 2012 11:58:27 +0000 Subject: [PATCH] BP: Address space member (cr3 reg) should be part of the event (not of the listener). git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@1508 8c4709b5-6ec9-48aa-a5cd-a96041d1645a --- src/core/sal/Event.hpp | 12 +++++++++++- src/core/sal/Listener.hpp | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/core/sal/Event.hpp b/src/core/sal/Event.hpp index 89f892b9..449b6087 100644 --- a/src/core/sal/Event.hpp +++ b/src/core/sal/Event.hpp @@ -33,13 +33,15 @@ public: class BPEvent : public BaseEvent { protected: address_t m_TriggerInstrPtr; //!< the address which triggered the event + address_t m_CR3; //!< the content of the cr3 reg public: /** * Creates a new breakpoint event. The range information is specific to * the subclasses. * @param trigger the triggering address of the breakpoint event + * @param cr3 the address space of this event, given as the content of a CR3 register. */ - BPEvent(address_t trigger) : m_TriggerInstrPtr(trigger) { } + BPEvent(address_t trigger, address_t cr3) : m_TriggerInstrPtr(trigger), m_CR3(cr3) { } /** * Returns the instruction pointer that triggered this event. * @return triggering IP @@ -50,6 +52,14 @@ public: * @param iptr new IP which caused this event */ void setTriggerInstructionPointer(address_t iptr) { m_TriggerInstrPtr = iptr; } + /** + * Returns the address space register of this event. + */ + address_t getCR3() const { return m_CR3; } + /** + * Sets the address space register for this event. + */ + void setCR3(address_t iptr) { m_CR3 = iptr; } }; /** diff --git a/src/core/sal/Listener.hpp b/src/core/sal/Listener.hpp index e54ee1c3..06666109 100644 --- a/src/core/sal/Listener.hpp +++ b/src/core/sal/Listener.hpp @@ -124,7 +124,7 @@ public: * in a random address space. */ BPListener(address_t address_space = ANY_ADDR) - : m_Data(address_space), m_CR3(ANY_ADDR) { } + : m_Data(address_space, ANY_ADDR), m_CR3(ANY_ADDR) { } /** * Returns the address space register of this listener. */