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: GDB can't access kext code memory



The GDB tool always returns "Cannot access memory" for me, even on valid addresses. I proved that with a panic.log from the same machine and OS which is running GDB.

Using an "assert()" in my kext, I generated a panic.log on the same machine. Then I ran kextstat and checked that the addresses in this panic.log fell within the ranges of the kexts involved. Then I tried to read those addresses with the GDB tool. GDB still returned "Cannot access memory" for valid addresses in my kext, and also for addresses within the ranges of several "com.apple.X" kexts.

If you're trying to access memory in your device's address space, you may need to use the kdp_read_io (mapped memory) and/or kdp_trans_off (phsical addresses) options. Check here for more info:


http://developer.apple.com/documentation/Darwin/Conceptual/KernelProgramming/build/chapter_18_section_5.html

Also, I have heard that kdp_trans_off will affect lots of things in gdb, so its best to enable and then disable before attempting anything else.

Jim
_______________________________________________
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


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.