From 1df9bf1220a8a436520338ca1d8c78c528e4ec54 Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Sun, 21 Jun 2009 23:28:13 +0000 Subject: [PATCH] Added Statement::ContainsAddress(). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31168 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/apps/debugger/model/Statement.cpp | 7 +++++++ src/apps/debugger/model/Statement.h | 5 +++++ 2 files changed, 12 insertions(+) diff --git a/src/apps/debugger/model/Statement.cpp b/src/apps/debugger/model/Statement.cpp index 539703f4b6..592e3ca0e3 100644 --- a/src/apps/debugger/model/Statement.cpp +++ b/src/apps/debugger/model/Statement.cpp @@ -71,3 +71,10 @@ ContiguousStatement::AddressRangeAt(int32 index) const { return index == 0 ? fRange : TargetAddressRange(); } + + +bool +ContiguousStatement::ContainsAddress(target_addr_t address) const +{ + return fRange.Contains(address); +} diff --git a/src/apps/debugger/model/Statement.h b/src/apps/debugger/model/Statement.h index ee802b5d29..2ae4476c75 100644 --- a/src/apps/debugger/model/Statement.h +++ b/src/apps/debugger/model/Statement.h @@ -23,6 +23,9 @@ public: virtual int32 CountAddressRanges() const = 0; virtual TargetAddressRange AddressRangeAt(int32 index) const = 0; + + virtual bool ContainsAddress(target_addr_t address) + const = 0; }; @@ -51,6 +54,8 @@ public: virtual int32 CountAddressRanges() const; virtual TargetAddressRange AddressRangeAt(int32 index) const; + virtual bool ContainsAddress(target_addr_t address) const; + protected: TargetAddressRange fRange; };