* Makefile.in (SFILES): Remove ada-tasks.c.
(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.
* symtab.c: Include ada-lang.h.
(symbol_natural_name, symbol_demangled_name)
(symbol_search_name): Add Ada case.
+2004-10-02 Paul N. Hilfinger <Hilfinger@gnat.com>
+
+ Turn on initial Ada support (mainly expression evaluation).
+
+ * Makefile.in (SFILES): Remove ada-tasks.c.
+ (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.
+ * symtab.c: Include ada-lang.h.
+ (symbol_natural_name, symbol_demangled_name)
+ (symbol_search_name): Add Ada case.
+
2004-10-01 Andrew Cagney <cagney@gnu.org>
* Makefile.in (COMMON_OBS): Add inf-child.o.
# 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 \
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 \
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 \
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 \
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
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."; \
#include "source.h"
#include "filenames.h" /* for FILENAME_CMP */
#include "objc-lang.h"
+#include "ada-lang.h"
#include "hashtab.h"
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
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
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. */