Debugger: Add convenience function to BaseUnit...

...to query if a given global offset is within its range.
This commit is contained in:
Rene Gollent 2013-07-17 18:13:15 -04:00
parent 142f7cabdc
commit 9cd4e805e6
2 changed files with 9 additions and 0 deletions

View File

@ -53,6 +53,13 @@ BaseUnit::AddDebugInfoEntry(DebugInfoEntry* entry, off_t offset)
}
bool
BaseUnit::ContainsAbsoluteOffset(off_t offset) const
{
return fHeaderOffset <= offset && fHeaderOffset + fTotalSize > offset;
}
void
BaseUnit::SetSourceLanguage(const SourceLanguageInfo* language)
{

View File

@ -45,6 +45,8 @@ public:
off_t AbbreviationOffset() const
{ return fAbbreviationOffset; }
bool ContainsAbsoluteOffset(off_t offset) const;
uint8 AddressSize() const { return fAddressSize; }
bool IsDwarf64() const { return fIsDwarf64; }