debuggers.hg

view xen/include/xen/symbols.h @ 0:7d21f7218375

Exact replica of unstable on 051908 + README-this
author Mukesh Rathor
date Mon May 19 15:34:57 2008 -0700 (2008-05-19)
parents
children 242301b822ec
line source
1 #ifndef _XEN_SYMBOLS_H
2 #define _XEN_SYMBOLS_H
4 #include <xen/config.h>
5 #include <xen/types.h>
7 #define KSYM_NAME_LEN 127
9 /* Lookup an address. */
10 const char *symbols_lookup(unsigned long addr,
11 unsigned long *symbolsize,
12 unsigned long *offset,
13 char *namebuf);
15 /* Replace "%s" in format with address, if found */
16 void __print_symbol(const char *fmt, unsigned long address);
18 /* This macro allows us to keep printk typechecking */
19 static void __check_printsym_format(const char *fmt, ...)
20 __attribute__((format(printf,1,2)));
21 static inline void __check_printsym_format(const char *fmt, ...)
22 {
23 }
25 /* ia64 and ppc64 use function descriptors, which contain the real address */
26 #if defined(CONFIG_IA64) || defined(CONFIG_PPC64)
27 #define print_fn_descriptor_symbol(fmt, addr) \
28 do { \
29 unsigned long *__faddr = (unsigned long*) addr; \
30 print_symbol(fmt, __faddr[0]); \
31 } while (0)
32 #else
33 #define print_fn_descriptor_symbol(fmt, addr) print_symbol(fmt, addr)
34 #endif
36 #define print_symbol(fmt, addr) \
37 do { \
38 __check_printsym_format(fmt, ""); \
39 __print_symbol(fmt, addr); \
40 } while(0)
42 #endif /*_XEN_SYMBOLS_H*/