Re: open ("/dev/tty.xxxx"...) for my driver crashes the system
Re: open ("/dev/tty.xxxx"...) for my driver crashes the system
- Subject: Re: open ("/dev/tty.xxxx"...) for my driver crashes the system
- From: Pavan Chebbi <email@hidden>
- Date: Wed, 28 Jun 2006 00:10:49 -0700 (PDT)
Hi Garth,
Thanks for the reply.
I decoded the panic log and studied the backtrace. I found that the crash was in IOSerialBSDClient and in the function getData(...) to be specific.
This is what the backtrace information showed which lead me to conclude the above.
(gdb) x/i 0x004BA6B4
0x4ba6b4 <_ZN17IOSerialBSDClient7getDataEPNS_7SessionE+364>:
lbzx r3,r2,r31
(gdb) x/i 0x004BA6D8
0x4ba6d8 <_ZN17IOSerialBSDClient7getDataEPNS_7SessionE+400>:
lwz r0,1088(r1)
(gdb) x/i 0x004BA9A4
0x4ba9a4 <_ZN17IOSerialBSDClient6rxFuncEv+228>: b 0x4ba9b4
<_ZN17IOSerialBSDClient6rxFuncEv+244>
(gdb) x/i 0x000A9894
0xa9894 <Call_continuation+20>: mfsprg r3,1
Can you suggest the reason why this is happening in IOSerialBSDClient ?
Is there anything that I
am missing out in my driver code used by IOSerialBSDClient ? My driver subclasses the IOSerialStreamSync class.
Thanks a lot.
Garth Cummings <email@hidden> wrote:
Hi Pavan,On Jun 27, 2006, at 2:08 AM, Pavan Chebbi wrote:
I want to know what happens when I call open() on my virtual ports from a program? I want to know how do I register the open routine for my driver. I know the
routines acquirePort, releasePort, etc but the machine crashes the moment I call open from an application. ( open("/dev/tty.xxxx", O_RDWR | O_NOCTTY | O_NONBLOCK ))
The panic log says unresolved kernel trap 0x300 data access.
The IOSerialBSDClient handles the transition from BSD syscalls to your I/O Kit driver.
I highly recommend you decode the panic backtrace to see precisely where the system panicked. All you know at this point is that a bad memory reference occurred, such as dereferencing a NULL or uninitialized pointer. This could be just a simple bug in your code.
Good luck,
--gc
__________________________________________________________________
Sr. Software Engineer
Apple Developer Technical Support
How low will we go? Check out Yahoo! Messengers low
PC-to-Phone call rates. _______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden