RE: kprobes, is there a way print local variables or parameters using kprobes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks for the information, appreciated your help on it.
dprobes should be pretty useful.
 
Thanks and Regards
Deepak
 

________________________________

From: kernelnewbies-bounce@xxxxxxxxxxxx on behalf of Sudhanshu Goswami
Sent: Sun 3/13/2005 9:24 PM
To: Kotian, Deepak
Cc: kernelnewbies@xxxxxxxxxxxx
Subject: Re: kprobes, is there a way print local variables or parameters using kprobes



On Sun, 13 Mar 2005 16:43:21 +0530, Kotian, Deepak
<Deepak.Kotian@xxxxxxxxx> wrote:
> Thanks for the information.
> Fyi,There also seems to be Linux Kernel State tracer at
> http://sourceforge.net/projects/lkst/

Thanks for the info.
>
> Thanks and Regards

You are welcome.

Since the previous reply I have also learned another way which could really
help you out with printing local variables. Find it here:
http://dprobes.sourceforge.net

The much more powerful cousin which works on top of KProbes. You can
pretty much log any variable's value at runtime using what DProbes calls
"probe expressions". From the dpcc (DProbes C Compiler) man page:

"'probe expressions' refer to static strings in the dprobes C program
that will be evaluated
relative to the program being debugged when the probe fires. Another
way to think about
probe expressions is that the result of evaluating a probe expression
is pretty much the
same thing you'd get if you'd typed the expression at the command
prompt of the gdb
debugger after hitting a breakpoint."

That gets you your local variables easily as well I guess!!
Check out the tutorial in:
http://dprobes.sourceforge.net/documentation/man/dpcc/

HTH,
Sudhanshu

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/




--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux