• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ TYPE_TARGET_TYPE函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中TYPE_TARGET_TYPE函数的典型用法代码示例。如果您正苦于以下问题:C++ TYPE_TARGET_TYPE函数的具体用法?C++ TYPE_TARGET_TYPE怎么用?C++ TYPE_TARGET_TYPE使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了TYPE_TARGET_TYPE函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: compile_cplus_convert_memberptr

static gcc_type
compile_cplus_convert_memberptr (compile_cplus_instance *instance,
				 struct type *type)
{
  struct type *containing_class = TYPE_SELF_TYPE (type);

  if (containing_class == nullptr)
    return GCC_TYPE_NONE;

  gcc_type class_type = instance->convert_type (containing_class);
  gcc_type member_type
    = instance->convert_type (TYPE_TARGET_TYPE (type));

  return instance->plugin ().build_pointer_to_member_type
    (class_type, member_type);
}
开发者ID:T-J-Teru,项目名称:binutils-gdb,代码行数:16,代码来源:compile-cplus-types.c


示例2: m2_unbounded_array

static int
m2_unbounded_array (struct type *type, struct ui_file *stream, int show,
		    int level, const struct type_print_options *flags)
{
  if (m2_is_unbounded_array (type))
    {
      if (show > 0)
	{
	  fputs_filtered ("ARRAY OF ", stream);
	  m2_print_type (TYPE_TARGET_TYPE (TYPE_FIELD_TYPE (type, 0)),
			 "", stream, 0, level, flags);
	}
      return 1;
    }
  return 0;
}
开发者ID:ajinkya93,项目名称:netbsd-src,代码行数:16,代码来源:m2-typeprint.c


示例3: print_range_type_named

/* Print the range type named NAME: */
static void
print_range_type_named(char *name, struct ui_file *stream)
{
  struct type *raw_type = ada_find_any_type(name);
  struct type *base_type;
  char *subtype_info;

  if (raw_type == NULL)
    base_type = builtin_type_int;
  else if (TYPE_CODE (raw_type) == TYPE_CODE_RANGE)
    base_type = TYPE_TARGET_TYPE (raw_type);
  else
    base_type = raw_type;

  subtype_info = strstr (name, "___XD");
  if (subtype_info == NULL && raw_type == NULL)
    fprintf_filtered (stream, "? .. ?");
  else if (subtype_info == NULL)
    print_range (raw_type, stream);
  else
    {
      int prefix_len = subtype_info - name;
      char *bounds_str;
      int n;

      subtype_info += 5;
      bounds_str = strchr (subtype_info, '_');
      n = 1;

      if (*subtype_info == 'L')
	{
	  print_range_bound (base_type, bounds_str, &n, stream);
	  subtype_info += 1;
	}
      else
	print_dynamic_range_bound (base_type, name, prefix_len, "___L",
				   stream);

      fprintf_filtered (stream, " .. ");

      if (*subtype_info == 'U')
	print_range_bound (base_type, bounds_str, &n, stream);
      else
	print_dynamic_range_bound (base_type, name, prefix_len, "___U",
				   stream);
    }
}
开发者ID:dougmencken,项目名称:apple-gdb-1824,代码行数:48,代码来源:ada-typeprint.c


示例4: print_go_string

static void
print_go_string (struct type *type,
                 LONGEST embedded_offset, CORE_ADDR address,
                 struct ui_file *stream, int recurse,
                 struct value *val,
                 const struct value_print_options *options)
{
    struct gdbarch *gdbarch = get_type_arch (type);
    struct type *elt_ptr_type = TYPE_FIELD_TYPE (type, 0);
    struct type *elt_type = TYPE_TARGET_TYPE (elt_ptr_type);
    LONGEST length;
    /* TODO(dje): The encapsulation of what a pointer is belongs in value.c.
       I.e. If there's going to be unpack_pointer, there should be
       unpack_value_field_as_pointer.  Do this until we can get
       unpack_value_field_as_pointer.  */
    LONGEST addr;
    const gdb_byte *valaddr = value_contents_for_printing (val);


    if (! unpack_value_field_as_long (type, valaddr, embedded_offset, 0,
                                      val, &addr))
        error (_("Unable to read string address"));

    if (! unpack_value_field_as_long (type, valaddr, embedded_offset, 1,
                                      val, &length))
        error (_("Unable to read string length"));

    /* TODO(dje): Print address of struct or actual string?  */
    if (options->addressprint)
    {
        fputs_filtered (paddress (gdbarch, addr), stream);
        fputs_filtered (" ", stream);
    }

    if (length < 0)
    {
        fputs_filtered (_("<invalid length: "), stream);
        fputs_filtered (plongest (addr), stream);
        fputs_filtered (">", stream);
        return;
    }

    /* TODO(dje): Perhaps we should pass "UTF8" for ENCODING.
       The target encoding is a global switch.
       Either choice is problematic.  */
    val_print_string (elt_type, NULL, addr, length, stream, options);
}
开发者ID:kraj,项目名称:binutils-gdb,代码行数:47,代码来源:go-valprint.c


示例5: print_range_type

static void
print_range_type (struct type *raw_type, struct ui_file *stream)
{
    const char *name;
    struct type *base_type;
    const char *subtype_info;

    gdb_assert (raw_type != NULL);
    name = TYPE_NAME (raw_type);
    gdb_assert (name != NULL);

    if (TYPE_CODE (raw_type) == TYPE_CODE_RANGE)
        base_type = TYPE_TARGET_TYPE (raw_type);
    else
        base_type = raw_type;

    subtype_info = strstr (name, "___XD");
    if (subtype_info == NULL)
        print_range (raw_type, stream);
    else
    {
        int prefix_len = subtype_info - name;
        char *bounds_str;
        int n;

        subtype_info += 5;
        bounds_str = strchr (subtype_info, '_');
        n = 1;

        if (*subtype_info == 'L')
        {
            print_range_bound (base_type, bounds_str, &n, stream);
            subtype_info += 1;
        }
        else
            print_dynamic_range_bound (base_type, name, prefix_len, "___L",
                                       stream);

        fprintf_filtered (stream, " .. ");

        if (*subtype_info == 'U')
            print_range_bound (base_type, bounds_str, &n, stream);
        else
            print_dynamic_range_bound (base_type, name, prefix_len, "___U",
                                       stream);
    }
}
开发者ID:asdlei00,项目名称:gdb,代码行数:47,代码来源:ada-typeprint.c


示例6: m2_range

void
m2_range (struct type *type, struct ui_file *stream, int show,
	  int level)
{
  if (TYPE_HIGH_BOUND (type) == TYPE_LOW_BOUND (type))
    m2_print_type (TYPE_DOMAIN_TYPE (type), "", stream, show, level);
  else
    {
      struct type *target = TYPE_TARGET_TYPE (type);

      fprintf_filtered (stream, "[");
      print_type_scalar (target, TYPE_LOW_BOUND (type), stream);
      fprintf_filtered (stream, "..");
      print_type_scalar (target, TYPE_HIGH_BOUND (type), stream);
      fprintf_filtered (stream, "]");
    }
}
开发者ID:3125788,项目名称:android_toolchain_gdb,代码行数:17,代码来源:m2-typeprint.c


示例7: stpy_convert_to_value

static PyObject *
stpy_convert_to_value (PyObject *self, PyObject *args)
{
  lazy_string_object *self_string = (lazy_string_object *) self;
  struct value *val = NULL;

  if (self_string->address == 0)
    {
      PyErr_SetString (gdbpy_gdb_memory_error,
		       _("Cannot create a value from NULL."));
      return NULL;
    }

  TRY
    {
      struct type *type = type_object_to_type (self_string->type);
      struct type *realtype;

      gdb_assert (type != NULL);
      realtype = check_typedef (type);
      switch (TYPE_CODE (realtype))
	{
	case TYPE_CODE_PTR:
	  /* If a length is specified we need to convert this to an array
	     of the specified size.  */
	  if (self_string->length != -1)
	    {
	      /* PR 20786: There's no way to specify an array of length zero.
		 Record a length of [0,-1] which is how Ada does it.  Anything
		 we do is broken, but this is one possible solution.  */
	      type = lookup_array_range_type (TYPE_TARGET_TYPE (realtype),
					      0, self_string->length - 1);
	      val = value_at_lazy (type, self_string->address);
	    }
	  else
	    val = value_from_pointer (type, self_string->address);
	  break;
	default:
	  val = value_at_lazy (type, self_string->address);
	  break;
	}
    }
  CATCH (except, RETURN_MASK_ALL)
    {
      GDB_PY_HANDLE_EXCEPTION (except);
    }
开发者ID:jon-turney,项目名称:binutils-gdb,代码行数:46,代码来源:py-lazy-string.c


示例8: print_range

static void
print_range(struct type *the_type, struct ui_file *stream)
{
  struct type *target_type;
  target_type = TYPE_TARGET_TYPE(the_type);
  if (target_type == NULL)
    target_type = the_type;

  switch (TYPE_CODE(target_type))
    {
    case TYPE_CODE_RANGE:
    case TYPE_CODE_INT:
    case TYPE_CODE_BOOL:
    case TYPE_CODE_CHAR:
    case TYPE_CODE_ENUM:
      break;
    default:
      target_type = builtin_type_int;
      break;
    }

  if (TYPE_NFIELDS(the_type) < 2)
    {
      /* A range needs at least 2 bounds to be printed.  If there are less
         than 2, just print the type name instead of the range itself.
         This check handles cases such as characters, for example.

         Note that if the name is not defined, then we don't print anything.
       */
      fprintf_filtered(stream, "%.*s",
                       ada_name_prefix_len(TYPE_NAME(the_type)),
                       TYPE_NAME(the_type));
    }
  else
    {
      /* We extract the range type bounds respectively from the first element
         and the last element of the type->fields array */
      const LONGEST lower_bound = (LONGEST)TYPE_LOW_BOUND(the_type);
      const LONGEST upper_bound =
	(LONGEST)TYPE_FIELD_BITPOS(the_type, TYPE_NFIELDS(the_type) - 1);

      ada_print_scalar(target_type, lower_bound, stream);
      fprintf_filtered(stream, " .. ");
      ada_print_scalar(target_type, upper_bound, stream);
    }
}
开发者ID:dougmencken,项目名称:apple-gdb-1824,代码行数:46,代码来源:ada-typeprint.c


示例9: get_regs_type

static struct type *
get_regs_type (struct objfile *objfile)
{
  struct symbol *func_sym;
  struct type *func_type, *regsp_type, *regs_type;

  func_sym = lookup_global_symbol_from_objfile (objfile,
						GCC_FE_WRAPPER_FUNCTION,
						VAR_DOMAIN);
  if (func_sym == NULL)
    error (_("Cannot find function \"%s\" in compiled module \"%s\"."),
	   GCC_FE_WRAPPER_FUNCTION, objfile_name (objfile));

  func_type = SYMBOL_TYPE (func_sym);
  if (TYPE_CODE (func_type) != TYPE_CODE_FUNC)
    error (_("Invalid type code %d of function \"%s\" in compiled "
	     "module \"%s\"."),
	   TYPE_CODE (func_type), GCC_FE_WRAPPER_FUNCTION,
	   objfile_name (objfile));

  /* No register parameter present.  */
  if (TYPE_NFIELDS (func_type) == 0)
    return NULL;

  if (TYPE_NFIELDS (func_type) != 1)
    error (_("Invalid %d parameters of function \"%s\" in compiled "
	     "module \"%s\"."),
	   TYPE_NFIELDS (func_type), GCC_FE_WRAPPER_FUNCTION,
	   objfile_name (objfile));

  regsp_type = check_typedef (TYPE_FIELD_TYPE (func_type, 0));
  if (TYPE_CODE (regsp_type) != TYPE_CODE_PTR)
    error (_("Invalid type code %d of first parameter of function \"%s\" "
	     "in compiled module \"%s\"."),
	   TYPE_CODE (regsp_type), GCC_FE_WRAPPER_FUNCTION,
	   objfile_name (objfile));

  regs_type = check_typedef (TYPE_TARGET_TYPE (regsp_type));
  if (TYPE_CODE (regs_type) != TYPE_CODE_STRUCT)
    error (_("Invalid type code %d of dereferenced first parameter "
	     "of function \"%s\" in compiled module \"%s\"."),
	   TYPE_CODE (regs_type), GCC_FE_WRAPPER_FUNCTION,
	   objfile_name (objfile));

  return regs_type;
}
开发者ID:gcc-toolchains,项目名称:gdb,代码行数:46,代码来源:compile-object-load.c


示例10: m2_print_bounds

static void
m2_print_bounds (struct type *type,
		 struct ui_file *stream, int show, int level,
		 int print_high)
{
  struct type *target = TYPE_TARGET_TYPE (type);

  if (target == NULL)
    target = builtin_type_int;

  if (TYPE_NFIELDS(type) == 0)
    return;

  if (print_high)
    print_type_scalar (target, TYPE_HIGH_BOUND (type), stream);
  else
    print_type_scalar (target, TYPE_LOW_BOUND (type), stream);
}
开发者ID:3125788,项目名称:android_toolchain_gdb,代码行数:18,代码来源:m2-typeprint.c


示例11: ada_val_print_string

static void
ada_val_print_string (struct type *type, const gdb_byte *valaddr,
		      int offset, int offset_aligned, CORE_ADDR address,
		      struct ui_file *stream, int recurse,
		      struct value *original_value,
		      const struct value_print_options *options)
{
  enum bfd_endian byte_order = gdbarch_byte_order (get_type_arch (type));
  struct type *elttype = TYPE_TARGET_TYPE (type);
  unsigned int eltlen;
  unsigned int len;

  /* We know that ELTTYPE cannot possibly be null, because we assume
     that we're called only when TYPE is a string-like type.
     Similarly, the size of ELTTYPE should also be non-null, since
     it's a character-like type.  */
  gdb_assert (elttype != NULL);
  gdb_assert (TYPE_LENGTH (elttype) != 0);

  eltlen = TYPE_LENGTH (elttype);
  len = TYPE_LENGTH (type) / eltlen;

  if (options->prettyformat_arrays)
    print_spaces_filtered (2 + 2 * recurse, stream);

  /* If requested, look for the first null char and only print
     elements up to it.  */
  if (options->stop_print_at_null)
    {
      int temp_len;

      /* Look for a NULL char.  */
      for (temp_len = 0;
	   (temp_len < len
	    && temp_len < options->print_max
	    && char_at (valaddr + offset_aligned,
			temp_len, eltlen, byte_order) != 0);
	   temp_len += 1);
      len = temp_len;
    }

  printstr (stream, elttype, valaddr + offset_aligned, len, 0,
	    eltlen, options);
}
开发者ID:kraj,项目名称:binutils-gdb,代码行数:44,代码来源:ada-valprint.c


示例12: f77_create_arrayprint_offset_tbl

static void
f77_create_arrayprint_offset_tbl (struct type *type, struct ui_file *stream)
{
  struct type *tmp_type;
  int eltlen;
  int ndimen = 1;
  int upper, lower, retcode;

  tmp_type = type;

  while ((TYPE_CODE (tmp_type) == TYPE_CODE_ARRAY))
    {
      if (TYPE_ARRAY_UPPER_BOUND_TYPE (tmp_type) == BOUND_CANNOT_BE_DETERMINED)
	fprintf_filtered (stream, "<assumed size array> ");

      retcode = f77_get_dynamic_upperbound (tmp_type, &upper);
      if (retcode == BOUND_FETCH_ERROR)
	error ("Cannot obtain dynamic upper bound");

      retcode = f77_get_dynamic_lowerbound (tmp_type, &lower);
      if (retcode == BOUND_FETCH_ERROR)
	error ("Cannot obtain dynamic lower bound");

      F77_DIM_SIZE (ndimen) = upper - lower + 1;

      tmp_type = TYPE_TARGET_TYPE (tmp_type);
      ndimen++;
    }

  /* Now we multiply eltlen by all the offsets, so that later we 
     can print out array elements correctly.  Up till now we 
     know an offset to apply to get the item but we also 
     have to know how much to add to get to the next item */

  ndimen--;
  eltlen = TYPE_LENGTH (tmp_type);
  F77_DIM_OFFSET (ndimen) = eltlen;
  while (--ndimen > 0)
    {
      eltlen *= F77_DIM_SIZE (ndimen + 1);
      F77_DIM_OFFSET (ndimen) = eltlen;
    }
}
开发者ID:2014-class,项目名称:freerouter,代码行数:43,代码来源:f-valprint.c


示例13: dynamic_array_type

static int
dynamic_array_type (struct type *type, const gdb_byte *valaddr,
		    int embedded_offset, CORE_ADDR address,
		    struct ui_file *stream, int recurse,
		    const struct value *val,
		    const struct value_print_options *options)
{
  if (TYPE_NFIELDS (type) == 2
      && TYPE_CODE (TYPE_FIELD_TYPE (type, 0)) == TYPE_CODE_INT
      && strcmp (TYPE_FIELD_NAME (type, 0), "length") == 0
      && strcmp (TYPE_FIELD_NAME (type, 1), "ptr") == 0
      && !value_bits_any_optimized_out (val,
					TARGET_CHAR_BIT * embedded_offset,
					TARGET_CHAR_BIT * TYPE_LENGTH (type)))
    {
      CORE_ADDR addr;
      struct type *elttype;
      struct type *true_type;
      struct type *ptr_type;
      struct value *ival;
      int length;

      length = unpack_field_as_long (type, valaddr + embedded_offset, 0);

      ptr_type = TYPE_FIELD_TYPE (type, 1);
      elttype = check_typedef (TYPE_TARGET_TYPE (ptr_type));
      addr = unpack_pointer (ptr_type,
			     valaddr + TYPE_FIELD_BITPOS (type, 1) / 8
			     + embedded_offset);
      true_type = check_typedef (elttype);

      true_type = lookup_array_range_type (true_type, 0, length - 1);
      ival = value_at (true_type, addr);
      true_type = value_type (ival);

      d_val_print (true_type,
		   value_contents_for_printing (ival),
		   value_embedded_offset (ival), addr,
		   stream, recurse + 1, ival, options);
      return 0;
    }
  return 1;
}
开发者ID:ajinkya93,项目名称:netbsd-src,代码行数:43,代码来源:d-valprint.c


示例14: print_optional_low_bound

static int
print_optional_low_bound (struct ui_file *stream, struct type *type)
{
  struct type *index_type;
  long low_bound;

  if (print_array_indexes_p ())
    return 0;

  if (!get_array_low_bound (type, &low_bound))
    return 0;

  index_type = TYPE_INDEX_TYPE (type);

  if (TYPE_CODE (index_type) == TYPE_CODE_RANGE)
    {
      /* We need to know what the base type is, in order to do the
         appropriate check below.  Otherwise, if this is a subrange
         of an enumerated type, where the underlying value of the
         first element is typically 0, we might test the low bound
         against the wrong value.  */
      index_type = TYPE_TARGET_TYPE (index_type);
    }

  switch (TYPE_CODE (index_type))
    {
    case TYPE_CODE_ENUM:
      if (low_bound == TYPE_FIELD_BITPOS (index_type, 0))
	return 0;
      break;
    case TYPE_CODE_UNDEF:
      index_type = builtin_type_long;
      /* FALL THROUGH */
    default:
      if (low_bound == 1)
	return 0;
      break;
    }

  ada_print_scalar (index_type, (LONGEST) low_bound, stream);
  fprintf_filtered (stream, " => ");
  return 1;
}
开发者ID:benjaminlevine,项目名称:Huawei-HG633-Open-Source-Software-Package,代码行数:43,代码来源:ada-valprint.c


示例15: go_print_type

void
go_print_type (struct type *type, const char *varstring,
	       struct ui_file *stream, int show, int level,
	       const struct type_print_options *flags)
{
  /* Borrowed from c-typeprint.c.  */
  if (show > 0)
    type = check_typedef (type);

  /* Print the type of "abc" as "string", not char[4].  */
  if (TYPE_CODE (type) == TYPE_CODE_ARRAY
      && TYPE_CODE (TYPE_TARGET_TYPE (type)) == TYPE_CODE_CHAR)
    {
      fputs_filtered ("string", stream);
      return;
    }

  /* Punt the rest to C for now.  */
  c_print_type (type, varstring, stream, show, level, flags);
}
开发者ID:jon-turney,项目名称:binutils-gdb,代码行数:20,代码来源:go-typeprint.c


示例16: compile_cplus_convert_reference

static gcc_type
compile_cplus_convert_reference (compile_cplus_instance *instance,
				 struct type *type)
{
  gcc_type target = instance->convert_type (TYPE_TARGET_TYPE (type));

  enum gcc_cp_ref_qualifiers quals = GCC_CP_REF_QUAL_NONE;
  switch (TYPE_CODE (type))
    {
    case TYPE_CODE_REF:
      quals = GCC_CP_REF_QUAL_LVALUE;
      break;
    case TYPE_CODE_RVALUE_REF:
      quals = GCC_CP_REF_QUAL_RVALUE;
      break;
    default:
      gdb_assert_not_reached ("unexpected type code for reference type");
    }

  return instance->convert_reference_base (target, quals);
}
开发者ID:T-J-Teru,项目名称:binutils-gdb,代码行数:21,代码来源:compile-cplus-types.c


示例17: print_optional_low_bound

static int
print_optional_low_bound (struct ui_file *stream, struct type *type)
{
  struct type *index_type;
  long low_bound;

  index_type = TYPE_INDEX_TYPE (type);
  low_bound = 0;

  if (index_type == NULL)
    return 0;
  if (TYPE_CODE (index_type) == TYPE_CODE_RANGE)
    {
      low_bound = TYPE_LOW_BOUND (index_type);
      if (low_bound > TYPE_HIGH_BOUND (index_type))
	return 0;
      index_type = TYPE_TARGET_TYPE (index_type);
    }
  else
    return 0;

  switch (TYPE_CODE (index_type))
    {
    case TYPE_CODE_ENUM:
      if (low_bound == TYPE_FIELD_BITPOS (index_type, 0))
	return 0;
      break;
    case TYPE_CODE_UNDEF:
      index_type = builtin_type_long;
      /* FALL THROUGH */
    default:
      if (low_bound == 1)
	return 0;
      break;
    }

  ada_print_scalar (index_type, (LONGEST) low_bound, stream);
  fprintf_filtered (stream, " => ");
  return 1;
}
开发者ID:sjohnston-adventiumlabs,项目名称:xen-micart-scheduler,代码行数:40,代码来源:ada-valprint.c


示例18: print_variant_clauses

static void
print_variant_clauses (struct type *type, int field_num,
                       struct type *outer_type, struct ui_file *stream,
                       int show, int level,
                       const struct type_print_options *flags)
{
    int i;
    struct type *var_type, *par_type;
    struct type *discr_type;

    var_type = TYPE_FIELD_TYPE (type, field_num);
    discr_type = ada_variant_discrim_type (var_type, outer_type);

    if (TYPE_CODE (var_type) == TYPE_CODE_PTR)
    {
        var_type = TYPE_TARGET_TYPE (var_type);
        if (var_type == NULL || TYPE_CODE (var_type) != TYPE_CODE_UNION)
            return;
    }

    par_type = ada_find_parallel_type (var_type, "___XVU");
    if (par_type != NULL)
        var_type = par_type;

    for (i = 0; i < TYPE_NFIELDS (var_type); i += 1)
    {
        fprintf_filtered (stream, "\n%*swhen ", level + 4, "");
        if (print_choices (var_type, i, stream, discr_type))
        {
            if (print_record_field_types (TYPE_FIELD_TYPE (var_type, i),
                                          outer_type, stream, show, level + 4,
                                          flags)
                    <= 0)
                fprintf_filtered (stream, " null;");
        }
        else
            print_selected_record_field_types (var_type, outer_type, i, i,
                                               stream, show, level + 4, flags);
    }
}
开发者ID:asdlei00,项目名称:gdb,代码行数:40,代码来源:ada-typeprint.c


示例19: is_object_type

int
is_object_type (struct type *type)
{
  CHECK_TYPEDEF (type);
  if (TYPE_CODE (type) == TYPE_CODE_PTR)
    {
      struct type *ttype = check_typedef (TYPE_TARGET_TYPE (type));
      const char *name;
      if (TYPE_CODE (ttype) != TYPE_CODE_STRUCT)
	return 0;
      while (TYPE_N_BASECLASSES (ttype) > 0)
	ttype = TYPE_BASECLASS (ttype, 0);
      name = TYPE_TAG_NAME (ttype);
      if (name != NULL && strcmp (name, "java.lang.Object") == 0)
	return 1;
      name
	= TYPE_NFIELDS (ttype) > 0 ? TYPE_FIELD_NAME (ttype, 0) : (char *) 0;
      if (name != NULL && strcmp (name, "vtable") == 0)
	return 1;
    }
  return 0;
}
开发者ID:NalaGinrut,项目名称:gdb,代码行数:22,代码来源:jv-lang.c


示例20: pascal_type_print_func_varspec_suffix

static void
pascal_type_print_func_varspec_suffix  (struct type *type, struct ui_file *stream,
					int show, int passed_a_ptr,
					int demangled_args,
					const struct type_print_options *flags)
{
  if (TYPE_TARGET_TYPE (type) == NULL
      || TYPE_CODE (TYPE_TARGET_TYPE (type)) != TYPE_CODE_VOID)
    {
      fprintf_filtered (stream, " : ");
      pascal_type_print_varspec_prefix (TYPE_TARGET_TYPE (type),
					stream, 0, 0, flags);

      if (TYPE_TARGET_TYPE (type) == NULL)
	type_print_unknown_return_type (stream);
      else
	pascal_type_print_base (TYPE_TARGET_TYPE (type), stream, show, 0,
				flags);

      pascal_type_print_varspec_suffix (TYPE_TARGET_TYPE (type), stream, 0,
					passed_a_ptr, 0, flags);
    }
}
开发者ID:jon-turney,项目名称:binutils-gdb,代码行数:23,代码来源:p-typeprint.c



注:本文中的TYPE_TARGET_TYPE函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ TransactionIdEquals函数代码示例发布时间:2022-05-30
下一篇:
C++ TYPE_PRECISION函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap