Create ros/vmm/vmx.h, prepare to move lots of code to user mode from kernel driver.
[akaros.git] / kern / arch / x86 / kdebug.h
index 025a3b6..7f7e3ea 100644 (file)
 
 #include <stdio.h>
 
+// Debug information about a particular instruction pointer
+typedef struct eipdebuginfo {
+       const char *eip_file;           // Source code filename for EIP
+       int eip_line;                           // Source code linenumber for EIP
+
+       const char *eip_fn_name;        // Name of function containing EIP
+                                                               //  - Note: not null terminated!
+       int eip_fn_namelen;                     // Length of function name
+       uintptr_t eip_fn_addr;          // Address of start of function
+       int eip_fn_narg;                        // Number of function arguments
+} eipdebuginfo_t;
+
+int debuginfo_eip(uintptr_t eip, eipdebuginfo_t *info);
+void *debug_get_fn_addr(char *fn_name);
+
 /* Returns a PC/EIP in the function that called us, preferably near the call
  * site.  Returns 0 when we can't jump back any farther. */
 static inline uintptr_t get_caller_pc(void)