diff options
Diffstat (limited to 'gdb/xcoffread.c')
-rw-r--r-- | gdb/xcoffread.c | 181 |
1 files changed, 4 insertions, 177 deletions
diff --git a/gdb/xcoffread.c b/gdb/xcoffread.c index a677f7b..1312f9b 100644 --- a/gdb/xcoffread.c +++ b/gdb/xcoffread.c @@ -313,7 +313,7 @@ struct pending_stabs *stabs; struct symbol *sym = find_symbol_in_list (symbols, name, pp-name); if (!sym) { ; - /* printf ("ERROR! stab symbol not found!\n"); /* FIXME */ + /* printf ("ERROR! stab symbol not found!\n"); */ /* FIXME */ /* The above is a false alarm. There are cases the we can have a stab, without its symbol. xlc generates this for the extern definitions in inner blocks. */ @@ -2387,182 +2387,9 @@ smash_to_pointer_type (type, to_type) #else /* IBM6000_HOST */ struct type * -builtin_type (pp) -char **pp; +builtin_type (ignore) +char **ignore; { - fatal ("internals eror: builtin_type called!"); + fatal ("GDB internal eror: builtin_type called on non-RS/6000!"); } #endif /* IBM6000_HOST */ - - -#define DEBUG 1 - -#if defined (DEBUG) && defined (IBM6000_HOST) /* Needs both defined */ -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"); -} - -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); -} - -void -dump_type (typeP) - struct type *typeP; -{ - printf ("0x%x: name: %s\n", typeP, typeP->name ? typeP->name : "(nil)"); -} - -char *dump_namespace (); -char *dump_addrclass (); - -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); -} - - -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***"; -} - - -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***"; -} - -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]); -} - -void -dump_blockvector (pp) - struct blockvector *pp; -{ - int ii; - for (ii=0; ii < pp->nblocks; ++ii) - dump_block (pp->block [ii]); -} - - -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); - } - } -} - -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); - } -} - -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); */ - } -} - -void -dump_msymbols (of) -struct objfile *of; -{ - int ii; - for (ii=0; ii < of->minimal_symbol_count; ++ii) - printf ("name: %s, addr: 0x%x, info: 0x%x\n", - of->msymbols[ii].name, - of->msymbols[ii].address, - of->msymbols[ii].info ); -} - -#endif /* DEBUG */ |