Re: Stepping Through Apple Sources
site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Thanks Kevin. I've managed to do that before. That works quite well. The problem I am having is with other kext. For example a kext from IOStorageFamily. When generating symbols for my kext, I also get symbols for various members of IOStorageFamily in com.apple.ioki t.IOStorageFamily.sym. However, after loading that symbol file using add-symbol-file, I still don't know file and line numbers for those functions: (gdb) li IOBlockStorageDriver::free() No line number known for IOBlockStorageDriver::free(). However, I can still set a break point there. I have the kernel debug kit, but It's not clear what to do or how to use the .dsym files that come with it. Thanks, ...Duane On Oct 26, 2009, at 4:43 PM, Kevin Brock wrote:
Duane Murphy wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256
Is there a document or other information that describes how to setup gdb with 2 machine debugging to also use Apple Sources? It would be useful in some of my debugging situations to be able to step through my code into Apple's sources.
I was doing this while debugging some problems with a network KEXT, and stepping through the TCP/IP stack, setting breakpoints there etc. to figure out why a generated packet was getting rejected.
As I recall I simply had to put the sources in the right location. They're expected to be in
/SourceCache/<project>/<versioned name> So for example, the xnu sources for 10.5.7 need to be in
/SourceCache/xnu/xnu-1228.12.14 If they're there, and the symbols are loaded, GDB will find them...
Since the versions are different you can have sources for every version you need in SourceCache at the same time with no conflicts.
I don't think I had to do anything extra to get it working.
Kevin
...Duane -----BEGIN PGP SIGNATURE----- Version: PGP Desktop 9.10.0 (Build 500) Charset: US-ASCII wsBVAwUBSuZUHUrg9acQ4r2CAQiAigf+Izm0QBn+T9c4R1ttZpUlPrJfB9I9n16h Mdx/Xr/hzx96tyCgwuOS3B/992v5AHIIQRlmVlZcsQCnosvqNwgHszyW/dOI8w/N I/CgRA33I7VI9dhhwcLNiByJtC3ZS5x7fUitvSg4ers6rDIJjau0OzIzkYFFCfjs 97rDlTMSOrFGL4p9xCgzJXFMhXjcByScHfZ7LtcNqIBP4Fw6MdDqGQHgUy8MXNRP TYxZE2lPGtVBhG9WbHF/HV3V1WFHMu5FOBPUTNrg9bFO1Nkg3Rxn6oIHe7ZBDHcN VEA/o9qPZRptSQaSmgLO0e6vkWaL3UqEmCUC8GbFgCHlECuxTsdDpg== =NptF -----END PGP SIGNATURE----- _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/site_archiver%40lists.a... This email sent to site_archiver@lists.apple.com
participants (1)
-
Duane Murphy