diff options
author | Ulrich Weigand <uweigand@de.ibm.com> | 2008-09-11 14:09:37 +0000 |
---|---|---|
committer | Ulrich Weigand <uweigand@de.ibm.com> | 2008-09-11 14:09:37 +0000 |
commit | 3e79cecf024acb3f5739ec19d6ebd331f08e80e8 (patch) | |
tree | f855bd65ee65c9033bc200b59db309096c775ea3 /gdb/ada-exp.y | |
parent | c841afd52aeb4292e2d9b294b78b71f7bc14313a (diff) | |
download | gdb-3e79cecf024acb3f5739ec19d6ebd331f08e80e8.zip gdb-3e79cecf024acb3f5739ec19d6ebd331f08e80e8.tar.gz gdb-3e79cecf024acb3f5739ec19d6ebd331f08e80e8.tar.bz2 |
* expression.h (struct expression): New member GDBARCH.
* parse.c (parse_exp_in_context): Initialize it.
* parser-def.h (parse_gdbarch, parse_language): New macros.
* ada-exp.y (parse_type): New macro.
Replace builtin_type_ macros by using parse_type.
Replace current_language by parse_language.
* ada-lex.l (processInt): Replace current_gdbarch by parse_gdbarch.
Replace builtin_type_ macros.
* c-exp.y (parse_type): New macro.
Replace builtin_type_ macros by using parse_type.
(parse_number): Replace current_gdbarch by parse_gdbarch.
(yylex): Replace current_language by parse_language.
* f-exp.y (parse_type, parse_f_type): New macros.
Replace builtin_type_ macros by using parse_{f_,}type.
(parse_number): Replace current_gdbarch by parse_gdbarch.
(yylex): Replace current_language by parse_language.
* jv-exp.y (parse_type): New macro.
(parse_number): Replace builtin_type_ macros by using parse_type.
* m2-exp.y (parse_type, parse_m2_type): New macros.
Replace builtin_type_ macros by using parse_{m2_,}type.
* objc-exp.y (parse_type): New macro.
Replace builtin_type_ macros by using parse_type.
(parse_number): Replace current_gdbarch by parse_gdbarch.
(yylex): Replace current_language by parse_language.
* p-exp.y (parse_type): New macro.
Replace builtin_type_ macros by using parse_type.
(parse_number): Replace current_gdbarch by parse_gdbarch.
(yylex): Replace current_language by parse_language.
Diffstat (limited to 'gdb/ada-exp.y')
-rw-r--r-- | gdb/ada-exp.y | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/gdb/ada-exp.y b/gdb/ada-exp.y index e44cc68..e440663 100644 --- a/gdb/ada-exp.y +++ b/gdb/ada-exp.y @@ -52,6 +52,8 @@ Boston, MA 02110-1301, USA. */ #include "frame.h" #include "block.h" +#define parse_type builtin_type (parse_gdbarch) + /* Remap normal yacc parser interface names (yyparse, yylex, yyerror, etc), as well as gratuitiously global symbol names, so we can have multiple yacc generated parsers in gdb. These are only the variables @@ -571,7 +573,7 @@ opt_type_prefix : type_prefix | /* EMPTY */ { write_exp_elt_opcode (OP_TYPE); - write_exp_elt_type (builtin_type_void); + write_exp_elt_type (parse_type->builtin_void); write_exp_elt_opcode (OP_TYPE); } ; @@ -1081,8 +1083,8 @@ static struct type* find_primitive_type (char *name) { struct type *type; - type = language_lookup_primitive_type_by_name (current_language, - current_gdbarch, + type = language_lookup_primitive_type_by_name (parse_language, + parse_gdbarch, name); if (type == NULL && strcmp ("system__address", name) == 0) type = type_system_address (); @@ -1463,59 +1465,59 @@ convert_char_literal (struct type *type, LONGEST val) static struct type * type_int (void) { - return builtin_type_int; + return parse_type->builtin_int; } static struct type * type_long (void) { - return builtin_type_long; + return parse_type->builtin_long; } static struct type * type_long_long (void) { - return builtin_type_long_long; + return parse_type->builtin_long_long; } static struct type * type_float (void) { - return builtin_type_float; + return parse_type->builtin_float; } static struct type * type_double (void) { - return builtin_type_double; + return parse_type->builtin_double; } static struct type * type_long_double (void) { - return builtin_type_long_double; + return parse_type->builtin_long_double; } static struct type * type_char (void) { - return language_string_char_type (current_language, current_gdbarch); + return language_string_char_type (parse_language, parse_gdbarch); } static struct type * type_boolean (void) { - return builtin_type_bool; + return parse_type->builtin_bool; } static struct type * type_system_address (void) { struct type *type - = language_lookup_primitive_type_by_name (current_language, - current_gdbarch, + = language_lookup_primitive_type_by_name (parse_language, + parse_gdbarch, "system__address"); - return type != NULL ? type : lookup_pointer_type (builtin_type_void); + return type != NULL ? type : parse_type->builtin_data_ptr; } void |