Q: 如何打印PowerPC的中断向量表内容,比如mv5100或者mv6100的中断向量表,以查看对应的向量绑接的ISR。
A: 只要打印sysIntTbl[]的内容就可以了。示例程序如下:
void intConnectShow (void)
{
IMPORT INT_HANDLER_DESC * sysIntTbl [256];
INT_HANDLER_DESC * handler;
int i;
printf ("n Vector : Handler (Arg)nn");
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) // 处理链式绑接的ISR
{
printf(" 0x%x (0x%x) - chainedn",
(UINT32)handler->vec, handler->arg);
handler = handler->next;
}
}
}
printf("n");
}