Debugger: Add convenience function to BaseUnit...
...to query if a given global offset is within its range.
This commit is contained in:
parent
142f7cabdc
commit
9cd4e805e6
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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; }
|
||||
|
||||
|
|
Loading…
Reference in New Issue