diff options
author | John Gilmore <gnu@cygnus> | 1992-02-22 09:16:11 +0000 |
---|---|---|
committer | John Gilmore <gnu@cygnus> | 1992-02-22 09:16:11 +0000 |
commit | 93fe4e330ebd39ea1b061383fe3521deb961e93a (patch) | |
tree | e013730c3e1e8aea07ae92cc94940869a0043fb3 /gdb/xcoffread.c | |
parent | 30875e1c4b96ec9966901d7ec4e50446394d1273 (diff) | |
download | gdb-93fe4e330ebd39ea1b061383fe3521deb961e93a.zip gdb-93fe4e330ebd39ea1b061383fe3521deb961e93a.tar.gz gdb-93fe4e330ebd39ea1b061383fe3521deb961e93a.tar.bz2 |
Saberlint.
* symmisc.c, xcoffread.c: Move debug functions to symmisc.c.
Diffstat (limited to 'gdb/xcoffread.c')
-rw-r--r-- | gdb/xcoffread.c | 201 |
1 files changed, 1 insertions, 200 deletions
diff --git a/gdb/xcoffread.c b/gdb/xcoffread.c index 207a54b..13c0e17 100644 --- a/gdb/xcoffread.c +++ b/gdb/xcoffread.c @@ -166,42 +166,6 @@ aixcoff_symfile_init PARAMS ((struct sym_fns *)); static void aixcoff_new_init PARAMS ((void)); -static void -dump_minimal_symbols PARAMS ((struct objfile *)); - -static void -dump_symtab_lines PARAMS ((struct symtab *)); - -static void -dump_symtabs PARAMS ((struct symtab *)); - -static void -dump_last_symtab PARAMS ((struct symtab *)); - -static void -dump_blockvector PARAMS ((struct blockvector *)); - -static void -dump_block PARAMS ((struct block *)); - -static char * -dump_addrclass PARAMS ((int)); - -static char * -dump_namespace PARAMS ((int)); - -static void -dump_symbol PARAMS ((struct symbol *)); - -static void -dump_type PARAMS ((struct type *)); - -static void -dump_linetable PARAMS ((struct linetable *)); - -static void -dump_strtbl PARAMS ((void)); - static int init_lineno PARAMS ((bfd *, long, int)); @@ -1098,170 +1062,7 @@ init_lineno (abfd, offset, size) make_cleanup (free, linetab); /* Be sure it gets de-allocated. */ return 0; } - - -static void -dump_strtbl () -{ - int ii; - printf ("===STRING TABLE DUMP...\n\n"); - for ( ii=0; ii < strtbl_len; ++ii ) - printf ("%c", isprint (*(strtbl+ii)) ? *(strtbl+ii) : ' '); - printf ("\n"); -} - -static void -dump_linetable (ltb) - struct linetable *ltb; -{ - int ii; - for (ii=0; ii < ltb->nitems; ++ii) - printf ("line: %d, addr: 0x%x\n", ltb->item[ii].line, ltb->item[ii].pc); -} - -static void -dump_type (typeP) - struct type *typeP; -{ - printf ("0x%x: name: %s\n", typeP, typeP->name ? typeP->name : "(nil)"); -} - -static void -dump_symbol (pp) - struct symbol *pp; -{ - printf (" sym: %s\t%s,\t%s\ttype: 0x%x, val: 0x%x end: 0x%x\n", - pp->name, dump_namespace (pp->namespace), - dump_addrclass (pp->class), pp->type, - SYMBOL_CLASS(pp) == LOC_BLOCK ? BLOCK_START(SYMBOL_BLOCK_VALUE(pp)) - : pp->value.value, - SYMBOL_CLASS(pp) == LOC_BLOCK ? BLOCK_END(SYMBOL_BLOCK_VALUE(pp)) : 0); -} - -static char * -dump_namespace (ns) -int ns; -{ - static char *ns_name [] = { - "UNDEF_NS", "VAR_NS", "STRUCT_NS", "LABEL_NS"}; - - switch (ns) { - case UNDEF_NAMESPACE: - case VAR_NAMESPACE: - case STRUCT_NAMESPACE: - case LABEL_NAMESPACE: - return ns_name[ns]; - } - - return "***ERROR***"; -} - -static char * -dump_addrclass (ac) -int ac; /* address class */ -{ - static char *ac_name [] = { - "LOC_UNDEF", - "LOC_CONST", - "LOC_STATIC", - "LOC_REGISTER", - "LOC_ARG", - "LOC_REF_ARG", - "LOC_REGPARM", - "LOC_LOCAL", - "LOC_TYPEDEF", - "LOC_LABEL", - "LOC_BLOCK", - "LOC_CONST_BYTES", - "LOC_LOCAL_ARG", - }; - switch (ac) { - case LOC_UNDEF: - case LOC_CONST: - case LOC_STATIC: - case LOC_REGISTER: - case LOC_ARG: - case LOC_REF_ARG: - case LOC_REGPARM: - case LOC_LOCAL: - case LOC_TYPEDEF: - case LOC_LABEL: - case LOC_BLOCK: - case LOC_CONST_BYTES: - case LOC_LOCAL_ARG: - return ac_name [ac]; - } - return "***ERROR***"; -} - -static void -dump_block (pp) - struct block *pp; -{ - int ii; - printf ("BLOCK..: start: 0x%x, end: 0x%x\n", pp->startaddr, pp->endaddr); - for (ii=0; ii < pp->nsyms; ++ii) - dump_symbol (pp->sym[ii]); -} - -static void -dump_blockvector (pp) - struct blockvector *pp; -{ - int ii; - for (ii=0; ii < pp->nblocks; ++ii) - dump_block (pp->block [ii]); -} - -static void -dump_last_symtab (pp) - struct symtab *pp; -{ - for ( ; pp; pp = pp->next) { - if ( pp->next == 0 ) { - printf ("SYMTAB NAME: %s\n", pp->filename); - dump_blockvector (pp->blockvector); - } - } -} - -static void -dump_symtabs (pp) - struct symtab *pp; -{ - for ( ; pp; pp = pp->next) { - printf ("SYMTAB NAME: %s\n", pp->filename ? pp->filename : "(nil)"); -/* if (pp->linetable) - dump_linetable (pp->linetable); */ - dump_blockvector (pp->blockvector); - } -} - -static void -dump_symtab_lines (pp) - struct symtab *pp; -{ - for ( ; pp; pp = pp->next) { - printf ("SYMTAB NAME: %s\n", pp->filename ? pp->filename : "(nil)"); - if (pp->linetable) - dump_linetable (pp->linetable); - /* dump_blockvector (pp->blockvector); */ - } -} - -static void -dump_minimal_symbols (objfile) -struct objfile *objfile; -{ - struct minimal_symbol *msymbol; - - for (msymbol = objfile -> msymbols; msymbol -> name != NULL; msymbol++) - { - printf ("name: %s, addr: 0x%x\n", msymbol -> name, msymbol -> address); - } -} - - + /* dbx allows the text of a symbol name to be continued into the next symbol name! When such a continuation is encountered (a \ at the end of the text of a name) |