{
default:
gdb_printf (stream, "<");
- c_print_type (type, "", stream, show, level, flags);
+ c_print_type (type, "", stream, show, level, language_ada, flags);
gdb_printf (stream, ">");
break;
case TYPE_CODE_PTR:
{
string_file buf;
c_print_type ($2, NULL, &buf, -1, 0,
+ pstate->language ()->la_language,
&type_print_raw_options);
std::string name = buf.release ();
struct ui_file *stream, int show, int level,
const struct type_print_options *flags) const override
{
- c_print_type (type, varstring, stream, show, level, flags);
+ c_print_type (type, varstring, stream, show, level, la_language, flags);
}
/* See language.h. */
struct ui_file *stream, int show, int level,
const struct type_print_options *flags) const override
{
- c_print_type (type, varstring, stream, show, level, flags);
+ c_print_type (type, varstring, stream, show, level, la_language, flags);
}
/* See language.h. */
struct ui_file *stream, int show, int level,
const struct type_print_options *flags) const override
{
- c_print_type (type, varstring, stream, show, level, flags);
+ c_print_type (type, varstring, stream, show, level, la_language, flags);
}
/* See language.h. */
struct ui_file *stream, int show, int level,
const struct type_print_options *flags) const override
{
- c_print_type (type, varstring, stream, show, level, flags);
+ c_print_type (type, varstring, stream, show, level, la_language, flags);
}
/* See language.h. */
extern int c_parse_escape (const char **, struct obstack *);
/* Defined in c-typeprint.c */
-extern void c_print_type (struct type *, const char *,
- struct ui_file *, int, int,
- const struct type_print_options *);
-/* Print a type but allow the precise language to be specified. */
+/* Print TYPE to STREAM using syntax appropriate for LANGUAGE, a
+ C-like language. The other parameters are like
+ type_language_defn::print_type's. */
-extern void c_print_type (struct type *, const char *,
- struct ui_file *, int, int,
- enum language,
- const struct type_print_options *);
+extern void c_print_type (struct type *type,
+ const char *varstring,
+ struct ui_file *stream,
+ int show, int level,
+ enum language language,
+ const struct type_print_options *flags);
extern void c_print_typedef (struct type *,
struct symbol *,
}
}
-/* LEVEL is the depth to indent lines by. */
-
-void
-c_print_type (struct type *type,
- const char *varstring,
- struct ui_file *stream,
- int show, int level,
- const struct type_print_options *flags)
-{
- struct print_offset_data podata (flags);
-
- c_print_type_1 (type, varstring, stream, show, level,
- current_language->la_language, flags, &podata);
-}
-
-
/* See c-lang.h. */
void
if (FIELD_ARTIFICIAL (arg))
continue;
- c_print_type (arg.type (), "", stream, 0, 0, flags);
+ c_print_type (arg.type (), "", stream, 0, 0, language, flags);
if (i == nargs && varargs)
gdb_printf (stream, ", ...");
static void
c_type_print_template_args (const struct type_print_options *flags,
- struct type *type, struct ui_file *stream)
+ struct type *type, struct ui_file *stream,
+ enum language language)
{
int first = 1, i;
gdb_printf (stream, "%s = ", sym->linkage_name ());
}
- c_print_type (sym->type (), "", stream, -1, 0, flags);
+ c_print_type (sym->type (), "", stream, -1, 0, language, flags);
}
if (!first)
struct type *basetype;
int vptr_fieldno;
- c_type_print_template_args (&local_flags, type, stream);
+ c_type_print_template_args (&local_flags, type, stream, language);
/* Add in template parameters when printing derivation info. */
if (local_flags.local_typedefs != NULL)
struct ui_file *stream, int show, int level,
const struct type_print_options *flags) const override
{
- c_print_type (type, varstring, stream, show, level, flags);
+ c_print_type (type, varstring, stream, show, level, la_language, flags);
}
/* See language.h. */
{
/* Found a non-virtual function: print out the type. */
gdb_puts ("(", stream);
- c_print_type (type, "", stream, -1, 0, &type_print_raw_options);
+ c_print_type (type, "", stream, -1, 0, current_language->la_language,
+ &type_print_raw_options);
gdb_puts (") ", stream);
}
}
/* Punt the rest to C for now. */
- c_print_type (type, varstring, stream, show, level, flags);
+ c_print_type (type, varstring, stream, show, level, la_language, flags);
}
struct ui_file *stream, int show, int level,
const struct type_print_options *flags) const override
{
- c_print_type (type, varstring, stream, show, level, flags);
+ c_print_type (type, varstring, stream, show, level, la_language, flags);
}
/* See language.h. */
show = 0;
}
- c_print_type (type, varstring, stream, show, level, flags);
+ c_print_type (type, varstring, stream, show, level, la_language, flags);
}
/* See language.h. */
/* If we see a base class, delegate to C. */
if (TYPE_N_BASECLASSES (type) > 0)
- c_print_type (type, varstring, stream, show, level, flags);
+ c_print_type (type, varstring, stream, show, level, language_rust, flags);
if (flags->print_offsets)
{
default:
c_printer:
- c_print_type (type, varstring, stream, show, level, flags);
+ c_print_type (type, varstring, stream, show, level, language_rust,
+ flags);
}
}