예제 #1
0
/*
 *      isrFetch()
 */
static myISR *isrFetch(unsigned vectorNumber)
{
    myISR   *psub;
    myISR   *pCISR;
    void    *pParam;
    int s;

    /*
     * fetch the handler or C stub attached at this vector
     */
    psub = (myISR *) intVecGet((FUNCPTR *)INUM_TO_IVEC(vectorNumber));

    if ( psub ) {
        /*
         * from libvxWorks/veclist.c
         *
         * checks to see if it is a C ISR
         * and if so finds the function pointer and
         * the parameter passed
         */
        s = cISRTest(psub, &pCISR, &pParam);
        if(!s){
            psub = pCISR;
        }
    }

    return psub;
}
예제 #2
0
/*
 *
 * 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;
}