On Tue, Apr 27, 2010 at 5:04 PM, Mulyadi Santosa <mulyadi.santosa@xxxxxxxxx> wrote:
With this approach, i can set breakpoints in every function except for the function that initializes the module because i have to insert the module to get the kernel module section addresses from /sys as a result of which, the initializition routine finishes executing which means i can not set any breakpoints in the module initialize function.
This is not a problem for the the module exit function or any other function though.
There should be a way to tell the kernel that "Look, I dont care where you put the segments of this module but put them at the same place everytime i re-insert the module again (atleast until the next reboot)". Conceptually, this should not be hard to implement (if its not there already) because it is the same kernel & the same unchanged KO module that i am asking it to insert.
Hi Venkatram...
None that I know. AFAIK the only way is to recheck the /sys entry and
On Wed, Apr 28, 2010 at 05:34, Venkatram Tummala <venkatram867@xxxxxxxxx> wrote:
>
> 1) Is there any way to tell the kernel not to load these module sections at
> different addresses every time the module is inserted & removed . That is,
> can we have the module loaded at exactly the same address everytime?
reinsert the symbol file (your kernel module file, which has been
compiled with -g before) to proper position
With this approach, i can set breakpoints in every function except for the function that initializes the module because i have to insert the module to get the kernel module section addresses from /sys as a result of which, the initializition routine finishes executing which means i can not set any breakpoints in the module initialize function.
This is not a problem for the the module exit function or any other function though.
There should be a way to tell the kernel that "Look, I dont care where you put the segments of this module but put them at the same place everytime i re-insert the module again (atleast until the next reboot)". Conceptually, this should not be hard to implement (if its not there already) because it is the same kernel & the same unchanged KO module that i am asking it to insert.
AFAIK, again none that I know.
> 2) Is there any way to overcome this problem so that i can debug the module
> using vmware even though the module is loaded at different addresses?
--
regards,
Mulyadi Santosa
Freelance Linux trainer and consultant
blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com