vxworks下如何打印PowerPC的中斷向量表內(nèi)容
Q: 如何打印PowerPC的中斷向量表內(nèi)容,比如mv5100或者mv6100的中斷向量表,以查看對(duì)應(yīng)的向量綁接的ISR。
A: 只要打印sysIntTbl[]的內(nèi)容就可以了。示例程序如下:
void intConnectShow (void)
{
IMPORT INT_HANDLER_DESC * sysIntTbl [256];
INT_HANDLER_DESC * handler;
int i;
printf ("\n Vector : Handler (Arg)\n\n");
for (i=0; i<=255; i++)
{
if( (handler = sysIntTbl[i]) != NULL )
{
printf ("%3d (0x%02x): 0x%x (0x%x)\n",
i,i, (UINT32)handler->vec, handler->arg);
handler = handler->next;
while (handler != NULL) // 處理鏈?zhǔn)浇壗拥腎SR
{
printf(" 0x%x (0x%x) - chained\n",
(UINT32)handler->vec, handler->arg);
handler = handler->next;
}
}
}
printf("\n");
}