Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions | Variables
debug_core.c File Reference
#include <linux/pid_namespace.h>
#include <linux/clocksource.h>
#include <linux/interrupt.h>
#include <linux/spinlock.h>
#include <linux/console.h>
#include <linux/threads.h>
#include <linux/uaccess.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/ptrace.h>
#include <linux/string.h>
#include <linux/delay.h>
#include <linux/sched.h>
#include <linux/sysrq.h>
#include <linux/reboot.h>
#include <linux/init.h>
#include <linux/kgdb.h>
#include <linux/kdb.h>
#include <linux/pid.h>
#include <linux/smp.h>
#include <linux/mm.h>
#include <linux/rcupdate.h>
#include <asm/cacheflush.h>
#include <asm/byteorder.h>
#include <linux/atomic.h>
#include "debug_core.h"

Go to the source code of this file.


 EXPORT_SYMBOL_GPL (kgdb_connected)
 early_param ("kgdbcon", opt_kgdb_con)
 module_param (kgdb_use_con, int, 0644)
 module_param (kgdbreboot, int, 0644)
 EXPORT_SYMBOL_GPL (kgdb_active)
 early_param ("nokgdbroundup", opt_nokgdbroundup)
int __weak kgdb_arch_set_breakpoint (struct kgdb_bkpt *bpt)
int __weak kgdb_arch_remove_breakpoint (struct kgdb_bkpt *bpt)
int __weak kgdb_validate_break_address (unsigned long addr)
unsigned long __weak kgdb_arch_pc (int exception, struct pt_regs *regs)
int __weak kgdb_arch_init (void)
int __weak kgdb_skipexception (int exception, struct pt_regs *regs)
int dbg_activate_sw_breakpoints (void)
int dbg_set_sw_break (unsigned long addr)
int dbg_deactivate_sw_breakpoints (void)
int dbg_remove_sw_break (unsigned long addr)
int kgdb_isremovedbreak (unsigned long addr)
int dbg_remove_all_break (void)
int kgdb_handle_exception (int evector, int signo, int ecode, struct pt_regs *regs)
int kgdb_nmicallback (int cpu, void *regs)
void __weak kgdb_arch_late (void)
void __init dbg_late_init (void)
void kgdb_schedule_breakpoint (void)
 EXPORT_SYMBOL_GPL (kgdb_schedule_breakpoint)
int kgdb_register_io_module (struct kgdb_io *new_dbg_io_ops)
 EXPORT_SYMBOL_GPL (kgdb_register_io_module)
void kgdb_unregister_io_module (struct kgdb_io *old_dbg_io_ops)
 EXPORT_SYMBOL_GPL (kgdb_unregister_io_module)
int dbg_io_get_char (void)
void kgdb_breakpoint (void)
 EXPORT_SYMBOL_GPL (kgdb_breakpoint)
 early_param ("kgdbwait", opt_kgdb_wait)


struct debuggerinfo_struct kgdb_info [NR_CPUS]
int kgdb_connected
int kgdb_io_module_registered
struct kgdb_io * dbg_io_ops
bool dbg_is_early = true
int dbg_switch_cpu
int dbg_kdb_mode = 1
atomic_t kgdb_active = ATOMIC_INIT(-1)
atomic_t kgdb_setting_breakpoint
struct task_structkgdb_usethread
struct task_structkgdb_contthread
int kgdb_single_step
atomic_t kgdb_cpu_doing_single_step = ATOMIC_INIT(-1)

Function Documentation

int dbg_activate_sw_breakpoints ( void  )

Definition at line 237 of file debug_core.c.

int dbg_deactivate_sw_breakpoints ( void  )

Definition at line 302 of file debug_core.c.

int dbg_io_get_char ( void  )

Definition at line 988 of file debug_core.c.

void __init dbg_late_init ( void  )

Definition at line 801 of file debug_core.c.

int dbg_remove_all_break ( void  )

Definition at line 350 of file debug_core.c.

int dbg_remove_sw_break ( unsigned long  addr)

Definition at line 324 of file debug_core.c.

int dbg_set_sw_break ( unsigned long  addr)

Definition at line 261 of file debug_core.c.

early_param ( "kgdbcon"  ,
early_param ( "nokgdbroundup"  ,
early_param ( "kgdbwait"  ,
EXPORT_SYMBOL_GPL ( kgdb_connected  )
EXPORT_SYMBOL_GPL ( kgdb_active  )
EXPORT_SYMBOL_GPL ( kgdb_schedule_breakpoint  )
EXPORT_SYMBOL_GPL ( kgdb_register_io_module  )
EXPORT_SYMBOL_GPL ( kgdb_unregister_io_module  )
EXPORT_SYMBOL_GPL ( kgdb_breakpoint  )
int __weak kgdb_arch_init ( void  )

Definition at line 207 of file debug_core.c.

void __weak kgdb_arch_late ( void  )

Definition at line 797 of file debug_core.c.

unsigned long __weak kgdb_arch_pc ( int  exception,
struct pt_regs regs 

Definition at line 202 of file debug_core.c.

int __weak kgdb_arch_remove_breakpoint ( struct kgdb_bkpt *  bpt)

Definition at line 176 of file debug_core.c.

int __weak kgdb_arch_set_breakpoint ( struct kgdb_bkpt *  bpt)

Definition at line 163 of file debug_core.c.

void kgdb_breakpoint ( void  )

kgdb_breakpoint - generate breakpoint exception

This function will generate a breakpoint exception. It is used at the beginning of a program to sync up with a debugger and can be used otherwise as a quick means to stop program execution and "break" into the debugger.

Definition at line 1008 of file debug_core.c.

int kgdb_handle_exception ( int  evector,
int  signo,
int  ecode,
struct pt_regs regs 

Definition at line 671 of file debug_core.c.

int kgdb_isremovedbreak ( unsigned long  addr)

Definition at line 338 of file debug_core.c.

int kgdb_nmicallback ( int  cpu,
void regs 

Definition at line 715 of file debug_core.c.

int kgdb_register_io_module ( struct kgdb_io *  new_dbg_io_ops)

kgdb_register_io_module - register KGDB IO module : the io ops vector

Register it with the KGDB core.

Definition at line 920 of file debug_core.c.

void kgdb_schedule_breakpoint ( void  )

Definition at line 895 of file debug_core.c.

int __weak kgdb_skipexception ( int  exception,
struct pt_regs regs 

Definition at line 212 of file debug_core.c.

void kgdb_unregister_io_module ( struct kgdb_io *  old_dbg_io_ops)

kkgdb_unregister_io_module - unregister KGDB IO module : the io ops vector

Unregister it with the KGDB core.

Definition at line 965 of file debug_core.c.

int __weak kgdb_validate_break_address ( unsigned long  addr)

Definition at line 182 of file debug_core.c.

module_param ( kgdb_use_con  ,
int  ,
module_param ( kgdbreboot  ,
int  ,

Variable Documentation

struct kgdb_io* dbg_io_ops

Definition at line 75 of file debug_core.c.

bool dbg_is_early = true

Definition at line 85 of file debug_core.c.

int dbg_kdb_mode = 1

Definition at line 90 of file debug_core.c.

int dbg_switch_cpu

Definition at line 87 of file debug_core.c.

atomic_t kgdb_active = ATOMIC_INIT(-1)

Definition at line 114 of file debug_core.c.

int kgdb_connected

kgdb_connected - Is a host GDB connected to us?

Definition at line 66 of file debug_core.c.

struct task_struct* kgdb_contthread

Definition at line 129 of file debug_core.c.

atomic_t kgdb_cpu_doing_single_step = ATOMIC_INIT(-1)

Definition at line 135 of file debug_core.c.

Definition at line 61 of file debug_core.c.

int kgdb_io_module_registered

Definition at line 70 of file debug_core.c.

atomic_t kgdb_setting_breakpoint

Definition at line 126 of file debug_core.c.

int kgdb_single_step

Definition at line 131 of file debug_core.c.

struct task_struct* kgdb_usethread

Definition at line 128 of file debug_core.c.