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

Go to the source code of this file.

Macros

#define GDB_SIZEOF_REG   4
 

Functions

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)
 
void sleeping_thread_to_gdb_regs (unsigned long *gdb_regs, struct task_struct *task)
 
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_REG   4

Definition at line 25 of file kgdb.c.

Function Documentation

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

Definition at line 86 of file kgdb.c.

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

Definition at line 97 of file kgdb.c.

void kgdb_arch_exit ( void  )

kgdb_arch_exit - Perform any architecture specific uninitalization.

This function will handle the uninitalization of any architecture specific callbacks, for dynamic registration and unregistration.

Definition at line 251 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 
)

kgdb_arch_handle_exception - Handle architecture specific GDB packets. : The error vector of the exception that happened. : The signal number of the exception that happened. : The error code of the exception that happened. : The buffer of the packet we have read. : The buffer of BUFMAX bytes to write a packet into. : The &struct pt_regs of the current process.

This function MUST handle the 'c' and 's' command packets, as well packets to set / remove a hardware breakpoint, if used. If there are additional packets which the hardware needs to handle, they are handled here. The code should return -1 if it wants to process more packets, and a %0 or %1 if it wants to exit from the kgdb callback.

Not yet working.

Definition at line 181 of file kgdb.c.

int kgdb_arch_init ( void  )

kgdb_arch_init - Perform any architecture specific initalization.

This function will handle the initalization of any architecture specific callbacks.

Definition at line 240 of file kgdb.c.

void kgdb_arch_set_pc ( struct pt_regs regs,
unsigned long  pc 
)

Definition at line 108 of file kgdb.c.

void sleeping_thread_to_gdb_regs ( unsigned long gdb_regs,
struct task_struct task 
)

Definition at line 147 of file kgdb.c.

Variable Documentation

struct kgdb_arch arch_kgdb_ops
Initial value:
= {
.gdb_bpt_instr = {0x54, 0x00, 0xdb, 0x0c},
}

Definition at line 81 of file kgdb.c.

struct dbg_reg_def_t dbg_reg_def[DBG_MAX_REG_NUM]

Definition at line 29 of file kgdb.c.