char *wpiGetLabel(UINT addr, INT32 *found = NULL) { INT32 pVal; SYM_TYPE pType; char name[MAX_SYS_SYM_LEN + 1]; static char label[DBG_DEMANGLE_PRINT_LEN + 1 + 11]; bzero(label, DBG_DEMANGLE_PRINT_LEN + 1 + 11); if (symFindByValue(sysSymTbl, addr, name, &pVal, &pType) == OK) { cplusDemangle(name, label, sizeof(label) - 11); if ((UINT)pVal != addr) { sprintf(&label[strlen(label)], "+0x%04x", addr-pVal); if (found) *found = 2; } else { if (found) *found = 1; } } else { sprintf(label, "0x%04x", addr); if (found) *found = 0; } return label; }
char * fh2path(vxfh_t * fhp) { int *value; SYM_TYPE type; if (fhp->type == rt11FsDrvNum) return (fhp->opaque); if (fhp->type == dosFsDrvNum) { value = (int *) fhp->opaque; /* * XXX optimize -- prolly just can return * ((SYMBOL)value)->name if symbol names are alloc'ed out of * a separate memory partition, in exactly duplicate order. */ if (symFindByValue(nfsd_pathtab, *value, path_buffer, value, &type) == ERROR) { nfsd_debug("fh2path failed for fstype %d, val = %d\n", fhp->type, *value); return; } path_to_all_lower(path_buffer); return path_buffer; } nfsd_debug("fh2path failed fhp->type = %d\n", fhp->type); return NULL; }
/* * * veclist() * */ int veclist(int all) { int vec; int value; SYM_TYPE type; char name[MAX_SYS_SYM_LEN]; char function_type[10]; FUNCPTR proutine; FUNCPTR pCISR; int cRoutine; void *pparam; int status; unsigned i; for(vec=0; vec<NVEC; vec++){ proutine = intVecGet((FUNCPTR *)INUM_TO_IVEC(vec)); status = cISRTest(proutine, &pCISR, &pparam); if(status == OK){ cRoutine = TRUE; proutine = pCISR; strcpy(function_type, "C"); } else{ cRoutine = FALSE; strcpy(function_type, "MACRO"); pCISR = NULL; } status = symFindByValue( sysSymTbl, (int)proutine, name, &value, &type); if(status<0 || value != (int)proutine){ sprintf(name, "0x%X", (unsigned int) proutine); } else if(!all){ int match = FALSE; for(i=0; i<NELEMENTS(ignore_list); i++){ if(!strcmp(ignore_list[i],name)){ match = TRUE; break; } } if(match){ continue; } } printf( "vec 0x%02X %5s ISR %s", vec, function_type, name); if(cRoutine){ printf("(0x%X)", (unsigned int) pparam); } printf("\n"); } return OK; }