本文整理汇总了C++中wrap_here函数的典型用法代码示例。如果您正苦于以下问题:C++ wrap_here函数的具体用法?C++ wrap_here怎么用?C++ wrap_here使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了wrap_here函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: pascal_print_func_args
static void
pascal_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, ")");
}
}
示例2: print_flush
static void
print_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 ();
}
示例3: maintenance_info_sections
static void
maintenance_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
示例4: m2_enum
void
m2_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, ")");
}
}
示例5: print_section_info
void
print_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");
}
}
示例6: cp_type_print_derivation_info
static void
cp_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);
}
}
示例7: print_func_type
static void
print_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);
}
}
示例8: m2_procedure
static void
m2_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);
}
}
}
示例9: m2_record_fields
void
m2_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 ");
}
}
示例10: cli_wrap_hint
void
cli_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);
}
示例11: wrap_here
void
cli_ui_out::do_wrap_hint (const char *identstring)
{
if (m_suppress_output)
return;
wrap_here (identstring);
}
示例12: c_type_print_args
static void
c_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, ")");
}
示例13: c_type_print_template_args
static void
c_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);
}
示例14: print_any_exception
static void
print_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);
}
}
示例15: print_flush
static void
print_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 ();
}