aboutsummaryrefslogtreecommitdiff
path: root/gdb/block.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@efficios.com>2022-01-28 16:24:06 -0500
committerSimon Marchi <simon.marchi@polymtl.ca>2022-04-27 22:05:03 -0400
commit3fe38936f6c0fe5d724806a1646fb7b67638b420 (patch)
tree269bb158ec698e5eb45e1c1e2aa997b3e2ee8ae4 /gdb/block.c
parent24d74bb5df30de096f0271d33ab4f17434cf2c49 (diff)
downloadfsf-binutils-gdb-3fe38936f6c0fe5d724806a1646fb7b67638b420.zip
fsf-binutils-gdb-3fe38936f6c0fe5d724806a1646fb7b67638b420.tar.gz
fsf-binutils-gdb-3fe38936f6c0fe5d724806a1646fb7b67638b420.tar.bz2
gdb: remove BLOCK_NAMESPACE macro
Replace with equivalent methods. Change-Id: If86b8cbdfb0f52e22c929614cd53e73358bab76a
Diffstat (limited to 'gdb/block.c')
-rw-r--r--gdb/block.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/gdb/block.c b/gdb/block.c
index 5a6282b..2d28f9d 100644
--- a/gdb/block.c
+++ b/gdb/block.c
@@ -297,9 +297,9 @@ block_scope (const struct block *block)
{
for (; block != NULL; block = block->superblock ())
{
- if (BLOCK_NAMESPACE (block) != NULL
- && BLOCK_NAMESPACE (block)->scope != NULL)
- return BLOCK_NAMESPACE (block)->scope;
+ if (block->namespace_info () != NULL
+ && block->namespace_info ()->scope != NULL)
+ return block->namespace_info ()->scope;
}
return "";
@@ -315,7 +315,7 @@ block_set_scope (struct block *block, const char *scope,
{
block_initialize_namespace (block, obstack);
- BLOCK_NAMESPACE (block)->scope = scope;
+ block->namespace_info ()->scope = scope;
}
/* This returns the using directives list associated with BLOCK, if
@@ -324,10 +324,10 @@ block_set_scope (struct block *block, const char *scope,
struct using_direct *
block_using (const struct block *block)
{
- if (block == NULL || BLOCK_NAMESPACE (block) == NULL)
+ if (block == NULL || block->namespace_info () == NULL)
return NULL;
else
- return BLOCK_NAMESPACE (block)->using_decl;
+ return block->namespace_info ()->using_decl;
}
/* Set BLOCK's using member to USING; if needed, allocate memory via
@@ -341,17 +341,17 @@ block_set_using (struct block *block,
{
block_initialize_namespace (block, obstack);
- BLOCK_NAMESPACE (block)->using_decl = using_decl;
+ block->namespace_info ()->using_decl = using_decl;
}
-/* If BLOCK_NAMESPACE (block) is NULL, allocate it via OBSTACK and
+/* If block->namespace_info () is NULL, allocate it via OBSTACK and
initialize its members to zero. */
static void
block_initialize_namespace (struct block *block, struct obstack *obstack)
{
- if (BLOCK_NAMESPACE (block) == NULL)
- BLOCK_NAMESPACE (block) = new (obstack) struct block_namespace_info ();
+ if (block->namespace_info () == NULL)
+ block->set_namespace_info (new (obstack) struct block_namespace_info ());
}
/* Return the static block associated to BLOCK. Return NULL if block