예제 #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;
}
예제 #2
0
파일: block.c 프로젝트: RodneyBates/M3Devel
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 "";
}
예제 #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;
    }
}
예제 #4
0
파일: block.c 프로젝트: RodneyBates/M3Devel
void
block_set_scope (struct block *block, const char *scope,
		 struct obstack *obstack)
{
  block_initialize_namespace (block, obstack);

  BLOCK_NAMESPACE (block)->scope = scope;
}
예제 #5
0
파일: block.c 프로젝트: 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;
}
예제 #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;
}
예제 #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;
}