/kernel/trunk/arch/mips32/include/debug.h |
---|
42,5 → 42,18 |
/** simulator enters interactive mode */ |
#define ___intmode() asm volatile ( "\t.word\t0x29\n"); |
/** Return current IP address */ |
static inline __address * _get_ra() |
{ |
__address *ip; |
__asm__ volatile ( |
"mov %%31, %0" |
: "=r" (ip) |
); |
return ip; |
} |
#define CALLER(first_arg) (_get_ra()) |
#endif |
/kernel/trunk/arch/ia32/include/debug.h |
---|
31,6 → 31,12 |
#include <arch/asm.h> |
/** Return caller of this function |
* |
* @param first_arg First argument of the function |
*/ |
#define CALLER(first_arg) ((__address *) &first_arg)[-1]; |
#define HERE get_ip() |
#endif |