/* DWARF debugging format support for GDB.
- Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996
+ Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1998
Free Software Foundation, Inc.
Written by Fred Fish at Cygnus Support. Portions based on dbxread.c,
mipsread.c, coffread.c, and dwarfread.c from a Data General SVR4 gdb port.
case LANG_MODULA2:
cu_language = language_m2;
break;
+ case LANG_FORTRAN77:
+ case LANG_FORTRAN90:
+ cu_language = language_fortran;
+ break;
case LANG_ADA83:
case LANG_COBOL74:
case LANG_COBOL85:
- case LANG_FORTRAN77:
- case LANG_FORTRAN90:
case LANG_PASCAL83:
/* We don't know anything special about these yet. */
cu_language = language_unknown;
TYPE_POINTER_TYPE (type) = utype;
/* We assume the machine has only one representation for pointers! */
- /* FIXME: This confuses host<->target data representations, and is a
- poor assumption besides. */
-
- TYPE_LENGTH (utype) = sizeof (char *);
+ /* FIXME: Possably a poor assumption */
+ TYPE_LENGTH (utype) = TARGET_PTR_BIT / TARGET_CHAR_BIT ;
TYPE_CODE (utype) = TYPE_CODE_PTR;
}
}
/* If this compilation unit was compiled with g++ or gcc, then set the
processing_gcc_compilation flag. */
- processing_gcc_compilation =
- STREQN (producer, GPLUS_PRODUCER, strlen (GPLUS_PRODUCER))
- || STREQN (producer, CHILL_PRODUCER, strlen (CHILL_PRODUCER))
- || STREQN (producer, GCC_PRODUCER, strlen (GCC_PRODUCER));
+ if (STREQN (producer, GCC_PRODUCER, strlen (GCC_PRODUCER)))
+ {
+ char version = producer[strlen (GCC_PRODUCER)];
+ processing_gcc_compilation = (version == '2' ? 2 : 1);
+ }
+ else
+ {
+ processing_gcc_compilation =
+ STREQN (producer, GPLUS_PRODUCER, strlen (GPLUS_PRODUCER))
+ || STREQN (producer, CHILL_PRODUCER, strlen (CHILL_PRODUCER));
+ }
/* Select a demangling style if we can identify the producer and if
the current style is auto. We leave the current style alone if it
if (DBLENGTH (pst)) /* Otherwise it's a dummy */
{
buildsym_init ();
- old_chain = make_cleanup (really_free_pendings, 0);
+ old_chain = make_cleanup ((make_cleanup_func)
+ really_free_pendings, 0);
read_ofile_symtab (pst);
if (info_verbose)
{