I will try to explain it. I have this variable declared on one of my source files:
struct Task_Data task_data_array[MAX_NUM_TASKS];
this variable is accesd by the function the kernel calls on scheduler and for other functions on the module. I put a printk on the function and printed: &task_data_array.
When accesing the function from the kernel, the value printed differs from the value printed when accesing from other module function.
Sorry if i explain it bad... :)
2008/3/1, Mulyadi Santosa <mulyadi.santosa@xxxxxxxxx>:
Hi...
On Sat, Mar 1, 2008 at 4:19 PM, David Embid <davidembid@xxxxxxxxx> wrote:
> Hi,
>
> by "direction" I mean where the function is taking the data for this
> varibale ( &variable ).
I still don't get it...can you give example?
> Can you explain me a little more your suggestion with kprobe?
kprobe.txt in Documentation directory of kernel tarball might do
better than me when explaining it. But in short, use kprobe to insert
a hook function on the beginning of schedule().
> Kprobes is a kernel debugger but i think I know the problem of my code, I
> used printk messages to get the value of "&variable" and checks that when
> is called from two different context, its value is different and the content
> of the variable is different too.
regards,
Mulyadi.