Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Functions | Variables
kdb_private.h File Reference
#include <linux/kgdb.h>
#include "../debug_core.h"

Go to the source code of this file.

Data Structures

struct  __ksymtab
 
struct  _kdb_bp
 

Macros

#define KDB_CMD_GO   (-1001)
 
#define KDB_CMD_CPU   (-1002)
 
#define KDB_CMD_SS   (-1003)
 
#define KDB_CMD_SSB   (-1004)
 
#define KDB_CMD_KGDB   (-1005)
 
#define KDB_DEBUG_FLAG_BP   0x0002 /* Breakpoint subsystem debug */
 
#define KDB_DEBUG_FLAG_BB_SUMM   0x0004 /* Basic block analysis, summary only */
 
#define KDB_DEBUG_FLAG_AR   0x0008 /* Activation record, generic */
 
#define KDB_DEBUG_FLAG_ARA   0x0010 /* Activation record, arch specific */
 
#define KDB_DEBUG_FLAG_BB   0x0020 /* All basic block analysis */
 
#define KDB_DEBUG_FLAG_STATE   0x0040 /* State flags */
 
#define KDB_DEBUG_FLAG_MASK   0xffff /* All debug flags */
 
#define KDB_DEBUG_FLAG_SHIFT   16 /* Shift factor for dbflags */
 
#define KDB_DEBUG(flag)
 
#define KDB_DEBUG_STATE(text, value)
 
#define KDB_MAXBPT   16
 
#define kdb_getarea(x, addr)   kdb_getarea_size(&(x), addr, sizeof((x)))
 
#define kdb_putarea(addr, x)   kdb_putarea_size(addr, &(x), sizeof((x)))
 
#define KDB_STATE_KDB   0x00000001 /* Cpu is inside kdb */
 
#define KDB_STATE_LEAVING   0x00000002 /* Cpu is leaving kdb */
 
#define KDB_STATE_CMD   0x00000004 /* Running a kdb command */
 
#define KDB_STATE_KDB_CONTROL
 
#define KDB_STATE_HOLD_CPU   0x00000010 /* Hold this cpu inside kdb */
 
#define KDB_STATE_DOING_SS   0x00000020 /* Doing ss command */
 
#define KDB_STATE_DOING_SSB
 
#define KDB_STATE_SSBPT
 
#define KDB_STATE_REENTRY   0x00000100 /* Valid re-entry into kdb */
 
#define KDB_STATE_SUPPRESS   0x00000200 /* Suppress error messages */
 
#define KDB_STATE_PAGER   0x00000400 /* pager is available */
 
#define KDB_STATE_GO_SWITCH
 
#define KDB_STATE_PRINTF_LOCK   0x00001000 /* Holds kdb_printf lock */
 
#define KDB_STATE_WAIT_IPI   0x00002000 /* Waiting for kdb_ipi() NMI */
 
#define KDB_STATE_RECURSE   0x00004000 /* Recursive entry to kdb */
 
#define KDB_STATE_IP_ADJUSTED
 
#define KDB_STATE_GO1   0x00010000 /* go only releases one cpu */
 
#define KDB_STATE_KEYBOARD
 
#define KDB_STATE_KEXEC   0x00040000 /* kexec issued */
 
#define KDB_STATE_DOING_KGDB   0x00080000 /* kgdb enter now issued */
 
#define KDB_STATE_KGDB_TRANS   0x00200000 /* Transition to kgdb */
 
#define KDB_STATE_ARCH
 
#define KDB_STATE(flag)   (kdb_state & KDB_STATE_##flag)
 
#define KDB_STATE_SET(flag)   ((void)(kdb_state |= KDB_STATE_##flag))
 
#define KDB_STATE_CLEAR(flag)   ((void)(kdb_state &= ~KDB_STATE_##flag))
 

Typedefs

typedef struct __ksymtab kdb_symtab_t
 
typedef struct _kdb_bp kdb_bp_t
 

Functions

int kallsyms_symbol_next (char *prefix_name, int flag)
 
int kallsyms_symbol_complete (char *prefix_name, int max_len)
 
int kdb_getarea_size (void *, unsigned long, size_t)
 
int kdb_putarea_size (unsigned long, void *, size_t)
 
int kdb_getphysword (unsigned long *word, unsigned long addr, size_t size)
 
int kdb_getword (unsigned long *, unsigned long, size_t)
 
int kdb_putword (unsigned long, unsigned long, size_t)
 
int kdbgetularg (const char *, unsigned long *)
 
int kdbgetu64arg (const char *, u64 *)
 
charkdbgetenv (const char *)
 
int kdbgetaddrarg (int, const char **, int *, unsigned long *, long *, char **)
 
int kdbgetsymval (const char *, kdb_symtab_t *)
 
int kdbnearsym (unsigned long, kdb_symtab_t *)
 
void kdbnearsym_cleanup (void)
 
charkdb_strdup (const char *str, gfp_t type)
 
void kdb_symbol_print (unsigned long, const kdb_symtab_t *, unsigned int)
 
void kdb_print_state (const char *, int)
 

Variables

int kdb_state
 
int kdb_nextline
 

Macro Definition Documentation

#define KDB_CMD_CPU   (-1002)

Definition at line 20 of file kdb_private.h.

#define KDB_CMD_GO   (-1001)

Definition at line 19 of file kdb_private.h.

#define KDB_CMD_KGDB   (-1005)

Definition at line 23 of file kdb_private.h.

#define KDB_CMD_SS   (-1003)

Definition at line 21 of file kdb_private.h.

#define KDB_CMD_SSB   (-1004)

Definition at line 22 of file kdb_private.h.

#define KDB_DEBUG (   flag)
Value:
(KDB_DEBUG_FLAG_##flag << KDB_DEBUG_FLAG_SHIFT))

Definition at line 35 of file kdb_private.h.

#define KDB_DEBUG_FLAG_AR   0x0008 /* Activation record, generic */

Definition at line 28 of file kdb_private.h.

#define KDB_DEBUG_FLAG_ARA   0x0010 /* Activation record, arch specific */

Definition at line 29 of file kdb_private.h.

#define KDB_DEBUG_FLAG_BB   0x0020 /* All basic block analysis */

Definition at line 30 of file kdb_private.h.

#define KDB_DEBUG_FLAG_BB_SUMM   0x0004 /* Basic block analysis, summary only */

Definition at line 27 of file kdb_private.h.

#define KDB_DEBUG_FLAG_BP   0x0002 /* Breakpoint subsystem debug */

Definition at line 26 of file kdb_private.h.

#define KDB_DEBUG_FLAG_MASK   0xffff /* All debug flags */

Definition at line 32 of file kdb_private.h.

#define KDB_DEBUG_FLAG_SHIFT   16 /* Shift factor for dbflags */

Definition at line 33 of file kdb_private.h.

#define KDB_DEBUG_FLAG_STATE   0x0040 /* State flags */

Definition at line 31 of file kdb_private.h.

#define KDB_DEBUG_STATE (   text,
  value 
)
Value:
kdb_print_state(text, value)

Definition at line 37 of file kdb_private.h.

#define kdb_getarea (   x,
  addr 
)    kdb_getarea_size(&(x), addr, sizeof((x)))

Definition at line 98 of file kdb_private.h.

#define KDB_MAXBPT   16

Definition at line 70 of file kdb_private.h.

#define kdb_putarea (   addr,
  x 
)    kdb_putarea_size(addr, &(x), sizeof((x)))

Definition at line 99 of file kdb_private.h.

#define KDB_STATE (   flag)    (kdb_state & KDB_STATE_##flag)

Definition at line 144 of file kdb_private.h.

#define KDB_STATE_ARCH
Value:
0xff000000 /* Reserved for arch
* specific use */

Definition at line 142 of file kdb_private.h.

#define KDB_STATE_CLEAR (   flag)    ((void)(kdb_state &= ~KDB_STATE_##flag))

Definition at line 146 of file kdb_private.h.

#define KDB_STATE_CMD   0x00000004 /* Running a kdb command */

Definition at line 123 of file kdb_private.h.

#define KDB_STATE_DOING_KGDB   0x00080000 /* kgdb enter now issued */

Definition at line 140 of file kdb_private.h.

#define KDB_STATE_DOING_SS   0x00000020 /* Doing ss command */

Definition at line 126 of file kdb_private.h.

#define KDB_STATE_DOING_SSB
Value:
0x00000040 /* Doing ssb command,
* DOING_SS is also set */

Definition at line 127 of file kdb_private.h.

#define KDB_STATE_GO1   0x00010000 /* go only releases one cpu */

Definition at line 137 of file kdb_private.h.

#define KDB_STATE_GO_SWITCH
Value:
0x00000800 /* go is switching
* back to initial cpu */

Definition at line 132 of file kdb_private.h.

#define KDB_STATE_HOLD_CPU   0x00000010 /* Hold this cpu inside kdb */

Definition at line 125 of file kdb_private.h.

#define KDB_STATE_IP_ADJUSTED
Value:
0x00008000 /* Restart IP has been
* adjusted */

Definition at line 136 of file kdb_private.h.

#define KDB_STATE_KDB   0x00000001 /* Cpu is inside kdb */

Definition at line 121 of file kdb_private.h.

#define KDB_STATE_KDB_CONTROL
Value:
0x00000008 /* This cpu is under
* kdb control */

Definition at line 124 of file kdb_private.h.

#define KDB_STATE_KEXEC   0x00040000 /* kexec issued */

Definition at line 139 of file kdb_private.h.

#define KDB_STATE_KEYBOARD
Value:
0x00020000 /* kdb entered via
* keyboard on this cpu */

Definition at line 138 of file kdb_private.h.

#define KDB_STATE_KGDB_TRANS   0x00200000 /* Transition to kgdb */

Definition at line 141 of file kdb_private.h.

#define KDB_STATE_LEAVING   0x00000002 /* Cpu is leaving kdb */

Definition at line 122 of file kdb_private.h.

#define KDB_STATE_PAGER   0x00000400 /* pager is available */

Definition at line 131 of file kdb_private.h.

#define KDB_STATE_PRINTF_LOCK   0x00001000 /* Holds kdb_printf lock */

Definition at line 133 of file kdb_private.h.

#define KDB_STATE_RECURSE   0x00004000 /* Recursive entry to kdb */

Definition at line 135 of file kdb_private.h.

#define KDB_STATE_REENTRY   0x00000100 /* Valid re-entry into kdb */

Definition at line 129 of file kdb_private.h.

#define KDB_STATE_SET (   flag)    ((void)(kdb_state |= KDB_STATE_##flag))

Definition at line 145 of file kdb_private.h.

#define KDB_STATE_SSBPT
Value:
0x00000080 /* Install breakpoint
* after one ss, independent of
* DOING_SS */

Definition at line 128 of file kdb_private.h.

#define KDB_STATE_SUPPRESS   0x00000200 /* Suppress error messages */

Definition at line 130 of file kdb_private.h.

#define KDB_STATE_WAIT_IPI   0x00002000 /* Waiting for kdb_ipi() NMI */

Definition at line 134 of file kdb_private.h.

Typedef Documentation

Function Documentation

int kallsyms_symbol_complete ( char prefix_name,
int  max_len 
)

Definition at line 186 of file kdb_support.c.

int kallsyms_symbol_next ( char prefix_name,
int  flag 
)

Definition at line 228 of file kdb_support.c.

int kdb_getarea_size ( void ,
unsigned  long,
size_t   
)

Definition at line 326 of file kdb_support.c.

int kdb_getphysword ( unsigned long word,
unsigned long  addr,
size_t  size 
)

Definition at line 403 of file kdb_support.c.

int kdb_getword ( unsigned long ,
unsigned  long,
size_t   
)

Definition at line 453 of file kdb_support.c.

void kdb_print_state ( const char ,
int   
)

Definition at line 1302 of file kdb_main.c.

int kdb_putarea_size ( unsigned  long,
void ,
size_t   
)

Definition at line 351 of file kdb_support.c.

int kdb_putword ( unsigned  long,
unsigned  long,
size_t   
)

Definition at line 502 of file kdb_support.c.

char* kdb_strdup ( const char str,
gfp_t  type 
)

Definition at line 307 of file kdb_support.c.

void kdb_symbol_print ( unsigned  long,
const kdb_symtab_t ,
unsigned  int 
)

Definition at line 258 of file kdb_support.c.

int kdbgetaddrarg ( int  ,
const char **  ,
int ,
unsigned long ,
long ,
char **   
)

Definition at line 464 of file kdb_main.c.

char* kdbgetenv ( const char )

Definition at line 199 of file kdb_main.c.

int kdbgetsymval ( const char ,
kdb_symtab_t  
)

Definition at line 40 of file kdb_support.c.

int kdbgetu64arg ( const char ,
u64  
)

Definition at line 329 of file kdb_main.c.

int kdbgetularg ( const char ,
unsigned long  
)

Definition at line 307 of file kdb_main.c.

int kdbnearsym ( unsigned  long,
kdb_symtab_t  
)

Definition at line 82 of file kdb_support.c.

void kdbnearsym_cleanup ( void  )

Definition at line 161 of file kdb_support.c.

Variable Documentation

int kdb_nextline

Definition at line 63 of file kdb_main.c.

int kdb_state

Definition at line 64 of file kdb_main.c.