+2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
+
+ * ada-lang.c (ada_language_arch_info): Delete function, move
+ implementation to...
+ (ada_language::language_arch_info): ...here, a new member
+ function.
+ (ada_language_data): Delete la_language_arch_info.
+ * c-lang.c (c_language_data): Likewise.
+ (c_language::language_arch_info): New member function.
+ (cplus_language_arch_info): Delete function, move
+ implementation to...
+ (cplus_language::language_arch_info): ...here, a new member
+ function.
+ (cplus_language_data): Delete la_language_arch_info.
+ (asm_language_data): Likewise.
+ (asm_language::language_arch_info): New member function.
+ (minimal_language_data): Delete la_language_arch_info.
+ (minimal_language::language_arch_info): New member function.
+ * d-lang.c (d_language_arch_info): Delete function, move
+ implementation to...
+ (d_language::language_arch_info): ...here, a new member
+ function.
+ (d_language_data): Delete la_language_arch_info.
+ * f-lang.c (f_language_arch_info): Delete function, move
+ implementation to...
+ (f_language::language_arch_info): ...here, a new member
+ function.
+ (f_language_data): Delete la_language_arch_info.
+ * go-lang.c (go_language_arch_info): Delete function, move
+ implementation to...
+ (go_language::language_arch_info): ...here, a new member
+ function.
+ (go_language_data): Delete la_language_arch_info.
+ * language.c (unknown_language_data): Likewise.
+ (unknown_language::language_arch_info): New member function.
+ (auto_language_data): Delete la_language_arch_info.
+ (auto_language::language_arch_info): New member function.
+ (language_gdbarch_post_init): Update call to
+ la_language_arch_info.
+ * language.h (language_data): Delete la_language_arch_info
+ function pointer.
+ (language_defn::language_arch_info): New function.
+ * m2-lang.c (m2_language_arch_info): Delete function, move
+ implementation to...
+ (m2_language::language_arch_info): ...here, a new member
+ function.
+ (m2_language_data): Delete la_language_arch_info.
+ * objc-lang.c (objc_language_arch_info): Delete function, move
+ implementation to...
+ (objc_language::language_arch_info): ...here, a new member
+ function.
+ (objc_language_data): Delete la_language_arch_info.
+ * opencl-lang.c (opencl_language_arch_info): Delete function, move
+ implementation to...
+ (opencl_language::language_arch_info): ...here, a new member
+ function.
+ (opencl_language_data): Delete la_language_arch_info.
+ * p-lang.c (pascal_language_arch_info): Delete function, move
+ implementation to...
+ (pascal_language::language_arch_info): ...here, a new member
+ function.
+ (pascal_language_data): Delete la_language_arch_info.
+ * rust-lang.c (rust_language_arch_info): Delete function, move
+ implementation to...
+ (rust_language::language_arch_info): ...here, a new member
+ function.
+ (rust_language_data): Delete la_language_arch_info.
+
2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
* ada-lang.c (ada_language_data): Delete la_pass_by_reference
static int ada_is_direct_array_type (struct type *);
-static void ada_language_arch_info (struct gdbarch *,
- struct language_arch_info *);
-
static struct value *ada_index_struct_field (int, struct value *, int,
struct type *);
nr_ada_primitive_types
};
-static void
-ada_language_arch_info (struct gdbarch *gdbarch,
- struct language_arch_info *lai)
-{
- const struct builtin_type *builtin = builtin_type (gdbarch);
-
- lai->primitive_type_vector
- = GDBARCH_OBSTACK_CALLOC (gdbarch, nr_ada_primitive_types + 1,
- struct type *);
-
- lai->primitive_type_vector [ada_primitive_type_int]
- = arch_integer_type (gdbarch, gdbarch_int_bit (gdbarch),
- 0, "integer");
- lai->primitive_type_vector [ada_primitive_type_long]
- = arch_integer_type (gdbarch, gdbarch_long_bit (gdbarch),
- 0, "long_integer");
- lai->primitive_type_vector [ada_primitive_type_short]
- = arch_integer_type (gdbarch, gdbarch_short_bit (gdbarch),
- 0, "short_integer");
- lai->string_char_type
- = lai->primitive_type_vector [ada_primitive_type_char]
- = arch_character_type (gdbarch, TARGET_CHAR_BIT, 0, "character");
- lai->primitive_type_vector [ada_primitive_type_float]
- = arch_float_type (gdbarch, gdbarch_float_bit (gdbarch),
- "float", gdbarch_float_format (gdbarch));
- lai->primitive_type_vector [ada_primitive_type_double]
- = arch_float_type (gdbarch, gdbarch_double_bit (gdbarch),
- "long_float", gdbarch_double_format (gdbarch));
- lai->primitive_type_vector [ada_primitive_type_long_long]
- = arch_integer_type (gdbarch, gdbarch_long_long_bit (gdbarch),
- 0, "long_long_integer");
- lai->primitive_type_vector [ada_primitive_type_long_double]
- = arch_float_type (gdbarch, gdbarch_long_double_bit (gdbarch),
- "long_long_float", gdbarch_long_double_format (gdbarch));
- lai->primitive_type_vector [ada_primitive_type_natural]
- = arch_integer_type (gdbarch, gdbarch_int_bit (gdbarch),
- 0, "natural");
- lai->primitive_type_vector [ada_primitive_type_positive]
- = arch_integer_type (gdbarch, gdbarch_int_bit (gdbarch),
- 0, "positive");
- lai->primitive_type_vector [ada_primitive_type_void]
- = builtin->builtin_void;
-
- lai->primitive_type_vector [ada_primitive_type_system_address]
- = lookup_pointer_type (arch_type (gdbarch, TYPE_CODE_VOID, TARGET_CHAR_BIT,
- "void"));
- lai->primitive_type_vector [ada_primitive_type_system_address]
- ->set_name ("system__address");
-
- /* Create the equivalent of the System.Storage_Elements.Storage_Offset
- type. This is a signed integral type whose size is the same as
- the size of addresses. */
- {
- unsigned int addr_length = TYPE_LENGTH
- (lai->primitive_type_vector [ada_primitive_type_system_address]);
-
- lai->primitive_type_vector [ada_primitive_type_storage_offset]
- = arch_integer_type (gdbarch, addr_length * HOST_CHAR_BIT, 0,
- "storage_offset");
- }
-
- lai->bool_type_symbol = NULL;
- lai->bool_type_default = builtin->builtin_bool;
-}
\f
/* Language vector */
1, /* String lower bound */
ada_get_gdb_completer_word_break_characters,
ada_collect_symbol_completion_matches,
- ada_language_arch_info,
ada_watch_location_expression,
ada_get_symbol_name_matcher, /* la_get_symbol_name_matcher */
ada_iterate_over_symbols,
function to work. */
return language_defn::read_var_value (var, var_block, frame);
}
+
+ /* See language.h. */
+ void language_arch_info (struct gdbarch *gdbarch,
+ struct language_arch_info *lai) const override
+ {
+ const struct builtin_type *builtin = builtin_type (gdbarch);
+
+ lai->primitive_type_vector
+ = GDBARCH_OBSTACK_CALLOC (gdbarch, nr_ada_primitive_types + 1,
+ struct type *);
+
+ lai->primitive_type_vector [ada_primitive_type_int]
+ = arch_integer_type (gdbarch, gdbarch_int_bit (gdbarch),
+ 0, "integer");
+ lai->primitive_type_vector [ada_primitive_type_long]
+ = arch_integer_type (gdbarch, gdbarch_long_bit (gdbarch),
+ 0, "long_integer");
+ lai->primitive_type_vector [ada_primitive_type_short]
+ = arch_integer_type (gdbarch, gdbarch_short_bit (gdbarch),
+ 0, "short_integer");
+ lai->string_char_type
+ = lai->primitive_type_vector [ada_primitive_type_char]
+ = arch_character_type (gdbarch, TARGET_CHAR_BIT, 0, "character");
+ lai->primitive_type_vector [ada_primitive_type_float]
+ = arch_float_type (gdbarch, gdbarch_float_bit (gdbarch),
+ "float", gdbarch_float_format (gdbarch));
+ lai->primitive_type_vector [ada_primitive_type_double]
+ = arch_float_type (gdbarch, gdbarch_double_bit (gdbarch),
+ "long_float", gdbarch_double_format (gdbarch));
+ lai->primitive_type_vector [ada_primitive_type_long_long]
+ = arch_integer_type (gdbarch, gdbarch_long_long_bit (gdbarch),
+ 0, "long_long_integer");
+ lai->primitive_type_vector [ada_primitive_type_long_double]
+ = arch_float_type (gdbarch, gdbarch_long_double_bit (gdbarch),
+ "long_long_float", gdbarch_long_double_format (gdbarch));
+ lai->primitive_type_vector [ada_primitive_type_natural]
+ = arch_integer_type (gdbarch, gdbarch_int_bit (gdbarch),
+ 0, "natural");
+ lai->primitive_type_vector [ada_primitive_type_positive]
+ = arch_integer_type (gdbarch, gdbarch_int_bit (gdbarch),
+ 0, "positive");
+ lai->primitive_type_vector [ada_primitive_type_void]
+ = builtin->builtin_void;
+
+ lai->primitive_type_vector [ada_primitive_type_system_address]
+ = lookup_pointer_type (arch_type (gdbarch, TYPE_CODE_VOID, TARGET_CHAR_BIT,
+ "void"));
+ lai->primitive_type_vector [ada_primitive_type_system_address]
+ ->set_name ("system__address");
+
+ /* Create the equivalent of the System.Storage_Elements.Storage_Offset
+ type. This is a signed integral type whose size is the same as
+ the size of addresses. */
+ {
+ unsigned int addr_length = TYPE_LENGTH
+ (lai->primitive_type_vector [ada_primitive_type_system_address]);
+
+ lai->primitive_type_vector [ada_primitive_type_storage_offset]
+ = arch_integer_type (gdbarch, addr_length * HOST_CHAR_BIT, 0,
+ "storage_offset");
+ }
+
+ lai->bool_type_symbol = NULL;
+ lai->bool_type_default = builtin->builtin_bool;
+ }
};
/* Single instance of the Ada language class. */
0, /* String lower bound */
default_word_break_characters,
default_collect_symbol_completion_matches,
- c_language_arch_info,
c_watch_location_expression,
NULL, /* la_get_symbol_name_matcher */
iterate_over_symbols,
c_language ()
: language_defn (language_c, c_language_data)
{ /* Nothing. */ }
+
+ /* See language.h. */
+ void language_arch_info (struct gdbarch *gdbarch,
+ struct language_arch_info *lai) const override
+ {
+ c_language_arch_info (gdbarch, lai);
+ }
};
/* Single instance of the C language class. */
nr_cplus_primitive_types
};
-static void
-cplus_language_arch_info (struct gdbarch *gdbarch,
- struct language_arch_info *lai)
-{
- const struct builtin_type *builtin = builtin_type (gdbarch);
-
- lai->string_char_type = builtin->builtin_char;
- lai->primitive_type_vector
- = GDBARCH_OBSTACK_CALLOC (gdbarch, nr_cplus_primitive_types + 1,
- struct type *);
- lai->primitive_type_vector [cplus_primitive_type_int]
- = builtin->builtin_int;
- lai->primitive_type_vector [cplus_primitive_type_long]
- = builtin->builtin_long;
- lai->primitive_type_vector [cplus_primitive_type_short]
- = builtin->builtin_short;
- lai->primitive_type_vector [cplus_primitive_type_char]
- = builtin->builtin_char;
- lai->primitive_type_vector [cplus_primitive_type_float]
- = builtin->builtin_float;
- lai->primitive_type_vector [cplus_primitive_type_double]
- = builtin->builtin_double;
- lai->primitive_type_vector [cplus_primitive_type_void]
- = builtin->builtin_void;
- lai->primitive_type_vector [cplus_primitive_type_long_long]
- = builtin->builtin_long_long;
- lai->primitive_type_vector [cplus_primitive_type_signed_char]
- = builtin->builtin_signed_char;
- lai->primitive_type_vector [cplus_primitive_type_unsigned_char]
- = builtin->builtin_unsigned_char;
- lai->primitive_type_vector [cplus_primitive_type_unsigned_short]
- = builtin->builtin_unsigned_short;
- lai->primitive_type_vector [cplus_primitive_type_unsigned_int]
- = builtin->builtin_unsigned_int;
- lai->primitive_type_vector [cplus_primitive_type_unsigned_long]
- = builtin->builtin_unsigned_long;
- lai->primitive_type_vector [cplus_primitive_type_unsigned_long_long]
- = builtin->builtin_unsigned_long_long;
- lai->primitive_type_vector [cplus_primitive_type_long_double]
- = builtin->builtin_long_double;
- lai->primitive_type_vector [cplus_primitive_type_complex]
- = builtin->builtin_complex;
- lai->primitive_type_vector [cplus_primitive_type_double_complex]
- = builtin->builtin_double_complex;
- lai->primitive_type_vector [cplus_primitive_type_bool]
- = builtin->builtin_bool;
- lai->primitive_type_vector [cplus_primitive_type_decfloat]
- = builtin->builtin_decfloat;
- lai->primitive_type_vector [cplus_primitive_type_decdouble]
- = builtin->builtin_decdouble;
- lai->primitive_type_vector [cplus_primitive_type_declong]
- = builtin->builtin_declong;
- lai->primitive_type_vector [cplus_primitive_type_char16_t]
- = builtin->builtin_char16;
- lai->primitive_type_vector [cplus_primitive_type_char32_t]
- = builtin->builtin_char32;
- lai->primitive_type_vector [cplus_primitive_type_wchar_t]
- = builtin->builtin_wchar;
-
- lai->bool_type_symbol = "bool";
- lai->bool_type_default = builtin->builtin_bool;
-}
-
static const char *cplus_extensions[] =
{
".C", ".cc", ".cp", ".cpp", ".cxx", ".c++", NULL
0, /* String lower bound */
default_word_break_characters,
default_collect_symbol_completion_matches,
- cplus_language_arch_info,
c_watch_location_expression,
cp_get_symbol_name_matcher,
iterate_over_symbols,
{
return cp_pass_by_reference (type);
}
+
+ /* See language.h. */
+ void language_arch_info (struct gdbarch *gdbarch,
+ struct language_arch_info *lai) const override
+ {
+ const struct builtin_type *builtin = builtin_type (gdbarch);
+
+ lai->string_char_type = builtin->builtin_char;
+ lai->primitive_type_vector
+ = GDBARCH_OBSTACK_CALLOC (gdbarch, nr_cplus_primitive_types + 1,
+ struct type *);
+ lai->primitive_type_vector [cplus_primitive_type_int]
+ = builtin->builtin_int;
+ lai->primitive_type_vector [cplus_primitive_type_long]
+ = builtin->builtin_long;
+ lai->primitive_type_vector [cplus_primitive_type_short]
+ = builtin->builtin_short;
+ lai->primitive_type_vector [cplus_primitive_type_char]
+ = builtin->builtin_char;
+ lai->primitive_type_vector [cplus_primitive_type_float]
+ = builtin->builtin_float;
+ lai->primitive_type_vector [cplus_primitive_type_double]
+ = builtin->builtin_double;
+ lai->primitive_type_vector [cplus_primitive_type_void]
+ = builtin->builtin_void;
+ lai->primitive_type_vector [cplus_primitive_type_long_long]
+ = builtin->builtin_long_long;
+ lai->primitive_type_vector [cplus_primitive_type_signed_char]
+ = builtin->builtin_signed_char;
+ lai->primitive_type_vector [cplus_primitive_type_unsigned_char]
+ = builtin->builtin_unsigned_char;
+ lai->primitive_type_vector [cplus_primitive_type_unsigned_short]
+ = builtin->builtin_unsigned_short;
+ lai->primitive_type_vector [cplus_primitive_type_unsigned_int]
+ = builtin->builtin_unsigned_int;
+ lai->primitive_type_vector [cplus_primitive_type_unsigned_long]
+ = builtin->builtin_unsigned_long;
+ lai->primitive_type_vector [cplus_primitive_type_unsigned_long_long]
+ = builtin->builtin_unsigned_long_long;
+ lai->primitive_type_vector [cplus_primitive_type_long_double]
+ = builtin->builtin_long_double;
+ lai->primitive_type_vector [cplus_primitive_type_complex]
+ = builtin->builtin_complex;
+ lai->primitive_type_vector [cplus_primitive_type_double_complex]
+ = builtin->builtin_double_complex;
+ lai->primitive_type_vector [cplus_primitive_type_bool]
+ = builtin->builtin_bool;
+ lai->primitive_type_vector [cplus_primitive_type_decfloat]
+ = builtin->builtin_decfloat;
+ lai->primitive_type_vector [cplus_primitive_type_decdouble]
+ = builtin->builtin_decdouble;
+ lai->primitive_type_vector [cplus_primitive_type_declong]
+ = builtin->builtin_declong;
+ lai->primitive_type_vector [cplus_primitive_type_char16_t]
+ = builtin->builtin_char16;
+ lai->primitive_type_vector [cplus_primitive_type_char32_t]
+ = builtin->builtin_char32;
+ lai->primitive_type_vector [cplus_primitive_type_wchar_t]
+ = builtin->builtin_wchar;
+
+ lai->bool_type_symbol = "bool";
+ lai->bool_type_default = builtin->builtin_bool;
+ }
};
/* The single instance of the C++ language class. */
0, /* String lower bound */
default_word_break_characters,
default_collect_symbol_completion_matches,
- c_language_arch_info, /* FIXME: la_language_arch_info. */
c_watch_location_expression,
NULL, /* la_get_symbol_name_matcher */
iterate_over_symbols,
asm_language ()
: language_defn (language_asm, asm_language_data)
{ /* Nothing. */ }
+
+ /* See language.h.
+
+ FIXME: Should this have its own arch info method? */
+ void language_arch_info (struct gdbarch *gdbarch,
+ struct language_arch_info *lai) const override
+ {
+ c_language_arch_info (gdbarch, lai);
+ }
};
/* The single instance of the ASM language class. */
0, /* String lower bound */
default_word_break_characters,
default_collect_symbol_completion_matches,
- c_language_arch_info,
c_watch_location_expression,
NULL, /* la_get_symbol_name_matcher */
iterate_over_symbols,
minimal_language ()
: language_defn (language_minimal, minimal_language_data)
{ /* Nothing. */ }
+
+ /* See language.h. */
+ void language_arch_info (struct gdbarch *gdbarch,
+ struct language_arch_info *lai) const override
+ {
+ c_language_arch_info (gdbarch, lai);
+ }
};
/* The single instance of the minimal language class. */
nr_d_primitive_types
};
-/* Implements the la_language_arch_info language_defn routine
- for language D. */
-
-static void
-d_language_arch_info (struct gdbarch *gdbarch,
- struct language_arch_info *lai)
-{
- const struct builtin_d_type *builtin = builtin_d_type (gdbarch);
-
- lai->string_char_type = builtin->builtin_char;
- lai->primitive_type_vector
- = GDBARCH_OBSTACK_CALLOC (gdbarch, nr_d_primitive_types + 1,
- struct type *);
-
- lai->primitive_type_vector [d_primitive_type_void]
- = builtin->builtin_void;
- lai->primitive_type_vector [d_primitive_type_bool]
- = builtin->builtin_bool;
- lai->primitive_type_vector [d_primitive_type_byte]
- = builtin->builtin_byte;
- lai->primitive_type_vector [d_primitive_type_ubyte]
- = builtin->builtin_ubyte;
- lai->primitive_type_vector [d_primitive_type_short]
- = builtin->builtin_short;
- lai->primitive_type_vector [d_primitive_type_ushort]
- = builtin->builtin_ushort;
- lai->primitive_type_vector [d_primitive_type_int]
- = builtin->builtin_int;
- lai->primitive_type_vector [d_primitive_type_uint]
- = builtin->builtin_uint;
- lai->primitive_type_vector [d_primitive_type_long]
- = builtin->builtin_long;
- lai->primitive_type_vector [d_primitive_type_ulong]
- = builtin->builtin_ulong;
- lai->primitive_type_vector [d_primitive_type_cent]
- = builtin->builtin_cent;
- lai->primitive_type_vector [d_primitive_type_ucent]
- = builtin->builtin_ucent;
- lai->primitive_type_vector [d_primitive_type_float]
- = builtin->builtin_float;
- lai->primitive_type_vector [d_primitive_type_double]
- = builtin->builtin_double;
- lai->primitive_type_vector [d_primitive_type_real]
- = builtin->builtin_real;
- lai->primitive_type_vector [d_primitive_type_ifloat]
- = builtin->builtin_ifloat;
- lai->primitive_type_vector [d_primitive_type_idouble]
- = builtin->builtin_idouble;
- lai->primitive_type_vector [d_primitive_type_ireal]
- = builtin->builtin_ireal;
- lai->primitive_type_vector [d_primitive_type_cfloat]
- = builtin->builtin_cfloat;
- lai->primitive_type_vector [d_primitive_type_cdouble]
- = builtin->builtin_cdouble;
- lai->primitive_type_vector [d_primitive_type_creal]
- = builtin->builtin_creal;
- lai->primitive_type_vector [d_primitive_type_char]
- = builtin->builtin_char;
- lai->primitive_type_vector [d_primitive_type_wchar]
- = builtin->builtin_wchar;
- lai->primitive_type_vector [d_primitive_type_dchar]
- = builtin->builtin_dchar;
-
- lai->bool_type_symbol = "bool";
- lai->bool_type_default = builtin->builtin_bool;
-}
-
static const char *d_extensions[] =
{
".d", NULL
0, /* String lower bound. */
default_word_break_characters,
default_collect_symbol_completion_matches,
- d_language_arch_info,
c_watch_location_expression,
NULL, /* la_get_symbol_name_matcher */
iterate_over_symbols,
d_language ()
: language_defn (language_d, d_language_data)
{ /* Nothing. */ }
+
+ /* See language.h. */
+ void language_arch_info (struct gdbarch *gdbarch,
+ struct language_arch_info *lai) const override
+ {
+ const struct builtin_d_type *builtin = builtin_d_type (gdbarch);
+
+ lai->string_char_type = builtin->builtin_char;
+ lai->primitive_type_vector
+ = GDBARCH_OBSTACK_CALLOC (gdbarch, nr_d_primitive_types + 1,
+ struct type *);
+
+ lai->primitive_type_vector [d_primitive_type_void]
+ = builtin->builtin_void;
+ lai->primitive_type_vector [d_primitive_type_bool]
+ = builtin->builtin_bool;
+ lai->primitive_type_vector [d_primitive_type_byte]
+ = builtin->builtin_byte;
+ lai->primitive_type_vector [d_primitive_type_ubyte]
+ = builtin->builtin_ubyte;
+ lai->primitive_type_vector [d_primitive_type_short]
+ = builtin->builtin_short;
+ lai->primitive_type_vector [d_primitive_type_ushort]
+ = builtin->builtin_ushort;
+ lai->primitive_type_vector [d_primitive_type_int]
+ = builtin->builtin_int;
+ lai->primitive_type_vector [d_primitive_type_uint]
+ = builtin->builtin_uint;
+ lai->primitive_type_vector [d_primitive_type_long]
+ = builtin->builtin_long;
+ lai->primitive_type_vector [d_primitive_type_ulong]
+ = builtin->builtin_ulong;
+ lai->primitive_type_vector [d_primitive_type_cent]
+ = builtin->builtin_cent;
+ lai->primitive_type_vector [d_primitive_type_ucent]
+ = builtin->builtin_ucent;
+ lai->primitive_type_vector [d_primitive_type_float]
+ = builtin->builtin_float;
+ lai->primitive_type_vector [d_primitive_type_double]
+ = builtin->builtin_double;
+ lai->primitive_type_vector [d_primitive_type_real]
+ = builtin->builtin_real;
+ lai->primitive_type_vector [d_primitive_type_ifloat]
+ = builtin->builtin_ifloat;
+ lai->primitive_type_vector [d_primitive_type_idouble]
+ = builtin->builtin_idouble;
+ lai->primitive_type_vector [d_primitive_type_ireal]
+ = builtin->builtin_ireal;
+ lai->primitive_type_vector [d_primitive_type_cfloat]
+ = builtin->builtin_cfloat;
+ lai->primitive_type_vector [d_primitive_type_cdouble]
+ = builtin->builtin_cdouble;
+ lai->primitive_type_vector [d_primitive_type_creal]
+ = builtin->builtin_creal;
+ lai->primitive_type_vector [d_primitive_type_char]
+ = builtin->builtin_char;
+ lai->primitive_type_vector [d_primitive_type_wchar]
+ = builtin->builtin_wchar;
+ lai->primitive_type_vector [d_primitive_type_dchar]
+ = builtin->builtin_dchar;
+
+ lai->bool_type_symbol = "bool";
+ lai->bool_type_default = builtin->builtin_bool;
+ }
};
/* Single instance of the D language class. */
nr_f_primitive_types
};
-static void
-f_language_arch_info (struct gdbarch *gdbarch,
- struct language_arch_info *lai)
-{
- const struct builtin_f_type *builtin = builtin_f_type (gdbarch);
-
- lai->string_char_type = builtin->builtin_character;
- lai->primitive_type_vector
- = GDBARCH_OBSTACK_CALLOC (gdbarch, nr_f_primitive_types + 1,
- struct type *);
-
- lai->primitive_type_vector [f_primitive_type_character]
- = builtin->builtin_character;
- lai->primitive_type_vector [f_primitive_type_logical]
- = builtin->builtin_logical;
- lai->primitive_type_vector [f_primitive_type_logical_s1]
- = builtin->builtin_logical_s1;
- lai->primitive_type_vector [f_primitive_type_logical_s2]
- = builtin->builtin_logical_s2;
- lai->primitive_type_vector [f_primitive_type_logical_s8]
- = builtin->builtin_logical_s8;
- lai->primitive_type_vector [f_primitive_type_real]
- = builtin->builtin_real;
- lai->primitive_type_vector [f_primitive_type_real_s8]
- = builtin->builtin_real_s8;
- lai->primitive_type_vector [f_primitive_type_real_s16]
- = builtin->builtin_real_s16;
- lai->primitive_type_vector [f_primitive_type_complex_s8]
- = builtin->builtin_complex_s8;
- lai->primitive_type_vector [f_primitive_type_complex_s16]
- = builtin->builtin_complex_s16;
- lai->primitive_type_vector [f_primitive_type_void]
- = builtin->builtin_void;
-
- lai->bool_type_symbol = "logical";
- lai->bool_type_default = builtin->builtin_logical_s2;
-}
-
/* Remove the modules separator :: from the default break list. */
static const char *
1, /* String lower bound */
f_word_break_characters,
f_collect_symbol_completion_matches,
- f_language_arch_info,
c_watch_location_expression,
cp_get_symbol_name_matcher, /* la_get_symbol_name_matcher */
iterate_over_symbols,
f_language ()
: language_defn (language_fortran, f_language_data)
{ /* Nothing. */ }
+
+ /* See language.h. */
+ void language_arch_info (struct gdbarch *gdbarch,
+ struct language_arch_info *lai) const override
+ {
+ const struct builtin_f_type *builtin = builtin_f_type (gdbarch);
+
+ lai->string_char_type = builtin->builtin_character;
+ lai->primitive_type_vector
+ = GDBARCH_OBSTACK_CALLOC (gdbarch, nr_f_primitive_types + 1,
+ struct type *);
+
+ lai->primitive_type_vector [f_primitive_type_character]
+ = builtin->builtin_character;
+ lai->primitive_type_vector [f_primitive_type_logical]
+ = builtin->builtin_logical;
+ lai->primitive_type_vector [f_primitive_type_logical_s1]
+ = builtin->builtin_logical_s1;
+ lai->primitive_type_vector [f_primitive_type_logical_s2]
+ = builtin->builtin_logical_s2;
+ lai->primitive_type_vector [f_primitive_type_logical_s8]
+ = builtin->builtin_logical_s8;
+ lai->primitive_type_vector [f_primitive_type_real]
+ = builtin->builtin_real;
+ lai->primitive_type_vector [f_primitive_type_real_s8]
+ = builtin->builtin_real_s8;
+ lai->primitive_type_vector [f_primitive_type_real_s16]
+ = builtin->builtin_real_s16;
+ lai->primitive_type_vector [f_primitive_type_complex_s8]
+ = builtin->builtin_complex_s8;
+ lai->primitive_type_vector [f_primitive_type_complex_s16]
+ = builtin->builtin_complex_s16;
+ lai->primitive_type_vector [f_primitive_type_void]
+ = builtin->builtin_void;
+
+ lai->bool_type_symbol = "logical";
+ lai->bool_type_default = builtin->builtin_logical_s2;
+ }
};
/* Single instance of the Fortran language class. */
nr_go_primitive_types
};
-static void
-go_language_arch_info (struct gdbarch *gdbarch,
- struct language_arch_info *lai)
-{
- const struct builtin_go_type *builtin = builtin_go_type (gdbarch);
-
- lai->string_char_type = builtin->builtin_char;
-
- lai->primitive_type_vector
- = GDBARCH_OBSTACK_CALLOC (gdbarch, nr_go_primitive_types + 1,
- struct type *);
-
- lai->primitive_type_vector [go_primitive_type_void]
- = builtin->builtin_void;
- lai->primitive_type_vector [go_primitive_type_char]
- = builtin->builtin_char;
- lai->primitive_type_vector [go_primitive_type_bool]
- = builtin->builtin_bool;
- lai->primitive_type_vector [go_primitive_type_int]
- = builtin->builtin_int;
- lai->primitive_type_vector [go_primitive_type_uint]
- = builtin->builtin_uint;
- lai->primitive_type_vector [go_primitive_type_uintptr]
- = builtin->builtin_uintptr;
- lai->primitive_type_vector [go_primitive_type_int8]
- = builtin->builtin_int8;
- lai->primitive_type_vector [go_primitive_type_int16]
- = builtin->builtin_int16;
- lai->primitive_type_vector [go_primitive_type_int32]
- = builtin->builtin_int32;
- lai->primitive_type_vector [go_primitive_type_int64]
- = builtin->builtin_int64;
- lai->primitive_type_vector [go_primitive_type_uint8]
- = builtin->builtin_uint8;
- lai->primitive_type_vector [go_primitive_type_uint16]
- = builtin->builtin_uint16;
- lai->primitive_type_vector [go_primitive_type_uint32]
- = builtin->builtin_uint32;
- lai->primitive_type_vector [go_primitive_type_uint64]
- = builtin->builtin_uint64;
- lai->primitive_type_vector [go_primitive_type_float32]
- = builtin->builtin_float32;
- lai->primitive_type_vector [go_primitive_type_float64]
- = builtin->builtin_float64;
- lai->primitive_type_vector [go_primitive_type_complex64]
- = builtin->builtin_complex64;
- lai->primitive_type_vector [go_primitive_type_complex128]
- = builtin->builtin_complex128;
-
- lai->bool_type_symbol = "bool";
- lai->bool_type_default = builtin->builtin_bool;
-}
-
/* Constant data that describes the Go language. */
extern const struct language_data go_language_data =
0, /* String lower bound. */
default_word_break_characters,
default_collect_symbol_completion_matches,
- go_language_arch_info,
c_watch_location_expression,
NULL, /* la_get_symbol_name_matcher */
iterate_over_symbols,
go_language ()
: language_defn (language_go, go_language_data)
{ /* Nothing. */ }
+
+ /* See language.h. */
+ void language_arch_info (struct gdbarch *gdbarch,
+ struct language_arch_info *lai) const override
+ {
+ const struct builtin_go_type *builtin = builtin_go_type (gdbarch);
+
+ lai->string_char_type = builtin->builtin_char;
+
+ lai->primitive_type_vector
+ = GDBARCH_OBSTACK_CALLOC (gdbarch, nr_go_primitive_types + 1,
+ struct type *);
+
+ lai->primitive_type_vector [go_primitive_type_void]
+ = builtin->builtin_void;
+ lai->primitive_type_vector [go_primitive_type_char]
+ = builtin->builtin_char;
+ lai->primitive_type_vector [go_primitive_type_bool]
+ = builtin->builtin_bool;
+ lai->primitive_type_vector [go_primitive_type_int]
+ = builtin->builtin_int;
+ lai->primitive_type_vector [go_primitive_type_uint]
+ = builtin->builtin_uint;
+ lai->primitive_type_vector [go_primitive_type_uintptr]
+ = builtin->builtin_uintptr;
+ lai->primitive_type_vector [go_primitive_type_int8]
+ = builtin->builtin_int8;
+ lai->primitive_type_vector [go_primitive_type_int16]
+ = builtin->builtin_int16;
+ lai->primitive_type_vector [go_primitive_type_int32]
+ = builtin->builtin_int32;
+ lai->primitive_type_vector [go_primitive_type_int64]
+ = builtin->builtin_int64;
+ lai->primitive_type_vector [go_primitive_type_uint8]
+ = builtin->builtin_uint8;
+ lai->primitive_type_vector [go_primitive_type_uint16]
+ = builtin->builtin_uint16;
+ lai->primitive_type_vector [go_primitive_type_uint32]
+ = builtin->builtin_uint32;
+ lai->primitive_type_vector [go_primitive_type_uint64]
+ = builtin->builtin_uint64;
+ lai->primitive_type_vector [go_primitive_type_float32]
+ = builtin->builtin_float32;
+ lai->primitive_type_vector [go_primitive_type_float64]
+ = builtin->builtin_float64;
+ lai->primitive_type_vector [go_primitive_type_complex64]
+ = builtin->builtin_complex64;
+ lai->primitive_type_vector [go_primitive_type_complex128]
+ = builtin->builtin_complex128;
+
+ lai->bool_type_symbol = "bool";
+ lai->bool_type_default = builtin->builtin_bool;
+ }
};
/* Single instance of the Go language class. */
0, /* String lower bound */
default_word_break_characters,
default_collect_symbol_completion_matches,
- unknown_language_arch_info, /* la_language_arch_info. */
c_watch_location_expression,
NULL, /* la_get_symbol_name_matcher */
iterate_over_symbols,
unknown_language ()
: language_defn (language_unknown, unknown_language_data)
{ /* Nothing. */ }
+
+ /* See language.h. */
+ void language_arch_info (struct gdbarch *gdbarch,
+ struct language_arch_info *lai) const override
+ {
+ unknown_language_arch_info (gdbarch, lai);
+ }
};
/* Single instance of the unknown language class. */
0, /* String lower bound */
default_word_break_characters,
default_collect_symbol_completion_matches,
- unknown_language_arch_info, /* la_language_arch_info. */
c_watch_location_expression,
NULL, /* la_get_symbol_name_matcher */
iterate_over_symbols,
auto_language ()
: language_defn (language_auto, auto_language_data)
{ /* Nothing. */ }
+
+ /* See language.h. */
+ void language_arch_info (struct gdbarch *gdbarch,
+ struct language_arch_info *lai) const override
+ {
+ unknown_language_arch_info (gdbarch, lai);
+ }
};
/* Single instance of the fake "auto" language. */
l = GDBARCH_OBSTACK_ZALLOC (gdbarch, struct language_gdbarch);
for (const auto &lang : language_defn::languages)
- if (lang != NULL && lang->la_language_arch_info != NULL)
- {
- lang->la_language_arch_info (gdbarch,
- l->arch_info + lang->la_language);
- }
+ {
+ gdb_assert (lang != nullptr);
+ lang->language_arch_info (gdbarch,
+ l->arch_info + lang->la_language);
+ }
return l;
}
const char *word,
enum type_code code);
- /* The per-architecture (OS/ABI) language information. */
- void (*la_language_arch_info) (struct gdbarch *,
- struct language_arch_info *);
-
/* Return an expression that can be used for a location
watchpoint. TYPE is a pointer type that points to the memory
to watch, and ADDR is the address of the watched memory. */
return {};
}
+ /* The per-architecture (OS/ABI) language information. */
+
+ virtual void language_arch_info (struct gdbarch *,
+ struct language_arch_info *) const = 0;
+
/* List of all known languages. */
static const struct language_defn *languages[nr_languages];
};
nr_m2_primitive_types
};
-static void
-m2_language_arch_info (struct gdbarch *gdbarch,
- struct language_arch_info *lai)
-{
- const struct builtin_m2_type *builtin = builtin_m2_type (gdbarch);
-
- lai->string_char_type = builtin->builtin_char;
- lai->primitive_type_vector
- = GDBARCH_OBSTACK_CALLOC (gdbarch, nr_m2_primitive_types + 1,
- struct type *);
-
- lai->primitive_type_vector [m2_primitive_type_char]
- = builtin->builtin_char;
- lai->primitive_type_vector [m2_primitive_type_int]
- = builtin->builtin_int;
- lai->primitive_type_vector [m2_primitive_type_card]
- = builtin->builtin_card;
- lai->primitive_type_vector [m2_primitive_type_real]
- = builtin->builtin_real;
- lai->primitive_type_vector [m2_primitive_type_bool]
- = builtin->builtin_bool;
-
- lai->bool_type_symbol = "BOOLEAN";
- lai->bool_type_default = builtin->builtin_bool;
-}
-
const struct exp_descriptor exp_descriptor_modula2 =
{
print_subexp_standard,
0, /* String lower bound */
default_word_break_characters,
default_collect_symbol_completion_matches,
- m2_language_arch_info,
c_watch_location_expression,
NULL, /* la_get_symbol_name_matcher */
iterate_over_symbols,
m2_language ()
: language_defn (language_m2, m2_language_data)
{ /* Nothing. */ }
+
+ /* See language.h. */
+ void language_arch_info (struct gdbarch *gdbarch,
+ struct language_arch_info *lai) const override
+ {
+ const struct builtin_m2_type *builtin = builtin_m2_type (gdbarch);
+
+ lai->string_char_type = builtin->builtin_char;
+ lai->primitive_type_vector
+ = GDBARCH_OBSTACK_CALLOC (gdbarch, nr_m2_primitive_types + 1,
+ struct type *);
+
+ lai->primitive_type_vector [m2_primitive_type_char]
+ = builtin->builtin_char;
+ lai->primitive_type_vector [m2_primitive_type_int]
+ = builtin->builtin_int;
+ lai->primitive_type_vector [m2_primitive_type_card]
+ = builtin->builtin_card;
+ lai->primitive_type_vector [m2_primitive_type_real]
+ = builtin->builtin_real;
+ lai->primitive_type_vector [m2_primitive_type_bool]
+ = builtin->builtin_bool;
+
+ lai->bool_type_symbol = "BOOLEAN";
+ lai->bool_type_default = builtin->builtin_bool;
+ }
};
/* Single instance of the M2 language. */
0, /* String lower bound */
default_word_break_characters,
default_collect_symbol_completion_matches,
- c_language_arch_info,
c_watch_location_expression,
NULL, /* la_get_symbol_name_matcher */
iterate_over_symbols,
objc_language ()
: language_defn (language_objc, objc_language_data)
{ /* Nothing. */ }
+
+ /* See language.h. */
+ void language_arch_info (struct gdbarch *gdbarch,
+ struct language_arch_info *lai) const override
+ {
+ c_language_arch_info (gdbarch, lai);
+ }
};
/* Single instance of the class representing the Objective-C language. */
c_print_type (type, varstring, stream, show, level, flags);
}
-static void
-opencl_language_arch_info (struct gdbarch *gdbarch,
- struct language_arch_info *lai)
-{
- struct type **types = builtin_opencl_type (gdbarch);
-
- /* Copy primitive types vector from gdbarch. */
- lai->primitive_type_vector = types;
-
- /* Type of elements of strings. */
- lai->string_char_type = types [opencl_primitive_type_char];
-
- /* Specifies the return type of logical and relational operations. */
- lai->bool_type_symbol = "int";
- lai->bool_type_default = types [opencl_primitive_type_int];
-}
-
const struct exp_descriptor exp_descriptor_opencl =
{
print_subexp_standard,
0, /* String lower bound */
default_word_break_characters,
default_collect_symbol_completion_matches,
- opencl_language_arch_info,
c_watch_location_expression,
NULL, /* la_get_symbol_name_matcher */
iterate_over_symbols,
opencl_language ()
: language_defn (language_opencl, opencl_language_data)
{ /* Nothing. */ }
+
+ /* See language.h. */
+ void language_arch_info (struct gdbarch *gdbarch,
+ struct language_arch_info *lai) const override
+ {
+ struct type **types = builtin_opencl_type (gdbarch);
+
+ /* Copy primitive types vector from gdbarch. */
+ lai->primitive_type_vector = types;
+
+ /* Type of elements of strings. */
+ lai->string_char_type = types [opencl_primitive_type_char];
+
+ /* Specifies the return type of logical and relational operations. */
+ lai->bool_type_symbol = "int";
+ lai->bool_type_default = types [opencl_primitive_type_int];
+ }
};
/* Single instance of the OpenCL language class. */
nr_pascal_primitive_types
};
-static void
-pascal_language_arch_info (struct gdbarch *gdbarch,
- struct language_arch_info *lai)
-{
- const struct builtin_type *builtin = builtin_type (gdbarch);
-
- lai->string_char_type = builtin->builtin_char;
- lai->primitive_type_vector
- = GDBARCH_OBSTACK_CALLOC (gdbarch, nr_pascal_primitive_types + 1,
- struct type *);
- lai->primitive_type_vector [pascal_primitive_type_int]
- = builtin->builtin_int;
- lai->primitive_type_vector [pascal_primitive_type_long]
- = builtin->builtin_long;
- lai->primitive_type_vector [pascal_primitive_type_short]
- = builtin->builtin_short;
- lai->primitive_type_vector [pascal_primitive_type_char]
- = builtin->builtin_char;
- lai->primitive_type_vector [pascal_primitive_type_float]
- = builtin->builtin_float;
- lai->primitive_type_vector [pascal_primitive_type_double]
- = builtin->builtin_double;
- lai->primitive_type_vector [pascal_primitive_type_void]
- = builtin->builtin_void;
- lai->primitive_type_vector [pascal_primitive_type_long_long]
- = builtin->builtin_long_long;
- lai->primitive_type_vector [pascal_primitive_type_signed_char]
- = builtin->builtin_signed_char;
- lai->primitive_type_vector [pascal_primitive_type_unsigned_char]
- = builtin->builtin_unsigned_char;
- lai->primitive_type_vector [pascal_primitive_type_unsigned_short]
- = builtin->builtin_unsigned_short;
- lai->primitive_type_vector [pascal_primitive_type_unsigned_int]
- = builtin->builtin_unsigned_int;
- lai->primitive_type_vector [pascal_primitive_type_unsigned_long]
- = builtin->builtin_unsigned_long;
- lai->primitive_type_vector [pascal_primitive_type_unsigned_long_long]
- = builtin->builtin_unsigned_long_long;
- lai->primitive_type_vector [pascal_primitive_type_long_double]
- = builtin->builtin_long_double;
- lai->primitive_type_vector [pascal_primitive_type_complex]
- = builtin->builtin_complex;
- lai->primitive_type_vector [pascal_primitive_type_double_complex]
- = builtin->builtin_double_complex;
-
- lai->bool_type_symbol = "boolean";
- lai->bool_type_default = builtin->builtin_bool;
-}
-
static const char *p_extensions[] =
{
".pas", ".p", ".pp", NULL
0, /* String lower bound */
default_word_break_characters,
default_collect_symbol_completion_matches,
- pascal_language_arch_info,
c_watch_location_expression,
NULL, /* la_compare_symbol_for_completion */
iterate_over_symbols,
pascal_language ()
: language_defn (language_pascal, pascal_language_data)
{ /* Nothing. */ }
+
+ /* See language.h. */
+ void language_arch_info (struct gdbarch *gdbarch,
+ struct language_arch_info *lai) const override
+ {
+ const struct builtin_type *builtin = builtin_type (gdbarch);
+
+ lai->string_char_type = builtin->builtin_char;
+ lai->primitive_type_vector
+ = GDBARCH_OBSTACK_CALLOC (gdbarch, nr_pascal_primitive_types + 1,
+ struct type *);
+ lai->primitive_type_vector [pascal_primitive_type_int]
+ = builtin->builtin_int;
+ lai->primitive_type_vector [pascal_primitive_type_long]
+ = builtin->builtin_long;
+ lai->primitive_type_vector [pascal_primitive_type_short]
+ = builtin->builtin_short;
+ lai->primitive_type_vector [pascal_primitive_type_char]
+ = builtin->builtin_char;
+ lai->primitive_type_vector [pascal_primitive_type_float]
+ = builtin->builtin_float;
+ lai->primitive_type_vector [pascal_primitive_type_double]
+ = builtin->builtin_double;
+ lai->primitive_type_vector [pascal_primitive_type_void]
+ = builtin->builtin_void;
+ lai->primitive_type_vector [pascal_primitive_type_long_long]
+ = builtin->builtin_long_long;
+ lai->primitive_type_vector [pascal_primitive_type_signed_char]
+ = builtin->builtin_signed_char;
+ lai->primitive_type_vector [pascal_primitive_type_unsigned_char]
+ = builtin->builtin_unsigned_char;
+ lai->primitive_type_vector [pascal_primitive_type_unsigned_short]
+ = builtin->builtin_unsigned_short;
+ lai->primitive_type_vector [pascal_primitive_type_unsigned_int]
+ = builtin->builtin_unsigned_int;
+ lai->primitive_type_vector [pascal_primitive_type_unsigned_long]
+ = builtin->builtin_unsigned_long;
+ lai->primitive_type_vector [pascal_primitive_type_unsigned_long_long]
+ = builtin->builtin_unsigned_long_long;
+ lai->primitive_type_vector [pascal_primitive_type_long_double]
+ = builtin->builtin_long_double;
+ lai->primitive_type_vector [pascal_primitive_type_complex]
+ = builtin->builtin_complex;
+ lai->primitive_type_vector [pascal_primitive_type_double_complex]
+ = builtin->builtin_double_complex;
+
+ lai->bool_type_symbol = "boolean";
+ lai->bool_type_default = builtin->builtin_bool;
+ }
};
/* Single instance of the Pascal language class. */
nr_rust_primitive_types
};
-/* la_language_arch_info implementation for Rust. */
-
-static void
-rust_language_arch_info (struct gdbarch *gdbarch,
- struct language_arch_info *lai)
-{
- const struct builtin_type *builtin = builtin_type (gdbarch);
- struct type *tem;
- struct type **types;
- unsigned int length;
-
- types = GDBARCH_OBSTACK_CALLOC (gdbarch, nr_rust_primitive_types + 1,
- struct type *);
-
- types[rust_primitive_bool] = arch_boolean_type (gdbarch, 8, 1, "bool");
- types[rust_primitive_char] = arch_character_type (gdbarch, 32, 1, "char");
- types[rust_primitive_i8] = arch_integer_type (gdbarch, 8, 0, "i8");
- types[rust_primitive_u8] = arch_integer_type (gdbarch, 8, 1, "u8");
- types[rust_primitive_i16] = arch_integer_type (gdbarch, 16, 0, "i16");
- types[rust_primitive_u16] = arch_integer_type (gdbarch, 16, 1, "u16");
- types[rust_primitive_i32] = arch_integer_type (gdbarch, 32, 0, "i32");
- types[rust_primitive_u32] = arch_integer_type (gdbarch, 32, 1, "u32");
- types[rust_primitive_i64] = arch_integer_type (gdbarch, 64, 0, "i64");
- types[rust_primitive_u64] = arch_integer_type (gdbarch, 64, 1, "u64");
-
- length = 8 * TYPE_LENGTH (builtin->builtin_data_ptr);
- types[rust_primitive_isize] = arch_integer_type (gdbarch, length, 0, "isize");
- types[rust_primitive_usize] = arch_integer_type (gdbarch, length, 1, "usize");
-
- types[rust_primitive_f32] = arch_float_type (gdbarch, 32, "f32",
- floatformats_ieee_single);
- types[rust_primitive_f64] = arch_float_type (gdbarch, 64, "f64",
- floatformats_ieee_double);
-
- types[rust_primitive_unit] = arch_integer_type (gdbarch, 0, 1, "()");
-
- tem = make_cv_type (1, 0, types[rust_primitive_u8], NULL);
- types[rust_primitive_str] = rust_slice_type ("&str", tem,
- types[rust_primitive_usize]);
-
- lai->primitive_type_vector = types;
- lai->bool_type_default = types[rust_primitive_bool];
- lai->string_char_type = types[rust_primitive_u8];
-}
-
\f
/* A helper for rust_evaluate_subexp that handles OP_FUNCALL. */
0, /* String lower bound */
default_word_break_characters,
default_collect_symbol_completion_matches,
- rust_language_arch_info,
rust_watch_location_expression,
NULL, /* la_get_symbol_name_matcher */
iterate_over_symbols,
rust_language ()
: language_defn (language_rust, rust_language_data)
{ /* Nothing. */ }
+
+ /* See language.h. */
+ void language_arch_info (struct gdbarch *gdbarch,
+ struct language_arch_info *lai) const override
+ {
+ const struct builtin_type *builtin = builtin_type (gdbarch);
+
+ struct type **types
+ = GDBARCH_OBSTACK_CALLOC (gdbarch, nr_rust_primitive_types + 1,
+ struct type *);
+
+ types[rust_primitive_bool] = arch_boolean_type (gdbarch, 8, 1, "bool");
+ types[rust_primitive_char] = arch_character_type (gdbarch, 32, 1, "char");
+ types[rust_primitive_i8] = arch_integer_type (gdbarch, 8, 0, "i8");
+ types[rust_primitive_u8] = arch_integer_type (gdbarch, 8, 1, "u8");
+ types[rust_primitive_i16] = arch_integer_type (gdbarch, 16, 0, "i16");
+ types[rust_primitive_u16] = arch_integer_type (gdbarch, 16, 1, "u16");
+ types[rust_primitive_i32] = arch_integer_type (gdbarch, 32, 0, "i32");
+ types[rust_primitive_u32] = arch_integer_type (gdbarch, 32, 1, "u32");
+ types[rust_primitive_i64] = arch_integer_type (gdbarch, 64, 0, "i64");
+ types[rust_primitive_u64] = arch_integer_type (gdbarch, 64, 1, "u64");
+
+ unsigned int length = 8 * TYPE_LENGTH (builtin->builtin_data_ptr);
+ types[rust_primitive_isize] = arch_integer_type (gdbarch, length, 0, "isize");
+ types[rust_primitive_usize] = arch_integer_type (gdbarch, length, 1, "usize");
+
+ types[rust_primitive_f32] = arch_float_type (gdbarch, 32, "f32",
+ floatformats_ieee_single);
+ types[rust_primitive_f64] = arch_float_type (gdbarch, 64, "f64",
+ floatformats_ieee_double);
+
+ types[rust_primitive_unit] = arch_integer_type (gdbarch, 0, 1, "()");
+
+ struct type *tem = make_cv_type (1, 0, types[rust_primitive_u8], NULL);
+ types[rust_primitive_str] = rust_slice_type ("&str", tem,
+ types[rust_primitive_usize]);
+
+ lai->primitive_type_vector = types;
+ lai->bool_type_default = types[rust_primitive_bool];
+ lai->string_char_type = types[rust_primitive_u8];
+ }
};
/* Single instance of the Rust language class. */