Example #1
0
struct using_direct *
block_using(const struct block *block)
{
  const struct block *static_block = block_static_block(block);

  if ((static_block == NULL)
      || (BLOCK_NAMESPACE(static_block) == NULL))
    return NULL;
  else
    return BLOCK_NAMESPACE(static_block)->usingd;
}
Example #2
0
const char *
block_scope (const struct block *block)
{
  for (; block != NULL; block = BLOCK_SUPERBLOCK (block))
    {
      if (BLOCK_NAMESPACE (block) != NULL
	  && BLOCK_NAMESPACE (block)->scope != NULL)
	return BLOCK_NAMESPACE (block)->scope;
    }

  return "";
}
Example #3
0
static void
block_initialize_namespace(struct block *block, struct obstack *obstack)
{
  if (BLOCK_NAMESPACE(block) == NULL)
    {
      BLOCK_NAMESPACE(block)
	= (struct block_namespace_info *)obstack_alloc(obstack,
                                                       sizeof(struct block_namespace_info));
      BLOCK_NAMESPACE(block)->scope = NULL;
      BLOCK_NAMESPACE(block)->usingd = NULL;
    }
}
Example #4
0
void
block_set_scope (struct block *block, const char *scope,
		 struct obstack *obstack)
{
  block_initialize_namespace (block, obstack);

  BLOCK_NAMESPACE (block)->scope = scope;
}
Example #5
0
File: block.c Project: 5kg/gdb
struct using_direct *
block_using (const struct block *block)
{
  if (block == NULL || BLOCK_NAMESPACE (block) == NULL)
    return NULL;
  else
    return BLOCK_NAMESPACE (block)->using;
}
Example #6
0
void
block_set_using(struct block *block, struct using_direct *usingd,
                struct obstack *obstack)
{
  block_initialize_namespace(block, obstack);

  BLOCK_NAMESPACE(block)->usingd = usingd;
}
Example #7
0
struct block *
allocate_block(struct obstack *obstack)
{
  struct block *bl = (struct block *)obstack_alloc(obstack,
                                                   sizeof(struct block));

  BLOCK_START(bl) = 0;
  BLOCK_END(bl) = 0;
  BLOCK_FUNCTION(bl) = NULL;
  BLOCK_SUPERBLOCK(bl) = NULL;
  BLOCK_DICT(bl) = NULL;
  BLOCK_NAMESPACE(bl) = NULL;
  BLOCK_GCC_COMPILED(bl) = 0;
  /* APPLE LOCAL begin address ranges  */
  BLOCK_RANGES(bl) = NULL;
  /* APPLE LOCAL end address ranges  */

  return bl;
}