Debugging a kext
Debugging a kext
- Subject: Debugging a kext
- From: Michael Tuexen <email@hidden>
- Date: Sun, 25 Dec 2011 14:19:34 +0100
Dear all,
I want to debug a kext (actually I've done this a lot of times before), however,
after creating a *.sym using kextutil as I did before, I get:
[mba:~/Desktop/files] tuexen% gdb /Volumes/KernelDebugKit/mach_kernel
GNU gdb 6.3.50-20050815 (Apple version gdb-1708) (Thu Nov 3 21:59:02 UTC 2011)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin"...Reading symbols from /Volumes/KernelDebugKit/mach_kernel...Reading symbols from /Volumes/KernelDebugKit/mach_kernel.dSYM/Contents/Resources/DWARF/mach_kernel...done.
done.
(gdb) add-symbol-file org.sctp.SCTP.sym
add symbol table from file "org.sctp.SCTP.sym"? (y or n) y
Reading symbols from /Users/tuexen/Desktop/files/org.sctp.SCTP.sym...Reading symbols from /Users/tuexen/Desktop/files/SCTP.kext.dSYM/Contents/Resources/DWARF/SCTP...gdb stack crawl at point of internal error:
0 gdb-i386-apple-darwin 0x000000010ae0ed08 internal_vproblem + 296
1 gdb-i386-apple-darwin 0x000000010ae0ebd6 internal_verror + 30
2 gdb-i386-apple-darwin 0x000000010ae0e307 do_cleanups + 0
3 gdb-i386-apple-darwin 0x000000010ada480f objfile_section_offset + 157
4 gdb-i386-apple-darwin 0x000000010ad56c59 syms_from_objfile + 1354
5 gdb-i386-apple-darwin 0x000000010ad57a86 symbol_file_add_with_addrs_or_offsets_using_objfile + 760
6 gdb-i386-apple-darwin 0x000000010ad57a3c symbol_file_add_with_addrs_or_offsets_using_objfile + 686
7 gdb-i386-apple-darwin 0x000000010ad5b557 add_symbol_file_command + 999
8 gdb-i386-apple-darwin 0x000000010ae0c5e6 execute_command + 518
9 gdb-i386-apple-darwin 0x000000010ad82f94 command_handler + 208
10 gdb-i386-apple-darwin 0x000000010ad82e72 command_line_handler + 1090
11 gdb-i386-apple-darwin 0x000000010ae8e55b rl_callback_read_char + 109
12 gdb-i386-apple-darwin 0x000000010ad82a1c rl_callback_read_char_wrapper + 9
13 gdb-i386-apple-darwin 0x000000010ad8159b process_event + 151
14 gdb-i386-apple-darwin 0x000000010ad814ee gdb_do_one_event + 1187
/SourceCache/gdb/gdb-1708/src/gdb/objfiles.c:2330: internal-error: Section index is out of range for objfile (exec_objfile '/Users/tuexen/Desktop/files/SCTP.kext.dSYM/Contents/Resources/DWARF/SCTP' objfile '/Users/tuexen/Desktop/files/SCTP.kext.dSYM/Contents/Resources/DWARF/SCTP')
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n)
Any idea what the problem is?
I'm using 10.7.2 with the latest Xcode stuff.
Best regards
Michael _______________________________________________
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