* 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".
This commit is contained in:
Ulrich Weigand 2009-06-17 18:46:26 +00:00
parent ec22ec346b
commit e6c014f28f
9 changed files with 74 additions and 24 deletions

View file

@ -26,6 +26,7 @@
#include "cp-support.h"
#include "demangle.h"
#include "objfiles.h"
#include "language.h"
typedef struct pyty_type_object
{
@ -373,7 +374,8 @@ typy_lookup_typename (char *type_name)
else if (!strncmp (type_name, "enum ", 5))
type = lookup_enum (type_name + 5, NULL);
else
type = lookup_typename (type_name, NULL, 0);
type = lookup_typename (current_language, current_gdbarch,
type_name, NULL, 0);
}
if (except.reason < 0)
{