04/16/2008 - Copyright © 2008 The PTR Group Inc.
Debugging Loadable Modules #2
We’ll need to breakpoint just before the control is transferred to the module’s __init
Somewhere around line 1907 of module.c
Once the breakpoint is encountered, we can walk the module address list to find the assigned address for the module
We then use the add-symbol-file GDB command to add the debug symbols for the driver at the address for the loaded module
E.g., add-symbol-file ./mydriver.ko 0x<addr> -e .init.text