From e6c014f28ffa7d52bf7e9b599422f5ca910a17dd Mon Sep 17 00:00:00 2001 From: Ulrich Weigand Date: Wed, 17 Jun 2009 18:46:26 +0000 Subject: * gdbtypes.h (struct language_defn): Add forward declaration. (lookup_typename): Add LANGUAGE and GDBARCH parameters. (lookup_unsigned_typename): Likewise. (lookup_signed_typename): Likewise. * gdbtypes.c (lookup_typename): Add LANGUAGE and GDBARCH parameters. Use them instead of current_language and current_gdbarch. (lookup_unsigned_typename): Add LANGUAGE and GDBARCH parameters. Pass them to lookup_typename. (lookup_signed_typename): Likewise. * c-exp.y: Pass parse_language and parse_gdbarch to lookup_unsigned_typename and lookup_signed_typename. * objc-exp.y: Likewise. * m2-exp.y: Pass parse_language and parse_gdbarch to lookup_typename. * c-lang.c (evaluate_subexp_c): Pass expression language and gdbarch to lookup_typename. * printcmd.c (printf_command): Pass current language and gdbarch to lookup_typename. * python/python-type.c (typy_lookup_typename): Likewise. Include "language.h". --- gdb/c-exp.y | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'gdb/c-exp.y') diff --git a/gdb/c-exp.y b/gdb/c-exp.y index d8b3975..75851d0 100644 --- a/gdb/c-exp.y +++ b/gdb/c-exp.y @@ -969,11 +969,15 @@ typebase /* Implements (approximately): (type-qualifier)* type-specifier */ { $$ = lookup_enum (copy_name ($2), expression_context_block); } | UNSIGNED typename - { $$ = lookup_unsigned_typename (TYPE_NAME($2.type)); } + { $$ = lookup_unsigned_typename (parse_language, + parse_gdbarch, + TYPE_NAME($2.type)); } | UNSIGNED { $$ = parse_type->builtin_unsigned_int; } | SIGNED_KEYWORD typename - { $$ = lookup_signed_typename (TYPE_NAME($2.type)); } + { $$ = lookup_signed_typename (parse_language, + parse_gdbarch, + TYPE_NAME($2.type)); } | SIGNED_KEYWORD { $$ = parse_type->builtin_int; } /* It appears that this rule for templates is never -- cgit v1.1