aboutsummaryrefslogtreecommitdiff
path: root/gdb/block.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/block.c')
-rw-r--r--gdb/block.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/gdb/block.c b/gdb/block.c
index 3318cb4..d3bc5ea 100644
--- a/gdb/block.c
+++ b/gdb/block.c
@@ -370,6 +370,29 @@ allocate_block (struct obstack *obstack)
return bl;
}
+/* Allocate a global block. */
+
+struct block *
+allocate_global_block (struct obstack *obstack)
+{
+ struct global_block *bl = OBSTACK_ZALLOC (obstack, struct global_block);
+
+ return &bl->block;
+}
+
+/* Set the symtab of the global block. */
+
+void
+set_block_symtab (struct block *block, struct symtab *symtab)
+{
+ struct global_block *gb;
+
+ gdb_assert (BLOCK_SUPERBLOCK (block) == NULL);
+ gb = (struct global_block *) block;
+ gdb_assert (gb->symtab == NULL);
+ gb->symtab = symtab;
+}
+
/* See block.h. */