aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf2read.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2018-04-17 13:51:23 -0600
committerTom Tromey <tom@tromey.com>2018-06-01 10:19:55 -0600
commitc1ec8cea7ff53eb76cb7c354b813c67fde755409 (patch)
treecc7a14ce354e5e4b61058824fe01949600ddc16b /gdb/dwarf2read.c
parentbc8453a7bb617a5f14a465516f9f87c2ab6e05d5 (diff)
downloadgdb-c1ec8cea7ff53eb76cb7c354b813c67fde755409.zip
gdb-c1ec8cea7ff53eb76cb7c354b813c67fde755409.tar.gz
gdb-c1ec8cea7ff53eb76cb7c354b813c67fde755409.tar.bz2
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.
Diffstat (limited to 'gdb/dwarf2read.c')
-rw-r--r--gdb/dwarf2read.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index d5b890b..14cae6e 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -10811,7 +10811,8 @@ dwarf2_compute_name (const char *name,
if (child->tag == DW_TAG_template_type_param)
{
- c_print_type (type, "", &buf, -1, 0, &type_print_raw_options);
+ c_print_type (type, "", &buf, -1, 0, cu->language,
+ &type_print_raw_options);
continue;
}