求教各位大神,关于qnx内核的

在进行qnx开发的时候,我需要对内核的API进行hook,但是网上的源码太少,所以我就仿照Linux下的APIhook进行编写,发现在搜索地址那里程序就会挂掉。
因为linux要进行相关开发的时候是需要编写内核模块ko文件的编写。但是在qnx下好像没有找到相关的编写方法,不知道各位大神有没有知道的,谢谢了!!!!!!

附加代码:
// 获取中断描述符表寄存器的地址
asm(“sidt %0”:"=m"(idtr));

// 获取0x80中断处理程序的地址
for(i=5;i<255;i++)
{
memcpy(&idt, idtr.base+8i, sizeof(idt));
sys_call_off=((idt.off2<<16)|idt.off1);
printf(“addr of idt 0x%0x: %x\n”, i,sys_call_off);
printf(“i is %d\n”,i);
// 从0x80中断服务例程中搜索sys_call_table的地址
p=sys_call_off;
int j=0;
for (j=0; j<100; j++)
{
printf(“j is %d\n”,j);
if (p[j]==’\xff’ && p[j+1]==’\x14’ && p[j+2]==’\x85’) //每次执行到这里就会挂掉!
{
printf(“j is %d\n”,j);
sys_call_table=
(unsigned int*)(p+j+3);
printf(“addr of sys_call_table: %x\n”, sys_call_table);
}
}
}

顶起来,求教大神啊!!!!!

Some people still do not understand these things. But I think it would be useful.