{
for (obj_section *iter : objfile->sections ())
{
- if (pc >= iter->addr () && pc < iter->endaddr ())
+ if (iter->contains (pc))
{
*unrel_addr = unrelocated_addr (pc - iter->offset ());
return 1;
if (section_is_overlay (osect) && !section_is_mapped (osect))
continue;
- if (osect->addr () <= addr && addr < osect->endaddr ())
+ if (osect->contains (addr))
return true;
}
return false;
return this->addr () + bfd_section_size (this->the_bfd_section);
}
+ /* True if ADDR is in this obj_section, false otherwise. */
+ bool contains (CORE_ADDR addr) const
+ {
+ return addr >= this->addr () && addr < endaddr ();
+ }
+
/* BFD section pointer */
struct bfd_section *the_bfd_section;
sect_addr = overlay_mapped_address (addr, osect);
- if (osect->addr () <= sect_addr && sect_addr < osect->endaddr ()
+ if (osect->contains (sect_addr)
&& (msymbol
= lookup_minimal_symbol_by_pc_section (sect_addr,
osect).minsym))
{
if (section_is_overlay (section))
{
- if (section->addr () <= pc
- && pc < section->endaddr ())
+ if (section->contains (pc))
return true;
}