Hi Pavan,On Jun 28, 2006, at 12:10 AM, Pavan Chebbi wrote: 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
Remember that the backtrace is a list of return addresses, so you need to disassemble the instruction _before_ the address in the backtrace. (On Intel processors, some processor exceptions such as page faults cause the instruction to be restarted after the fault, so this rule doesn't apply in those cases.)
On PowerPC-based Macs, do x/i 0x004BA6B4-4, for example. On Intel-based systems, the instructions are all different lengths, so the safest thing to do is to disassemble the entire function, then find the instruction just prior to the address in the backtrace. 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.
There's not enough info here to go on, sorry.
When we get this kind of question in DTS, we usually ask the developer for everything we'd need to reproduce the problem locally. Sometimes an obvious cause can be found in the full panic log, but typically the developer is able to find the easy crashes and DTS gets involved in the harder ones.
--gc 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! Messenger’s low PC-to-Phone call rates.
______________________________________________________________________ Garth Cummings 1 Infinite Loop, MS 303-2T Sr. Software Engineer Cupertino, CA 95014 Apple Developer Technical Support "The last good thing written in C was 408-974-7711 phone Franz Schubert's Symphony No. 9." 408-974-8101 fax —Erwin Dieterich email@hidden |