- /* Assorted Types and Interfaces */
-
-struct type *builtin_type_ada_int;
-struct type *builtin_type_ada_short;
-struct type *builtin_type_ada_long;
-struct type *builtin_type_ada_long_long;
-struct type *builtin_type_ada_char;
-struct type *builtin_type_ada_float;
-struct type *builtin_type_ada_double;
-struct type *builtin_type_ada_long_double;
-struct type *builtin_type_ada_natural;
-struct type *builtin_type_ada_positive;
-struct type *builtin_type_ada_system_address;
-
-struct type **const (ada_builtin_types[]) =
-{
- &builtin_type_ada_int,
- &builtin_type_ada_long,
- &builtin_type_ada_short,
- &builtin_type_ada_char,
- &builtin_type_ada_float,
- &builtin_type_ada_double,
- &builtin_type_ada_long_long,
- &builtin_type_ada_long_double,
- &builtin_type_ada_natural, &builtin_type_ada_positive,
- /* The following types are carried over from C for convenience. */
-&builtin_type_int,
- &builtin_type_long,
- &builtin_type_short,
- &builtin_type_char,
- &builtin_type_float,
- &builtin_type_double,
- &builtin_type_long_long,
- &builtin_type_void,
- &builtin_type_signed_char,
- &builtin_type_unsigned_char,
- &builtin_type_unsigned_short,
- &builtin_type_unsigned_int,
- &builtin_type_unsigned_long,
- &builtin_type_unsigned_long_long,
- &builtin_type_long_double,
- &builtin_type_complex, &builtin_type_double_complex, 0};
-
-/* Not really used, but needed in the ada_language_defn. */
-
-static void
-emit_char (int c, struct ui_file *stream, int quoter)
-{
- ada_emit_char (c, stream, quoter, 1);
-}
-
-static int
-parse (void)
-{
- warnings_issued = 0;
- return ada_parse ();
-}
-
-static const struct exp_descriptor ada_exp_descriptor = {
- ada_print_subexp,
- ada_operator_length,
- ada_op_name,
- ada_dump_subexp_body,
- ada_evaluate_subexp
-};
-
-const struct language_defn ada_language_defn = {
- "ada", /* Language name */
- language_ada,
- ada_builtin_types,
- range_check_off,
- type_check_off,
- case_sensitive_on, /* Yes, Ada is case-insensitive, but
- that's not quite what this means. */
-#ifdef GNAT_GDB
- ada_lookup_symbol,
- ada_lookup_minimal_symbol,
-#endif /* GNAT_GDB */
- &ada_exp_descriptor,
- parse,
- ada_error,
- resolve,
- ada_printchar, /* Print a character constant */
- ada_printstr, /* Function to print string constant */
- emit_char, /* Function to print single char (not used) */
- ada_create_fundamental_type, /* Create fundamental type in this language */
- ada_print_type, /* Print a type using appropriate syntax */
- ada_val_print, /* Print a value using appropriate syntax */
- ada_value_print, /* Print a top-level value */
- NULL, /* Language specific skip_trampoline */
- NULL, /* value_of_this */
- ada_lookup_symbol_nonlocal, /* Looking up non-local symbols. */
- basic_lookup_transparent_type, /* lookup_transparent_type */
- ada_la_decode, /* Language specific symbol demangler */
- {"", "", "", ""}, /* Binary format info */
-#if 0
- {"8#%lo#", "8#", "o", "#"}, /* Octal format info */
- {"%ld", "", "d", ""}, /* Decimal format info */
- {"16#%lx#", "16#", "x", "#"}, /* Hex format info */
-#else
- /* Copied from c-lang.c. */
- {"0%lo", "0", "o", ""}, /* Octal format info */
- {"%ld", "", "d", ""}, /* Decimal format info */
- {"0x%lx", "0x", "x", ""}, /* Hex format info */
-#endif
- ada_op_print_tab, /* expression operators for printing */
- 0, /* c-style arrays */
- 1, /* String lower bound */
- &builtin_type_ada_char,
- ada_get_gdb_completer_word_break_characters,
-#ifdef GNAT_GDB
- ada_translate_error_message, /* Substitute Ada-specific terminology
- in errors and warnings. */
-#endif /* GNAT_GDB */
- LANG_MAGIC
-};
-
-static void
-build_ada_types (void)
-{
- builtin_type_ada_int =
- init_type (TYPE_CODE_INT, TARGET_INT_BIT / TARGET_CHAR_BIT,
- 0, "integer", (struct objfile *) NULL);
- builtin_type_ada_long =
- init_type (TYPE_CODE_INT, TARGET_LONG_BIT / TARGET_CHAR_BIT,
- 0, "long_integer", (struct objfile *) NULL);
- builtin_type_ada_short =
- init_type (TYPE_CODE_INT, TARGET_SHORT_BIT / TARGET_CHAR_BIT,
- 0, "short_integer", (struct objfile *) NULL);
- builtin_type_ada_char =
- init_type (TYPE_CODE_INT, TARGET_CHAR_BIT / TARGET_CHAR_BIT,
- 0, "character", (struct objfile *) NULL);
- builtin_type_ada_float =
- init_type (TYPE_CODE_FLT, TARGET_FLOAT_BIT / TARGET_CHAR_BIT,
- 0, "float", (struct objfile *) NULL);
- builtin_type_ada_double =
- init_type (TYPE_CODE_FLT, TARGET_DOUBLE_BIT / TARGET_CHAR_BIT,
- 0, "long_float", (struct objfile *) NULL);
- builtin_type_ada_long_long =
- init_type (TYPE_CODE_INT, TARGET_LONG_LONG_BIT / TARGET_CHAR_BIT,
- 0, "long_long_integer", (struct objfile *) NULL);
- builtin_type_ada_long_double =
- init_type (TYPE_CODE_FLT, TARGET_LONG_DOUBLE_BIT / TARGET_CHAR_BIT,
- 0, "long_long_float", (struct objfile *) NULL);
- builtin_type_ada_natural =
- init_type (TYPE_CODE_INT, TARGET_INT_BIT / TARGET_CHAR_BIT,
- 0, "natural", (struct objfile *) NULL);
- builtin_type_ada_positive =
- init_type (TYPE_CODE_INT, TARGET_INT_BIT / TARGET_CHAR_BIT,
- 0, "positive", (struct objfile *) NULL);
-
-
- builtin_type_ada_system_address =
- lookup_pointer_type (init_type (TYPE_CODE_VOID, 1, 0, "void",
- (struct objfile *) NULL));
- TYPE_NAME (builtin_type_ada_system_address) = "system__address";
-}
-
-void
-_initialize_ada_language (void)
-{
-
- build_ada_types ();
- deprecated_register_gdbarch_swap (NULL, 0, build_ada_types);
- add_language (&ada_language_defn);
-
- varsize_limit = 65536;
-#ifdef GNAT_GDB
- add_show_from_set
- (add_set_cmd ("varsize-limit", class_support, var_uinteger,
- (char *) &varsize_limit,
- "Set maximum bytes in dynamic-sized object.",
- &setlist), &showlist);
- obstack_init (&cache_space);
-#endif /* GNAT_GDB */
-
- obstack_init (&symbol_list_obstack);
-
- decoded_names_store = htab_create_alloc_ex
- (256, htab_hash_string, (int (*)(const void *, const void *)) streq,
- NULL, NULL, xmcalloc, xmfree);
-}