This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[RFA]: Turn on initial Ada support in GDB


With the following patch, I believe we have addressed all outstanding
requests for modifications.  The most recent changes incorporated here
(to ada-lang.c and ada-lang.h) strip out the code that was #ifdefed
out depending on whether we were compiling from our internal sources
or the public tree, and also remove a few other definitions or
declarations that were unused as a result.  The other files in the
patch are repostings of the previously approved portions (not yet applied
because the whole lot is interdependent).

Paul Hilfinger

ChangeLog:

2004-09-27  Paul N. Hilfinger  <Hilfinger@gnat.com>

        Turn on initial Ada support (mainly expression evaluation).
	
        * Makefile.in (ada_lex_c): Define
	(HFILES_NO_SRCDIR): Add ada-lang.h.
	(COMMON_OBS): Add ada-lang.o, ada-typeprint.o, ada-valprint.o.
	(YYOBJ): Add ada-exp.o.
	(rule .l.c): Generalize to not mention ada.
	(ada-lex.o): Remove (ada-lex.c is included by ada-exp.y).
	(ada-lang.o): Add dependencies on completer.h, gdb_obstack.h, 
	hashtab.h.
	(ada-tasks.o): Add dependency on gdb_string.h.
	(ada-valprint.o): Add dependency on gdb_string.h.
	(ada-exp.o): Add dependency on gdb_string.h.

	* symtab.c: Add dependency on ada-lang.h.
	(symbol_natural_name): Add Ada case.
	(symbol_demangled_name): Add Ada case.
	(symbol_search_name): Add Ada case.
	* symfile.c (init_filename_language_table): Add extensions for
	Ada.
	* defs.h (enum language): Add language_ada.

	* gdbtypes.h (TYPE_FLAG_FIXED_INSTANCE): Define.
	
	* ada-lang.c: Strip code that is conditionalized out by GNAT_GDB.
	(add_symbols_from_enclosing_procs): Make a no-op for now.
	(ada_unqualified_name,add_angle_brackets,function_name_from_pc)
	(extended_canonical_line_spec, find_sal_from_funcs_and_line)
	(find_line_in_linetable, find_next_line_in_linetable)
	(read_all_symtabs, is_plausible_func_for_line)
	(adjust_pc_past_prologue, error_breakpoint_runtime_sym_not_found)
	(is_runtime_sym_defined, check_size): Remove declaration.
	(function_name_from_pc, ada_translate_error_message)
	(ada_lookup_minimal_symbol): Remove definition.
	(ada_add_block_symbols): Remove useless label.
	* ada-lang.h (ada_maybe_exception_partial_symbol): Remove 
	useless declaration.
	(ada_is_exception_sym): Likewise.

doc ChangeLog:

2004-09-22  Paul N. Hilfinger  <hilfinger@gnat.com>

	* gdb.texinfo (Filenames): Add Ada suffixes.
	(Ada) New section.



Index: gdb/Makefile.in
===================================================================
RCS file: /cvs/src/src/gdb/Makefile.in,v
retrieving revision 1.628
diff -u -p -r1.628 Makefile.in
--- gdb/Makefile.in	26 Sep 2004 18:42:29 -0000	1.628
+++ gdb/Makefile.in	27 Sep 2004 10:18:43 -0000
@@ -510,7 +510,7 @@ TARGET_FLAGS_TO_PASS = \
 # Links made at configuration time should not be specified here, since
 # SFILES is used in building the distribution archive.
 
-SFILES = ada-exp.y ada-lang.c ada-typeprint.c ada-valprint.c ada-tasks.c \
+SFILES = ada-exp.y ada-lang.c ada-typeprint.c ada-valprint.c  \
 	ax-general.c ax-gdb.c \
 	bcache.c \
 	bfd-target.c \
@@ -624,6 +624,7 @@ nm_h =		@nm_h@
 # gdb/ headers
 #
 
+ada_lex_c = ada-lex.c
 ada_lang_h = ada-lang.h $(value_h) $(gdbtypes_h) $(breakpoint_h)
 alphabsd_tdep_h = alphabsd-tdep.h
 alpha_tdep_h = alpha-tdep.h
@@ -846,7 +847,7 @@ HFILES_NO_SRCDIR = bcache.h buildsym.h c
 	symfile.h symfile-mem.h stabsread.h target.h terminal.h typeprint.h \
 	xcoffsolib.h \
 	macrotab.h macroexp.h macroscope.h \
-	c-lang.h f-lang.h \
+	ada-lang.h c-lang.h f-lang.h \
 	jv-lang.h \
 	m2-lang.h  p-lang.h \
 	complaints.h valprint.h \
@@ -907,7 +908,7 @@ COMMON_OBS = $(DEPFILES) $(YYOBJ) \
 	dbxread.o coffread.o coff-pe-read.o elfread.o \
 	dwarfread.o dwarf2read.o mipsread.o stabsread.o corefile.o \
 	dwarf2expr.o dwarf2loc.o dwarf2-frame.o \
-	c-lang.o f-lang.o objc-lang.o \
+	ada-lang.o c-lang.o f-lang.o objc-lang.o \
 	ui-out.o cli-out.o \
 	varobj.o wrapper.o \
 	jv-lang.o jv-valprint.o jv-typeprint.o \
@@ -915,8 +916,8 @@ COMMON_OBS = $(DEPFILES) $(YYOBJ) \
 	scm-exp.o scm-lang.o scm-valprint.o \
 	sentinel-frame.o \
 	complaints.o typeprint.o \
-	c-typeprint.o f-typeprint.o m2-typeprint.o \
-	c-valprint.o cp-valprint.o f-valprint.o m2-valprint.o \
+	ada-typeprint.o c-typeprint.o f-typeprint.o m2-typeprint.o \
+	ada-valprint.o c-valprint.o cp-valprint.o f-valprint.o m2-valprint.o \
 	nlmread.o serial.o mdebugread.o top.o utils.o \
 	ui-file.o \
 	user-regs.o \
@@ -940,6 +941,7 @@ YYFILES = c-exp.c \
 	f-exp.c m2-exp.c p-exp.c
 YYOBJ = c-exp.o \
 	objc-exp.o \
+	ada-exp.o \
 	jv-exp.o \
 	f-exp.o m2-exp.o p-exp.o
 
@@ -1580,7 +1582,7 @@ po/$(PACKAGE).pot: force
 	    echo $(FLEX) -Isit $< ">" $@; \
 	    $(FLEX) -Isit $< > $@; \
 	elif [ ! -f $@ -a ! -f $< ]; then \
-	    echo "ada-lex.c missing and flex not available."; \
+	    echo "$< missing and flex not available."; \
 	    false; \
 	elif [ ! -f $@ ]; then \
 	    echo "Warning: $*.c older than $*.l and flex not available."; \
@@ -1610,7 +1612,6 @@ ada-lang.o: ada-lang.c $(defs_h) $(gdb_s
 	$(gdbcore_h) $(hashtab_h) $(gdb_obstack_h) $(ada_lang_h) \
 	$(completer_h) $(gdb_stat_h) $(ui_out_h) $(block_h) $(infcall_h) \
 	$(dictionary_h)
-ada-lex.o: ada-lex.c $(gdb_string_h)
 ada-typeprint.o: ada-typeprint.c $(defs_h) $(gdb_obstack_h) $(bfd_h) \
 	$(symtab_h) $(gdbtypes_h) $(expression_h) $(value_h) $(gdbcore_h) \
 	$(target_h) $(command_h) $(gdbcmd_h) $(language_h) $(demangle_h) \
Index: gdb/ada-lang.c
===================================================================
RCS file: /cvs/src/src/gdb/ada-lang.c,v
retrieving revision 1.54
diff -u -p -r1.54 ada-lang.c
--- gdb/ada-lang.c	18 Sep 2004 22:23:23 -0000	1.54
+++ gdb/ada-lang.c	27 Sep 2004 10:18:45 -0000
@@ -19,18 +19,6 @@ along with this program; if not, write t
 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 
 
-/* Sections of code marked 
-
-     #ifdef GNAT_GDB 
-     ...
-     #endif
-
-   indicate sections that are used in sources distributed by 
-   ACT, Inc., but not yet integrated into the public tree (where
-   GNAT_GDB is not defined).  They are retained here nevertheless 
-   to minimize the problems of maintaining different versions 
-   of the source and to make the full source available. */
-
 #include "defs.h"
 #include <stdio.h>
 #include "gdb_string.h"
@@ -75,27 +63,8 @@ Foundation, Inc., 675 Mass Ave, Cambridg
 #define TRUNCATION_TOWARDS_ZERO ((-5 / 2) == -2)
 #endif
 
-#ifdef GNAT_GDB
-/* A structure that contains a vector of strings.
-   The main purpose of this type is to group the vector and its
-   associated parameters in one structure.  This makes it easier
-   to handle and pass around.  */
-
-struct string_vector
-{
-  char **array; /* The vector itself.  */
-  int index;    /* Index of the next available element in the array.  */
-  size_t size;  /* The number of entries allocated in the array.  */
-};
-
-static struct string_vector xnew_string_vector (int initial_size);
-static void string_vector_append (struct string_vector *sv, char *str);
-#endif /* GNAT_GDB */
 
-static const char *ada_unqualified_name (const char *decoded_name);
-static char *add_angle_brackets (const char *str);
 static void extract_string (CORE_ADDR addr, char *buf);
-static char *function_name_from_pc (CORE_ADDR pc);
 
 static struct type *ada_create_fundamental_type (struct objfile *, int);
 
@@ -184,9 +153,6 @@ static int discrete_type_p (struct type 
 static struct type *ada_lookup_struct_elt_type (struct type *, char *,
                                                 int, int, int *);
 
-static char *extended_canonical_line_spec (struct symtab_and_line,
-                                           const char *);
-
 static struct value *evaluate_subexp (struct type *, struct expression *,
                                       int *, enum noside);
 
@@ -228,19 +194,6 @@ static int is_name_suffix (const char *)
 
 static int wild_match (const char *, int, const char *);
 
-static struct symtabs_and_lines
-find_sal_from_funcs_and_line (const char *, int,
-                              struct ada_symbol_info *, int);
-
-static int find_line_in_linetable (struct linetable *, int,
-                                   struct ada_symbol_info *, int, int *);
-
-static int find_next_line_in_linetable (struct linetable *, int, int, int);
-
-static void read_all_symtabs (const char *);
-
-static int is_plausible_func_for_line (struct symbol *, int);
-
 static struct value *ada_coerce_ref (struct value *);
 
 static LONGEST pos_atr (struct value *);
@@ -266,8 +219,6 @@ static struct value *ada_to_fixed_value_
 
 static struct value *ada_to_fixed_value (struct value *);
 
-static void adjust_pc_past_prologue (CORE_ADDR *);
-
 static int ada_resolve_function (struct ada_symbol_info *, int,
                                  struct value **, int, const char *,
                                  struct type *);
@@ -276,14 +227,8 @@ static struct value *ada_coerce_to_simpl
 
 static int ada_is_direct_array_type (struct type *);
 
-static void error_breakpoint_runtime_sym_not_found (const char *err_desc);
-
-static int is_runtime_sym_defined (const char *name, int allow_tramp);
-
 static void ada_language_arch_info (struct gdbarch *,
 				    struct language_arch_info *);
-
-static void check_size (const struct type *);
 
 
 
@@ -346,69 +291,6 @@ static struct obstack symbol_list_obstac
 
                         /* Utilities */
 
-#ifdef GNAT_GDB
-
-/* Create a new empty string_vector struct with an initial size of
-   INITIAL_SIZE.  */
-
-static struct string_vector
-xnew_string_vector (int initial_size)
-{
-  struct string_vector result;
-
-  result.array = (char **) xmalloc ((initial_size + 1) * sizeof (char *));
-  result.index = 0;
-  result.size = initial_size;
-
-  return result;
-}
-
-/* Add STR at the end of the given string vector SV.  If SV is already
-   full, its size is automatically increased (doubled).  */
-
-static void
-string_vector_append (struct string_vector *sv, char *str)
-{
-  if (sv->index >= sv->size)
-    GROW_VECT (sv->array, sv->size, sv->size * 2);
-
-  sv->array[sv->index] = str;
-  sv->index++;
-}
-
-/* Given DECODED_NAME a string holding a symbol name in its
-   decoded form (ie using the Ada dotted notation), returns
-   its unqualified name.  */
-
-static const char *
-ada_unqualified_name (const char *decoded_name)
-{
-  const char *result = strrchr (decoded_name, '.');
-
-  if (result != NULL)
-    result++;                   /* Skip the dot...  */
-  else
-    result = decoded_name;
-
-  return result;
-}
-
-/* Return a string starting with '<', followed by STR, and '>'.
-   The result is good until the next call.  */
-
-static char *
-add_angle_brackets (const char *str)
-{
-  static char *result = NULL;
-
-  xfree (result);
-  result = (char *) xmalloc ((strlen (str) + 3) * sizeof (char));
-
-  sprintf (result, "<%s>", str);
-  return result;
-}
-
-#endif /* GNAT_GDB */
 
 static char *
 ada_get_gdb_completer_word_break_characters (void)
@@ -435,20 +317,6 @@ extract_string (CORE_ADDR addr, char *bu
   while (buf[char_index - 1] != '\000');
 }
 
-/* Return the name of the function owning the instruction located at PC.
-   Return NULL if no such function could be found.  */
-
-static char *
-function_name_from_pc (CORE_ADDR pc)
-{
-  char *func_name;
-
-  if (!find_pc_partial_function (pc, &func_name, NULL, NULL))
-    return NULL;
-
-  return func_name;
-}
-
 /* Assuming *OLD_VECT points to an array of *SIZE objects of size
    ELEMENT_SIZE, grow it to contain at least MIN_SIZE objects,
    updating *OLD_VECT and *SIZE as necessary.  */
@@ -617,15 +485,6 @@ lim_warning (const char *format, long ar
     warning (format, arg);
 }
 
-static const char *
-ada_translate_error_message (const char *string)
-{
-  if (strcmp (string, "Invalid cast.") == 0)
-    return "Invalid type conversion.";
-  else
-    return string;
-}
-
 /* Note: would have used MAX_OF_TYPE and MIN_OF_TYPE macros from
    gdbtypes.h, but some of the necessary definitions in that file
    seem to have gone missing. */
@@ -3713,107 +3572,9 @@ ada_convert_actuals (struct value *func,
       convert_actual (args[i], TYPE_FIELD_TYPE (VALUE_TYPE (func), i), sp);
 }
 
-                                /* Experimental Symbol Cache Module */
-
-/* This module may well have been OBE, due to improvements in the 
-   symbol-table module.  So until proven otherwise, it is disabled in
-   the submitted public code, and may be removed from all sources
-   in the future. */
-
-#ifdef GNAT_GDB
-
-/* This section implements a simple, fixed-sized hash table for those
-   Ada-mode symbols that get looked up in the course of executing the user's
-   commands.  The size is fixed on the grounds that there are not
-   likely to be all that many symbols looked up during any given
-   session, regardless of the size of the symbol table.  If we decide
-   to go to a resizable table, let's just use the stuff from libiberty
-   instead.  */
-
-#define HASH_SIZE 1009
-
-struct cache_entry
-{
-  const char *name;
-  domain_enum namespace;
-  struct symbol *sym;
-  struct symtab *symtab;
-  struct block *block;
-  struct cache_entry *next;
-};
-
-static struct obstack cache_space;
-
-static struct cache_entry *cache[HASH_SIZE];
-
-/* Clear all entries from the symbol cache.  */
-
-void
-clear_ada_sym_cache (void)
-{
-  obstack_free (&cache_space, NULL);
-  obstack_init (&cache_space);
-  memset (cache, '\000', sizeof (cache));
-}
-
-static struct cache_entry **
-find_entry (const char *name, domain_enum namespace)
-{
-  int h = msymbol_hash (name) % HASH_SIZE;
-  struct cache_entry **e;
-  for (e = &cache[h]; *e != NULL; e = &(*e)->next)
-    {
-      if (namespace == (*e)->namespace && strcmp (name, (*e)->name) == 0)
-        return e;
-    }
-  return NULL;
-}
-
-/* Return (in SYM) the last cached definition for global or static symbol NAME
-   in namespace DOMAIN.  Returns 1 if entry found, 0 otherwise.
-   If SYMTAB is non-NULL, store the symbol
-   table in which the symbol was found there, or NULL if not found.
-   *BLOCK is set to the block in which NAME is found.  */
-
-static int
-lookup_cached_symbol (const char *name, domain_enum namespace,
-                      struct symbol **sym, struct block **block,
-                      struct symtab **symtab)
-{
-  struct cache_entry **e = find_entry (name, namespace);
-  if (e == NULL)
-    return 0;
-  if (sym != NULL)
-    *sym = (*e)->sym;
-  if (block != NULL)
-    *block = (*e)->block;
-  if (symtab != NULL)
-    *symtab = (*e)->symtab;
-  return 1;
-}
-
-/* Set the cached definition of NAME in DOMAIN to SYM in block
-   BLOCK and symbol table SYMTAB.  */
-
-static void
-cache_symbol (const char *name, domain_enum namespace, struct symbol *sym,
-              struct block *block, struct symtab *symtab)
-{
-  int h = msymbol_hash (name) % HASH_SIZE;
-  char *copy;
-  struct cache_entry *e =
-    (struct cache_entry *) obstack_alloc (&cache_space, sizeof (*e));
-  e->next = cache[h];
-  cache[h] = e;
-  e->name = copy = obstack_alloc (&cache_space, strlen (name) + 1);
-  strcpy (copy, name);
-  e->sym = sym;
-  e->namespace = namespace;
-  e->symtab = symtab;
-  e->block = block;
-}
+/* Dummy definitions for an experimental caching module that is not
+ * used in the public sources. */
 
-#else
 static int
 lookup_cached_symbol (const char *name, domain_enum namespace,
                       struct symbol **sym, struct block **block,
@@ -3827,7 +3588,6 @@ cache_symbol (const char *name, domain_e
               struct block *block, struct symtab *symtab)
 {
 }
-#endif /* GNAT_GDB */
 
                                 /* Symbol Lookup */
 
@@ -4209,16 +3969,6 @@ ada_lookup_simple_minsym (const char *na
   return NULL;
 }
 
-/* Return up minimal symbol for NAME, folded and encoded according to 
-   Ada conventions, or NULL if none.  The last two arguments are ignored.  */
-
-static struct minimal_symbol *
-ada_lookup_minimal_symbol (const char *name, const char *sfile,
-                           struct objfile *objf)
-{
-  return ada_lookup_simple_minsym (ada_encode (name));
-}
-
 /* For all subprograms that statically enclose the subprogram of the
    selected frame, add symbols matching identifier NAME in DOMAIN
    and their blocks to the list of data in OBSTACKP, as for
@@ -4230,72 +3980,6 @@ add_symbols_from_enclosing_procs (struct
                                   const char *name, domain_enum namespace,
                                   int wild_match)
 {
-#ifdef HAVE_ADD_SYMBOLS_FROM_ENCLOSING_PROCS
-  /* Use a heuristic to find the frames of enclosing subprograms: treat the
-     pointer-sized value at location 0 from the local-variable base of a
-     frame as a static link, and then search up the call stack for a
-     frame with that same local-variable base.  */
-  static struct symbol static_link_sym;
-  static struct symbol *static_link;
-  struct value *target_link_val;
-
-  struct cleanup *old_chain = make_cleanup (null_cleanup, NULL);
-  struct frame_info *frame;
-
-  if (!target_has_stack)
-    return;
-
-  if (static_link == NULL)
-    {
-      /* Initialize the local variable symbol that stands for the
-         static link (when there is one).  */
-      static_link = &static_link_sym;
-      SYMBOL_LINKAGE_NAME (static_link) = "";
-      SYMBOL_LANGUAGE (static_link) = language_unknown;
-      SYMBOL_CLASS (static_link) = LOC_LOCAL;
-      SYMBOL_DOMAIN (static_link) = VAR_DOMAIN;
-      SYMBOL_TYPE (static_link) = lookup_pointer_type (builtin_type_void);
-      SYMBOL_VALUE (static_link) =
-        -(long) TYPE_LENGTH (SYMBOL_TYPE (static_link));
-    }
-
-  frame = get_selected_frame ();
-  if (frame == NULL || inside_main_func (get_frame_address_in_block (frame)))
-    return;
-
-  target_link_val = read_var_value (static_link, frame);
-  while (target_link_val != NULL
-         && num_defns_collected (obstackp) == 0
-         && frame_relative_level (frame) <= MAX_ENCLOSING_FRAME_LEVELS)
-    {
-      CORE_ADDR target_link = value_as_address (target_link_val);
-
-      frame = get_prev_frame (frame);
-      if (frame == NULL)
-        break;
-
-      if (get_frame_locals_address (frame) == target_link)
-        {
-          struct block *block;
-
-          QUIT;
-
-          block = get_frame_block (frame, 0);
-          while (block != NULL && block_function (block) != NULL
-                 && num_defns_collected (obstackp) == 0)
-            {
-              QUIT;
-
-              ada_add_block_symbols (obstackp, block, name, namespace,
-                                     NULL, NULL, wild_match);
-
-              block = BLOCK_SUPERBLOCK (block);
-            }
-        }
-    }
-
-  do_cleanups (old_chain);
-#endif
 }
 
 /* FIXME: The next two routines belong in symtab.c */
@@ -4758,8 +4442,6 @@ done:
    set to 0 and *SYMTAB is set to the symbol table in which the symbol
    was found (in both cases, these assignments occur only if the
    pointers are non-null).  */
-
-
 struct symbol *
 ada_lookup_symbol (const char *name, const struct block *block0,
                    domain_enum namespace, int *is_a_field_of_this,
@@ -5178,7 +4860,6 @@ ada_add_block_symbols (struct obstack *o
                   }
               }
           }
-      end_loop2:;
       }
 
       /* NOTE: This really shouldn't be needed for _ada_ symbols.
@@ -5192,1486 +4873,104 @@ ada_add_block_symbols (struct obstack *o
     }
 }
 
-#ifdef GNAT_GDB
-
-                                /* Symbol Completion */
+                                /* Field Access */
 
-/* If SYM_NAME is a completion candidate for TEXT, return this symbol
-   name in a form that's appropriate for the completion.  The result
-   does not need to be deallocated, but is only good until the next call.
-
-   TEXT_LEN is equal to the length of TEXT.
-   Perform a wild match if WILD_MATCH is set.
-   ENCODED should be set if TEXT represents the start of a symbol name
-   in its encoded form.  */
+/* True if field number FIELD_NUM in struct or union type TYPE is supposed
+   to be invisible to users.  */
 
-static const char *
-symbol_completion_match (const char *sym_name,
-                         const char *text, int text_len,
-                         int wild_match, int encoded)
+int
+ada_is_ignored_field (struct type *type, int field_num)
 {
-  char *result;
-  const int verbatim_match = (text[0] == '<');
-  int match = 0;
-
-  if (verbatim_match)
-    {
-      /* Strip the leading angle bracket.  */
-      text = text + 1;
-      text_len--;
-    }
-
-  /* First, test against the fully qualified name of the symbol.  */
-
-  if (strncmp (sym_name, text, text_len) == 0)
-    match = 1;
-
-  if (match && !encoded)
+  if (field_num < 0 || field_num > TYPE_NFIELDS (type))
+    return 1;
+  else
     {
-      /* One needed check before declaring a positive match is to verify
-         that iff we are doing a verbatim match, the decoded version
-         of the symbol name starts with '<'.  Otherwise, this symbol name
-         is not a suitable completion.  */
-      const char *sym_name_copy = sym_name;
-      int has_angle_bracket;
-
-      sym_name = ada_decode (sym_name);
-      has_angle_bracket = (sym_name[0] == '<');
-      match = (has_angle_bracket == verbatim_match);
-      sym_name = sym_name_copy;
+      const char *name = TYPE_FIELD_NAME (type, field_num);
+      return (name == NULL
+              || (name[0] == '_' && strncmp (name, "_parent", 7) != 0));
     }
+}
 
-  if (match && !verbatim_match)
-    {
-      /* When doing non-verbatim match, another check that needs to
-         be done is to verify that the potentially matching symbol name
-         does not include capital letters, because the ada-mode would
-         not be able to understand these symbol names without the
-         angle bracket notation.  */
-      const char *tmp;
+/* True iff TYPE has a tag field.  If REFOK, then TYPE may also be a
+   pointer or reference type whose ultimate target has a tag field. */
 
-      for (tmp = sym_name; *tmp != '\0' && !isupper (*tmp); tmp++);
-      if (*tmp != '\0')
-        match = 0;
-    }
+int
+ada_is_tagged_type (struct type *type, int refok)
+{
+  return (ada_lookup_struct_elt_type (type, "_tag", refok, 1, NULL) != NULL);
+}
 
-  /* Second: Try wild matching...  */
+/* True iff TYPE represents the type of X'Tag */
 
-  if (!match && wild_match)
+int
+ada_is_tag_type (struct type *type)
+{
+  if (type == NULL || TYPE_CODE (type) != TYPE_CODE_PTR)
+    return 0;
+  else
     {
-      /* Since we are doing wild matching, this means that TEXT
-         may represent an unqualified symbol name.  We therefore must
-         also compare TEXT against the unqualified name of the symbol.  */
-      sym_name = ada_unqualified_name (ada_decode (sym_name));
-
-      if (strncmp (sym_name, text, text_len) == 0)
-        match = 1;
+      const char *name = ada_type_name (TYPE_TARGET_TYPE (type));
+      return (name != NULL
+              && strcmp (name, "ada__tags__dispatch_table") == 0);
     }
-
-  /* Finally: If we found a mach, prepare the result to return.  */
-
-  if (!match)
-    return NULL;
-
-  if (verbatim_match)
-    sym_name = add_angle_brackets (sym_name);
-
-  if (!encoded)
-    sym_name = ada_decode (sym_name);
-
-  return sym_name;
 }
 
-/* A companion function to ada_make_symbol_completion_list().
-   Check if SYM_NAME represents a symbol which name would be suitable
-   to complete TEXT (TEXT_LEN is the length of TEXT), in which case
-   it is appended at the end of the given string vector SV.
-
-   ORIG_TEXT is the string original string from the user command
-   that needs to be completed.  WORD is the entire command on which
-   completion should be performed.  These two parameters are used to
-   determine which part of the symbol name should be added to the
-   completion vector.
-   if WILD_MATCH is set, then wild matching is performed.
-   ENCODED should be set if TEXT represents a symbol name in its
-   encoded formed (in which case the completion should also be
-   encoded).  */
-
-static void
-symbol_completion_add (struct string_vector *sv,
-                       const char *sym_name,
-                       const char *text, int text_len,
-                       const char *orig_text, const char *word,
-                       int wild_match, int encoded)
-{
-  const char *match = symbol_completion_match (sym_name, text, text_len,
-                                               wild_match, encoded);
-  char *completion;
-
-  if (match == NULL)
-    return;
+/* The type of the tag on VAL.  */
 
-  /* We found a match, so add the appropriate completion to the given
-     string vector.  */
+struct type *
+ada_tag_type (struct value *val)
+{
+  return ada_lookup_struct_elt_type (VALUE_TYPE (val), "_tag", 1, 0, NULL);
+}
 
-  if (word == orig_text)
-    {
-      completion = xmalloc (strlen (match) + 5);
-      strcpy (completion, match);
-    }
-  else if (word > orig_text)
-    {
-      /* Return some portion of sym_name.  */
-      completion = xmalloc (strlen (match) + 5);
-      strcpy (completion, match + (word - orig_text));
-    }
-  else
-    {
-      /* Return some of ORIG_TEXT plus sym_name.  */
-      completion = xmalloc (strlen (match) + (orig_text - word) + 5);
-      strncpy (completion, word, orig_text - word);
-      completion[orig_text - word] = '\0';
-      strcat (completion, match);
-    }
+/* The value of the tag on VAL.  */
 
-  string_vector_append (sv, completion);
+struct value *
+ada_value_tag (struct value *val)
+{
+  return ada_value_struct_elt (val, "_tag", "record");
 }
 
-/* Return a list of possible symbol names completing TEXT0.  The list
-   is NULL terminated.  WORD is the entire command on which completion
-   is made.  */
+/* The value of the tag on the object of type TYPE whose contents are
+   saved at VALADDR, if it is non-null, or is at memory address
+   ADDRESS. */
 
-char **
-ada_make_symbol_completion_list (const char *text0, const char *word)
+static struct value *
+value_tag_from_contents_and_address (struct type *type, char *valaddr,
+                                     CORE_ADDR address)
 {
-  /* Note: This function is almost a copy of make_symbol_completion_list(),
-     except it has been adapted for Ada.  It is somewhat of a shame to
-     duplicate so much code, but we don't really have the infrastructure
-     yet to develop a language-aware version of he symbol completer...  */
-  char *text;
-  int text_len;
-  int wild_match;
-  int encoded;
-  struct string_vector result = xnew_string_vector (128);
-  struct symbol *sym;
-  struct symtab *s;
-  struct partial_symtab *ps;
-  struct minimal_symbol *msymbol;
-  struct objfile *objfile;
-  struct block *b, *surrounding_static_block = 0;
-  int i;
-  struct dict_iterator iter;
-
-  if (text0[0] == '<')
-    {
-      text = xstrdup (text0);
-      make_cleanup (xfree, text);
-      text_len = strlen (text);
-      wild_match = 0;
-      encoded = 1;
-    }
-  else
+  int tag_byte_offset, dummy1, dummy2;
+  struct type *tag_type;
+  if (find_struct_field ("_tag", type, 0, &tag_type, &tag_byte_offset,
+                         &dummy1, &dummy2))
     {
-      text = xstrdup (ada_encode (text0));
-      make_cleanup (xfree, text);
-      text_len = strlen (text);
-      for (i = 0; i < text_len; i++)
-        text[i] = tolower (text[i]);
+      char *valaddr1 = (valaddr == NULL) ? NULL : valaddr + tag_byte_offset;
+      CORE_ADDR address1 = (address == 0) ? 0 : address + tag_byte_offset;
 
-      /* FIXME: brobecker/2003-09-17: When we get rid of ADA_RETAIN_DOTS,
-         we can restrict the wild_match check to searching "__" only.  */
-      wild_match = (strstr (text0, "__") == NULL
-                    && strchr (text0, '.') == NULL);
-      encoded = (strstr (text0, "__") != NULL);
+      return value_from_contents_and_address (tag_type, valaddr1, address1);
     }
+  return NULL;
+}
 
-  /* First, look at the partial symtab symbols.  */
-  ALL_PSYMTABS (objfile, ps)
-  {
-    struct partial_symbol **psym;
+static struct type *
+type_from_tag (struct value *tag)
+{
+  const char *type_name = ada_tag_name (tag);
+  if (type_name != NULL)
+    return ada_find_any_type (ada_encode (type_name));
+  return NULL;
+}
 
-    /* If the psymtab's been read in we'll get it when we search
-       through the blockvector.  */
-    if (ps->readin)
-      continue;
+struct tag_args
+{
+  struct value *tag;
+  char *name;
+};
 
-    for (psym = objfile->global_psymbols.list + ps->globals_offset;
-         psym < (objfile->global_psymbols.list + ps->globals_offset
-                 + ps->n_global_syms); psym++)
-      {
-        QUIT;
-        symbol_completion_add (&result, SYMBOL_LINKAGE_NAME (*psym),
-                               text, text_len, text0, word,
-                               wild_match, encoded);
-      }
-
-    for (psym = objfile->static_psymbols.list + ps->statics_offset;
-         psym < (objfile->static_psymbols.list + ps->statics_offset
-                 + ps->n_static_syms); psym++)
-      {
-        QUIT;
-        symbol_completion_add (&result, SYMBOL_LINKAGE_NAME (*psym),
-                               text, text_len, text0, word,
-                               wild_match, encoded);
-      }
-  }
-
-  /* At this point scan through the misc symbol vectors and add each
-     symbol you find to the list.  Eventually we want to ignore
-     anything that isn't a text symbol (everything else will be
-     handled by the psymtab code above).  */
-
-  ALL_MSYMBOLS (objfile, msymbol)
-  {
-    QUIT;
-    symbol_completion_add (&result, SYMBOL_LINKAGE_NAME (msymbol),
-                           text, text_len, text0, word, wild_match, encoded);
-  }
-
-  /* Search upwards from currently selected frame (so that we can
-     complete on local vars.  */
-
-  for (b = get_selected_block (0); b != NULL; b = BLOCK_SUPERBLOCK (b))
-    {
-      if (!BLOCK_SUPERBLOCK (b))
-        surrounding_static_block = b;   /* For elmin of dups */
-
-      ALL_BLOCK_SYMBOLS (b, iter, sym)
-      {
-        symbol_completion_add (&result, SYMBOL_LINKAGE_NAME (sym),
-                               text, text_len, text0, word,
-                               wild_match, encoded);
-      }
-    }
-
-  /* Go through the symtabs and check the externs and statics for
-     symbols which match.  */
-
-  ALL_SYMTABS (objfile, s)
-  {
-    QUIT;
-    b = BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), GLOBAL_BLOCK);
-    ALL_BLOCK_SYMBOLS (b, iter, sym)
-    {
-      symbol_completion_add (&result, SYMBOL_LINKAGE_NAME (sym),
-                             text, text_len, text0, word,
-                             wild_match, encoded);
-    }
-  }
-
-  ALL_SYMTABS (objfile, s)
-  {
-    QUIT;
-    b = BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), STATIC_BLOCK);
-    /* Don't do this block twice.  */
-    if (b == surrounding_static_block)
-      continue;
-    ALL_BLOCK_SYMBOLS (b, iter, sym)
-    {
-      symbol_completion_add (&result, SYMBOL_LINKAGE_NAME (sym),
-                             text, text_len, text0, word,
-                             wild_match, encoded);
-    }
-  }
-
-  /* Append the closing NULL entry.  */
-  string_vector_append (&result, NULL);
-
-  return (result.array);
-}
-
-#endif /* GNAT_GDB */
-
-#ifdef GNAT_GDB
-                                /* Breakpoint-related */
-
-/* Assuming that LINE is pointing at the beginning of an argument to
-   'break', return a pointer to the delimiter for the initial segment
-   of that name.  This is the first ':', ' ', or end of LINE.  */
-
-char *
-ada_start_decode_line_1 (char *line)
-{
-  /* NOTE: strpbrk would be more elegant, but I am reluctant to be
-     the first to use such a library function in GDB code.  */
-  char *p;
-  for (p = line; *p != '\000' && *p != ' ' && *p != ':'; p += 1)
-    ;
-  return p;
-}
-
-/* *SPEC points to a function and line number spec (as in a break
-   command), following any initial file name specification.
-
-   Return all symbol table/line specfications (sals) consistent with the
-   information in *SPEC and FILE_TABLE in the following sense:
-     + FILE_TABLE is null, or the sal refers to a line in the file
-       named by FILE_TABLE.
-     + If *SPEC points to an argument with a trailing ':LINENUM',
-       then the sal refers to that line (or one following it as closely as
-       possible).
-     + If *SPEC does not start with '*', the sal is in a function with
-       that name.
-
-   Returns with 0 elements if no matching non-minimal symbols found.
-
-   If *SPEC begins with a function name of the form <NAME>, then NAME
-   is taken as a literal name; otherwise the function name is subject
-   to the usual encoding.
-
-   *SPEC is updated to point after the function/line number specification.
-
-   FUNFIRSTLINE is non-zero if we desire the first line of real code
-   in each function.
-
-   If CANONICAL is non-NULL, and if any of the sals require a
-   'canonical line spec', then *CANONICAL is set to point to an array
-   of strings, corresponding to and equal in length to the returned
-   list of sals, such that (*CANONICAL)[i] is non-null and contains a
-   canonical line spec for the ith returned sal, if needed.  If no
-   canonical line specs are required and CANONICAL is non-null,
-   *CANONICAL is set to NULL.
-
-   A 'canonical line spec' is simply a name (in the format of the
-   breakpoint command) that uniquely identifies a breakpoint position,
-   with no further contextual information or user selection.  It is
-   needed whenever the file name, function name, and line number
-   information supplied is insufficient for this unique
-   identification.  Currently overloaded functions, the name '*',
-   or static functions without a filename yield a canonical line spec.
-   The array and the line spec strings are allocated on the heap; it
-   is the caller's responsibility to free them.  */
-
-struct symtabs_and_lines
-ada_finish_decode_line_1 (char **spec, struct symtab *file_table,
-                          int funfirstline, char ***canonical)
-{
-  struct ada_symbol_info *symbols;
-  const struct block *block;
-  int n_matches, i, line_num;
-  struct symtabs_and_lines selected;
-  struct cleanup *old_chain = make_cleanup (null_cleanup, NULL);
-  char *name;
-  int is_quoted;
-
-  int len;
-  char *lower_name;
-  char *unquoted_name;
-
-  if (file_table == NULL)
-    block = block_static_block (get_selected_block (0));
-  else
-    block = BLOCKVECTOR_BLOCK (BLOCKVECTOR (file_table), STATIC_BLOCK);
-
-  if (canonical != NULL)
-    *canonical = (char **) NULL;
-
-  is_quoted = (**spec && strchr (get_gdb_completer_quote_characters (),
-                                 **spec) != NULL);
-
-  name = *spec;
-  if (**spec == '*')
-    *spec += 1;
-  else
-    {
-      if (is_quoted)
-        *spec = skip_quoted (*spec);
-      while (**spec != '\000'
-             && !strchr (ada_completer_word_break_characters, **spec))
-        *spec += 1;
-    }
-  len = *spec - name;
-
-  line_num = -1;
-  if (file_table != NULL && (*spec)[0] == ':' && isdigit ((*spec)[1]))
-    {
-      line_num = strtol (*spec + 1, spec, 10);
-      while (**spec == ' ' || **spec == '\t')
-        *spec += 1;
-    }
-
-  if (name[0] == '*')
-    {
-      if (line_num == -1)
-        error ("Wild-card function with no line number or file name.");
-
-      return ada_sals_for_line (file_table->filename, line_num,
-                                funfirstline, canonical, 0);
-    }
-
-  if (name[0] == '\'')
-    {
-      name += 1;
-      len -= 2;
-    }
-
-  if (name[0] == '<')
-    {
-      unquoted_name = (char *) alloca (len - 1);
-      memcpy (unquoted_name, name + 1, len - 2);
-      unquoted_name[len - 2] = '\000';
-      lower_name = NULL;
-    }
-  else
-    {
-      unquoted_name = (char *) alloca (len + 1);
-      memcpy (unquoted_name, name, len);
-      unquoted_name[len] = '\000';
-      lower_name = (char *) alloca (len + 1);
-      for (i = 0; i < len; i += 1)
-        lower_name[i] = tolower (name[i]);
-      lower_name[len] = '\000';
-    }
-
-  n_matches = 0;
-  if (lower_name != NULL)
-    n_matches = ada_lookup_symbol_list (ada_encode (lower_name), block,
-                                        VAR_DOMAIN, &symbols);
-  if (n_matches == 0)
-    n_matches = ada_lookup_symbol_list (unquoted_name, block,
-                                        VAR_DOMAIN, &symbols);
-  if (n_matches == 0 && line_num >= 0)
-    error ("No line number information found for %s.", unquoted_name);
-  else if (n_matches == 0)
-    {
-#ifdef HPPA_COMPILER_BUG
-      /* FIXME: See comment in symtab.c::decode_line_1 */
-#undef volatile
-      volatile struct symtab_and_line val;
-#define volatile                /*nothing */
-#else
-      struct symtab_and_line val;
-#endif
-      struct minimal_symbol *msymbol;
-
-      init_sal (&val);
-
-      msymbol = NULL;
-      if (lower_name != NULL)
-        msymbol = ada_lookup_simple_minsym (ada_encode (lower_name));
-      if (msymbol == NULL)
-        msymbol = ada_lookup_simple_minsym (unquoted_name);
-      if (msymbol != NULL)
-        {
-          val.pc = SYMBOL_VALUE_ADDRESS (msymbol);
-          val.section = SYMBOL_BFD_SECTION (msymbol);
-          if (funfirstline)
-            {
-              val.pc = gdbarch_convert_from_func_ptr_addr (current_gdbarch,
-							   val.pc,
-							   &current_target);
-              SKIP_PROLOGUE (val.pc);
-            }
-          selected.sals = (struct symtab_and_line *)
-            xmalloc (sizeof (struct symtab_and_line));
-          selected.sals[0] = val;
-          selected.nelts = 1;
-          return selected;
-        }
-
-      if (!have_full_symbols ()
-          && !have_partial_symbols () && !have_minimal_symbols ())
-        error ("No symbol table is loaded.  Use the \"file\" command.");
-
-      error ("Function \"%s\" not defined.", unquoted_name);
-      return selected;          /* for lint */
-    }
-
-  if (line_num >= 0)
-    {
-      struct symtabs_and_lines best_sal =
-        find_sal_from_funcs_and_line (file_table->filename, line_num,
-                                      symbols, n_matches);
-      if (funfirstline)
-        adjust_pc_past_prologue (&best_sal.sals[0].pc);
-      return best_sal;
-    }
-  else
-    {
-      selected.nelts = user_select_syms (symbols, n_matches, n_matches);
-    }
-
-  selected.sals = (struct symtab_and_line *)
-    xmalloc (sizeof (struct symtab_and_line) * selected.nelts);
-  memset (selected.sals, 0, selected.nelts * sizeof (selected.sals[i]));
-  make_cleanup (xfree, selected.sals);
-
-  i = 0;
-  while (i < selected.nelts)
-    {
-      if (SYMBOL_CLASS (symbols[i].sym) == LOC_BLOCK)
-        selected.sals[i]
-          = find_function_start_sal (symbols[i].sym, funfirstline);
-      else if (SYMBOL_LINE (symbols[i].sym) != 0)
-        {
-          selected.sals[i].symtab =
-            symbols[i].symtab
-            ? symbols[i].symtab : symtab_for_sym (symbols[i].sym);
-          selected.sals[i].line = SYMBOL_LINE (symbols[i].sym);
-        }
-      else if (line_num >= 0)
-        {
-          /* Ignore this choice */
-          symbols[i] = symbols[selected.nelts - 1];
-          selected.nelts -= 1;
-          continue;
-        }
-      else
-        error ("Line number not known for symbol \"%s\"", unquoted_name);
-      i += 1;
-    }
-
-  if (canonical != NULL && (line_num >= 0 || n_matches > 1))
-    {
-      *canonical = (char **) xmalloc (sizeof (char *) * selected.nelts);
-      for (i = 0; i < selected.nelts; i += 1)
-        (*canonical)[i] =
-          extended_canonical_line_spec (selected.sals[i],
-                                        SYMBOL_PRINT_NAME (symbols[i].sym));
-    }
-
-  discard_cleanups (old_chain);
-  return selected;
-}
-
-/* The (single) sal corresponding to line LINE_NUM in a symbol table
-   with file name FILENAME that occurs in one of the functions listed
-   in the symbol fields of SYMBOLS[0 .. NSYMS-1].  */
-
-static struct symtabs_and_lines
-find_sal_from_funcs_and_line (const char *filename, int line_num,
-                              struct ada_symbol_info *symbols, int nsyms)
-{
-  struct symtabs_and_lines sals;
-  int best_index, best;
-  struct linetable *best_linetable;
-  struct objfile *objfile;
-  struct symtab *s;
-  struct symtab *best_symtab;
-
-  read_all_symtabs (filename);
-
-  best_index = 0;
-  best_linetable = NULL;
-  best_symtab = NULL;
-  best = 0;
-  ALL_SYMTABS (objfile, s)
-  {
-    struct linetable *l;
-    int ind, exact;
-
-    QUIT;
-
-    if (strcmp (filename, s->filename) != 0)
-      continue;
-    l = LINETABLE (s);
-    ind = find_line_in_linetable (l, line_num, symbols, nsyms, &exact);
-    if (ind >= 0)
-      {
-        if (exact)
-          {
-            best_index = ind;
-            best_linetable = l;
-            best_symtab = s;
-            goto done;
-          }
-        if (best == 0 || l->item[ind].line < best)
-          {
-            best = l->item[ind].line;
-            best_index = ind;
-            best_linetable = l;
-            best_symtab = s;
-          }
-      }
-  }
-
-  if (best == 0)
-    error ("Line number not found in designated function.");
-
-done:
-
-  sals.nelts = 1;
-  sals.sals = (struct symtab_and_line *) xmalloc (sizeof (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;
-  sals.sals[0].symtab = best_symtab;
-
-  return sals;
-}
-
-/* Return the index in LINETABLE of the best match for LINE_NUM whose
-   pc falls within one of the functions denoted by the symbol fields
-   of SYMBOLS[0..NSYMS-1].  Set *EXACTP to 1 if the match is exact, 
-   and 0 otherwise.  */
-
-static int
-find_line_in_linetable (struct linetable *linetable, int line_num,
-                        struct ada_symbol_info *symbols, int nsyms,
-                        int *exactp)
-{
-  int i, len, best_index, best;
-
-  if (line_num <= 0 || linetable == NULL)
-    return -1;
-
-  len = linetable->nitems;
-  for (i = 0, best_index = -1, best = 0; i < len; i += 1)
-    {
-      int k;
-      struct linetable_entry *item = &(linetable->item[i]);
-
-      for (k = 0; k < nsyms; k += 1)
-        {
-          if (symbols[k].sym != NULL
-              && SYMBOL_CLASS (symbols[k].sym) == LOC_BLOCK
-              && item->pc >= BLOCK_START (SYMBOL_BLOCK_VALUE (symbols[k].sym))
-              && item->pc < BLOCK_END (SYMBOL_BLOCK_VALUE (symbols[k].sym)))
-            goto candidate;
-        }
-      continue;
-
-    candidate:
-
-      if (item->line == line_num)
-        {
-          *exactp = 1;
-          return i;
-        }
-
-      if (item->line > line_num && (best == 0 || item->line < best))
-        {
-          best = item->line;
-          best_index = i;
-        }
-    }
-
-  *exactp = 0;
-  return best_index;
-}
-
-/* Find the smallest k >= LINE_NUM such that k is a line number in
-   LINETABLE, and k falls strictly within a named function that begins at
-   or before LINE_NUM.  Return -1 if there is no such k.  */
-
-static int
-nearest_line_number_in_linetable (struct linetable *linetable, int line_num)
-{
-  int i, len, best;
-
-  if (line_num <= 0 || linetable == NULL || linetable->nitems == 0)
-    return -1;
-  len = linetable->nitems;
-
-  i = 0;
-  best = INT_MAX;
-  while (i < len)
-    {
-      struct linetable_entry *item = &(linetable->item[i]);
-
-      if (item->line >= line_num && item->line < best)
-        {
-          char *func_name;
-          CORE_ADDR start, end;
-
-          func_name = NULL;
-          find_pc_partial_function (item->pc, &func_name, &start, &end);
-
-          if (func_name != NULL && item->pc < end)
-            {
-              if (item->line == line_num)
-                return line_num;
-              else
-                {
-                  struct symbol *sym =
-                    standard_lookup (func_name, NULL, VAR_DOMAIN);
-                  if (is_plausible_func_for_line (sym, line_num))
-                    best = item->line;
-                  else
-                    {
-                      do
-                        i += 1;
-                      while (i < len && linetable->item[i].pc < end);
-                      continue;
-                    }
-                }
-            }
-        }
-
-      i += 1;
-    }
-
-  return (best == INT_MAX) ? -1 : best;
-}
-
-
-/* Return the next higher index, k, into LINETABLE such that k > IND,
-   entry k in LINETABLE has a line number equal to LINE_NUM, k
-   corresponds to a PC that is in a function different from that
-   corresponding to IND, and falls strictly within a named function
-   that begins at a line at or preceding STARTING_LINE.
-   Return -1 if there is no such k.
-   IND == -1 corresponds to no function.  */
-
-static int
-find_next_line_in_linetable (struct linetable *linetable, int line_num,
-                             int starting_line, int ind)
-{
-  int i, len;
-
-  if (line_num <= 0 || linetable == NULL || ind >= linetable->nitems)
-    return -1;
-  len = linetable->nitems;
-
-  if (ind >= 0)
-    {
-      CORE_ADDR start, end;
-
-      if (find_pc_partial_function (linetable->item[ind].pc,
-                                    (char **) NULL, &start, &end))
-        {
-          while (ind < len && linetable->item[ind].pc < end)
-            ind += 1;
-        }
-      else
-        ind += 1;
-    }
-  else
-    ind = 0;
-
-  i = ind;
-  while (i < len)
-    {
-      struct linetable_entry *item = &(linetable->item[i]);
-
-      if (item->line >= line_num)
-        {
-          char *func_name;
-          CORE_ADDR start, end;
-
-          func_name = NULL;
-          find_pc_partial_function (item->pc, &func_name, &start, &end);
-
-          if (func_name != NULL && item->pc < end)
-            {
-              if (item->line == line_num)
-                {
-                  struct symbol *sym =
-                    standard_lookup (func_name, NULL, VAR_DOMAIN);
-                  if (is_plausible_func_for_line (sym, starting_line))
-                    return i;
-                  else
-                    {
-                      while ((i + 1) < len && linetable->item[i + 1].pc < end)
-                        i += 1;
-                    }
-                }
-            }
-        }
-      i += 1;
-    }
-
-  return -1;
-}
-
-/* True iff function symbol SYM starts somewhere at or before line #
-   LINE_NUM.  */
-
-static int
-is_plausible_func_for_line (struct symbol *sym, int line_num)
-{
-  struct symtab_and_line start_sal;
-
-  if (sym == NULL)
-    return 0;
-
-  start_sal = find_function_start_sal (sym, 0);
-
-  return (start_sal.line != 0 && line_num >= start_sal.line);
-}
-
-/* Read in all symbol tables corresponding to partial symbol tables
-   with file name FILENAME.  */
-
-static void
-read_all_symtabs (const char *filename)
-{
-  struct partial_symtab *ps;
-  struct objfile *objfile;
-
-  ALL_PSYMTABS (objfile, ps)
-  {
-    QUIT;
-
-    if (strcmp (filename, ps->filename) == 0)
-      PSYMTAB_TO_SYMTAB (ps);
-  }
-}
-
-/* All sals corresponding to line LINE_NUM in a symbol table from file
-   FILENAME, as filtered by the user.  Filter out any lines that
-   reside in functions with "suppressed" names (not corresponding to
-   explicit Ada functions), if there is at least one in a function
-   with a non-suppressed name.  If CANONICAL is not null, set
-   it to a corresponding array of canonical line specs.
-   If ONE_LOCATION_ONLY is set and several matches are found for
-   the given location, then automatically select the first match found
-   instead of asking the user which instance should be returned.  */
-
-struct symtabs_and_lines
-ada_sals_for_line (const char *filename, int line_num,
-                   int funfirstline, char ***canonical, int one_location_only)
-{
-  struct symtabs_and_lines result;
-  struct objfile *objfile;
-  struct symtab *s;
-  struct cleanup *old_chain = make_cleanup (null_cleanup, NULL);
-  size_t len;
-
-  read_all_symtabs (filename);
-
-  result.sals =
-    (struct symtab_and_line *) xmalloc (4 * sizeof (result.sals[0]));
-  result.nelts = 0;
-  len = 4;
-  make_cleanup (free_current_contents, &result.sals);
-
-  ALL_SYMTABS (objfile, s)
-  {
-    int ind, target_line_num;
-
-    QUIT;
-
-    if (strcmp (s->filename, filename) != 0)
-      continue;
-
-    target_line_num =
-      nearest_line_number_in_linetable (LINETABLE (s), line_num);
-    if (target_line_num == -1)
-      continue;
-
-    ind = -1;
-    while (1)
-      {
-        ind =
-          find_next_line_in_linetable (LINETABLE (s),
-                                       target_line_num, line_num, ind);
-
-        if (ind < 0)
-          break;
-
-        GROW_VECT (result.sals, len, result.nelts + 1);
-        init_sal (&result.sals[result.nelts]);
-        result.sals[result.nelts].line = line_num;
-        result.sals[result.nelts].pc = LINETABLE (s)->item[ind].pc;
-        result.sals[result.nelts].symtab = s;
-
-        if (funfirstline)
-          adjust_pc_past_prologue (&result.sals[result.nelts].pc);
-
-        result.nelts += 1;
-      }
-  }
-
-  if (canonical != NULL || result.nelts > 1)
-    {
-      int k, j, n;
-      char **func_names = (char **) alloca (result.nelts * sizeof (char *));
-      int first_choice = (result.nelts > 1) ? 2 : 1;
-      int *choices = (int *) alloca (result.nelts * sizeof (int));
-
-      for (k = 0; k < result.nelts; k += 1)
-        {
-          find_pc_partial_function (result.sals[k].pc, &func_names[k],
-                                    (CORE_ADDR *) NULL, (CORE_ADDR *) NULL);
-          if (func_names[k] == NULL)
-            error ("Could not find function for one or more breakpoints.");
-        }
-
-      /* Remove suppressed names, unless all are suppressed.  */
-      for (j = 0; j < result.nelts; j += 1)
-        if (!is_suppressed_name (func_names[j]))
-          {
-            /* At least one name is unsuppressed, so remove all
-               suppressed names.  */
-            for (k = n = 0; k < result.nelts; k += 1)
-              if (!is_suppressed_name (func_names[k]))
-                {
-                  func_names[n] = func_names[k];
-                  result.sals[n] = result.sals[k];
-                  n += 1;
-                }
-            result.nelts = n;
-            break;
-          }
-
-      if (result.nelts > 1)
-        {
-          if (one_location_only)
-            {
-              /* Automatically select the first of all possible choices.  */
-              n = 1;
-              choices[0] = 0;
-            }
-          else
-            {
-              printf_unfiltered ("[0] cancel\n");
-              if (result.nelts > 1)
-                printf_unfiltered ("[1] all\n");
-              for (k = 0; k < result.nelts; k += 1)
-                printf_unfiltered ("[%d] %s\n", k + first_choice,
-                                   ada_decode (func_names[k]));
-
-              n = get_selections (choices, result.nelts, result.nelts,
-                                  result.nelts > 1, "instance-choice");
-            }
-
-          for (k = 0; k < n; k += 1)
-            {
-              result.sals[k] = result.sals[choices[k]];
-              func_names[k] = func_names[choices[k]];
-            }
-          result.nelts = n;
-        }
-
-      if (canonical != NULL && result.nelts == 0)
-        *canonical = NULL;
-      else if (canonical != NULL)
-        {
-          *canonical = (char **) xmalloc (result.nelts * sizeof (char **));
-          make_cleanup (xfree, *canonical);
-          for (k = 0; k < result.nelts; k += 1)
-            {
-              (*canonical)[k] =
-                extended_canonical_line_spec (result.sals[k], func_names[k]);
-              if ((*canonical)[k] == NULL)
-                error ("Could not locate one or more breakpoints.");
-              make_cleanup (xfree, (*canonical)[k]);
-            }
-        }
-    }
-
-  if (result.nelts == 0)
-    {
-      do_cleanups (old_chain);
-      result.sals = NULL;
-    }
-  else
-    discard_cleanups (old_chain);
-  return result;
-}
-
-
-/* A canonical line specification of the form FILE:NAME:LINENUM for
-   symbol table and line data SAL.  NULL if insufficient
-   information.  The caller is responsible for releasing any space
-   allocated.  */
-
-static char *
-extended_canonical_line_spec (struct symtab_and_line sal, const char *name)
-{
-  char *r;
-
-  if (sal.symtab == NULL || sal.symtab->filename == NULL || sal.line <= 0)
-    return NULL;
-
-  r = (char *) xmalloc (strlen (name) + strlen (sal.symtab->filename)
-                        + sizeof (sal.line) * 3 + 3);
-  sprintf (r, "%s:'%s':%d", sal.symtab->filename, name, sal.line);
-  return r;
-}
-
-
-				/* Exception-related */
-
-int
-ada_is_exception_sym (struct symbol *sym)
-{
-  char *type_name = type_name_no_tag (SYMBOL_TYPE (sym));
-
-  return (SYMBOL_CLASS (sym) != LOC_TYPEDEF
-          && SYMBOL_CLASS (sym) != LOC_BLOCK
-          && SYMBOL_CLASS (sym) != LOC_CONST
-          && type_name != NULL && strcmp (type_name, "exception") == 0);
-}
-
-/* Return type of Ada breakpoint associated with bp_stat:
-   0 if not an Ada-specific breakpoint, 1 for break on specific exception,
-   2 for break on unhandled exception, 3 for assert.  */
-
-static int
-ada_exception_breakpoint_type (bpstat bs)
-{
-  return ((!bs || !bs->breakpoint_at) ? 0
-          : bs->breakpoint_at->break_on_exception);
-}
-
-/* True iff FRAME is very likely to be that of a function that is
-   part of the runtime system.  This is all very heuristic, but is
-   intended to be used as advice as to what frames are uninteresting
-   to most users.  */
-
-static int
-is_known_support_routine (struct frame_info *frame)
-{
-  struct frame_info *next_frame = get_next_frame (frame);
-  /* If frame is not innermost, that normally means that frame->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 frame->pc.  */
-  const int pc_is_after_call =
-    next_frame != NULL
-    && get_frame_type (next_frame) != SIGTRAMP_FRAME
-    && get_frame_type (next_frame) != DUMMY_FRAME;
-  struct symtab_and_line sal
-    = find_pc_line (get_frame_pc (frame), pc_is_after_call);
-  char *func_name;
-  int i;
-  struct stat st;
-
-  /* The heuristic:
-     1. The symtab is null (indicating no debugging symbols)
-     2. The symtab's filename does not exist.
-     3. The object file's name is one of the standard libraries.
-     4. The symtab's file name has the form of an Ada library source file.
-     5. The function at frame's PC has a GNAT-compiler-generated name.  */
-
-  if (sal.symtab == NULL)
-    return 1;
-
-  /* On some systems (e.g. VxWorks), the kernel contains debugging
-     symbols; in this case, the filename referenced by these symbols
-     does not exists.  */
-
-  if (stat (sal.symtab->filename, &st))
-    return 1;
-
-  for (i = 0; known_runtime_file_name_patterns[i] != NULL; i += 1)
-    {
-      re_comp (known_runtime_file_name_patterns[i]);
-      if (re_exec (sal.symtab->filename))
-        return 1;
-    }
-  if (sal.symtab->objfile != NULL)
-    {
-      for (i = 0; known_runtime_file_name_patterns[i] != NULL; i += 1)
-        {
-          re_comp (known_runtime_file_name_patterns[i]);
-          if (re_exec (sal.symtab->objfile->name))
-            return 1;
-        }
-    }
-
-  /* If the frame PC points after the call instruction, then we need to
-     decrement it in order to search for the function associated to this
-     PC.  Otherwise, if the associated call was the last instruction of
-     the function, we might either find the wrong function or even fail
-     during the function name lookup.  */
-  if (pc_is_after_call)
-    func_name = function_name_from_pc (get_frame_pc (frame) - 1);
-  else
-    func_name = function_name_from_pc (get_frame_pc (frame));
-
-  if (func_name == NULL)
-    return 1;
-
-  for (i = 0; known_auxiliary_function_name_patterns[i] != NULL; i += 1)
-    {
-      re_comp (known_auxiliary_function_name_patterns[i]);
-      if (re_exec (func_name))
-        return 1;
-    }
-
-  return 0;
-}
-
-/* Find the first frame that contains debugging information and that is not
-   part of the Ada run-time, starting from FI and moving upward.  */
-
-void
-ada_find_printable_frame (struct frame_info *fi)
-{
-  for (; fi != NULL; fi = get_prev_frame (fi))
-    {
-      if (!is_known_support_routine (fi))
-        {
-          select_frame (fi);
-          break;
-        }
-    }
-
-}
-
-/* Name found for exception associated with last bpstat sent to
-   ada_adjust_exception_stop.  Set to the null string if that bpstat
-   did not correspond to an Ada exception or no name could be found.  */
-
-static char last_exception_name[256];
-
-/* If BS indicates a stop in an Ada exception, try to go up to a frame
-   that will be meaningful to the user, and save the name of the last
-   exception (truncated, if necessary) in last_exception_name.  */
-
-void
-ada_adjust_exception_stop (bpstat bs)
-{
-  CORE_ADDR addr;
-  struct frame_info *fi;
-  int frame_level;
-  char *selected_frame_func;
-
-  addr = 0;
-  last_exception_name[0] = '\0';
-  fi = get_selected_frame ();
-  selected_frame_func = function_name_from_pc (get_frame_pc (fi));
-
-  switch (ada_exception_breakpoint_type (bs))
-    {
-    default:
-      return;
-    case 1:
-      break;
-    case 2:
-      /* Unhandled exceptions.  Select the frame corresponding to
-         ada.exceptions.process_raise_exception.  This frame is at
-         least 2 levels up, so we simply skip the first 2 frames
-         without checking the name of their associated function.  */
-      for (frame_level = 0; frame_level < 2; frame_level += 1)
-        if (fi != NULL)
-          fi = get_prev_frame (fi);
-      while (fi != NULL)
-        {
-          const char *func_name = function_name_from_pc (get_frame_pc (fi));
-          if (func_name != NULL
-              && strcmp (func_name, process_raise_exception_name) == 0)
-            break;              /* We found the frame we were looking for...  */
-          fi = get_prev_frame (fi);
-        }
-      if (fi == NULL)
-        break;
-      select_frame (fi);
-      break;
-    }
-
-  addr = parse_and_eval_address ("e.full_name");
-
-  if (addr != 0)
-    read_memory (addr, last_exception_name, sizeof (last_exception_name) - 1);
-  last_exception_name[sizeof (last_exception_name) - 1] = '\0';
-  ada_find_printable_frame (get_selected_frame ());
-}
-
-/* Output Ada exception name (if any) associated with last call to
-   ada_adjust_exception_stop.  */
-
-void
-ada_print_exception_stop (bpstat bs)
-{
-  if (last_exception_name[0] != '\000')
-    {
-      ui_out_text (uiout, last_exception_name);
-      ui_out_text (uiout, " at ");
-    }
-}
-
-/* Parses the CONDITION string associated with a breakpoint exception
-   to get the name of the exception on which the breakpoint has been
-   set.  The returned string needs to be deallocated after use.  */
-
-static char *
-exception_name_from_cond (const char *condition)
-{
-  char *start, *end, *exception_name;
-  int exception_name_len;
-
-  start = strrchr (condition, '&') + 1;
-  end = strchr (start, ')') - 1;
-  exception_name_len = end - start + 1;
-
-  exception_name =
-    (char *) xmalloc ((exception_name_len + 1) * sizeof (char));
-  sprintf (exception_name, "%.*s", exception_name_len, start);
-
-  return exception_name;
-}
-
-/* Print Ada-specific exception information about B, other than task
-   clause.  Return non-zero iff B was an Ada exception breakpoint.  */
-
-int
-ada_print_exception_breakpoint_nontask (struct breakpoint *b)
-{
-  if (b->break_on_exception == 1)
-    {
-      if (b->cond_string)       /* the breakpoint is on a specific exception.  */
-        {
-          char *exception_name = exception_name_from_cond (b->cond_string);
-
-          make_cleanup (xfree, exception_name);
-
-          ui_out_text (uiout, "on ");
-          if (ui_out_is_mi_like_p (uiout))
-            ui_out_field_string (uiout, "exception", exception_name);
-          else
-            {
-              ui_out_text (uiout, "exception ");
-              ui_out_text (uiout, exception_name);
-              ui_out_text (uiout, " ");
-            }
-        }
-      else
-        ui_out_text (uiout, "on all exceptions");
-    }
-  else if (b->break_on_exception == 2)
-    ui_out_text (uiout, "on unhandled exception");
-  else if (b->break_on_exception == 3)
-    ui_out_text (uiout, "on assert failure");
-  else
-    return 0;
-  return 1;
-}
-
-/* Print task identifier for breakpoint B, if it is an Ada-specific
-   breakpoint with non-zero tasking information.  */
-
-void
-ada_print_exception_breakpoint_task (struct breakpoint *b)
-{
-  if (b->task != 0)
-    {
-      ui_out_text (uiout, " task ");
-      ui_out_field_int (uiout, "task", b->task);
-    }
-}
-
-/* Cause the appropriate error if no appropriate runtime symbol is
-   found to set a breakpoint, using ERR_DESC to describe the
-   breakpoint.  */
-
-static void
-error_breakpoint_runtime_sym_not_found (const char *err_desc)
-{
-  /* If we are not debugging an Ada program, we can not put exception
-     breakpoints!  */
-
-  if (ada_update_initial_language (language_unknown, NULL) != language_ada)
-    error ("Unable to break on %s.  Is this an Ada main program?", err_desc);
-
-  /* If the symbol does not exist, then check that the program is
-     already started, to make sure that shared libraries have been
-     loaded.  If it is not started, this may mean that the symbol is
-     in a shared library.  */
-
-  if (ptid_get_pid (inferior_ptid) == 0)
-    error ("Unable to break on %s. Try to start the program first.",
-           err_desc);
-
-  /* At this point, we know that we are debugging an Ada program and
-     that the inferior has been started, but we still are not able to
-     find the run-time symbols. That can mean that we are in
-     configurable run time mode, or that a-except as been optimized
-     out by the linker...  In any case, at this point it is not worth
-     supporting this feature.  */
-
-  error ("Cannot break on %s in this configuration.", err_desc);
-}
-
-/* Test if NAME is currently defined, and that either ALLOW_TRAMP or
-   the symbol is not a shared-library trampoline.  Return the result of
-   the test.  */
-
-static int
-is_runtime_sym_defined (const char *name, int allow_tramp)
-{
-  struct minimal_symbol *msym;
-
-  msym = lookup_minimal_symbol (name, NULL, NULL);
-  return (msym != NULL && msym->type != mst_unknown
-          && (allow_tramp || msym->type != mst_solib_trampoline));
-}
-
-/* If ARG points to an Ada exception or assert breakpoint, rewrite
-   into equivalent form.  Return resulting argument string.  Set
-   *BREAK_ON_EXCEPTIONP to 1 for ordinary break on exception, 2 for
-   break on unhandled, 3 for assert, 0 otherwise.  */
-
-char *
-ada_breakpoint_rewrite (char *arg, int *break_on_exceptionp)
-{
-  if (arg == NULL)
-    return arg;
-  *break_on_exceptionp = 0;
-  if (current_language->la_language == language_ada
-      && strncmp (arg, "exception", 9) == 0
-      && (arg[9] == ' ' || arg[9] == '\t' || arg[9] == '\0'))
-    {
-      char *tok, *end_tok;
-      int toklen;
-      int has_exception_propagation =
-        is_runtime_sym_defined (raise_sym_name, 1);
-
-      *break_on_exceptionp = 1;
-
-      tok = arg + 9;
-      while (*tok == ' ' || *tok == '\t')
-        tok += 1;
-
-      end_tok = tok;
-
-      while (*end_tok != ' ' && *end_tok != '\t' && *end_tok != '\000')
-        end_tok += 1;
-
-      toklen = end_tok - tok;
-
-      arg = (char *) xmalloc (sizeof (longest_exception_template) + toklen);
-      make_cleanup (xfree, arg);
-      if (toklen == 0)
-        {
-          if (has_exception_propagation)
-            sprintf (arg, "'%s'", raise_sym_name);
-          else
-            error_breakpoint_runtime_sym_not_found ("exception");
-        }
-      else if (strncmp (tok, "unhandled", toklen) == 0)
-        {
-          if (is_runtime_sym_defined (raise_unhandled_sym_name, 1))
-            sprintf (arg, "'%s'", raise_unhandled_sym_name);
-          else
-            error_breakpoint_runtime_sym_not_found ("exception");
-
-          *break_on_exceptionp = 2;
-        }
-      else
-        {
-          if (is_runtime_sym_defined (raise_sym_name, 0))
-            sprintf (arg, "'%s' if long_integer(e) = long_integer(&%.*s)",
-                     raise_sym_name, toklen, tok);
-          else
-            error_breakpoint_runtime_sym_not_found ("specific exception");
-        }
-    }
-  else if (current_language->la_language == language_ada
-           && strncmp (arg, "assert", 6) == 0
-           && (arg[6] == ' ' || arg[6] == '\t' || arg[6] == '\0'))
-    {
-      char *tok = arg + 6;
-
-      if (!is_runtime_sym_defined (raise_assert_sym_name, 1))
-        error_breakpoint_runtime_sym_not_found ("failed assertion");
-
-      *break_on_exceptionp = 3;
-
-      arg =
-        (char *) xmalloc (sizeof (raise_assert_sym_name) + strlen (tok) + 2);
-      make_cleanup (xfree, arg);
-      sprintf (arg, "'%s'%s", raise_assert_sym_name, tok);
-    }
-  return arg;
-}
-#endif /* GNAT_GDB */
-
-                                /* Field Access */
-
-/* True if field number FIELD_NUM in struct or union type TYPE is supposed
-   to be invisible to users.  */
-
-int
-ada_is_ignored_field (struct type *type, int field_num)
-{
-  if (field_num < 0 || field_num > TYPE_NFIELDS (type))
-    return 1;
-  else
-    {
-      const char *name = TYPE_FIELD_NAME (type, field_num);
-      return (name == NULL
-              || (name[0] == '_' && strncmp (name, "_parent", 7) != 0));
-    }
-}
-
-/* True iff TYPE has a tag field.  If REFOK, then TYPE may also be a
-   pointer or reference type whose ultimate target has a tag field. */
-
-int
-ada_is_tagged_type (struct type *type, int refok)
-{
-  return (ada_lookup_struct_elt_type (type, "_tag", refok, 1, NULL) != NULL);
-}
-
-/* True iff TYPE represents the type of X'Tag */
-
-int
-ada_is_tag_type (struct type *type)
-{
-  if (type == NULL || TYPE_CODE (type) != TYPE_CODE_PTR)
-    return 0;
-  else
-    {
-      const char *name = ada_type_name (TYPE_TARGET_TYPE (type));
-      return (name != NULL
-              && strcmp (name, "ada__tags__dispatch_table") == 0);
-    }
-}
-
-/* The type of the tag on VAL.  */
-
-struct type *
-ada_tag_type (struct value *val)
-{
-  return ada_lookup_struct_elt_type (VALUE_TYPE (val), "_tag", 1, 0, NULL);
-}
-
-/* The value of the tag on VAL.  */
-
-struct value *
-ada_value_tag (struct value *val)
-{
-  return ada_value_struct_elt (val, "_tag", "record");
-}
-
-/* The value of the tag on the object of type TYPE whose contents are
-   saved at VALADDR, if it is non-null, or is at memory address
-   ADDRESS. */
-
-static struct value *
-value_tag_from_contents_and_address (struct type *type, char *valaddr,
-                                     CORE_ADDR address)
-{
-  int tag_byte_offset, dummy1, dummy2;
-  struct type *tag_type;
-  if (find_struct_field ("_tag", type, 0, &tag_type, &tag_byte_offset,
-                         &dummy1, &dummy2))
-    {
-      char *valaddr1 = (valaddr == NULL) ? NULL : valaddr + tag_byte_offset;
-      CORE_ADDR address1 = (address == 0) ? 0 : address + tag_byte_offset;
-
-      return value_from_contents_and_address (tag_type, valaddr1, address1);
-    }
-  return NULL;
-}
-
-static struct type *
-type_from_tag (struct value *tag)
-{
-  const char *type_name = ada_tag_name (tag);
-  if (type_name != NULL)
-    return ada_find_any_type (ada_encode (type_name));
-  return NULL;
-}
-
-struct tag_args
-{
-  struct value *tag;
-  char *name;
-};
-
-/* Wrapper function used by ada_tag_name.  Given a struct tag_args*
-   value ARGS, sets ARGS->name to the tag name of ARGS->tag.  
-   The value stored in ARGS->name is valid until the next call to 
-   ada_tag_name_1.  */
+/* Wrapper function used by ada_tag_name.  Given a struct tag_args*
+   value ARGS, sets ARGS->name to the tag name of ARGS->tag.  
+   The value stored in ARGS->name is valid until the next call to 
+   ada_tag_name_1.  */
 
 static int
 ada_tag_name_1 (void *args0)
@@ -8251,24 +6550,6 @@ ada_to_fixed_value (struct value *val)
                                     val);
 }
 
-/* If the PC is pointing inside a function prologue, then re-adjust it
-   past this prologue.  */
-
-static void
-adjust_pc_past_prologue (CORE_ADDR *pc)
-{
-  struct symbol *func_sym = find_pc_function (*pc);
-
-  if (func_sym)
-    {
-      const struct symtab_and_line sal =
-        find_function_start_sal (func_sym, 1);
-
-      if (*pc <= sal.pc)
-        *pc = sal.pc;
-    }
-}
-
 /* A value representing VAL, but with a standard (static-sized) type
    chosen to approximate the real type of VAL as well as possible, but
    without consulting any runtime values.  For Ada dynamic-sized
@@ -9043,6 +7324,7 @@ ada_evaluate_subexp (struct type *expect
         LONGEST low_bound = pos_atr (low_bound_val);
         LONGEST high_bound
           = pos_atr (evaluate_subexp (NULL_TYPE, exp, pos, noside));
+
         if (noside == EVAL_SKIP)
           goto nosideret;
 
@@ -10325,10 +8607,6 @@ const struct language_defn ada_language_
   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 */
   array_row_major,
   &ada_exp_descriptor,
   parse,
@@ -10353,10 +8631,6 @@ const struct language_defn ada_language_
   NULL,
   ada_get_gdb_completer_word_break_characters,
   ada_language_arch_info,
-#ifdef GNAT_GDB
-  ada_translate_error_message,  /* Substitute Ada-specific terminology
-                                   in errors and warnings.  */
-#endif /* GNAT_GDB */
   LANG_MAGIC
 };
 
@@ -10366,14 +8640,6 @@ _initialize_ada_language (void)
   add_language (&ada_language_defn);
 
   varsize_limit = 65536;
-#ifdef GNAT_GDB
-  add_setshow_uinteger_cmd ("varsize-limit", class_support,
-			    &varsize_limit, "\
-Set the maximum number of bytes allowed in a dynamic-sized object.", "\
-Show the maximum number of bytes allowed in a dynamic-sized object.",
-			    NULL, NULL, &setlist, &showlist);
-  obstack_init (&cache_space);
-#endif /* GNAT_GDB */
 
   obstack_init (&symbol_list_obstack);
 
Index: gdb/ada-lang.h
===================================================================
RCS file: /cvs/src/src/gdb/ada-lang.h,v
retrieving revision 1.11
diff -u -p -r1.11 ada-lang.h
--- gdb/ada-lang.h	18 Sep 2004 22:23:23 -0000	1.11
+++ gdb/ada-lang.h	27 Sep 2004 10:18:45 -0000
@@ -413,10 +413,6 @@ extern int ada_print_exception_breakpoin
 
 extern void ada_print_exception_breakpoint_task (struct breakpoint *);
 
-extern int ada_maybe_exception_partial_symbol (struct partial_symbol *sym);
-
-extern int ada_is_exception_sym (struct symbol *sym);
-
 extern void ada_find_printable_frame (struct frame_info *fi);
 
 extern void ada_reset_thread_registers (void);
Index: gdb/defs.h
===================================================================
RCS file: /cvs/src/src/gdb/defs.h,v
retrieving revision 1.167
diff -u -p -r1.167 defs.h
--- gdb/defs.h	13 Sep 2004 18:26:28 -0000	1.167
+++ gdb/defs.h	27 Sep 2004 10:18:45 -0000
@@ -197,6 +197,7 @@ enum language
     language_asm,		/* Assembly language */
     language_scm,    		/* Scheme / Guile */
     language_pascal,		/* Pascal */
+    language_ada,		/* Ada */
     language_minimal,		/* All other languages, minimal support only */
     nr_languages
   };
Index: gdb/gdbtypes.h
===================================================================
RCS file: /cvs/src/src/gdb/gdbtypes.h,v
retrieving revision 1.59
diff -u -p -r1.59 gdbtypes.h
--- gdb/gdbtypes.h	25 Aug 2004 15:41:54 -0000	1.59
+++ gdb/gdbtypes.h	27 Sep 2004 10:18:46 -0000
@@ -293,6 +293,17 @@ enum type_code
 #define TYPE_ADDRESS_CLASS_ALL(t) (TYPE_INSTANCE_FLAGS(t) \
 				   & TYPE_FLAG_ADDRESS_CLASS_ALL)
 
+/* The debugging formats (especially STABS) do not contain enough information
+   to represent all Ada types---especially those whose size depends on
+   dynamic quantities.  Therefore, the GNAT Ada compiler includes
+   extra information in the form of additional type definitions
+   connected by naming conventions.  This flag indicates that the 
+   type is an ordinary (unencoded) GDB type that has been created from 
+   the necessary run-time information, and does not need further 
+   interpretation. Optionally marks ordinary, fixed-size GDB type. */
+
+#define TYPE_FLAG_FIXED_INSTANCE (1 << 15)
+
 /*  Array bound type.  */
 enum array_bound_type
 {
Index: gdb/symfile.c
===================================================================
RCS file: /cvs/src/src/gdb/symfile.c,v
retrieving revision 1.142
diff -u -p -r1.142 symfile.c
--- gdb/symfile.c	11 Sep 2004 10:24:51 -0000	1.142
+++ gdb/symfile.c	27 Sep 2004 10:18:47 -0000
@@ -2185,6 +2185,10 @@ init_filename_language_table (void)
       add_filename_language (".pas", language_pascal);
       add_filename_language (".p", language_pascal);
       add_filename_language (".pp", language_pascal);
+      add_filename_language (".adb", language_ada);
+      add_filename_language (".ads", language_ada);
+      add_filename_language (".a", language_ada);
+      add_filename_language (".ada", language_ada);
     }
 }
 
Index: gdb/symtab.c
===================================================================
RCS file: /cvs/src/src/gdb/symtab.c,v
retrieving revision 1.139
diff -u -p -r1.139 symtab.c
--- gdb/symtab.c	20 Sep 2004 20:18:39 -0000	1.139
+++ gdb/symtab.c	27 Sep 2004 10:18:47 -0000
@@ -41,6 +41,7 @@
 #include "source.h"
 #include "filenames.h"		/* for FILENAME_CMP */
 #include "objc-lang.h"
+#include "ada-lang.h"
 
 #include "hashtab.h"
 
@@ -634,17 +635,24 @@ symbol_init_demangled_name (struct gener
 char *
 symbol_natural_name (const struct general_symbol_info *gsymbol)
 {
-  if ((gsymbol->language == language_cplus
-       || gsymbol->language == language_java
-       || gsymbol->language == language_objc)
-      && (gsymbol->language_specific.cplus_specific.demangled_name != NULL))
+  switch (gsymbol->language) 
     {
-      return gsymbol->language_specific.cplus_specific.demangled_name;
-    }
-  else
-    {
-      return gsymbol->name;
+    case language_cplus:
+    case language_java:
+    case language_objc:
+      if (gsymbol->language_specific.cplus_specific.demangled_name != NULL)
+	return gsymbol->language_specific.cplus_specific.demangled_name;
+      break;
+    case language_ada:
+      if (gsymbol->language_specific.cplus_specific.demangled_name != NULL)
+	return gsymbol->language_specific.cplus_specific.demangled_name;
+      else
+	return ada_decode_symbol (gsymbol);
+      break;
+    default:
+      break;
     }
+  return gsymbol->name;
 }
 
 /* Return the demangled name for a symbol based on the language for
@@ -652,13 +660,24 @@ symbol_natural_name (const struct genera
 char *
 symbol_demangled_name (struct general_symbol_info *gsymbol)
 {
-  if (gsymbol->language == language_cplus
-      || gsymbol->language == language_java
-      || gsymbol->language == language_objc)
-    return gsymbol->language_specific.cplus_specific.demangled_name;
-
-  else 
-    return NULL;
+  switch (gsymbol->language) 
+    {
+    case language_cplus:
+    case language_java:
+    case language_objc:
+      if (gsymbol->language_specific.cplus_specific.demangled_name != NULL)
+	return gsymbol->language_specific.cplus_specific.demangled_name;
+      break;
+    case language_ada:
+      if (gsymbol->language_specific.cplus_specific.demangled_name != NULL)
+	return gsymbol->language_specific.cplus_specific.demangled_name;
+      else
+	return ada_decode_symbol (gsymbol);
+      break;
+    default:
+      break;
+    }
+  return NULL;
 }
 
 /* Return the search name of a symbol---generally the demangled or
@@ -666,7 +685,10 @@ symbol_demangled_name (struct general_sy
    If there is no distinct demangled name, then returns the same value 
    (same pointer) as SYMBOL_LINKAGE_NAME. */
 char *symbol_search_name (const struct general_symbol_info *gsymbol) {
-  return symbol_natural_name (gsymbol);
+  if (gsymbol->language == language_ada)
+    return gsymbol->name;
+  else
+    return symbol_natural_name (gsymbol);
 }
 
 /* Initialize the structure fields to zero values.  */
Index: gdb/doc/gdb.texinfo
===================================================================
RCS file: /cvs/src/src/gdb/doc/gdb.texinfo,v
retrieving revision 1.214
diff -u -p -r1.214 gdb.texinfo
--- gdb/doc/gdb.texinfo	20 Sep 2004 22:26:21 -0000	1.214
+++ gdb/doc/gdb.texinfo	27 Sep 2004 10:18:52 -0000
@@ -7717,6 +7717,11 @@ If a source file name ends in one of the
 @value{GDBN} infers that its language is the one indicated.
 
 @table @file
+@item .ada
+@itemx .ads
+@itemx .adb
+@itemx .a
+Ada source file.
 
 @item .c
 C source file
@@ -8005,7 +8010,7 @@ being set automatically by @value{GDBN}.
 @node Support
 @section Supported languages
 
-@value{GDBN} supports C, C@t{++}, Objective-C, Fortran, Java, assembly, and Modula-2.
+@value{GDBN} supports C, C@t{++}, Objective-C, Fortran, Java, assembly, Modula-2, and Ada.
 @c This is false ...
 Some @value{GDBN} features may be used in expressions regardless of the
 language you use: the @value{GDBN} @code{@@} and @code{::} operators,
@@ -8025,6 +8030,7 @@ language reference or tutorial.
 * C::                           C and C@t{++}
 * Objective-C::                 Objective-C
 * Modula-2::                    Modula-2
+* Ada::                         Ada
 @end menu
 
 @node C
@@ -8640,7 +8646,7 @@ the description of an object.  However, 
 with certain Objective-C libraries that have a particular hook
 function, @code{_NSPrintForDebugger}, defined.
 
-@node Modula-2,  , Objective-C, Support
+@node Modula-2, Ada, Objective-C, Support
 @subsection Modula-2
 
 @cindex Modula-2, @value{GDBN} support
@@ -9083,6 +9089,481 @@ address can be specified by an integral 
 In @value{GDBN} scripts, the Modula-2 inequality operator @code{#} is
 interpreted as the beginning of a comment.  Use @code{<>} instead.
 
+@node Ada
+@subsection Ada
+@cindex Ada
+
+The extensions made to @value{GDBN} for Ada only support
+output from the @sc{gnu} Ada (GNAT) compiler.
+Other Ada compilers are not currently supported, and
+attempting to debug executables produced by them is most likely
+to be difficult.
+
+
+@cindex expressions in Ada
+@menu
+* Ada Mode Intro::              General remarks on the Ada syntax 
+                                   and semantics supported by Ada mode 
+                                   in @value{GDBN}
+* Omissions from Ada::          Restrictions on the Ada expression syntax.
+* Additions to Ada::            Extensions of the Ada expression syntax.
+* Stopping Before Main Program:: Debugging the program during elaboration.
+* Ada Exceptions::              Setting breakpoints on exception handlers.
+* Ada Generic Units::           Dealing with generic instantiations.
+* Ada Glitches::                Known peculiarities of Ada mode.
+@end menu
+
+@node Ada Mode Intro
+@subsubsection Introduction
+@cindex Ada mode, general
+
+The Ada mode of @value{GDBN} supports a fairly large subset of Ada expression 
+syntax, with some extensions.
+The philosophy behind the design of this subset is 
+
+@itemize @bullet
+@item
+That @value{GDBN} should provide basic literals and access to operations for 
+arithmetic, dereferencing, field selection, indexing, and subprogram calls, 
+leaving more sophisticated computations to subprograms written into the
+program (which therefore may be called from @value{GDBN}).
+
+@item 
+That type safety and strict adherence to Ada language restrictions
+are not particularly important to the @value{GDBN} user.
+
+@item 
+That brevity is important to the @value{GDBN} user.
+@end itemize
+
+Thus, for brevity, the debugger acts as if there were 
+implicit @code{with} and @code{use} clauses in effect for all user-written 
+packages, making it unnecessary to fully qualify most names with 
+their packages, regardless of context.  Where this causes ambiguity, 
+@value{GDBN} asks the user's intent.
+
+The debugger will start in Ada mode if it detects an Ada main program. 
+As for other languages, it will enter Ada mode when stopped in a program that
+was translated from an Ada source file.
+
+While in Ada mode, you may use `@t{--}' for comments.  This is useful 
+mostly for documenting command files.  The standard @value{GDBN} comment 
+(@samp{#}) still works at the beginning of a line in Ada mode, but not in the 
+middle (to allow based literals).
+
+The debugger supports limited overloading.  Given a subprogram call in which
+the function symbol has multiple definitions, it will use the number of 
+actual parameters and some information about their types to attempt to narrow
+the set of definitions.  It also makes very limited use of context, preferring
+procedures to functions in the context of the @code{call} command, and
+functions to procedures elsewhere. 
+
+@node Omissions from Ada
+@subsubsection Omissions from Ada
+@cindex Ada, omissions from
+
+Here are the notable omissions from the subset:
+
+@itemize @bullet
+@item
+Only a subset of the attributes are supported:
+
+@itemize @minus
+@item
+@t{'First}, @t{'Last}, and @t{'Length}
+ on array objects (not on types and subtypes).
+
+@item
+@t{'Min} and @t{'Max}.  
+
+@item 
+@t{'Pos} and @t{'Val}. 
+
+@item
+@t{'Tag}.
+
+@item
+@t{'Range} on array objects (not subtypes), but only as the right
+operand of the membership (@code{in}) operator.
+
+@item 
+@t{'Access}, @t{'Unchecked_Access}, and 
+@t{'Unrestricted_Access} (a GNAT extension).
+
+@item
+@t{'Address}.
+@end itemize
+
+@item
+The names in
+@code{Characters.Latin_1} are not available and
+concatenation is not implemented.  Thus, escape characters in strings are 
+not currently available.
+
+@item
+Equality tests (@samp{=} and @samp{/=}) on arrays test for bitwise
+equality of representations.  They will generally work correctly
+for strings and arrays whose elements have integer or enumeration types.
+They may not work correctly for arrays whose element
+types have user-defined equality, for arrays of real values 
+(in particular, IEEE-conformant floating point, because of negative
+zeroes and NaNs), and for arrays whose elements contain unused bits with
+indeterminate values.  
+
+@item
+The other component-by-component array operations (@code{and}, @code{or}, 
+@code{xor}, @code{not}, and relational tests other than equality)
+are not implemented. 
+
+@item 
+There are no record or array aggregates.
+
+@item
+Dispatching subprogram calls are not implemented.
+
+@item
+The overloading algorithm is much more limited (i.e., less selective)
+than that of real Ada.  It makes only limited use of the context in which a subexpression
+appears to resolve its meaning, and it is much looser in its rules for allowing
+type matches.  As a result, some function calls will be ambiguous, and the user
+will be asked to choose the proper resolution.
+
+@item
+The @code{new} operator is not implemented.
+
+@item
+Entry calls are not implemented.
+
+@item 
+Aside from printing, arithmetic operations on the native VAX floating-point 
+formats are not supported.
+
+@item
+It is not possible to slice a packed array.
+@end itemize
+
+@node Additions to Ada
+@subsubsection Additions to Ada
+@cindex Ada, deviations from 
+
+As it does for other languages, @value{GDBN} makes certain generic
+extensions to Ada (@pxref{Expressions}):
+
+@itemize @bullet
+@item
+If the expression @var{E} is a variable residing in memory 
+(typically a local variable or array element) and @var{N} is 
+a positive integer, then @code{@var{E}@@@var{N}} displays the values of
+@var{E} and the @var{N}-1 adjacent variables following it in memory as an array.  
+In Ada, this operator is generally not necessary, since its prime use
+is in displaying parts of an array, and slicing will usually do this in Ada.
+However, there are occasional uses when debugging programs
+in which certain debugging information has been optimized away.
+
+@item
+@code{@var{B}::@var{var}} means ``the variable named @var{var} that appears
+in function or file @var{B}.''  When @var{B} is a file name, you must typically
+surround it in single quotes.
+
+@item 
+The expression @code{@{@var{type}@} @var{addr}} means ``the variable of type
+@var{type} that appears at address @var{addr}.''
+
+@item
+A name starting with @samp{$} is a convenience variable 
+(@pxref{Convenience Vars}) or a machine register (@pxref{Registers}).
+@end itemize
+
+In addition, @value{GDBN} provides a few other shortcuts and outright additions specific 
+to Ada:
+
+@itemize @bullet
+@item 
+The assignment statement is allowed as an expression, returning
+its right-hand operand as its value.  Thus, you may enter
+
+@smallexample
+set x := y + 3
+print A(tmp := y + 1)
+@end smallexample
+
+@item 
+The semicolon is allowed as an ``operator,''  returning as its value 
+the value of its right-hand operand.
+This allows, for example,
+complex conditional breaks:
+
+@smallexample
+break f
+condition 1 (report(i); k += 1; A(k) > 100)
+@end smallexample
+
+@item 
+Rather than use catenation and symbolic character names to introduce special 
+characters into strings, one may instead use a special bracket notation, 
+which is also used to print strings.  A sequence of characters of the form 
+@samp{["@var{XX}"]} within a string or character literal denotes the 
+(single) character whose numeric encoding is @var{XX} in hexadecimal.  The
+sequence of characters @samp{["""]} also denotes a single quotation mark 
+in strings.   For example,
+@smallexample
+   "One line.["0a"]Next line.["0a"]"
+@end smallexample
+@noindent
+Contains an ASCII newline character (@code{Ada.Characters.Latin_1.LF}) after each
+period.
+
+@item
+The subtype used as a prefix for the attributes @t{'Pos}, @t{'Min}, and
+@t{'Max} is optional (and is ignored in any case).  For example, it is valid
+to write
+
+@smallexample
+print 'max(x, y)
+@end smallexample
+
+@item
+When printing arrays, @value{GDBN} uses positional notation when the 
+array has a lower bound of 1, and uses a modified named notation otherwise.
+For example, a one-dimensional array of three integers with a lower bound of 3 might print as
+
+@smallexample
+(3 => 10, 17, 1)
+@end smallexample
+
+@noindent
+That is, in contrast to valid Ada, only the first component has a @code{=>} 
+clause.
+
+@item
+You may abbreviate attributes in expressions with any unique,
+multi-character subsequence of 
+their names (an exact match gets preference).
+For example, you may use @t{a'len}, @t{a'gth}, or @t{a'lh}
+in place of  @t{a'length}.
+
+@item
+@cindex quoting Ada internal identifiers
+Since Ada is case-insensitive, the debugger normally maps identifiers you type 
+to lower case.  The GNAT compiler uses upper-case characters for 
+some of its internal identifiers, which are normally of no interest to users.
+For the rare occasions when you actually have to look at them,
+enclose them in angle brackets to avoid the lower-case mapping. 
+For example,
+@smallexample
+(gdb) print <JMPBUF_SAVE>[0]
+@end smallexample
+
+@item
+Printing an object of class-wide type or dereferencing an 
+access-to-class-wide value will display all the components of the object's
+specific type (as indicated by its run-time tag).  Likewise, component
+selection on such a value will operate on the specific type of the
+object.
+
+@end itemize
+
+@node Stopping Before Main Program
+@subsubsection Stopping at the Very Beginning
+
+@cindex breakpointing Ada elaboration code
+It is sometimes necessary to debug the program during elaboration, and
+before reaching the main procedure.
+As defined in the Ada Reference
+Manual, the elaboration code is invoked from a procedure called
+@code{adainit}.  To run your program up to the beginning of
+elaboration, simply use the following two commands:
+@code{tbreak adainit} and @code{run}.
+
+@node Ada Exceptions
+@subsubsection Breaking on Ada Exceptions
+@cindex Ada, exceptions
+
+In Ada mode, you can set breakpoints that trip when your program raises 
+selected exceptions.
+
+@table @code
+@kindex break exception
+@item break exception
+Set a breakpoint that trips whenever (any task in the) program raises
+any exception.
+
+@item break exception @var{name}
+Set a breakpoint that trips whenever (any task in the) program raises
+the exception @var{name}.
+
+When inserting a breakpoint on a specific exception for which an
+homonym entity exists in the application, it is necessary to prefix
+the exception name with its package name.  In particular, if an entity
+sharing the same name as one of the standard exceptions has been defined,
+the exception name must be prefixed with package @code{Standard} when
+setting a breakpoint on this exception.
+
+@smallexample
+@iftex
+@leftskip=0.5cm
+@end iftex
+(gdb) break exception Standard.Constraint_Error
+@end smallexample
+
+@item break exception unhandled
+Set a breakpoint that trips whenever (any task in the) program raises an
+exception for which there is no handler.
+At the moment, 
+depending on the implementation of exceptions used on your platform, 
+this may not have quite the desired effect.  Other forms of
+exception breaking stop the program at the point the exception is raised.
+In Ada implementations that use setjmp and longjmp to implement exception
+handling, however, unhandled exceptions are not detected until the 
+affected task's stack is completely unwound.  Thus, you find out that a
+task has terminated with an exception, but you aren't told where it was
+raised.
+
+@kindex info exceptions
+@item info exceptions 
+@itemx info exceptions @var{regexp}
+The @code{info exceptions} command permits the user to examine all defined
+exceptions within Ada programs.  With a regular expression, @var{regexp}, as 
+argument, prints out only those exceptions whose name matches @var{regexp}.
+@end table
+
+@node Ada Generic Units
+@subsubsection Debugging Generic Units
+@cindex Ada, generic units
+
+GNAT always uses code expansion for generic instantiation.  This means that
+each time an instantiation occurs, a complete copy of the original code is
+made with appropriate substitutions.
+
+It is not possible to refer to the original generic entities themselves
+in @value{GDBN} (there is no code to refer to), but it
+is certainly possible to debug a particular instance of a generic, simply by
+using the appropriate expanded names.  For example, suppose that 
+@code{Gen} is a generic package:
+
+@smallexample
+-- In file gen.ads:
+generic package Gen is
+   function F (v1 : Integer) return Integer;
+end Gen;
+
+-- In file gen.adb:
+package body Gen is
+   function F (v1 : Integer) return Integer is
+   begin
+      return v1+1;         -- Line 5
+   end F;
+end Gen;
+@end smallexample
+
+@noindent
+and we have the following expansions
+
+@smallexample
+with Gen;
+procedure G is
+   package Gen1 is new Gen;
+   package Gen2 is new Gen;
+
+   I : Integer := 0;
+begin
+   I := Gen1.F (I);
+   I := Gen2.F (I);
+   I := Gen1.F (I);
+   I := Gen2.F (I);
+end;
+@end smallexample
+
+@noindent
+Then to break on a call to procedure @code{F} in the @code{Gen2} instance, simply
+use the command:
+
+@smallexample
+break G.Gen2.F
+@end smallexample
+
+When a breakpoint occurs, you can step through the code of the generic
+instance in the normal manner.  You can also examine values of data in the
+normal manner, providing the appropriate generic package qualification to
+refer to non-local entities.
+
+@node Ada Glitches
+@subsubsection Known Peculiarities of Ada Mode
+@cindex Ada, problems
+
+Besides the omissions listed previously (@pxref{Omissions from Ada}),
+we know of several problems with and limitations of Ada mode in
+@value{GDBN},
+some of which will be fixed with planned future releases of the debugger 
+and the GNU Ada compiler.
+
+@itemize @bullet
+@item
+Currently, the debugger 
+has insufficient information to determine whether certain pointers represent
+pointers to objects or the objects themselves.
+Thus, the user may have to tack an extra @code{.all} after an expression
+to get it printed properly.
+
+@item 
+Static constants that the compiler chooses not to materialize as objects in 
+storage are invisible to the debugger.
+
+@item
+Named parameter associations in function argument lists are ignored (the
+argument lists are treated as positional).
+
+@item
+Many useful library packages are currently invisible to the debugger.
+
+@item
+Fixed-point arithmetic, conversions, input, and output is carried out using 
+floating-point arithmetic, and may give results that only approximate those on 
+the host machine.
+
+@item
+The type of the @t{'Address} attribute may not be @code{System.Address}.
+
+@item
+When stopped in a particular subprogram, you can access variables defined
+in other, lexically
+enclosing subprograms by their simple names.  At the moment, however, this
+may not always work; it depends on whether the compiler happens to have
+made the necessary information (the ``static link'') available 
+at execution time, which it can sometimes avoid.  Of course,
+even in those cases where
+the compiler does not provide the information, you can still look at such
+variables by issuing the appropriate number of @code{up} commands to get to
+frame containing the variable you wish to see.   
+Access to non-local variables does not, at the moment, work in
+the test expressions for conditional breakpoints 
+(@pxref{Conditions, ,Break conditions}) unless you happen to specify these 
+while stopped in the subprogram in which they are to be applied.
+
+@item
+Depending on the platform, it is not always possible to set breakpoints
+on nested functions by name (e.g., @code{break foo}).  In effect, the
+nested functions act like local variables of the enclosing function.
+On these platforms, you must wait until @value{GDBN} is stopped in 
+the enclosing function before using this form of @code{break} command.  
+This is not much of a limitation, since you can still set a breakpoint on 
+the first line of the desired function using the usual 
+@code{break @var{file}:@var{line}} syntax.
+
+@item
+The GNAT compiler never generates the prefix @code{Standard} for any of 
+the standard symbols defined by the Ada language.  @value{GDBN} knows about 
+this: it will strip the prefix from names when you use it, and will never
+look for a name you have so qualified among local symbols, nor match against
+symbols in other packages or subprograms.  If you have 
+defined entities anywhere in your program other than parameters and 
+local variables whose simple names match names in @code{Standard}, 
+GNAT's lack of qualification here can cause confusion.  When this happens,
+you can usually resolve the confusion 
+by qualifying the problematic names with package
+@code{Standard} explicitly.  
+@end itemize
+
 @node Unsupported languages
 @section Unsupported languages
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]