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. */