mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-12-19 01:19:41 +08:00
Thread language through c_type_print_args
Currently dwarf2read.c will pass the CU's language to c_type_print_args -- but this doesn't affect all aspects of type printing, because some code in c-typeprint.c refers to current_language. This patch threads the language through more of the type printing code, adding an overload to c_type_print. Some uses of current_language remain, but now they are only in top-level functions. gdb/ChangeLog 2018-06-01 Tom Tromey <tom@tromey.com> * dwarf2read.c (dwarf2_compute_name): Pass CU's language to c_print_type. * c-typeprint.c (c_print_type_1): Add "language" parameter. (c_print_type): Update. (c_print_type): New overload. (c_type_print_varspec_prefix, c_type_print_args) (c_type_print_varspec_suffix, c_print_type_no_offsets) (c_type_print_base_struct_union, c_type_print_base_1) (cp_type_print_method_args): Add "language" parameter. (c_type_print_base): Update. * c-lang.h (c_print_type): Add new overload.
This commit is contained in:
@@ -72,6 +72,13 @@ 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. */
|
||||
|
||||
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_typedef (struct type *,
|
||||
struct symbol *,
|
||||
struct ui_file *);
|
||||
|
||||
Reference in New Issue
Block a user