aboutsummaryrefslogtreecommitdiff
path: root/gdb/partial-stab.h
diff options
context:
space:
mode:
authorJim Kingdon <jkingdon@engr.sgi.com>1993-06-24 00:44:54 +0000
committerJim Kingdon <jkingdon@engr.sgi.com>1993-06-24 00:44:54 +0000
commit4ae030b938c3949c08d2c11dd8874e4b2907727b (patch)
tree5229cb20f59129cc0e3f4f1595157e0d150bfc88 /gdb/partial-stab.h
parent97090015dd8562e488ff372082575f501eb6460c (diff)
downloadgdb-4ae030b938c3949c08d2c11dd8874e4b2907727b.zip
gdb-4ae030b938c3949c08d2c11dd8874e4b2907727b.tar.gz
gdb-4ae030b938c3949c08d2c11dd8874e4b2907727b.tar.bz2
* partial-stab.h: Consolidate case statements for N_LSYM and N_FUN.
* dbxread.c: Change comment regarding acc.
Diffstat (limited to 'gdb/partial-stab.h')
-rw-r--r--gdb/partial-stab.h114
1 files changed, 42 insertions, 72 deletions
diff --git a/gdb/partial-stab.h b/gdb/partial-stab.h
index e083143..e76c8d8 100644
--- a/gdb/partial-stab.h
+++ b/gdb/partial-stab.h
@@ -323,16 +323,54 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
case N_ROSYM: /* Read-only data seg var -- static. */
case N_NBSTS: /* Gould nobase. */
case N_NBLCS: /* symbols. */
+ case N_FUN:
+ case N_GSYM: /* Global (extern) variable; can be
+ data or bss (sigh FIXME). */
+
+ /* Following may probably be ignored; I'll leave them here
+ for now (until I do Pascal and Modula 2 extensions). */
+
+ case N_PC: /* I may or may not need this; I
+ suspect not. */
+ case N_M2C: /* I suspect that I can ignore this here. */
+ case N_SCOPE: /* Same. */
SET_NAMESTRING();
p = (char *) strchr (namestring, ':');
+ if (!p)
+ continue; /* Not a debugging symbol. */
- /* Skip if there is no :. */
- if (!p) continue;
+
+
+ /* Main processing section for debugging symbols which
+ the initial read through the symbol tables needs to worry
+ about. If we reach this point, the symbol which we are
+ considering is definitely one we are interested in.
+ p must also contain the (valid) index into the namestring
+ which indicates the debugging type symbol. */
switch (p[1])
{
+ case 'S':
+ CUR_SYMBOL_VALUE += ANOFFSET (section_offsets, SECT_OFF_DATA);
+ ADD_PSYMBOL_ADDR_TO_LIST (namestring, p - namestring,
+ VAR_NAMESPACE, LOC_STATIC,
+ objfile->static_psymbols,
+ CUR_SYMBOL_VALUE,
+ psymtab_language, objfile);
+ continue;
+ case 'G':
+ CUR_SYMBOL_VALUE += ANOFFSET (section_offsets, SECT_OFF_DATA);
+ /* The addresses in these entries are reported to be
+ wrong. See the code that reads 'G's for symtabs. */
+ ADD_PSYMBOL_ADDR_TO_LIST (namestring, p - namestring,
+ VAR_NAMESPACE, LOC_STATIC,
+ objfile->global_psymbols,
+ CUR_SYMBOL_VALUE,
+ psymtab_language, objfile);
+ continue;
+
case 'T':
if (p != namestring) /* a name is there, not just :T... */
{
@@ -369,9 +407,8 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
"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 separate
- constant symbols ('c' N_LSYMS) for enum constants in
- enums without names, or put out a dummy type. */
+ 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"
@@ -430,73 +467,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
objfile->static_psymbols, CUR_SYMBOL_VALUE,
psymtab_language, objfile);
continue;
- default:
- /* Skip if the thing following the : is
- not a letter (which indicates declaration of a local
- variable, which we aren't interested in). */
- continue;
- }
-
- case N_FUN:
- case N_GSYM: /* Global (extern) variable; can be
- data or bss (sigh FIXME). */
-
- /* Following may probably be ignored; I'll leave them here
- for now (until I do Pascal and Modula 2 extensions). */
-
- case N_PC: /* I may or may not need this; I
- suspect not. */
- case N_M2C: /* I suspect that I can ignore this here. */
- case N_SCOPE: /* Same. */
-
- SET_NAMESTRING();
-
- p = (char *) strchr (namestring, ':');
- if (!p)
- continue; /* Not a debugging symbol. */
-
-
-
- /* Main processing section for debugging symbols which
- the initial read through the symbol tables needs to worry
- about. If we reach this point, the symbol which we are
- considering is definitely one we are interested in.
- p must also contain the (valid) index into the namestring
- which indicates the debugging type symbol. */
-
- switch (p[1])
- {
- case 'c':
- ADD_PSYMBOL_TO_LIST (namestring, p - namestring,
- VAR_NAMESPACE, LOC_CONST,
- objfile->static_psymbols, CUR_SYMBOL_VALUE,
- psymtab_language, objfile);
- continue;
- case 'S':
- CUR_SYMBOL_VALUE += ANOFFSET (section_offsets, SECT_OFF_DATA);
- ADD_PSYMBOL_ADDR_TO_LIST (namestring, p - namestring,
- VAR_NAMESPACE, LOC_STATIC,
- objfile->static_psymbols,
- CUR_SYMBOL_VALUE,
- psymtab_language, objfile);
- continue;
- case 'G':
- CUR_SYMBOL_VALUE += ANOFFSET (section_offsets, SECT_OFF_DATA);
- /* The addresses in these entries are reported to be
- wrong. See the code that reads 'G's for symtabs. */
- ADD_PSYMBOL_ADDR_TO_LIST (namestring, p - namestring,
- VAR_NAMESPACE, LOC_STATIC,
- objfile->global_psymbols,
- CUR_SYMBOL_VALUE,
- psymtab_language, objfile);
- continue;
-
- case 't':
- ADD_PSYMBOL_TO_LIST (namestring, p - namestring,
- VAR_NAMESPACE, LOC_TYPEDEF,
- objfile->static_psymbols, CUR_SYMBOL_VALUE,
- psymtab_language, objfile);
- continue;
case 'f':
#ifdef DBXREAD_ONLY