Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can I use GDB to debug IOUSBFamily?



Hi Pei-Yuan,

On Dec 11, 2007, at 1:40 AM, peiyuan wrote:

Hi,
 
I try to use two-machine debug method. However, according to GDB, my driver seems to crash on its call to superclass(which belongs to IOUSBFamily).
Here are my settings:
1. target used a debug version of IOUSBFamily kext.
2. I run "sudo kextload -ls /tmp GHub.kext", and I got a few .sym including com.apple.iokit.IOUSBFamily.sym. Then I load all .sym into GDB.
 
I can set breakpoints on IOUSBDevice etc. but I can't get the source line number. All I got is its address like 0x0054893c.
 If I run backtrace, I will get some token() and its address.
 
Is this what it is supposed to do?
 
When it crashed, it was not crashed on my function but its parent or some mac-defined functions.
So I can't decide what call went wrong.

You're pretty close. You are just missing the symbols because the shipping Apple kexts don't contain full symbolic information.

That's why Apple ships the Kernel Debug Kits which you can get from <http://developer.apple.com/hardwaredrivers/download>. Take a look at the readme file in the Kernel Debug Kit for some hints such as the createsymbolfile script.

Best regards,
--gc


____________________________________________________________________
Garth Cummings  email@hidden
Sr. Software Engineer
Apple Developer Technical Support



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Usb mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/usb/email@hidden

This email sent to email@hidden

References: 
 >Can I use GDB to debug IOUSBFamily? (From: "peiyuan" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.