diff options
author | Tom Tromey <tromey@redhat.com> | 2012-05-10 19:59:12 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2012-05-10 19:59:12 +0000 |
commit | 84a146c9d3fdfcd4a45b12f88735bd77d4f8d729 (patch) | |
tree | 1af7348130cfb4bd51a0f2f3cf6955c4de6688fe /gdb/block.h | |
parent | 9439a077bef75279f4881cabc3adbe61cf057504 (diff) | |
download | gdb-84a146c9d3fdfcd4a45b12f88735bd77d4f8d729.zip gdb-84a146c9d3fdfcd4a45b12f88735bd77d4f8d729.tar.gz gdb-84a146c9d3fdfcd4a45b12f88735bd77d4f8d729.tar.bz2 |
* jv-lang.c (get_java_class_symtab): Use allocate_global_block,
set_block_symtab.
* jit.c (finalize_symtab): Use allocate_global_block,
set_block_symtab.
* buildsym.c (finish_block_internal): New function, from old
finish_block.
(finish_block): Rewrite.
(end_symtab): Use finish_block_internal, set_block_symtab.
* block.h (struct global_block): New.
(allocate_global_block, set_block_symtab): Declare.
* block.c (allocate_global_block, set_block_symtab): New
functions.
Diffstat (limited to 'gdb/block.h')
-rw-r--r-- | gdb/block.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gdb/block.h b/gdb/block.h index 2eec346..de674a8 100644 --- a/gdb/block.h +++ b/gdb/block.h @@ -99,6 +99,21 @@ struct block language_specific; }; +/* The global block is singled out so that we can provide a back-link + to the primary symtab. */ + +struct global_block +{ + /* The block. */ + + struct block block; + + /* This holds a pointer to the primary symtab holding this + block. */ + + struct symtab *symtab; +}; + #define BLOCK_START(bl) (bl)->startaddr #define BLOCK_END(bl) (bl)->endaddr #define BLOCK_FUNCTION(bl) (bl)->function @@ -161,6 +176,9 @@ extern const struct block *block_global_block (const struct block *block); extern struct block *allocate_block (struct obstack *obstack); +extern struct block *allocate_global_block (struct obstack *obstack); + +extern void set_block_symtab (struct block *, struct symtab *); /* A block iterator. This structure should be treated as though it were opaque; it is only defined here because we want to support |