From e32551b18f4560056d2d482f5e1505b1b98fa82a Mon Sep 17 00:00:00 2001 From: hunt Date: Tue, 29 Mar 2005 18:07:58 +0000 Subject: *** empty log message *** --- runtime/docs/html/current_8c-source.html | 42 ++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 runtime/docs/html/current_8c-source.html (limited to 'runtime/docs/html/current_8c-source.html') diff --git a/runtime/docs/html/current_8c-source.html b/runtime/docs/html/current_8c-source.html new file mode 100644 index 00000000..88ad571a --- /dev/null +++ b/runtime/docs/html/current_8c-source.html @@ -0,0 +1,42 @@ + + +SystemTap: current.c Source File + + + +
Main Page | Modules | Data Structures | Directories | File List | Data Fields | Globals | Related Pages
+

current.c

Go to the documentation of this file.
00001 #ifndef _CURRENT_C_
+00002 #define _CURRENT_C_
+00003 
+00004 /* -*- linux-c -*- */
+00005 /** @file current.c
+00006  * @brief Functions to get the current state.
+00007  */
+00008 /** @addtogroup current Current State
+00009  * Functions to get the current state.
+00010  * @{
+00011  */
+00012 
+00013 
+00014 /** Get the current return address.
+00015  * Call from kprobes (not jprobes).
+00016  * @param regs The pt_regs saved by the kprobe.
+00017  * @return The return address saved in esp or rsp.
+00018  * @note i386 and x86_64 only so far.
+00019  */
+00020  
+00021 unsigned long _stp_ret_addr (struct pt_regs *regs)
+00022 {
+00023 #ifdef __x86_64__
+00024   unsigned long *ra = (unsigned long *)regs->rsp;
+00025 #else
+00026   unsigned long *ra = (unsigned long *)regs->esp;
+00027 #endif
+00028   if (ra)
+00029     return *ra;
+00030   else
+00031     return 0;
+00032 }
+00033 /** @} */
+00034 #endif /* _CURRENT_C_ */
+
-- cgit