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)\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) // 处理链式绑接的ISR
{
printf( 0x%x (0x%x) – chained\n,
(UINT32)handler->vec, handler->arg);
handler = handler->next;
}
}
}
printf(\n);
}