return bl;
}
-/* Return true if the blockvector BV contains PC, false otherwise. */
-
-int
-blockvector_contains_pc (const struct blockvector *bv, CORE_ADDR pc)
-{
- return bv->lookup (pc) != nullptr;
-}
-
/* Return call_site for specified PC in GDBARCH. PC must match exactly, it
must be the next instruction after call (or after tail call jump). Throw
NO_ENTRY_VALUE_ERROR otherwise. This function never returns NULL. */
return NULL;
}
+/* See block.h. */
+
+bool
+blockvector::contains (CORE_ADDR addr) const
+{
+ return lookup (addr) != nullptr;
+}
+
blockvector::~blockvector ()
{
for (struct block *bl : m_blocks)
if there is one, NULL otherwise. */
const struct block *lookup (CORE_ADDR addr) const;
+ /* Return true if the blockvector contains ADDR, false otherwise. */
+ bool contains (CORE_ADDR addr) const;
+
private:
/* An address map mapping addresses to blocks in this blockvector.
This pointer is zero if the blocks' start and end addresses are
blockvector_for_pc_sect (CORE_ADDR, struct obj_section *,
const struct block **, struct compunit_symtab *);
-extern int blockvector_contains_pc (const struct blockvector *bv, CORE_ADDR pc);
-
extern struct call_site *call_site_for_pc (struct gdbarch *gdbarch,
CORE_ADDR pc);
{
int i;
- if (cust->blockvector () != nullptr
- && blockvector_contains_pc (cust->blockvector (), pc))
+ if (cust->blockvector () != nullptr && cust->blockvector ()->contains (pc))
return cust;
if (cust->includes == NULL)