+Sun Jun 28 11:35:48 1998 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
+
+ Improve support for SunPro F77.
+ * dbxread.c (end_psymtab, process_one_symbol): Handle minimal
+ symbols with trailing underscore names.
+ * minsyms.c (find_stab_function_addr): Ditto.
+ * dbxread.c (process_one_symbol): Ignore N_ALIAS for now.
+ * partial-stab.h (case N_ALIAS): Ditto.
+ * stabsread.c (read_sun_builtin_type): Handle boolean types.
+
Fri Jun 26 14:03:01 1998 Keith Seitz <keiths@cygnus.com>
* symtab.h (enum namespace): Add new namespaces FUNCTIONS_NAMESPACE,
/* Read dbx symbol tables and convert to internal format, for GDB.
- Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996
+ Copyright 1986, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 1998
Free Software Foundation, Inc.
This file is part of GDB.
if (p == NULL)
p = last_function_name;
n = p - last_function_name;
- p = alloca (n + 1);
+ p = alloca (n + 2);
strncpy (p, last_function_name, n);
p[n] = 0;
minsym = lookup_minimal_symbol (p, pst->filename, objfile);
+ if (minsym == NULL)
+ {
+ /* Sun Fortran appends an underscore to the minimal symbol name,
+ try again with an appended underscore if the minimal symbol
+ was not found. */
+ p[n] = '_';
+ p[n + 1] = 0;
+ minsym = lookup_minimal_symbol (p, pst->filename, objfile);
+ }
if (minsym)
pst->texthigh = SYMBOL_VALUE_ADDRESS (minsym) + MSYMBOL_SIZE (minsym);
finish_block (new->name, &local_symbols, new->old_blocks,
new->start_addr, new->start_addr + valu,
objfile);
+
+ if (block_address_function_relative)
+ function_start_offset = 0;
+
break;
}
/* This type of "symbol" really just records
one line-number -- core-address correspondence.
Enter it in the line list for this symbol table. */
+
/* Relocate for dynamic loading and for ELF acc fn-relative syms. */
valu += function_start_offset;
+
#ifdef SUN_FIXED_LBRAC_BUG
last_pc_address = valu; /* Save for SunOS bug circumcision */
#endif
if (p == NULL)
p = name;
n = p - name;
- p = alloca (n + 1);
+ p = alloca (n + 2);
strncpy (p, name, n);
p[n] = 0;
msym = lookup_minimal_symbol (p, last_source_file,
objfile);
+ if (msym == NULL)
+ {
+ /* Sun Fortran appends an underscore to the minimal
+ symbol name, try again with an appended underscore
+ if the minimal symbol was not found. */
+ p[n] = '_';
+ p[n + 1] = 0;
+ msym = lookup_minimal_symbol (p, last_source_file,
+ objfile);
+ }
if (msym)
valu = SYMBOL_VALUE_ADDRESS (msym);
}
file's symbols at once. */
case N_ENDM: /* Solaris 2: End of module */
case N_MAIN: /* Name of main routine. */
+ case N_ALIAS: /* SunPro F77: alias name, ignore for now. */
break;
}
/* GDB routines for manipulating the minimal symbol tables.
- Copyright 1992, 1993, 1994, 1996, 1996 Free Software Foundation, Inc.
+ Copyright 1992, 93, 94, 96, 97, 1998 Free Software Foundation, Inc.
Contributed by Cygnus Support, using pieces from other GDB modules.
This file is part of GDB.
if (p == NULL)
p = namestring;
n = p - namestring;
- p = alloca (n + 1);
+ p = alloca (n + 2);
strncpy (p, namestring, n);
p[n] = 0;
msym = lookup_minimal_symbol (p, pst->filename, objfile);
+ if (msym == NULL)
+ {
+ /* Sun Fortran appends an underscore to the minimal symbol name,
+ try again with an appended underscore if the minimal symbol
+ was not found. */
+ p[n] = '_';
+ p[n + 1] = 0;
+ msym = lookup_minimal_symbol (p, pst->filename, objfile);
+ }
return msym == NULL ? 0 : SYMBOL_VALUE_ADDRESS (msym);
}
#endif /* SOFUN_ADDRESS_MAYBE_MISSING */
/* Shared code to pre-read a stab (dbx-style), when building a psymtab.
- Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996
+ Copyright 1986, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 1998
Free Software Foundation, Inc.
This file is part of GDB.
case N_LBRAC:
case N_NSYMS: /* Ultrix 4.0: symbol count */
case N_DEFD: /* GNU Modula-2 */
+ case N_ALIAS: /* SunPro F77: alias name, ignore for now. */
case N_OBJ: /* useless types from Solaris */
case N_OPT:
/* Sun's ACC uses a somewhat saner method for specifying the builtin
typedefs in every file (for int, long, etc):
- type = b <signed> <width>; <offset>; <nbits>
- signed = u or s. Possible c in addition to u or s (for char?).
+ type = b <signed> <width> <format type>; <offset>; <nbits>
+ signed = u or s.
+ optional format type = c or b for char or boolean.
offset = offset from high order bit to start bit of type.
width is # bytes in object of this type, nbits is # bits in type.
int type_bits;
int nbits;
int signed_type;
+ enum type_code code = TYPE_CODE_INT;
switch (**pp)
{
/* For some odd reason, all forms of char put a c here. This is strange
because no other type has this honor. We can safely ignore this because
we actually determine 'char'acterness by the number of bits specified in
- the descriptor. */
+ the descriptor.
+ Boolean forms, e.g Fortran logical*X, put a b here. */
if (**pp == 'c')
(*pp)++;
+ else if (**pp == 'b')
+ {
+ code = TYPE_CODE_BOOL;
+ (*pp)++;
+ }
/* The first number appears to be the number of bytes occupied
by this type, except that unsigned short is 4 instead of 2.
signed_type ? 0 : TYPE_FLAG_UNSIGNED, (char *)NULL,
objfile);
else
- return init_type (TYPE_CODE_INT,
+ return init_type (code,
type_bits / TARGET_CHAR_BIT,
signed_type ? 0 : TYPE_FLAG_UNSIGNED, (char *)NULL,
objfile);