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 not access memory at address 0x0



Lalit --

1) Target: nvram boot-args="debug=0x14e"

0x144 is sufficient. 0x14e will end up turning on serial debug output too.


2) Reboot target.
3) Host: arp -s <target> <mac address>
4) Target: kextload -l -s /tmp my_driver.kext
5) Target: tar -cvf sym.tar /tmp/*.sym
6) ftp host, put sym.tar, also put source
7) Host: untar sym.tar
8) Host: gdb mach_kernel (from th SDK)
9) Host: (gdb) target remote-kdb

remote-kdp (but this is probably a mis-type right?)

10) Host: Add the symbols
11) Target: kextload -m my_driver.kext
12) Target : Run test so that systme becomes non-responsive
13) Target: Give NMI to enter into debugging
14) Host: (gdb) attach target
15) source kgmacros
16) showallstacks
17) Get the message: Cannot access memory at address 0x0

Hmmm. Did it say it attached to the remote machine? Did you try doing a 'bt' for backtrace to confirm you were at the NMI point?


Try doing:

(gdb) p proc0

Then the showallstacks. Sometimes gdb needs a 'poke' to get going.

HTH,

-- Chris

------------------
6 Infinite Loop
M/S 306-2MS
Cupertino CA 95014
phone: (408) 974-4033
fax:   (408) 862-7577
email: email@hidden

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

This email sent to email@hidden
References: 
 >gdb: Can not access memory at address 0x0 (From: "Lalit Chandivade" <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.