Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
kgdb.c File Reference
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/kgdb.h>
#include <linux/smp.h>
#include <linux/signal.h>
#include <linux/ptrace.h>
#include <linux/kdebug.h>
#include <asm/current.h>
#include <asm/processor.h>
#include <asm/machdep.h>
#include <asm/debug.h>
#include <linux/slab.h>

Go to the source code of this file.

Data Structures

struct  hard_trap_info
 

Macros

#define PACK64(ptr, src)   do { *(ptr++) = (src); } while (0)
 
#define PACK32(ptr, src)
 
#define GDB_SIZEOF_REG   sizeof(unsigned long)
 
#define GDB_SIZEOF_REG_U32   sizeof(u32)
 
#define GDB_SIZEOF_FLOAT_REG   sizeof(u64)
 

Functions

int kgdb_skipexception (int exception, struct pt_regs *regs)
 
void sleeping_thread_to_gdb_regs (unsigned long *gdb_regs, struct task_struct *p)
 
chardbg_get_reg (int regno, void *mem, struct pt_regs *regs)
 
int dbg_set_reg (int regno, void *mem, struct pt_regs *regs)
 
void kgdb_arch_set_pc (struct pt_regs *regs, unsigned long pc)
 
int kgdb_arch_handle_exception (int vector, int signo, int err_code, char *remcom_in_buffer, char *remcom_out_buffer, struct pt_regs *linux_regs)
 
int kgdb_arch_init (void)
 
void kgdb_arch_exit (void)
 

Variables

struct dbg_reg_def_t dbg_reg_def [DBG_MAX_REG_NUM]
 
struct kgdb_arch arch_kgdb_ops
 

Macro Definition Documentation

#define GDB_SIZEOF_FLOAT_REG   sizeof(u64)

Definition at line 269 of file kgdb.c.

#define GDB_SIZEOF_REG   sizeof(unsigned long)

Definition at line 263 of file kgdb.c.

#define GDB_SIZEOF_REG_U32   sizeof(u32)

Definition at line 264 of file kgdb.c.

#define PACK32 (   ptr,
  src 
)
Value:
do { \
u32 *ptr32; \
ptr32 = (u32 *)ptr; \
*(ptr32++) = (src); \
ptr = (unsigned long *)ptr32; \
} while (0)

Definition at line 213 of file kgdb.c.

#define PACK64 (   ptr,
  src 
)    do { *(ptr++) = (src); } while (0)

Definition at line 211 of file kgdb.c.

Function Documentation

char* dbg_get_reg ( int  regno,
void mem,
struct pt_regs regs 
)

Definition at line 348 of file kgdb.c.

int dbg_set_reg ( int  regno,
void mem,
struct pt_regs regs 
)

Definition at line 374 of file kgdb.c.

void kgdb_arch_exit ( void  )

Definition at line 485 of file kgdb.c.

int kgdb_arch_handle_exception ( int  vector,
int  signo,
int  err_code,
char remcom_in_buffer,
char remcom_out_buffer,
struct pt_regs linux_regs 
)

Definition at line 407 of file kgdb.c.

int kgdb_arch_init ( void  )

Definition at line 464 of file kgdb.c.

void kgdb_arch_set_pc ( struct pt_regs regs,
unsigned long  pc 
)

Definition at line 399 of file kgdb.c.

int kgdb_skipexception ( int  exception,
struct pt_regs regs 
)

kgdb_skipexception - Bail out of KGDB when we've been triggered.

Exceptions
Exception vector number : Current &struct pt_regs.

On some architectures we need to skip a breakpoint exception when it occurs after a breakpoint has been removed.

Definition at line 115 of file kgdb.c.

void sleeping_thread_to_gdb_regs ( unsigned long gdb_regs,
struct task_struct p 
)

Definition at line 220 of file kgdb.c.

Variable Documentation

struct kgdb_arch arch_kgdb_ops
Initial value:
= {
.gdb_bpt_instr = {0x7d, 0x82, 0x10, 0x08},
}

Definition at line 447 of file kgdb.c.

struct dbg_reg_def_t dbg_reg_def[DBG_MAX_REG_NUM]

Definition at line 272 of file kgdb.c.