I can compile this code fragment (from main() in my interrupt
experiment program) and step throught it with the watcom debugger It
locks the entire machine up (requiring a hard reset) inside the
qnx_hint_attach() routine (the “int” assembly instruction
specifically). the machine locks regardless if using watcom debugger
or running the process from a shell. I have it set to compile with
privity 1 (-T1 option), and the -Wc, -zu, -Wc, -s flags (for disabling
stack checking). I have no Idea where to from here on debugging this
one. Does anyone have any suggestions?
Note: QNX4.25 / Watcom 10.6
Thanks in advance for any suggestions,
Erick
…
// Set the process priority fairly high
if (setprio(0,25)==-1)
{
fprintf(stderr, “Failed to set priority\n”);
exit(EXIT_FAILURE);
}
// Create a Proxy of Zero Length
printf(“Creating a proxy message handler\n”);
pid_int_proxy = qnx_proxy_attach(0,NULL,0,-1);
if (pid_int_proxy == -1)
{
fprintf(stderr, “Failed to attach interrupt proxy\n”);
exit(EXIT_FAILURE);
}
//Setup PC104 cards (except interrupts)
initializeHardware(); // Initialize all the hardware on the pc104
stack
// Attach the interrupt service routine
printf(“Attaching to interrupt %u \n”,DM6814IRQ);
isr_id = qnx_hint_attach(DM6814IRQ, &ctrl_isr_handler,
FP_SEG(&pid_int_proxy));//<<<<<<<<<<<<<<<<<It Locks up in this routine
if (isr_id ==-1)
{
fprintf(stderr, “Failed to attach the ctrl interrupt
handler\n”);
exit(EXIT_FAILURE);
}
printf(“Enabing the DM6814 IRQ.\n”);
EnableIRQSharing6814(1); // Disable interrupt sharing.
EnableBoardIRQ6814(1); // Enable 6814 IRQ circuit.
continue to ISR handler…