X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gdb%2Fblock.h;h=ca143a96d205894908cb9e69b522d9a4cdfd0702;hb=2117c711ae07700adb57ea5b5ca61e4c32d7e3d2;hp=de674a86653546e6aab9e81c99f8e0d288d5f0e1;hpb=84a146c9d3fdfcd4a45b12f88735bd77d4f8d729;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/block.h b/gdb/block.h index de674a8665..ca143a96d2 100644 --- a/gdb/block.h +++ b/gdb/block.h @@ -1,6 +1,6 @@ /* Code dealing with blocks for GDB. - Copyright (C) 2003, 2007-2012 Free Software Foundation, Inc. + Copyright (C) 2003-2014 Free Software Foundation, Inc. This file is part of GDB. @@ -152,6 +152,8 @@ extern struct blockvector *blockvector_for_pc_sect (CORE_ADDR, struct block **, struct symtab *); +extern int blockvector_contains_pc (struct blockvector *bv, CORE_ADDR pc); + extern struct call_site *call_site_for_pc (struct gdbarch *gdbarch, CORE_ADDR pc); @@ -186,6 +188,28 @@ extern void set_block_symtab (struct block *, struct symtab *); struct block_iterator { + /* If we're iterating over a single block, this holds the block. + Otherwise, it holds the canonical symtab. */ + + union + { + struct symtab *symtab; + const struct block *block; + } d; + + /* If we're iterating over a single block, this is always -1. + Otherwise, it holds the index of the current "included" symtab in + the canonical symtab (that is, d.symtab->includes[idx]), with -1 + meaning the canonical symtab itself. */ + + int idx; + + /* Which block, either static or global, to iterate over. If this + is FIRST_LOCAL_BLOCK, then we are iterating over a single block. + This is used to select which field of 'd' is in use. */ + + enum block_enum which; + /* The underlying dictionary iterator. */ struct dict_iterator dict_iter;