- case 'T':
- /* When a 'T' entry is defining an anonymous enum, it
- may have a name which is the empty string, or a
- single space. Since they're not really defining a
- symbol, those shouldn't go in the partial symbol
- table. We do pick up the elements of such enums at
- 'check_enum:', below. */
- if (p >= namestring + 2
- || (p == namestring + 1
- && namestring[0] != ' '))
- {
- add_psymbol_to_list (namestring, p - namestring,
- STRUCT_DOMAIN, LOC_TYPEDEF,
- &objfile->static_psymbols,
- nlist.n_value, 0,
- psymtab_language, objfile);
- if (p[2] == 't')
- {
- /* Also a typedef with the same name. */
- add_psymbol_to_list (namestring, p - namestring,
- VAR_DOMAIN, LOC_TYPEDEF,
- &objfile->static_psymbols,
- nlist.n_value, 0,
- psymtab_language, objfile);
- p += 1;
- }
- }
- goto check_enum;
- case 't':
- if (p != namestring) /* a name is there, not just :T... */
- {
- add_psymbol_to_list (namestring, p - namestring,
- VAR_DOMAIN, LOC_TYPEDEF,
- &objfile->static_psymbols,
- nlist.n_value, 0,
- psymtab_language, objfile);
- }
- check_enum:
- /* If this is an enumerated type, we need to
- add all the enum constants to the partial symbol
- table. This does not cover enums without names, e.g.
- "enum {a, b} c;" in C, but fortunately those are
- rare. There is no way for GDB to find those from the
- enum type without spending too much time on it. Thus
- to solve this problem, the compiler needs to put out the
- enum in a nameless type. GCC2 does this. */
-
- /* We are looking for something of the form
- <name> ":" ("t" | "T") [<number> "="] "e"
- {<constant> ":" <value> ","} ";". */
-
- /* Skip over the colon and the 't' or 'T'. */
- p += 2;
- /* This type may be given a number. Also, numbers can come
- in pairs like (0,26). Skip over it. */
- while ((*p >= '0' && *p <= '9')
- || *p == '(' || *p == ',' || *p == ')'
- || *p == '=')
- p++;
-
- if (*p++ == 'e')
- {
- /* The aix4 compiler emits extra crud before the members. */
- if (*p == '-')
- {
- /* Skip over the type (?). */
- while (*p != ':')
- p++;
+ case 'G':
+ nlist.n_value += ANOFFSET (objfile->section_offsets,
+ data_sect_index);
+ /* The addresses in these entries are reported to be
+ wrong. See the code that reads 'G's for symtabs. */
+ add_psymbol_to_list (sym_name, sym_len,
+ VAR_DOMAIN, LOC_STATIC,
+ &objfile->global_psymbols,
+ 0, nlist.n_value,
+ psymtab_language, objfile);
+ continue;