这篇教程C++ wrap_here函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中wrap_here函数的典型用法代码示例。如果您正苦于以下问题:C++ wrap_here函数的具体用法?C++ wrap_here怎么用?C++ wrap_here使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了wrap_here函数的27个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: pascal_print_func_argsstatic voidpascal_print_func_args (struct type *type, struct ui_file *stream){ int i, len = TYPE_NFIELDS (type); if (len) { fprintf_filtered (stream, "("); } for (i = 0; i < len; i++) { if (i > 0) { fputs_filtered (", ", stream); wrap_here (" "); } /* can we find if it is a var parameter ?? if ( TYPE_FIELD(type, i) == ) { fprintf_filtered (stream, "var "); } */ pascal_print_type (TYPE_FIELD_TYPE (type, i), "" /* TYPE_FIELD_NAME seems invalid ! */ ,stream, -1, 0); } if (len) { fprintf_filtered (stream, ")"); }}
开发者ID:HoMeCracKeR,项目名称:gdb-ng,代码行数:28,
示例2: print_flushstatic voidprint_flush (void){ struct serial *gdb_stdout_serial; if (deprecated_error_begin_hook) deprecated_error_begin_hook (); if (target_supports_terminal_ours ()) target_terminal_ours (); /* We want all output to appear now, before we print the error. We have 3 levels of buffering we have to flush (it's possible that some of these should be changed to flush the lower-level ones too): */ /* 1. The _filtered buffer. */ if (filtered_printing_initialized ()) wrap_here (""); /* 2. The stdio buffer. */ gdb_flush (gdb_stdout); gdb_flush (gdb_stderr); /* 3. The system-level buffer. */ gdb_stdout_serial = serial_fdopen (1); if (gdb_stdout_serial) { serial_drain_output (gdb_stdout_serial); serial_un_fdopen (gdb_stdout_serial); } annotate_error_begin ();}
开发者ID:ajinkya93,项目名称:netbsd-src,代码行数:34,
示例3: maintenance_info_sectionsstatic voidmaintenance_info_sections (char *arg, int from_tty){ if (exec_bfd) { printf_filtered (_("Exec file:/n")); printf_filtered (" `%s', ", bfd_get_filename (exec_bfd)); wrap_here (" "); printf_filtered (_("file type %s./n"), bfd_get_target (exec_bfd)); if (arg && *arg && match_substring (arg, "ALLOBJ")) { struct objfile *ofile; struct obj_section *osect; /* Only this function cares about the 'ALLOBJ' argument; if 'ALLOBJ' is the only argument, discard it rather than passing it down to print_objfile_section_info (which wouldn't know how to handle it). */ if (strcmp (arg, "ALLOBJ") == 0) arg = NULL; ALL_OBJFILES (ofile) { printf_filtered (_(" Object file: %s/n"), bfd_get_filename (ofile->obfd)); ALL_OBJFILE_OSECTIONS (ofile, osect) { print_objfile_section_info (ofile->obfd, osect, arg); } } } else
开发者ID:3125788,项目名称:android_toolchain_gdb,代码行数:32,
示例4: m2_enumvoidm2_enum (struct type *type, struct ui_file *stream, int show, int level){ LONGEST lastval; int i, len; if (show < 0) { /* If we just printed a tag name, no need to print anything else. */ if (TYPE_TAG_NAME (type) == NULL) fprintf_filtered (stream, "(...)"); } else if (show > 0 || TYPE_TAG_NAME (type) == NULL) { fprintf_filtered (stream, "("); len = TYPE_NFIELDS (type); lastval = 0; for (i = 0; i < len; i++) { QUIT; if (i > 0) fprintf_filtered (stream, ", "); wrap_here (" "); fputs_filtered (TYPE_FIELD_NAME (type, i), stream); if (lastval != TYPE_FIELD_ENUMVAL (type, i)) { fprintf_filtered (stream, " = %s", plongest (TYPE_FIELD_ENUMVAL (type, i))); lastval = TYPE_FIELD_ENUMVAL (type, i); } lastval++; } fprintf_filtered (stream, ")"); }}
开发者ID:neon12345,项目名称:gdb,代码行数:35,
示例5: print_section_infovoidprint_section_info (struct target_ops *t, bfd *abfd){ struct target_section *p; /* FIXME: 16 is not wide enough when gdbarch_addr_bit > 64. */ int wid = gdbarch_addr_bit (gdbarch_from_bfd (abfd)) <= 32 ? 8 : 16; printf_filtered ("/t`%s', ", bfd_get_filename (abfd)); wrap_here (" "); printf_filtered (_("file type %s./n"), bfd_get_target (abfd)); if (abfd == exec_bfd) printf_filtered (_("/tEntry point: %s/n"), paddress (bfd_get_start_address (abfd))); for (p = t->to_sections; p < t->to_sections_end; p++) { printf_filtered ("/t%s", hex_string_custom (p->addr, wid)); printf_filtered (" - %s", hex_string_custom (p->endaddr, wid)); /* FIXME: A format of "08l" is not wide enough for file offsets larger than 4GB. OTOH, making it "016l" isn't desirable either since most output will then be much wider than necessary. It may make sense to test the size of the file and choose the format string accordingly. */ /* FIXME: i18n: Need to rewrite this sentence. */ if (info_verbose) printf_filtered (" @ %s", hex_string_custom (p->the_bfd_section->filepos, 8)); printf_filtered (" is %s", bfd_section_name (p->bfd, p->the_bfd_section)); if (p->bfd != abfd) printf_filtered (" in %s", bfd_get_filename (p->bfd)); printf_filtered ("/n"); }}
开发者ID:davearrama,项目名称:gdb,代码行数:33,
示例6: cp_type_print_derivation_infostatic voidcp_type_print_derivation_info (struct ui_file *stream, struct type *type, const struct type_print_options *flags){ const char *name; int i; for (i = 0; i < TYPE_N_BASECLASSES (type); i++) { wrap_here (" "); fputs_filtered (i == 0 ? ": " : ", ", stream); fprintf_filtered (stream, "%s%s ", BASETYPE_VIA_PUBLIC (type, i) ? "public" : (TYPE_FIELD_PROTECTED (type, i) ? "protected" : "private"), BASETYPE_VIA_VIRTUAL (type, i) ? " virtual" : ""); name = type_name_no_tag (TYPE_BASECLASS (type, i)); if (name) print_name_maybe_canonical (name, flags, stream); else fprintf_filtered (stream, "(null)"); } if (i > 0) { fputs_filtered (" ", stream); }}
开发者ID:nds32,项目名称:binutils,代码行数:28,
示例7: print_func_typestatic voidprint_func_type (struct type *type, struct ui_file *stream, char *name){ int i, len = TYPE_NFIELDS (type); if (TYPE_CODE (TYPE_TARGET_TYPE (type)) == TYPE_CODE_VOID) fprintf_filtered (stream, "procedure"); else fprintf_filtered (stream, "function"); if (name != NULL && name[0] != '/0') fprintf_filtered (stream, " %s", name); if (len > 0) { fprintf_filtered (stream, " ("); for (i = 0; i < len; i += 1) { if (i > 0) { fputs_filtered ("; ", stream); wrap_here (" "); } fprintf_filtered (stream, "a%d: ", i + 1); ada_print_type (TYPE_FIELD_TYPE (type, i), "", stream, -1, 0); } fprintf_filtered (stream, ")"); } if (TYPE_CODE (TYPE_TARGET_TYPE (type)) != TYPE_CODE_VOID) { fprintf_filtered (stream, " return "); ada_print_type (TYPE_TARGET_TYPE (type), "", stream, 0, 0); }}
开发者ID:dougmencken,项目名称:apple-gdb-1824,代码行数:35,
示例8: m2_procedurestatic voidm2_procedure (struct type *type, struct ui_file *stream, int show, int level, const struct type_print_options *flags){ fprintf_filtered (stream, "PROCEDURE "); m2_type_name (type, stream); if (TYPE_CODE (TYPE_TARGET_TYPE (type)) != TYPE_CODE_VOID) { int i, len = TYPE_NFIELDS (type); fprintf_filtered (stream, " ("); for (i = 0; i < len; i++) { if (i > 0) { fputs_filtered (", ", stream); wrap_here (" "); } m2_print_type (TYPE_FIELD_TYPE (type, i), "", stream, -1, 0, flags); } if (TYPE_TARGET_TYPE (type) != NULL) { fprintf_filtered (stream, " : "); m2_print_type (TYPE_TARGET_TYPE (type), "", stream, 0, 0, flags); } }}
开发者ID:neon12345,项目名称:gdb,代码行数:27,
示例9: m2_record_fieldsvoidm2_record_fields (struct type *type, struct ui_file *stream, int show, int level, const struct type_print_options *flags){ /* Print the tag if it exists. */ if (TYPE_TAG_NAME (type) != NULL) { if (strncmp (TYPE_TAG_NAME (type), "$$", 2) != 0) { fputs_filtered (TYPE_TAG_NAME (type), stream); if (show > 0) fprintf_filtered (stream, " = "); } } wrap_here (" "); if (show < 0) { if (TYPE_CODE (type) == TYPE_CODE_STRUCT) fprintf_filtered (stream, "RECORD ... END "); else if (TYPE_CODE (type) == TYPE_CODE_UNION) fprintf_filtered (stream, "CASE ... END "); } else if (show > 0) { int i; int len = TYPE_NFIELDS (type); if (TYPE_CODE (type) == TYPE_CODE_STRUCT) fprintf_filtered (stream, "RECORD/n"); else if (TYPE_CODE (type) == TYPE_CODE_UNION) /* i18n: Do not translate "CASE" and "OF". */ fprintf_filtered (stream, _("CASE <variant> OF/n")); for (i = TYPE_N_BASECLASSES (type); i < len; i++) { QUIT; print_spaces_filtered (level + 4, stream); fputs_filtered (TYPE_FIELD_NAME (type, i), stream); fputs_filtered (" : ", stream); m2_print_type (TYPE_FIELD_TYPE (type, i), "", stream, 0, level + 4, flags); if (TYPE_FIELD_PACKED (type, i)) { /* It is a bitfield. This code does not attempt to look at the bitpos and reconstruct filler, unnamed fields. This would lead to misleading results if the compiler does not put out fields for such things (I don't know what it does). */ fprintf_filtered (stream, " : %d", TYPE_FIELD_BITSIZE (type, i)); } fprintf_filtered (stream, ";/n"); } fprintfi_filtered (level, stream, "END "); }}
开发者ID:neon12345,项目名称:gdb,代码行数:59,
示例10: cli_wrap_hintvoidcli_wrap_hint (struct ui_out *uiout, char *identstring){ struct ui_out_data *data = ui_out_data (uiout); if (data->suppress_output) return; wrap_here (identstring);}
开发者ID:jichu4n,项目名称:prc-tools-remix,代码行数:8,
示例11: wrap_herevoidcli_ui_out::do_wrap_hint (const char *identstring){ if (m_suppress_output) return; wrap_here (identstring);}
开发者ID:jon-turney,项目名称:binutils-gdb,代码行数:8,
示例12: c_type_print_argsstatic voidc_type_print_args (struct type *type, struct ui_file *stream){ int i, len; struct field *args; int printed_any = 0; fprintf_filtered (stream, "("); args = TYPE_FIELDS (type); len = TYPE_NFIELDS (type); for (i = 0; i < TYPE_NFIELDS (type); i++) { if (printed_any) { fprintf_filtered (stream, ", "); wrap_here (" "); } c_print_type (TYPE_FIELD_TYPE (type, i), "", stream, -1, 0); printed_any = 1; } if (printed_any && TYPE_VARARGS (type)) { /* Print out a trailing ellipsis for varargs functions. Ignore TYPE_VARARGS if the function has no named arguments; that represents unprototyped (K&R style) C functions. */ if (printed_any && TYPE_VARARGS (type)) { fprintf_filtered (stream, ", "); wrap_here (" "); fprintf_filtered (stream, "..."); } } else if (!printed_any && (TYPE_PROTOTYPED (type) || current_language->la_language == language_cplus)) fprintf_filtered (stream, "void"); fprintf_filtered (stream, ")");}
开发者ID:OpenInkpot-archive,项目名称:iplinux-gdb,代码行数:42,
示例13: c_type_print_template_argsstatic voidc_type_print_template_args (const struct type_print_options *flags, struct type *type, struct ui_file *stream){ int first = 1, i; if (flags->raw) return; for (i = 0; i < TYPE_N_TEMPLATE_ARGUMENTS (type); ++i) { struct symbol *sym = TYPE_TEMPLATE_ARGUMENT (type, i); if (SYMBOL_CLASS (sym) != LOC_TYPEDEF) continue; if (first) { wrap_here (" "); fprintf_filtered (stream, _("[with %s = "), SYMBOL_LINKAGE_NAME (sym)); first = 0; } else { fputs_filtered (", ", stream); wrap_here (" "); fprintf_filtered (stream, "%s = ", SYMBOL_LINKAGE_NAME (sym)); } c_print_type (SYMBOL_TYPE (sym), "", stream, -1, 0, flags); } if (!first) fputs_filtered (_("] "), stream);}
开发者ID:nds32,项目名称:binutils,代码行数:36,
示例14: print_any_exceptionstatic voidprint_any_exception (struct ui_file *file, const char *prefix, struct gdb_exception e){ if (e.reason < 0 && e.message != NULL) { target_terminal_ours (); wrap_here (""); /* Force out any buffered output. */ gdb_flush (gdb_stdout); annotate_error_begin (); /* Print the prefix. */ if (prefix != NULL && prefix[0] != '/0') fputs_filtered (prefix, file); print_exception (file, e); }}
开发者ID:bitthunder-toolchain,项目名称:binutils,代码行数:17,
示例15: print_flushstatic voidprint_flush (void){ struct ui *ui = current_ui; struct serial *gdb_stdout_serial; if (deprecated_error_begin_hook) deprecated_error_begin_hook (); gdb::optional<target_terminal::scoped_restore_terminal_state> term_state; /* While normally there's always something pushed on the target stack, the NULL check is needed here because we can get here very early during startup, before the target stack is first initialized. */ if (current_top_target () != NULL && target_supports_terminal_ours ()) { term_state.emplace (); target_terminal::ours_for_output (); } /* We want all output to appear now, before we print the error. We have 3 levels of buffering we have to flush (it's possible that some of these should be changed to flush the lower-level ones too): */ /* 1. The _filtered buffer. */ if (filtered_printing_initialized ()) wrap_here (""); /* 2. The stdio buffer. */ gdb_flush (gdb_stdout); gdb_flush (gdb_stderr); /* 3. The system-level buffer. */ gdb_stdout_serial = serial_fdopen (fileno (ui->outstream)); if (gdb_stdout_serial) { serial_drain_output (gdb_stdout_serial); serial_un_fdopen (gdb_stdout_serial); } annotate_error_begin ();}
开发者ID:jon-turney,项目名称:binutils-gdb,代码行数:43,
示例16: c_type_print_argsstatic voidc_type_print_args (struct type *type, struct ui_file *stream){ int i; struct field *args; fprintf_filtered (stream, "("); args = TYPE_FIELDS (type); if (args != NULL) { int i; /* FIXME drow/2002-05-31: Always skips the first argument, should we be checking for static members? */ for (i = 1; i < TYPE_NFIELDS (type); i++) { c_print_type (args[i].type, "", stream, -1, 0); if (i != TYPE_NFIELDS (type)) { fprintf_filtered (stream, ","); wrap_here (" "); } } if (TYPE_VARARGS (type)) fprintf_filtered (stream, "..."); else if (i == 1 /* APPLE LOCAL begin Objective-C++ */ && (current_language->la_language == language_cplus || current_language->la_language == language_objcplus)) /* APPLE LOCAL end Objective-C++ */ fprintf_filtered (stream, "void"); } /* APPLE LOCAL begin Objective-C++ */ else if (current_language->la_language == language_cplus || current_language->la_language == language_objcplus) /* APPLE LOCAL end Objective-C++ */ { fprintf_filtered (stream, "void"); } fprintf_filtered (stream, ")");}
开发者ID:unofficial-opensource-apple,项目名称:gdbforcw,代码行数:43,
示例17: java_value_printintjava_value_print (struct value *val, struct ui_file *stream, const struct value_print_options *options){ struct gdbarch *gdbarch = get_type_arch (value_type (val)); enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); struct type *type; CORE_ADDR address; int i; char *name; struct value_print_options opts; type = value_type (val); address = value_address (val); if (is_object_type (type)) { CORE_ADDR obj_addr; /* Get the run-time type, and cast the object into that */ obj_addr = unpack_pointer (type, value_contents (val)); if (obj_addr != 0) { type = type_from_class (gdbarch, java_class_from_object (val)); type = lookup_pointer_type (type); val = value_at (type, address); } } if (TYPE_CODE (type) == TYPE_CODE_PTR && !value_logical_not (val)) type_print (TYPE_TARGET_TYPE (type), "", stream, -1); name = TYPE_TAG_NAME (type); if (TYPE_CODE (type) == TYPE_CODE_STRUCT && name != NULL && (i = strlen (name), name[i - 1] == ']')) { gdb_byte buf4[4]; long length; unsigned int things_printed = 0; int reps; struct type *el_type = java_primitive_type_from_name (gdbarch, name, i - 2); i = 0; read_memory (address + get_java_object_header_size (gdbarch), buf4, 4); length = (long) extract_signed_integer (buf4, 4, byte_order); fprintf_filtered (stream, "{length: %ld", length); if (el_type == NULL) { CORE_ADDR element; CORE_ADDR next_element = -1; /* dummy initial value */ /* Skip object header and length. */ address += get_java_object_header_size (gdbarch) + 4; while (i < length && things_printed < options->print_max) { gdb_byte *buf; buf = alloca (gdbarch_ptr_bit (gdbarch) / HOST_CHAR_BIT); fputs_filtered (", ", stream); wrap_here (n_spaces (2)); if (i > 0) element = next_element; else { read_memory (address, buf, sizeof (buf)); address += gdbarch_ptr_bit (gdbarch) / HOST_CHAR_BIT; /* FIXME: cagney/2003-05-24: Bogus or what. It pulls a host sized pointer out of the target and then extracts that as an address (while assuming that the address is unsigned)! */ element = extract_unsigned_integer (buf, sizeof (buf), byte_order); } for (reps = 1; i + reps < length; reps++) { read_memory (address, buf, sizeof (buf)); address += gdbarch_ptr_bit (gdbarch) / HOST_CHAR_BIT; /* FIXME: cagney/2003-05-24: Bogus or what. It pulls a host sized pointer out of the target and then extracts that as an address (while assuming that the address is unsigned)! */ next_element = extract_unsigned_integer (buf, sizeof (buf), byte_order); if (next_element != element) break; } if (reps == 1) fprintf_filtered (stream, "%d: ", i); else fprintf_filtered (stream, "%d..%d: ", i, i + reps - 1);//.........这里部分代码省略.........
开发者ID:3125788,项目名称:android_toolchain_gdb,代码行数:101,
示例18: f_type_print_basevoidf_type_print_base (struct type *type, struct ui_file *stream, int show, int level){ int upper_bound; int index; QUIT; wrap_here (" "); if (type == NULL) { fputs_filtered ("<type unknown>", stream); return; } /* When SHOW is zero or less, and there is a valid type name, then always just print the type name directly from the type. */ if ((show <= 0) && (TYPE_NAME (type) != NULL)) { fputs_filtered (TYPE_NAME (type), stream); return; } if (TYPE_CODE (type) != TYPE_CODE_TYPEDEF) CHECK_TYPEDEF (type); switch (TYPE_CODE (type)) { case TYPE_CODE_TYPEDEF: f_type_print_base (TYPE_TARGET_TYPE (type), stream, 0, level); break; case TYPE_CODE_ARRAY: case TYPE_CODE_FUNC: f_type_print_base (TYPE_TARGET_TYPE (type), stream, show, level); break; case TYPE_CODE_PTR: fprintf_filtered (stream, "PTR TO -> ( "); f_type_print_base (TYPE_TARGET_TYPE (type), stream, 0, level); break; case TYPE_CODE_REF: fprintf_filtered (stream, "REF TO -> ( "); f_type_print_base (TYPE_TARGET_TYPE (type), stream, 0, level); break; case TYPE_CODE_VOID: fprintfi_filtered (level, stream, "VOID"); break; case TYPE_CODE_UNDEF: fprintfi_filtered (level, stream, "struct <unknown>"); break; case TYPE_CODE_ERROR: fprintfi_filtered (level, stream, "%s", TYPE_ERROR_NAME (type)); break; case TYPE_CODE_RANGE: /* This should not occur */ fprintfi_filtered (level, stream, "<range type>"); break; case TYPE_CODE_CHAR: /* Override name "char" and make it "character" */ fprintfi_filtered (level, stream, "character"); break; case TYPE_CODE_INT: /* There may be some character types that attempt to come through as TYPE_CODE_INT since dbxstclass.h is so C-oriented, we must change these to "character" from "char". */ if (strcmp (TYPE_NAME (type), "char") == 0) fprintfi_filtered (level, stream, "character"); else goto default_case; break; case TYPE_CODE_STRING: /* Strings may have dynamic upperbounds (lengths) like arrays. */ if (TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED (type)) fprintfi_filtered (level, stream, "character*(*)"); else { upper_bound = f77_get_upperbound (type); fprintf_filtered (stream, "character*%d", upper_bound); } break; case TYPE_CODE_STRUCT: case TYPE_CODE_UNION: if (TYPE_CODE (type) == TYPE_CODE_UNION) fprintfi_filtered (level, stream, "Type, C_Union :: "); else fprintfi_filtered (level, stream, "Type ");//.........这里部分代码省略.........
开发者ID:Akheon23,项目名称:chromecast-mirrored-source.toolchain,代码行数:101,
示例19: pascal_object_print_value_fieldsvoidpascal_object_print_value_fields (struct type *type, const gdb_byte *valaddr, int offset, CORE_ADDR address, struct ui_file *stream, int recurse, const struct value *val, const struct value_print_options *options, struct type **dont_print_vb, int dont_print_statmem){ int i, len, n_baseclasses; char *last_dont_print = (char *) obstack_next_free (&dont_print_statmem_obstack); type = check_typedef (type); fprintf_filtered (stream, "{"); len = TYPE_NFIELDS (type); n_baseclasses = TYPE_N_BASECLASSES (type); /* Print out baseclasses such that we don't print duplicates of virtual baseclasses. */ if (n_baseclasses > 0) pascal_object_print_value (type, valaddr, offset, address, stream, recurse + 1, val, options, dont_print_vb); if (!len && n_baseclasses == 1) fprintf_filtered (stream, "<No data fields>"); else { struct obstack tmp_obstack = dont_print_statmem_obstack; int fields_seen = 0; if (dont_print_statmem == 0) { /* If we're at top level, carve out a completely fresh chunk of the obstack and use that until this particular invocation returns. */ obstack_finish (&dont_print_statmem_obstack); } for (i = n_baseclasses; i < len; i++) { /* If requested, skip printing of static fields. */ if (!options->pascal_static_field_print && field_is_static (&TYPE_FIELD (type, i))) continue; if (fields_seen) fprintf_filtered (stream, ", "); else if (n_baseclasses > 0) { if (options->prettyformat) { fprintf_filtered (stream, "/n"); print_spaces_filtered (2 + 2 * recurse, stream); fputs_filtered ("members of ", stream); fputs_filtered (type_name_no_tag (type), stream); fputs_filtered (": ", stream); } } fields_seen = 1; if (options->prettyformat) { fprintf_filtered (stream, "/n"); print_spaces_filtered (2 + 2 * recurse, stream); } else { wrap_here (n_spaces (2 + 2 * recurse)); } annotate_field_begin (TYPE_FIELD_TYPE (type, i)); if (field_is_static (&TYPE_FIELD (type, i))) fputs_filtered ("static ", stream); fprintf_symbol_filtered (stream, TYPE_FIELD_NAME (type, i), language_cplus, DMGL_PARAMS | DMGL_ANSI); annotate_field_name_end (); fputs_filtered (" = ", stream); annotate_field_value (); if (!field_is_static (&TYPE_FIELD (type, i)) && TYPE_FIELD_PACKED (type, i)) { struct value *v; /* Bitfields require special handling, especially due to byte order problems. */ if (TYPE_FIELD_IGNORE (type, i)) { fputs_filtered ("<optimized out or zero length>", stream); } else if (value_bits_synthetic_pointer (val, TYPE_FIELD_BITPOS (type, i), TYPE_FIELD_BITSIZE (type, i)))//.........这里部分代码省略.........
开发者ID:Cookfeces,项目名称:binutils-gdb,代码行数:101,
示例20: m2_print_typevoidm2_print_type (struct type *type, char *varstring, struct ui_file *stream, int show, int level){ enum type_code code; int demangled_args; CHECK_TYPEDEF (type); code = TYPE_CODE (type); QUIT; wrap_here (" "); if (type == NULL) { fputs_filtered (_("<type unknown>"), stream); return; } switch (TYPE_CODE (type)) { case TYPE_CODE_SET: m2_short_set(type, stream, show, level); break; case TYPE_CODE_STRUCT: if (m2_long_set (type, stream, show, level)) break; m2_record_fields (type, stream, show, level); break; case TYPE_CODE_TYPEDEF: m2_typedef (type, stream, show, level); break; case TYPE_CODE_ARRAY: m2_array (type, stream, show, level); break; case TYPE_CODE_PTR: m2_pointer (type, stream, show, level); break; case TYPE_CODE_REF: m2_ref (type, stream, show, level); break; case TYPE_CODE_MEMBER: m2_unknown (_("member"), type, stream, show, level); break; case TYPE_CODE_METHOD: m2_unknown (_("method"), type, stream, show, level); break; case TYPE_CODE_FUNC: m2_procedure (type, stream, show, level); break; case TYPE_CODE_UNION: m2_union (type, stream); break; case TYPE_CODE_ENUM: m2_enum (type, stream, show, level); break; case TYPE_CODE_VOID: break; case TYPE_CODE_UNDEF: /* i18n: Do not translate the "struct" part! */ m2_unknown (_("undef"), type, stream, show, level); break; case TYPE_CODE_ERROR: m2_unknown (_("error"), type, stream, show, level); break; case TYPE_CODE_RANGE: m2_range (type, stream, show, level); break; case TYPE_CODE_TEMPLATE: break; default: m2_type_name (type, stream); break; }}
开发者ID:3125788,项目名称:android_toolchain_gdb,代码行数:91,
示例21: c_type_print_basevoidc_type_print_base (struct type *type, struct ui_file *stream, int show, int level){ int i; int len, real_len; enum { s_none, s_public, s_private, s_protected } section_type; int need_access_label = 0; int j, len2; QUIT; wrap_here (" "); if (type == NULL) { fputs_filtered (_("<type unknown>"), stream); return; } /* When SHOW is zero or less, and there is a valid type name, then always just print the type name directly from the type. */ /* If we have "typedef struct foo {. . .} bar;" do we want to print it as "struct foo" or as "bar"? Pick the latter, because C++ folk tend to expect things like "class5 *foo" rather than "struct class5 *foo". */ if (show <= 0 && TYPE_NAME (type) != NULL) { c_type_print_modifier (type, stream, 0, 1); fputs_filtered (TYPE_NAME (type), stream); return; } CHECK_TYPEDEF (type); switch (TYPE_CODE (type)) { case TYPE_CODE_TYPEDEF: /* If we get here, the typedef doesn't have a name, and we couldn't resolve TYPE_TARGET_TYPE. Not much we can do. */ gdb_assert (TYPE_NAME (type) == NULL); gdb_assert (TYPE_TARGET_TYPE (type) == NULL); fprintf_filtered (stream, _("<unnamed typedef>")); break; case TYPE_CODE_ARRAY: case TYPE_CODE_PTR: case TYPE_CODE_MEMBERPTR: case TYPE_CODE_REF: case TYPE_CODE_FUNC: case TYPE_CODE_METHOD: case TYPE_CODE_METHODPTR: c_type_print_base (TYPE_TARGET_TYPE (type), stream, show, level); break; case TYPE_CODE_STRUCT: case TYPE_CODE_UNION: c_type_print_modifier (type, stream, 0, 1); if (TYPE_CODE (type) == TYPE_CODE_UNION) fprintf_filtered (stream, "union "); else if (TYPE_DECLARED_CLASS (type)) fprintf_filtered (stream, "class "); else fprintf_filtered (stream, "struct "); /* Print the tag if it exists. The HP aCC compiler emits a spurious "{unnamed struct}"/"{unnamed union}"/"{unnamed enum}" tag for unnamed struct/union/enum's, which we don't want to print. */ if (TYPE_TAG_NAME (type) != NULL && strncmp (TYPE_TAG_NAME (type), "{unnamed", 8)) { fputs_filtered (TYPE_TAG_NAME (type), stream); if (show > 0) fputs_filtered (" ", stream); } wrap_here (" "); if (show < 0) { /* If we just printed a tag name, no need to print anything else. */ if (TYPE_TAG_NAME (type) == NULL) fprintf_filtered (stream, "{...}"); } else if (show > 0 || TYPE_TAG_NAME (type) == NULL) { struct type *basetype; int vptr_fieldno; cp_type_print_derivation_info (stream, type); fprintf_filtered (stream, "{/n"); if (TYPE_NFIELDS (type) == 0 && TYPE_NFN_FIELDS (type) == 0 && TYPE_TYPEDEF_FIELD_COUNT (type) == 0)//.........这里部分代码省略.........
开发者ID:johnhubbard,项目名称:kgdb-pci-gdb,代码行数:101,
示例22: c_type_print_argsvoidc_type_print_args (struct type *type, struct ui_file *stream, int linkage_name, enum language language){ int i, len; struct field *args; int printed_any = 0; fprintf_filtered (stream, "("); args = TYPE_FIELDS (type); len = TYPE_NFIELDS (type); for (i = 0; i < TYPE_NFIELDS (type); i++) { struct type *param_type; if (TYPE_FIELD_ARTIFICIAL (type, i) && linkage_name) continue; if (printed_any) { fprintf_filtered (stream, ", "); wrap_here (" "); } param_type = TYPE_FIELD_TYPE (type, i); if (language == language_cplus && linkage_name) { /* C++ standard, 13.1 Overloadable declarations, point 3, item: - Parameter declarations that differ only in the presence or absence of const and/or volatile are equivalent. And the const/volatile qualifiers are not present in the mangled names as produced by GCC. */ param_type = make_cv_type (0, 0, param_type, NULL); } if (language == language_java) java_print_type (param_type, "", stream, -1, 0); else c_print_type (param_type, "", stream, -1, 0); printed_any = 1; } if (printed_any && TYPE_VARARGS (type)) { /* Print out a trailing ellipsis for varargs functions. Ignore TYPE_VARARGS if the function has no named arguments; that represents unprototyped (K&R style) C functions. */ if (printed_any && TYPE_VARARGS (type)) { fprintf_filtered (stream, ", "); wrap_here (" "); fprintf_filtered (stream, "..."); } } else if (!printed_any && ((TYPE_PROTOTYPED (type) && language != language_java) || language == language_cplus)) fprintf_filtered (stream, "void"); fprintf_filtered (stream, ")");}
开发者ID:johnhubbard,项目名称:kgdb-pci-gdb,代码行数:65,
示例23: java_print_value_fieldsstatic voidjava_print_value_fields (struct type *type, const gdb_byte *valaddr, CORE_ADDR address, struct ui_file *stream, int recurse, const struct value_print_options *options){ int i, len, n_baseclasses; CHECK_TYPEDEF (type); fprintf_filtered (stream, "{"); len = TYPE_NFIELDS (type); n_baseclasses = TYPE_N_BASECLASSES (type); if (n_baseclasses > 0) { int i, n_baseclasses = TYPE_N_BASECLASSES (type); for (i = 0; i < n_baseclasses; i++) { int boffset; struct type *baseclass = check_typedef (TYPE_BASECLASS (type, i)); char *basename = TYPE_NAME (baseclass); const gdb_byte *base_valaddr; if (BASETYPE_VIA_VIRTUAL (type, i)) continue; if (basename != NULL && strcmp (basename, "java.lang.Object") == 0) continue; boffset = 0; if (options->pretty) { fprintf_filtered (stream, "/n"); print_spaces_filtered (2 * (recurse + 1), stream); } fputs_filtered ("<", stream); /* Not sure what the best notation is in the case where there is no baseclass name. */ fputs_filtered (basename ? basename : "", stream); fputs_filtered ("> = ", stream); base_valaddr = valaddr; java_print_value_fields (baseclass, base_valaddr, address + boffset, stream, recurse + 1, options); fputs_filtered (", ", stream); } } if (!len && n_baseclasses == 1) fprintf_filtered (stream, "<No data fields>"); else { int fields_seen = 0; for (i = n_baseclasses; i < len; i++) { /* If requested, skip printing of static fields. */ if (field_is_static (&TYPE_FIELD (type, i))) { char *name = TYPE_FIELD_NAME (type, i); if (!options->static_field_print) continue; if (name != NULL && strcmp (name, "class") == 0) continue; } if (fields_seen) fprintf_filtered (stream, ", "); else if (n_baseclasses > 0) { if (options->pretty) { fprintf_filtered (stream, "/n"); print_spaces_filtered (2 + 2 * recurse, stream); fputs_filtered ("members of ", stream); fputs_filtered (type_name_no_tag (type), stream); fputs_filtered (": ", stream); } } fields_seen = 1; if (options->pretty) { fprintf_filtered (stream, "/n"); print_spaces_filtered (2 + 2 * recurse, stream); } else { wrap_here (n_spaces (2 + 2 * recurse)); } if (options->inspect_it) { if (TYPE_CODE (TYPE_FIELD_TYPE (type, i)) == TYPE_CODE_PTR) fputs_filtered ("/"( ptr /"", stream); else fputs_filtered ("/"( nodef /"", stream);//.........这里部分代码省略.........
开发者ID:3125788,项目名称:android_toolchain_gdb,代码行数:101,
示例24: command_line_handler/* NOTE: 1999-04-30 This is the asynchronous version of the command_line_input function; command_line_input will become obsolete once we use the event loop as the default mechanism in GDB. */static voidcommand_line_handler (char *rl){ static char *linebuffer = 0; static unsigned linelength = 0; char *p; char *p1; char *nline; int repeat = (instream == stdin); if (annotation_level > 1 && instream == stdin) { printf_unfiltered (("/n/032/032post-")); puts_unfiltered (async_annotation_suffix); printf_unfiltered (("/n")); } if (linebuffer == 0) { linelength = 80; linebuffer = (char *) xmalloc (linelength); } p = linebuffer; if (more_to_come) { strcpy (linebuffer, readline_input_state.linebuffer); p = readline_input_state.linebuffer_ptr; xfree (readline_input_state.linebuffer); more_to_come = 0; }#ifdef STOP_SIGNAL if (job_control) signal (STOP_SIGNAL, handle_stop_sig);#endif /* Make sure that all output has been output. Some machines may let you get away with leaving out some of the gdb_flush, but not all. */ wrap_here (""); gdb_flush (gdb_stdout); gdb_flush (gdb_stderr); if (source_file_name != NULL) ++source_line_number; /* If we are in this case, then command_handler will call quit and exit from gdb. */ if (!rl || rl == (char *) EOF) { command_handler (0); return; /* Lint. */ } if (strlen (rl) + 1 + (p - linebuffer) > linelength) { linelength = strlen (rl) + 1 + (p - linebuffer); nline = (char *) xrealloc (linebuffer, linelength); p += nline - linebuffer; linebuffer = nline; } p1 = rl; /* Copy line. Don't copy null at end. (Leaves line alone if this was just a newline). */ while (*p1) *p++ = *p1++; xfree (rl); /* Allocated in readline. */ if (p > linebuffer && *(p - 1) == '//') { *p = '/0'; p--; /* Put on top of '/'. */ readline_input_state.linebuffer = xstrdup (linebuffer); readline_input_state.linebuffer_ptr = p; /* We will not invoke a execute_command if there is more input expected to complete the command. So, we need to print an empty prompt here. */ more_to_come = 1; display_gdb_prompt (""); return; }#ifdef STOP_SIGNAL if (job_control) signal (STOP_SIGNAL, SIG_DFL);#endif#define SERVER_COMMAND_LENGTH 7 server_command = (p - linebuffer > SERVER_COMMAND_LENGTH) && strncmp (linebuffer, "server ", SERVER_COMMAND_LENGTH) == 0; if (server_command)//.........这里部分代码省略.........
开发者ID:Xilinx,项目名称:gdb,代码行数:101,
示例25: c_type_print_basevoidc_type_print_base (struct type *type, struct ui_file *stream, int show, int level){ int i; int len, real_len; int lastval; char *mangled_name; char *demangled_name; char *demangled_no_static; enum { s_none, s_public, s_private, s_protected } section_type; int need_access_label = 0; int j, len2; QUIT; wrap_here (" "); if (type == NULL) { fputs_filtered (_("<type unknown>"), stream); return; } /* When SHOW is zero or less, and there is a valid type name, then always just print the type name directly from the type. */ /* If we have "typedef struct foo {. . .} bar;" do we want to print it as "struct foo" or as "bar"? Pick the latter, because C++ folk tend to expect things like "class5 *foo" rather than "struct class5 *foo". */ if (show <= 0 && TYPE_NAME (type) != NULL) { c_type_print_modifier (type, stream, 0, 1); fputs_filtered (TYPE_NAME (type), stream); return; } CHECK_TYPEDEF (type); switch (TYPE_CODE (type)) { case TYPE_CODE_TYPEDEF: case TYPE_CODE_ARRAY: case TYPE_CODE_PTR: case TYPE_CODE_MEMBER: case TYPE_CODE_REF: case TYPE_CODE_FUNC: case TYPE_CODE_METHOD: c_type_print_base (TYPE_TARGET_TYPE (type), stream, show, level); break; case TYPE_CODE_STRUCT: c_type_print_modifier (type, stream, 0, 1); /* Note TYPE_CODE_STRUCT and TYPE_CODE_CLASS have the same value, * so we use another means for distinguishing them. */ if (HAVE_CPLUS_STRUCT (type)) { switch (TYPE_DECLARED_TYPE (type)) { case DECLARED_TYPE_CLASS: fprintf_filtered (stream, "class "); break; case DECLARED_TYPE_UNION: fprintf_filtered (stream, "union "); break; case DECLARED_TYPE_STRUCT: fprintf_filtered (stream, "struct "); break; default: /* If there is a CPLUS_STRUCT, assume class if not * otherwise specified in the declared_type field. */ fprintf_filtered (stream, "class "); break; } /* switch */ } else { /* If not CPLUS_STRUCT, then assume it's a C struct */ fprintf_filtered (stream, "struct "); } goto struct_union; case TYPE_CODE_UNION: c_type_print_modifier (type, stream, 0, 1); fprintf_filtered (stream, "union "); struct_union: /* Print the tag if it exists. * The HP aCC compiler emits * a spurious "{unnamed struct}"/"{unnamed union}"/"{unnamed enum}" * tag for unnamed struct/union/enum's, which we don't * want to print. *///.........这里部分代码省略.........
开发者ID:aosm,项目名称:gdb,代码行数:101,
示例26: ppscm_print_children//.........这里部分代码省略......... 2. Arrays. Always print a ",". 3. Other. Always print a ",". */ if (i == 0) { if (printed_nothing) fputs_filtered ("{", stream); else fputs_filtered (" = {", stream); } else if (! is_map || i % 2 == 0) fputs_filtered (pretty ? "," : ", ", stream); /* In summary mode, we just want to print "= {...}" if there is a value. */ if (options->summary) { /* This increment tricks the post-loop logic to print what we want. */ ++i; /* Likewise. */ pretty = 0; break; } if (! is_map || i % 2 == 0) { if (pretty) { fputs_filtered ("/n", stream); print_spaces_filtered (2 + 2 * recurse, stream); } else wrap_here (n_spaces (2 + 2 *recurse)); } if (is_map && i % 2 == 0) fputs_filtered ("[", stream); else if (is_array) { /* We print the index, not whatever the child method returned as the name. */ if (options->print_array_indexes) fprintf_filtered (stream, "[%d] = ", i); } else if (! is_map) { fputs_filtered (name, stream); fputs_filtered (" = ", stream); } if (lsscm_is_lazy_string (v_scm)) { struct value_print_options local_opts = *options; local_opts.addressprint = 0; lsscm_val_print_lazy_string (v_scm, stream, &local_opts); } else if (scm_is_string (v_scm)) { char *output = gdbscm_scm_to_c_string (v_scm); fputs_filtered (output, stream); xfree (output); } else
开发者ID:Caleb1994,项目名称:stewieos-binutils,代码行数:67,
示例27: c_type_print_varspec_suffixvoidc_type_print_varspec_suffix (struct type *type, struct ui_file *stream, int show, int passed_a_ptr, int demangled_args){ if (type == 0) return; if (TYPE_NAME (type) && show <= 0) return; QUIT; switch (TYPE_CODE (type)) { case TYPE_CODE_ARRAY: if (passed_a_ptr) fprintf_filtered (stream, ")"); fprintf_filtered (stream, "["); if (TYPE_LENGTH (type) >= 0 && TYPE_LENGTH (TYPE_TARGET_TYPE (type)) > 0 && TYPE_ARRAY_UPPER_BOUND_TYPE (type) != BOUND_CANNOT_BE_DETERMINED) fprintf_filtered (stream, "%d", (TYPE_LENGTH (type) / TYPE_LENGTH (TYPE_TARGET_TYPE (type)))); fprintf_filtered (stream, "]"); c_type_print_varspec_suffix (TYPE_TARGET_TYPE (type), stream, show, 0, 0); break; case TYPE_CODE_MEMBER: if (passed_a_ptr) fprintf_filtered (stream, ")"); c_type_print_varspec_suffix (TYPE_TARGET_TYPE (type), stream, show, 0, 0); break; case TYPE_CODE_METHOD: if (passed_a_ptr) fprintf_filtered (stream, ")"); c_type_print_varspec_suffix (TYPE_TARGET_TYPE (type), stream, show, 0, 0); if (passed_a_ptr) { c_type_print_args (type, stream); } break; case TYPE_CODE_PTR: case TYPE_CODE_REF: c_type_print_varspec_suffix (TYPE_TARGET_TYPE (type), stream, show, 1, 0); break; case TYPE_CODE_FUNC: if (passed_a_ptr) fprintf_filtered (stream, ")"); if (!demangled_args) { int i, len = TYPE_NFIELDS (type); fprintf_filtered (stream, "("); if (len == 0 && (TYPE_PROTOTYPED (type) /* APPLE LOCAL begin Objective-C++ */ || current_language->la_language == language_cplus || current_language->la_language == language_objcplus)) /* APPLE LOCAL end Objective-C++ */ { fprintf_filtered (stream, "void"); } else for (i = 0; i < len; i++) { if (i > 0) { fputs_filtered (", ", stream); wrap_here (" "); } c_print_type (TYPE_FIELD_TYPE (type, i), "", stream, -1, 0); } fprintf_filtered (stream, ")"); } c_type_print_varspec_suffix (TYPE_TARGET_TYPE (type), stream, show, passed_a_ptr, 0); break; case TYPE_CODE_TYPEDEF: c_type_print_varspec_suffix (TYPE_TARGET_TYPE (type), stream, show, passed_a_ptr, 0); break; case TYPE_CODE_UNDEF: case TYPE_CODE_STRUCT: case TYPE_CODE_UNION: case TYPE_CODE_ENUM: case TYPE_CODE_INT: case TYPE_CODE_FLT: case TYPE_CODE_VOID: case TYPE_CODE_ERROR: case TYPE_CODE_CHAR://.........这里部分代码省略.........
开发者ID:aosm,项目名称:gdb,代码行数:101,
注:本文中的wrap_here函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ wrap_int函数代码示例 C++ wrap_PI函数代码示例 |