/* Shared code to pre-read a stab (dbx-style), when building a psymtab.
- Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994
+ Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995
Free Software Foundation, Inc.
This file is part of GDB.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* The following need to be defined:
SET_NAMESTRING() --Set namestring to name of symbol.
CUR_SYMBOL_TYPE --Type code of current symbol.
CUR_SYMBOL_VALUE --Value field of current symbol. May be adjusted here.
+ namestring - variable pointing to the name of the stab.
+ section_offsets - variable pointing to the section offsets.
+ pst - the partial symbol table being built.
+
+ psymtab_include_list, includes_used, includes_allocated - list of include
+ file names (N_SOL) seen so far.
+ dependency_list, dependencies_used, dependencies_allocated - list of
+ N_EXCL stabs seen so far.
+
+ END_PSYMTAB -- end a partial symbol table.
+ START_PSYMTAB -- start a partial symbol table.
*/
/* End of macro definitions, now let's handle them symbols! */
char *p;
valu = CUR_SYMBOL_VALUE + ANOFFSET (section_offsets, SECT_OFF_TEXT);
+#ifdef SOFUN_ADDRESS_MAYBE_MISSING
+ /* A zero value is probably an indication for the SunPRO 3.0
+ compiler. end_psymtab explicitly tests for zero, so
+ don't relocate it. */
+ if (CUR_SYMBOL_VALUE == 0)
+ valu = 0;
+#endif
past_first_source_file = 1;
{
case 'S':
CUR_SYMBOL_VALUE += ANOFFSET (section_offsets, SECT_OFF_DATA);
+#ifdef STATIC_TRANSFORM_NAME
+ namestring = STATIC_TRANSFORM_NAME (namestring);
+#endif
ADD_PSYMBOL_ADDR_TO_LIST (namestring, p - namestring,
VAR_NAMESPACE, LOC_STATIC,
objfile->static_psymbols,
if (*p++ == 'e')
{
+ /* The aix4 compiler emits extra crud before the members. */
+ if (*p == '-')
+ {
+ /* Skip over the type (?). */
+ while (*p != ':')
+ p++;
+
+ /* Skip over the colon. */
+ p++;
+ }
+
/* We have found an enumerated type. */
/* According to comments in read_enum_type
a comma could end it instead of a semicolon.
case '7':
case '8':
case '9':
+ case '-':
continue;
case ':':