The OOPS message:
1 2 3 4 5 6 7 8 9 10 11 12 13 | |
Method A: Recompile vmlinux or failed module with debug info enabled if possible (CONFIG_DEBUG_INFO=y), then gdb can give out the C source code line of the failed instruction:
1 2 | |
Recompile individual module if needed:
1
| |
Use gdb to get C source file:line info from given instruction address:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | |
Method B: If can not recompile the vmlinux/module, but the problematic vmlinux/module file is available, use objdump to get the assembly line, but no C source line available.
1
| |
module_put+0x44 = 0x800751d8 + 0x44 = 0x8007521c:
1 2 3 | |
Compared with method A, method B get the same instruction line.
Appendix: only for comparison/reference: use objdump to decode an object file with debug info:
1
| |
Check if module_put+0x44 = 0xf28+0x44 = 0xf6c point to the same C source line and assembly line:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | |