gdb add-all-kexts command: Unable to locate symbol-rich-executable for dSYM
gdb add-all-kexts command: Unable to locate symbol-rich-executable for dSYM
- Subject: gdb add-all-kexts command: Unable to locate symbol-rich-executable for dSYM
- From: Brad Keryan <email@hidden>
- Date: Thu, 13 Oct 2011 17:01:44 -0500
I'm trying to use the new add-all-kexts
gdb command to load symbols for all of the kexts that are loaded on my
target. It works for kexts that I have built, but for kexts in the kernel
debug kit, gdb seems to be able to find the dSYM but not the actual binary.
I have Spotlight indexing enabled for
/Volumes/KernelDebugKit, and it is finding the dSYMs, at least one the
ones that exist in the kernel debug kit. Host: 10.6.8 + Xcode 4.2; target:
10.7.2.
Here's some example output:
(gdb) add-all-kexts
warning: Can't find dSYM for com.apple.iokit.IOACPIFamily
(8B3C2276-CD6A-355B-A5F7-A09E4499594B)
warning: Unable to locate symbol-rich-executable
for dSYM at /Volumes/KernelDebugKit/IOPCIFamily.kext.dSYM
warning: Can't find dSYM for com.apple.driver.AppleACPIPlatform
(9FC0A7ED-417F-32BB-B3DA-F796353FEBEE)
warning: Can't find dSYM for com.apple.driver.AppleKeyStore
(03A494E4-AA15-35DF-85EF-D8B2C7A9F05B)
warning: Unable to locate symbol-rich-executable
for dSYM at /Volumes/KernelDebugKit/IOStorageFamily.kext.dSYM
...
I attached dtruss to gdb to see what
it's doing. It seems to be looking at the path specified in the dSYM's
<UUID>.plist and then giving up:
stat64("~rc/Software/SULionCzar/BuildRecords/IOStorageFamily/IOStorageFamily-133
.2~286/Symbols/IOStorageFamily.kext/Contents/MacOS/IOStorageFamily\0",
0x7FFF5FBFDE60, 0x7FFF701925E0) = -1
Err#2
write_nocancel(0x2, "warning: \0",
0x9) = 9 0
write_nocancel(0x2, "Unable to
locate symbol-rich-executable for dSYM at /Volumes/KernelDebugKit/IOStorageFamily.kext.dSYM\0",
0x65) = 101 0
write_nocancel(0x2, "\n\0",
0x1) = 1 0
A comment in macosx_locate_kext_executable_by_symfile_helper()
(in http://www.opensource.apple.com/source/gdb/gdb-1708/src/gdb/macosx/macosx-tdep.c
) says that if the dSYM contains a plist, it uses the plist to find the
kext, otherwise it looks for a kext next to the dSYM. If the filename listed
in the plist doesn't exist, I think it would be very helpful for gdb to
fall back to looking next to the dSYM. That way, it would be able to find
kexts in the kernel debug kit even if there is no ~rc/Software/SULionCzar/...
directory.
Note that using add-kext to specify
the full path to each kext does work, and it doesn't require me to generate
a .sym file. That's an improvement over generating .sym files.
Brad _______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden