Added i386 QNX Neutrino support.
[binutils-gdb.git] / gdb / ada-lang.c
index c58d46338ea48c56ffc99775232a837901c2f303..b047442d6f33bbafc2df5797e54c336de82183a4 100644 (file)
@@ -1,5 +1,6 @@
 /* Ada language support routines for GDB, the GNU debugger.  Copyright
-   1992, 1993, 1994, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+   1992, 1993, 1994, 1997, 1998, 1999, 2000, 2003
+   Free Software Foundation, Inc.
 
 This file is part of GDB.
 
@@ -36,9 +37,9 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 #include "breakpoint.h"
 #include "gdbcore.h"
 #include "ada-lang.h"
-#ifdef UI_OUT
 #include "ui-out.h"
-#endif
+#include "block.h"
+#include "infcall.h"
 
 struct cleanup *unresolved_names;
 
@@ -707,7 +708,7 @@ ada_suppress_symbol_printing (struct symbol *sym)
   if (SYMBOL_NAMESPACE (sym) == STRUCT_NAMESPACE)
     return 1;
   else
-    return is_suppressed_name (SYMBOL_NAME (sym));
+    return is_suppressed_name (DEPRECATED_SYMBOL_NAME (sym));
 }
 \f
 
@@ -1852,10 +1853,7 @@ ada_array_bound_from_type (struct type * arr_type, int n, int which,
    supplied by run-time quantities other than discriminants. */
 
 struct value *
-ada_array_bound (arr, n, which)
-     struct value *arr;
-     int n;
-     int which;
+ada_array_bound (struct value *arr, int n, int which)
 {
   struct type *arr_type = VALUE_TYPE (arr);
 
@@ -2175,6 +2173,8 @@ ada_resolve_subexp (struct expression **expp, int *pos, int deprocedure_p,
    case LOC_LOCAL_ARG:
    case LOC_BASEREG:
    case LOC_BASEREG_ARG:
+   case LOC_COMPUTED:
+   case LOC_COMPUTED_ARG:
    goto FoundNonType;
    default:
    break;
@@ -2334,10 +2334,7 @@ ada_resolve_subexp (struct expression **expp, int *pos, int deprocedure_p,
    liberal.  FIXME: TOO liberal, in fact. */
 
 static int
-ada_type_match (ftype, atype, may_deref)
-     struct type *ftype;
-     struct type *atype;
-     int may_deref;
+ada_type_match (struct type *ftype, struct type *atype, int may_deref)
 {
   CHECK_TYPEDEF (ftype);
   CHECK_TYPEDEF (atype);
@@ -2569,8 +2566,8 @@ sort_choices (struct symbol *syms[], struct block *blocks[], int nsyms)
 
       for (j = i - 1; j >= 0; j -= 1)
        {
-         if (mangled_ordered_before (SYMBOL_NAME (syms[j]),
-                                     SYMBOL_NAME (sym)))
+         if (mangled_ordered_before (DEPRECATED_SYMBOL_NAME (syms[j]),
+                                     DEPRECATED_SYMBOL_NAME (sym)))
            break;
          syms[j + 1] = syms[j];
          blocks[j + 1] = blocks[j];
@@ -2620,7 +2617,7 @@ user_select_syms (struct symbol *syms[], struct block *blocks[], int nsyms,
          struct symtab_and_line sal = find_function_start_sal (syms[i], 1);
          printf_unfiltered ("[%d] %s at %s:%d\n",
                             i + first_choice,
-                            SYMBOL_SOURCE_NAME (syms[i]),
+                            SYMBOL_PRINT_NAME (syms[i]),
                             sal.symtab == NULL
                             ? "<no source file available>"
                             : sal.symtab->filename, sal.line);
@@ -2637,28 +2634,28 @@ user_select_syms (struct symbol *syms[], struct block *blocks[], int nsyms,
          if (SYMBOL_LINE (syms[i]) != 0 && symtab != NULL)
            printf_unfiltered ("[%d] %s at %s:%d\n",
                               i + first_choice,
-                              SYMBOL_SOURCE_NAME (syms[i]),
+                              SYMBOL_PRINT_NAME (syms[i]),
                               symtab->filename, SYMBOL_LINE (syms[i]));
          else if (is_enumeral && TYPE_NAME (SYMBOL_TYPE (syms[i])) != NULL)
            {
              printf_unfiltered ("[%d] ", i + first_choice);
              ada_print_type (SYMBOL_TYPE (syms[i]), NULL, gdb_stdout, -1, 0);
              printf_unfiltered ("'(%s) (enumeral)\n",
-                                SYMBOL_SOURCE_NAME (syms[i]));
+                                SYMBOL_PRINT_NAME (syms[i]));
            }
          else if (symtab != NULL)
            printf_unfiltered (is_enumeral
                               ? "[%d] %s in %s (enumeral)\n"
                               : "[%d] %s at %s:?\n",
                               i + first_choice,
-                              SYMBOL_SOURCE_NAME (syms[i]),
+                              SYMBOL_PRINT_NAME (syms[i]),
                               symtab->filename);
          else
            printf_unfiltered (is_enumeral
                               ? "[%d] %s (enumeral)\n"
                               : "[%d] %s at ?\n",
                               i + first_choice,
-                              SYMBOL_SOURCE_NAME (syms[i]));
+                              SYMBOL_PRINT_NAME (syms[i]));
        }
     }
 
@@ -3246,8 +3243,8 @@ lesseq_defined_than (struct symbol *sym0, struct symbol *sym1)
       {
        struct type *type0 = SYMBOL_TYPE (sym0);
        struct type *type1 = SYMBOL_TYPE (sym1);
-       char *name0 = SYMBOL_NAME (sym0);
-       char *name1 = SYMBOL_NAME (sym1);
+       char *name0 = DEPRECATED_SYMBOL_NAME (sym0);
+       char *name1 = DEPRECATED_SYMBOL_NAME (sym1);
        int len0 = strlen (name0);
        return
          TYPE_CODE (type0) == TYPE_CODE (type1)
@@ -3325,7 +3322,7 @@ ada_lookup_partial_symbol (struct partial_symtab *pst, const char *name,
          struct partial_symbol *psym = start[i];
 
          if (SYMBOL_NAMESPACE (psym) == namespace &&
-             wild_match (name, name_len, SYMBOL_NAME (psym)))
+             wild_match (name, name_len, DEPRECATED_SYMBOL_NAME (psym)))
            return psym;
        }
       return NULL;
@@ -3341,11 +3338,11 @@ ada_lookup_partial_symbol (struct partial_symtab *pst, const char *name,
            {
              int M = (U + i) >> 1;
              struct partial_symbol *psym = start[M];
-             if (SYMBOL_NAME (psym)[0] < name[0])
+             if (DEPRECATED_SYMBOL_NAME (psym)[0] < name[0])
                i = M + 1;
-             else if (SYMBOL_NAME (psym)[0] > name[0])
+             else if (DEPRECATED_SYMBOL_NAME (psym)[0] > name[0])
                U = M - 1;
-             else if (strcmp (SYMBOL_NAME (psym), name) < 0)
+             else if (strcmp (DEPRECATED_SYMBOL_NAME (psym), name) < 0)
                i = M + 1;
              else
                U = M;
@@ -3360,7 +3357,7 @@ ada_lookup_partial_symbol (struct partial_symtab *pst, const char *name,
 
          if (SYMBOL_NAMESPACE (psym) == namespace)
            {
-             int cmp = strncmp (name, SYMBOL_NAME (psym), name_len);
+             int cmp = strncmp (name, DEPRECATED_SYMBOL_NAME (psym), name_len);
 
              if (cmp < 0)
                {
@@ -3368,7 +3365,7 @@ ada_lookup_partial_symbol (struct partial_symtab *pst, const char *name,
                    break;
                }
              else if (cmp == 0
-                      && is_name_suffix (SYMBOL_NAME (psym) + name_len))
+                      && is_name_suffix (DEPRECATED_SYMBOL_NAME (psym) + name_len))
                return psym;
            }
          i += 1;
@@ -3383,11 +3380,11 @@ ada_lookup_partial_symbol (struct partial_symtab *pst, const char *name,
            {
              int M = (U + i) >> 1;
              struct partial_symbol *psym = start[M];
-             if (SYMBOL_NAME (psym)[0] < '_')
+             if (DEPRECATED_SYMBOL_NAME (psym)[0] < '_')
                i = M + 1;
-             else if (SYMBOL_NAME (psym)[0] > '_')
+             else if (DEPRECATED_SYMBOL_NAME (psym)[0] > '_')
                U = M - 1;
-             else if (strcmp (SYMBOL_NAME (psym), "_ada_") < 0)
+             else if (strcmp (DEPRECATED_SYMBOL_NAME (psym), "_ada_") < 0)
                i = M + 1;
              else
                U = M;
@@ -3404,12 +3401,12 @@ ada_lookup_partial_symbol (struct partial_symtab *pst, const char *name,
            {
              int cmp;
 
-             cmp = (int) '_' - (int) SYMBOL_NAME (psym)[0];
+             cmp = (int) '_' - (int) DEPRECATED_SYMBOL_NAME (psym)[0];
              if (cmp == 0)
                {
-                 cmp = strncmp ("_ada_", SYMBOL_NAME (psym), 5);
+                 cmp = strncmp ("_ada_", DEPRECATED_SYMBOL_NAME (psym), 5);
                  if (cmp == 0)
-                   cmp = strncmp (name, SYMBOL_NAME (psym) + 5, name_len);
+                   cmp = strncmp (name, DEPRECATED_SYMBOL_NAME (psym) + 5, name_len);
                }
 
              if (cmp < 0)
@@ -3418,7 +3415,7 @@ ada_lookup_partial_symbol (struct partial_symtab *pst, const char *name,
                    break;
                }
              else if (cmp == 0
-                      && is_name_suffix (SYMBOL_NAME (psym) + name_len + 5))
+                      && is_name_suffix (DEPRECATED_SYMBOL_NAME (psym) + name_len + 5))
                return psym;
            }
          i += 1;
@@ -3472,6 +3469,8 @@ symtab_for_sym (struct symbol *sym)
       case LOC_LOCAL_ARG:
       case LOC_BASEREG:
       case LOC_BASEREG_ARG:
+      case LOC_COMPUTED:
+      case LOC_COMPUTED_ARG:
        for (j = FIRST_LOCAL_BLOCK;
             j < BLOCKVECTOR_NBLOCKS (BLOCKVECTOR (s)); j += 1)
          {
@@ -3499,7 +3498,7 @@ ada_lookup_minimal_symbol (const char *name)
 
   ALL_MSYMBOLS (objfile, msymbol)
   {
-    if (ada_match_name (SYMBOL_NAME (msymbol), name, wild_match)
+    if (ada_match_name (DEPRECATED_SYMBOL_NAME (msymbol), name, wild_match)
        && MSYMBOL_TYPE (msymbol) != mst_solib_trampoline)
       return msymbol;
   }
@@ -3533,7 +3532,7 @@ add_symbols_from_enclosing_procs (const char *name, namespace_enum namespace,
       /* Initialize the local variable symbol that stands for the
        * static link (when it exists). */
       static_link = &static_link_sym;
-      SYMBOL_NAME (static_link) = "";
+      DEPRECATED_SYMBOL_NAME (static_link) = "";
       SYMBOL_LANGUAGE (static_link) = language_unknown;
       SYMBOL_CLASS (static_link) = LOC_LOCAL;
       SYMBOL_NAMESPACE (static_link) = VAR_NAMESPACE;
@@ -3542,7 +3541,7 @@ add_symbols_from_enclosing_procs (const char *name, namespace_enum namespace,
        -(long) TYPE_LENGTH (SYMBOL_TYPE (static_link));
     }
 
-  frame = selected_frame;
+  frame = deprecated_selected_frame;
   while (frame != NULL && ndefns == 0)
     {
       struct block *block;
@@ -3602,15 +3601,15 @@ remove_extra_symbols (struct symbol **syms, struct block **blocks, int nsyms)
   i = 0;
   while (i < nsyms)
     {
-      if (SYMBOL_NAME (syms[i]) != NULL
+      if (DEPRECATED_SYMBOL_NAME (syms[i]) != NULL
          && SYMBOL_CLASS (syms[i]) == LOC_STATIC
          && is_nondebugging_type (SYMBOL_TYPE (syms[i])))
        {
          for (j = 0; j < nsyms; j += 1)
            {
              if (i != j
-                 && SYMBOL_NAME (syms[j]) != NULL
-                 && STREQ (SYMBOL_NAME (syms[i]), SYMBOL_NAME (syms[j]))
+                 && DEPRECATED_SYMBOL_NAME (syms[j]) != NULL
+                 && STREQ (DEPRECATED_SYMBOL_NAME (syms[i]), DEPRECATED_SYMBOL_NAME (syms[j]))
                  && SYMBOL_CLASS (syms[i]) == SYMBOL_CLASS (syms[j])
                  && SYMBOL_VALUE_ADDRESS (syms[i])
                  == SYMBOL_VALUE_ADDRESS (syms[j]))
@@ -3705,7 +3704,7 @@ ada_lookup_symbol_list (const char *name, struct block *block0,
     {
       ALL_MSYMBOLS (objfile, msymbol)
       {
-       if (ada_match_name (SYMBOL_NAME (msymbol), name, wild_match))
+       if (ada_match_name (DEPRECATED_SYMBOL_NAME (msymbol), name, wild_match))
          {
            switch (MSYMBOL_TYPE (msymbol))
              {
@@ -3720,13 +3719,13 @@ ada_lookup_symbol_list (const char *name, struct block *block0,
                    bv = BLOCKVECTOR (s);
                    block = BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK);
                    ada_add_block_symbols (block,
-                                          SYMBOL_NAME (msymbol),
+                                          DEPRECATED_SYMBOL_NAME (msymbol),
                                           namespace, objfile, wild_match);
                    if (ndefns == old_ndefns)
                      {
                        block = BLOCKVECTOR_BLOCK (bv, STATIC_BLOCK);
                        ada_add_block_symbols (block,
-                                              SYMBOL_NAME (msymbol),
+                                              DEPRECATED_SYMBOL_NAME (msymbol),
                                               namespace, objfile,
                                               wild_match);
                      }
@@ -3966,7 +3965,7 @@ ada_add_block_symbols (struct block *block, const char *name,
       ALL_BLOCK_SYMBOLS (block, i, sym)
       {
        if (SYMBOL_NAMESPACE (sym) == namespace &&
-           wild_match (name, name_len, SYMBOL_NAME (sym)))
+           wild_match (name, name_len, DEPRECATED_SYMBOL_NAME (sym)))
          {
            switch (SYMBOL_CLASS (sym))
              {
@@ -3976,6 +3975,7 @@ ada_add_block_symbols (struct block *block, const char *name,
              case LOC_REGPARM:
              case LOC_REGPARM_ADDR:
              case LOC_BASEREG_ARG:
+             case LOC_COMPUTED_ARG:
                arg_sym = sym;
                break;
              case LOC_UNRESOLVED:
@@ -4000,11 +4000,11 @@ ada_add_block_symbols (struct block *block, const char *name,
            {
              int M = (U + i) >> 1;
              struct symbol *sym = BLOCK_SYM (block, M);
-             if (SYMBOL_NAME (sym)[0] < name[0])
+             if (DEPRECATED_SYMBOL_NAME (sym)[0] < name[0])
                i = M + 1;
-             else if (SYMBOL_NAME (sym)[0] > name[0])
+             else if (DEPRECATED_SYMBOL_NAME (sym)[0] > name[0])
                U = M - 1;
-             else if (strcmp (SYMBOL_NAME (sym), name) < 0)
+             else if (strcmp (DEPRECATED_SYMBOL_NAME (sym), name) < 0)
                i = M + 1;
              else
                U = M;
@@ -4018,7 +4018,7 @@ ada_add_block_symbols (struct block *block, const char *name,
          {
            if (SYMBOL_NAMESPACE (sym) == namespace)
              {
-               int cmp = strncmp (name, SYMBOL_NAME (sym), name_len);
+               int cmp = strncmp (name, DEPRECATED_SYMBOL_NAME (sym), name_len);
 
                if (cmp < 0)
                  {
@@ -4029,7 +4029,7 @@ ada_add_block_symbols (struct block *block, const char *name,
                      }
                  }
                else if (cmp == 0
-                        && is_name_suffix (SYMBOL_NAME (sym) + name_len))
+                        && is_name_suffix (DEPRECATED_SYMBOL_NAME (sym) + name_len))
                  {
                    switch (SYMBOL_CLASS (sym))
                      {
@@ -4039,6 +4039,7 @@ ada_add_block_symbols (struct block *block, const char *name,
                      case LOC_REGPARM:
                      case LOC_REGPARM_ADDR:
                      case LOC_BASEREG_ARG:
+                     case LOC_COMPUTED_ARG:
                        arg_sym = sym;
                        break;
                      case LOC_UNRESOLVED:
@@ -4074,11 +4075,11 @@ ada_add_block_symbols (struct block *block, const char *name,
            {
              int M = (U + i) >> 1;
              struct symbol *sym = BLOCK_SYM (block, M);
-             if (SYMBOL_NAME (sym)[0] < '_')
+             if (DEPRECATED_SYMBOL_NAME (sym)[0] < '_')
                i = M + 1;
-             else if (SYMBOL_NAME (sym)[0] > '_')
+             else if (DEPRECATED_SYMBOL_NAME (sym)[0] > '_')
                U = M - 1;
-             else if (strcmp (SYMBOL_NAME (sym), "_ada_") < 0)
+             else if (strcmp (DEPRECATED_SYMBOL_NAME (sym), "_ada_") < 0)
                i = M + 1;
              else
                U = M;
@@ -4096,12 +4097,12 @@ ada_add_block_symbols (struct block *block, const char *name,
              {
                int cmp;
 
-               cmp = (int) '_' - (int) SYMBOL_NAME (sym)[0];
+               cmp = (int) '_' - (int) DEPRECATED_SYMBOL_NAME (sym)[0];
                if (cmp == 0)
                  {
-                   cmp = strncmp ("_ada_", SYMBOL_NAME (sym), 5);
+                   cmp = strncmp ("_ada_", DEPRECATED_SYMBOL_NAME (sym), 5);
                    if (cmp == 0)
-                     cmp = strncmp (name, SYMBOL_NAME (sym) + 5, name_len);
+                     cmp = strncmp (name, DEPRECATED_SYMBOL_NAME (sym) + 5, name_len);
                  }
 
                if (cmp < 0)
@@ -4113,7 +4114,7 @@ ada_add_block_symbols (struct block *block, const char *name,
                      }
                  }
                else if (cmp == 0
-                        && is_name_suffix (SYMBOL_NAME (sym) + name_len + 5))
+                        && is_name_suffix (DEPRECATED_SYMBOL_NAME (sym) + name_len + 5))
                  {
                    switch (SYMBOL_CLASS (sym))
                      {
@@ -4123,6 +4124,7 @@ ada_add_block_symbols (struct block *block, const char *name,
                      case LOC_REGPARM:
                      case LOC_REGPARM_ADDR:
                      case LOC_BASEREG_ARG:
+                     case LOC_COMPUTED_ARG:
                        arg_sym = sym;
                        break;
                      case LOC_UNRESOLVED:
@@ -4195,9 +4197,10 @@ fill_in_ada_prototype (struct symbol *func)
       case LOC_REGPARM_ADDR:
        TYPE_FIELD_BITPOS (ftype, nargs) = nargs;
        TYPE_FIELD_BITSIZE (ftype, nargs) = 0;
+       TYPE_FIELD_STATIC_KIND (ftype, nargs) = 0;
        TYPE_FIELD_TYPE (ftype, nargs) =
          lookup_pointer_type (check_typedef (SYMBOL_TYPE (sym)));
-       TYPE_FIELD_NAME (ftype, nargs) = SYMBOL_NAME (sym);
+       TYPE_FIELD_NAME (ftype, nargs) = DEPRECATED_SYMBOL_NAME (sym);
        nargs += 1;
 
        break;
@@ -4206,10 +4209,12 @@ fill_in_ada_prototype (struct symbol *func)
       case LOC_REGPARM:
       case LOC_LOCAL_ARG:
       case LOC_BASEREG_ARG:
+      case LOC_COMPUTED_ARG:
        TYPE_FIELD_BITPOS (ftype, nargs) = nargs;
        TYPE_FIELD_BITSIZE (ftype, nargs) = 0;
+       TYPE_FIELD_STATIC_KIND (ftype, nargs) = 0;
        TYPE_FIELD_TYPE (ftype, nargs) = check_typedef (SYMBOL_TYPE (sym));
-       TYPE_FIELD_NAME (ftype, nargs) = SYMBOL_NAME (sym);
+       TYPE_FIELD_NAME (ftype, nargs) = DEPRECATED_SYMBOL_NAME (sym);
        nargs += 1;
 
        break;
@@ -4401,7 +4406,7 @@ ada_finish_decode_line_1 (char **spec, struct symtab *file_table,
 #endif
       struct minimal_symbol *msymbol;
 
-      INIT_SAL (&val);
+      init_sal (&val);
 
       msymbol = NULL;
       if (lower_name != NULL)
@@ -4478,7 +4483,7 @@ ada_finish_decode_line_1 (char **spec, struct symtab *file_table,
       for (i = 0; i < selected.nelts; i += 1)
        (*canonical)[i] =
          extended_canonical_line_spec (selected.sals[i],
-                                       SYMBOL_SOURCE_NAME (symbols[i]));
+                                       SYMBOL_PRINT_NAME (symbols[i]));
     }
 
   discard_cleanups (old_chain);
@@ -4543,7 +4548,7 @@ done:
   sals.nelts = 1;
   sals.sals = (struct symtab_and_line *) xmalloc (sizeof (sals.sals[0]));
 
-  INIT_SAL (&sals.sals[0]);
+  init_sal (&sals.sals[0]);
 
   sals.sals[0].line = best_linetable->item[best_index].line;
   sals.sals[0].pc = best_linetable->item[best_index].pc;
@@ -4761,7 +4766,7 @@ debug_print_block (struct block *b)
   fprintf (stderr, "Block: %p; [0x%lx, 0x%lx]",
           b, BLOCK_START (b), BLOCK_END (b));
   if (BLOCK_FUNCTION (b) != NULL)
-    fprintf (stderr, " Function: %s", SYMBOL_NAME (BLOCK_FUNCTION (b)));
+    fprintf (stderr, " Function: %s", DEPRECATED_SYMBOL_NAME (BLOCK_FUNCTION (b)));
   fprintf (stderr, "\n");
   fprintf (stderr, "\t    Superblock: %p\n", BLOCK_SUPERBLOCK (b));
   fprintf (stderr, "\t    Symbols:");
@@ -4769,7 +4774,7 @@ debug_print_block (struct block *b)
   {
     if (i > 0 && i % 4 == 0)
       fprintf (stderr, "\n\t\t    ");
-    fprintf (stderr, " %s", SYMBOL_NAME (sym));
+    fprintf (stderr, " %s", DEPRECATED_SYMBOL_NAME (sym));
   }
   fprintf (stderr, "\n");
 }
@@ -4862,7 +4867,7 @@ all_sals_for_line (const char *filename, int line_num, char ***canonical)
          break;
 
        GROW_VECT (result.sals, len, result.nelts + 1);
-       INIT_SAL (&result.sals[result.nelts]);
+       init_sal (&result.sals[result.nelts]);
        result.sals[result.nelts].line = LINETABLE (s)->item[ind].line;
        result.sals[result.nelts].pc = LINETABLE (s)->item[ind].pc;
        result.sals[result.nelts].symtab = s;
@@ -5036,17 +5041,7 @@ find_printable_frame (struct frame_info *fi, int level)
 
   for (; fi != NULL; level += 1, fi = get_prev_frame (fi))
     {
-      /* If fi is not the innermost frame, that normally means that fi->pc
-         points to *after* the call instruction, and we want to get the line
-         containing the call, never the next line.  But if the next frame is
-         a signal_handler_caller or a dummy frame, then the next frame was
-         not entered as the result of a call, and we want to get the line
-         containing fi->pc.  */
-      sal =
-       find_pc_line (fi->pc,
-                     fi->next != NULL
-                     && !fi->next->signal_handler_caller
-                     && !frame_in_dummy (fi->next));
+      find_frame_sal (fi, &sal);
       if (sal.symtab && !is_ada_runtime_file (sal.symtab->filename))
        {
 #if defined(__alpha__) && defined(__osf__) && !defined(VXWORKS_TARGET)
@@ -5057,7 +5052,7 @@ find_printable_frame (struct frame_info *fi, int level)
              STREQ (sal.symtab->objfile->name, "/usr/shlib/libpthread.so"))
            continue;
 #endif
-         selected_frame = fi;
+         deprecated_selected_frame = fi;
          break;
        }
     }
@@ -5068,7 +5063,6 @@ find_printable_frame (struct frame_info *fi, int level)
 void
 ada_report_exception_break (struct breakpoint *b)
 {
-#ifdef UI_OUT
   /* FIXME: break_on_exception should be defined in breakpoint.h */
   /*  if (b->break_on_exception == 1)
      {
@@ -5106,7 +5100,6 @@ ada_report_exception_break (struct breakpoint *b)
    else if (b->break_on_exception == 3)
    fputs_filtered ("on assert failure", gdb_stdout);
  */
-#endif
 }
 
 int
@@ -6052,6 +6045,7 @@ template_to_fixed_record_type (struct type *type, char *valaddr,
        * rediscover why we needed field_offset and fix it properly. */
       TYPE_FIELD_BITPOS (rtype, f) = off;
       TYPE_FIELD_BITSIZE (rtype, f) = 0;
+      TYPE_FIELD_STATIC_KIND (rtype, f) = 0;
 
       if (ada_is_variant_part (type, f))
        {
@@ -6155,6 +6149,7 @@ template_to_static_fixed_type (struct type *templ_type)
     {
       TYPE_FIELD_BITPOS (type, f) = 0;
       TYPE_FIELD_BITSIZE (type, f) = 0;
+      TYPE_FIELD_STATIC_KIND (type, f) = 0;
 
       if (is_dynamic_field (templ_type, f))
        {
@@ -6224,6 +6219,7 @@ to_record_with_fixed_variant_part (struct type *type, char *valaddr,
       TYPE_FIELD_TYPE (rtype, nfields - 1) = branch_type;
       TYPE_FIELD_NAME (rtype, nfields - 1) = "S";
       TYPE_FIELD_BITSIZE (rtype, nfields - 1) = 0;
+      TYPE_FIELD_STATIC_KIND (rtype, nfields - 1) = 0;
       TYPE_LENGTH (rtype) += TYPE_LENGTH (branch_type);
       -TYPE_LENGTH (TYPE_FIELD_TYPE (type, nfields - 1));
     }
@@ -8085,6 +8081,8 @@ const struct language_defn ada_language_defn = {
   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,                                /* Language specific symbol demangler */
   {"", "", "", ""},            /* Binary format info */
 #if 0
   {"8#%lo#", "8#", "o", "#"},  /* Octal format info */
@@ -8104,7 +8102,7 @@ const struct language_defn ada_language_defn = {
 };
 
 void
-_initialize_ada_language ()
+_initialize_ada_language (void)
 {
   builtin_type_ada_int =
     init_type (TYPE_CODE_INT, TARGET_INT_BIT / TARGET_CHAR_BIT,