Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Typedefs | Functions
stacktrace.c File Reference
#include <linux/kernel.h>

Go to the source code of this file.

Macros

#define MAJOR_OP   0xfc000000
 
#define LDA_OP   0x20000000
 
#define STQ_OP   0xb4000000
 
#define BR_OP   0xc0000000
 
#define STK_ALLOC_1   0x23de8000 /* lda $30,-X($30) */
 
#define STK_ALLOC_1M   0xffff8000
 
#define STK_ALLOC_2   0x43c0153e /* subq $30,X,$30 */
 
#define STK_ALLOC_2M   0xffe01fff
 
#define MEM_REG   0x03e00000
 
#define MEM_BASE   0x001f0000
 
#define MEM_OFF   0x0000ffff
 
#define MEM_OFF_SIGN   0x00008000
 
#define BASE_SP   0x001e0000
 
#define STK_ALLOC_MATCH(INSTR)
 
#define STK_PUSH_MATCH(INSTR)   (((INSTR) & (MAJOR_OP | MEM_BASE | MEM_OFF_SIGN)) == (STQ_OP | BASE_SP))
 
#define MEM_OP_OFFSET(INSTR)   (((long)((INSTR) & MEM_OFF) << 48) >> 48)
 
#define MEM_OP_REG(INSTR)   (((INSTR) & MEM_REG) >> 22)
 
#define BB_END(INSTR)
 
#define IS_KERNEL_TEXT(PC)   ((unsigned long)(PC) > START_ADDR)
 

Typedefs

typedef unsigned int instr
 

Functions

void stacktrace (void)
 

Macro Definition Documentation

#define BASE_SP   0x001e0000

Definition at line 19 of file stacktrace.c.

#define BB_END (   INSTR)
Value:
(((instr)(INSTR) >= BR_OP) | ((instr)(INSTR) < LDA_OP) | \
((((instr)(INSTR) ^ 0x60000000) < 0x20000000) & \
(((instr)(INSTR) & 0x0c000000) != 0)))

Definition at line 32 of file stacktrace.c.

#define BR_OP   0xc0000000

Definition at line 8 of file stacktrace.c.

#define IS_KERNEL_TEXT (   PC)    ((unsigned long)(PC) > START_ADDR)

Definition at line 37 of file stacktrace.c.

#define LDA_OP   0x20000000

Definition at line 6 of file stacktrace.c.

#define MAJOR_OP   0xfc000000

Definition at line 5 of file stacktrace.c.

#define MEM_BASE   0x001f0000

Definition at line 16 of file stacktrace.c.

#define MEM_OFF   0x0000ffff

Definition at line 17 of file stacktrace.c.

#define MEM_OFF_SIGN   0x00008000

Definition at line 18 of file stacktrace.c.

#define MEM_OP_OFFSET (   INSTR)    (((long)((INSTR) & MEM_OFF) << 48) >> 48)

Definition at line 26 of file stacktrace.c.

#define MEM_OP_REG (   INSTR)    (((INSTR) & MEM_REG) >> 22)

Definition at line 28 of file stacktrace.c.

#define MEM_REG   0x03e00000

Definition at line 15 of file stacktrace.c.

#define STK_ALLOC_1   0x23de8000 /* lda $30,-X($30) */

Definition at line 10 of file stacktrace.c.

#define STK_ALLOC_1M   0xffff8000

Definition at line 11 of file stacktrace.c.

#define STK_ALLOC_2   0x43c0153e /* subq $30,X,$30 */

Definition at line 12 of file stacktrace.c.

#define STK_ALLOC_2M   0xffe01fff

Definition at line 13 of file stacktrace.c.

#define STK_ALLOC_MATCH (   INSTR)
Value:
(((INSTR) & STK_ALLOC_1M) == STK_ALLOC_1 \
|| ((INSTR) & STK_ALLOC_2M) == STK_ALLOC_2)

Definition at line 21 of file stacktrace.c.

#define STK_PUSH_MATCH (   INSTR)    (((INSTR) & (MAJOR_OP | MEM_BASE | MEM_OFF_SIGN)) == (STQ_OP | BASE_SP))

Definition at line 24 of file stacktrace.c.

#define STQ_OP   0xb4000000

Definition at line 7 of file stacktrace.c.

Typedef Documentation

typedef unsigned int instr

Definition at line 3 of file stacktrace.c.

Function Documentation

void stacktrace ( void  )

Definition at line 90 of file stacktrace.c.