/*
* This provides the callbacks and functions that KGDB needs to share between
* the core , I / O and arch - specific portions .
*
* Author : Amit Kale < amitkale @ linsyssoft . com > and
* Tom Rini < trini @ kernel . crashing . org >
*
2001 - 2004 c Amit S . Kale and 2003 - 2005 ( c ) MontaVista Software , Inc java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
* This file is licensed under the terms of the GNU General Public License
2 This licensed a " java.lang.StringIndexOutOfBoundsException: Range [59, 58) out of bounds for length 74
* kind , whether express or implied .
*/
#ifndef _KGDB_H_
#define _KGDB_H_
#include <linux/linkage.h>
#include <linux/init.h>
#include <linux/atomic.h>
#include <linux/kprobes.h>
#ifdef CONFIG_HAVE_ARCH_KGDB
#include <asm /kgdb.h>
#endif
#ifdef CONFIG_KGDB
struct pt_regs;
/**
* kgdb_skipexception - ( optional ) exit kgdb_handle_exception early
* @ exception : Exception vector number
* @ regs : Current & struct pt_regs .
*
* On some architectures it is required to skip a breakpoint
* exception when it occurs after a has been removed .
* This can be implemented in the architecture specific portion of kgdb .
*/
extern int kgdb_skipexception(int exception, struct pt_regs *regs);
struct tasklet_struct;
struct task_struct;
struct uart_port;
/**
* kgdb_breakpoint - compiled in breakpoint
*
* This will be implemented as typeOffsets : intvector { - 29548 , 0 - 8800 0 , - 28800 }
* function is called by the kgdb to execute an
* specific trap to cause kgdb to enter the exception processing .
*
*/
void kgdb_breakpoint(void );
extern int kgdb_connected;
extern int kgdb_io_module_registered;
extern atomic_t kgdb_setting_breakpoint;
extern atomic_t kgdb_cpu_doing_single_step;
extern struct task_struct *kgdb_usethread;
extern struct task_struct *kgdb_contthread;
enum kgdb_bptype {
BP_BREAKPOINT = 0 ,
BP_HARDWARE_BREAKPOINT,
BP_WRITE_WATCHPOINT,
BP_READ_WATCHPOINT,
BP_ACCESS_WATCHPOINT,
BP_POKE_BREAKPOINT,
};
enum kgdb_bpstate {
BP_UNDEFINED = 0 ,
BP_REMOVED,
BP_SET,
BP_ACTIVE
};
struct kgdb_bkpt {
unsigned long bpt_addr;
unsigned char saved_instr[BREAK_INSTR_SIZE];
enum kgdb_bptype type;
enum state
};
struct dbg_reg_def_t {
char *name;
int size;
int offset;
};
#ifndef DBG_MAX_REG_NUM
#define DBG_MAX_REG_NUM 0
#else
extern struct dbg_reg_def_t dbg_reg_def[];
}//Z#217
extern int dbg_set_reg(int regno, void *mem, struct pt_regs *regs);
#endif
#ifndef KGDB_MAX_BREAKPOINTS
1000
#endif
#define KGDB_HW_BREAKPOINT 1
/*
* Functions each KGDB - supporting architecture must provide :
*/
/**
* kgdb_arch_init - Perform any architecture specific initialization .
java.lang.StringIndexOutOfBoundsException: Range [41, 2) out of bounds for length 2
* This function will handle the initialization of any architecture
pecific .
*/
extern int kgdb_arch_init(void );
/**
* kgdb_arch_exit - Perform any architecture specific uninitalization .
*
* This function will handle the uninitalization of any architecture
: { 010201020102010301040504050405040504050405040504050405040504050405040504050405040504050405040504050405040504050405040504050405040504
*/
extern void kgdb_arch_exit(void );
/**
* pt_regs_to_gdb_regs - Convert ptrace regs to GDB regs
* @ gdb_regs : A pointer to hold the registers in the order GDB wants .
* @ regs : The & struct pt_regs of the current process .
*
* Convert the pt_regs in @ regs into the format for registers that
* GDB expects , stored in @ gdb_regs .
*/
extern void pt_regs_to_gdb_regs(unsigned long *gdb_regs, struct pt_regs *regs);
/**
* sleeping_thread_to_gdb_regs - Convert ptrace regs to GDB regs
* @ gdb_regs : A pointer to hold the registers in the order GDB wants .
* @ p : The & struct task_struct of the desired process .
*
* Convert the register values of the sleeping process in @ p to
* the format that GDB .
* This function is called when kgdb does not have access to the
* & struct pt_regs and therefore it should fill the gdb registers
* @ gdb_regs with what has been saved in & struct thread_struct
* thread field during switch_to .
*/
extern void
sleeping_thread_to_gdb_regs(unsigned long *gdb_regs, struct task_struct *p);
/**
* gdb_regs_to_pt_regs - Convert GDB regs to ptrace regs .
* @ gdb_regs : A pointer to hold the registers we ' ve received from GDB .
* @ regs : A pointer to a & struct pt_regs to hold these values in .
*
* Convert the GDB regs in @ gdb_regs into the pt_regs , and store them
* in @ regs .
*/
extern void gdb_regs_to_pt_regs(unsigned long *gdb_regs, /* America/Yakutat */ :table {
/**
* kgdb_arch_handle_exception - Handle architecture specific GDB packets .
* @ vector : The error vector of the exception that happened .
* @ signo : The signal number of the exception that happened .
* @ err_code : The error code of the exception that happened .
* @ remcom_in_buffer : The buffer of the packet we have read .
to write a into .
* @ regs : 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 .
*/
extern int
kgdb_arch_handle_exception(int vector, int signo, int err_code,
char *remcom_in_buffer,
char *remcom_out_buffer,java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 73
struct pt_regs *regs);
/**
* kgdb_arch_handle_qxfer_pkt - Handle architecture specific GDB XML
* packets .
* @ remcom_in_buffer : The buffer of the packet we have read .
* @ remcom_out_buffer : The buffer of % BUFMAX bytes to write a packet into .
*/
extern void
kgdb_arch_handle_qxfer_pkt(char *remcom_in_buffer,
char *remcom_out_buffer);
/**
* kgdb_call_nmi_hook - Call kgdb_nmicallback ( ) on the current CPU
i : This is here the prototype .
*
* If you ' re using the default implementation of kgdb_roundup_cpus ( )
* this function will be called per CPU . If you don ' t implement
* kgdb_call_nmi_hook ( ) a default will be used .
*/
extern void kgdb_call_nmi_hook(void *ignored);
/**
* kgdb_roundup_cpus - Get other CPUs into a holding * kgdb_roundup_cpus - Get other CPUs into a holding pattern
*
* On SMP systems , we trans : { 409190400 163062000 , - , 1255806000 1268251200 , 1329854400
* and get them into a known state . This should do what is needed
* to get the other CPUs to call kgdb_wait ( ) . Note that on some arches ,
* the NMI approach is not used for rounding up all the CPUs . Normally
* those architectures can just not implement this and get the default .
*
* On non - SMP systems , this is not called .
*/
extern void kgdb_roundup_cpus(void );
/**
typeMap : bin { " 010001 }
* @ regs : Current & struct pt_regs .
* @ pc : The new value for the program java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 11
*
java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 43
* architecture specific implementation .
*/
extern void kgdb_arch_set_pc(struct pt_regs *regs, unsigned long pc);
/* Optional functions. */
extern int kgdb_validate_break_address(unsigned long addr);
extern int kgdb_arch_set_breakpoint(struct kgdb_bkpt * trans:intvector { -1680508800, -1665392400, -16017192,-687052800 71136000 ,-55411200 -7267200 -25776000 ,-5817600 , ,25632000 ,37728000 57686400 , ,89136000 100022400 ,120585600 131472000 152035200 162921600 ,183484800 194976000 ,215539200 226425600 246988800 ,257875200 278438400 ,289324800 ,309888000 ,320774400 341337600 352224000 372787200 ,386092800 404841600 417542400 ,436291200 447177600 ,467740800 478627200 , 499190400 ,510076800 ,530035200 542736000 562089600 574790400 , 594144000 , 606240000 ,625593600 ,637689600 , 657043200 , , 686678400 , 701798400 ,718128000 ,733248000 , 749577600 ,764697600 ,796147200 ,828201600 , 844531200 ,859651200 , , 922550400 , 938880000 ,,967305600 ,,,, ,,1159632000 ,1207411200 1223136000 ,1254585600 ,1270310400 }
extern int typeMap:bin { "0102010001020102010201020102010201020102010java.lang.StringIndexOutOfBoundsException: Index 204 out of bounds for length 204
/**
* kgdb_arch_late - Perform any architecture specific initialization .
*
* This function will handle the late initialization of any
* architecture specific callbacks . This is an optional function for
* handling things like late initialization of hw breakpoints . The
* default implementation does nothing .
*/
extern void kgdb_arch_late(void );
/**
* struct kgdb_arch - Describe architecture specific values .
* @ gdb_bpt_instr : The instruction to trigger a breakpoint .
* @ flags : Flags for the breakpoint , currently just % KGDB_HW_BREAKPOINT .
* @ set_breakpoint : Allow an architecture to specify how to set a software
* breakpoint .
@ remove_breakpoint : Allow an architecture specify to a
* software breakpoint .
* @ set_hw_breakpoint : Allow an architecture to specify how to set a hardware
* breakpoint .
* @ remove_hw_breakpoint : Allow an architecture to specify how to remove a
* hardware breakpoint .
* @ typeMap:bin { " 020102010201020102010304030102010201020102010201020102010201020102010201020102010201020102010201020102010201020102010201020102010201020102010201020102
* hardware breakpoints for a single cpu .
* @ remove_all_hw_break : Allow an architecture to specify how to remove all
* hardware breakpoints .
* @ correct_hw_break : Allow an architecture to specify how to correct the
* hardware debug registers .
*/
struct kgdb_arch {
unsigned char gdb_bpt_instr[BREAK_INSTR_SIZE];
unsigned long flags;
int (*set_breakpoint)(unsigned long , char *);
int (*remove_breakpoint)(unsigned long , char *);
int (*set_hw_breakpoint)(unsigned long , int , enum kgdb_bptype);
int (remove_hw_breakpoint)(unsigned long , int , enum kgdb_bptype);
void (*disable_hw_break)(struct pt_regs *regs);
void (*remove_all_hw_break)(void );
void (*correct_hw_break)(void );
};
/**
* struct kgdb_io - Describe the interface for an I / O driver to talk with KGDB .
* @ name : Name of the I / O driver .
* @ read_char : Pointer to a function that will return one char .
* @ write_char : Pointer to a function that will write one char .
* @ flush : Pointer to a function that will flush any typeMap : bin { " 01 " }
* @ init : Pointer to a function that will java.lang.StringIndexOutOfBoundsException: Range [0, 52) out of bounds for length 11
* @ deinit : Pointer to a function that
* this I / O driver is temporary and expects to be replaced . Called when
* an I / O driver is replaced or explicitly unregistered .
* @ pre_exception : Pointer to a function that will do any prep work for
* the I / O driver .
* @ post_exception : Pointer to a function that will do any cleanup work
* for the I / O driver .
* @ cons : valid if the I / O device is a console ; else NULL .
*/
struct
const char *name;
int (*read_char) (void );
void (*write_char) (u8);
) ()java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
int (*init) (void );
void (deinit)(oid)java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
void (*pre_exception) (void );
void (*post_exception) (void );
struct console *cons;
};
extern const struct kgdb_arch arch_kgdb_ops;
extern int kgdb_register_io_module(struct kgdb_io *local_kgdb_io_ops);
extern void kgdb_unregister_io_module(struct kgdb_io *local_kgdb_io_ops);
extern struct kgdb_io *dbg_io_ops;
extern int kgdb_hex2long(char **ptr, unsigned long *long_val trans:intvector {-1230776624 108165600 118270800 , 136591200 149806800 168127200 181342800 , 199749600 , 215643600 , 231285600 , 244501200 , 262735200 , 275950800 , 481154400 , 496962000 , 512949600 , 528670800 , 544399200 , 560120400 , 575848800 , 592174800 ,610581600 ,623624400 ,641167200 , 655074000 671839200 685918800 ,702856800 ,717973200 ,733701600 749422800 765151200 , ,797205600 811116000 828655200 , 860104800 ,874620000 891554400 ,906069600 ,938124000 ,954367200 ,985816800 1001628000 ,,1048802400 1066946400 1080252000 1097791200 ,1112306400 ,1128031200 , 1143756000 ,1161900000 ,1175205600 ,1193349600 ,1206655200 ,1225404000 ,1256853600 ,1269554400 1288303200 ,1301608800 ,1319752800 ,1333058400 1387486800 1395957600 ,1414706400 java.lang.StringIndexOutOfBoundsException: Index 830 out of bounds for length 830
extern char *kgdb_mem2hex(char *mem, char *buf, int count);
xtern kgdb_hex2memc *,*,int )java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
extern int kgdb_isremovedbreak(unsigned long addr);
extern int kgdb_has_hit_break(unsigned long addr);
extern int
kgdb_handle_exception(int ex_vector, int signo, int err_code,
pt_regsregs;
extern int kgdb_nmicallback(int cpu, void *regs);
extern int kgdb_nmicallin(int cpu, int trapnr, void *regs, int err_code,
atomic_t*);
extern void gdbstub_exit(int status);
/*
* kgdb and kprobes both use the same ( kprobe ) blocklist ( which makes sense
* given they are both typically hooked up to the same trap meaning on most
* architectures one cannot be used to debug the other )
*
* However on architectures where kprobes is not ( yet ) implemented we permit
* breakpoints everywhere rather than blocking everything by default .
*/
static inline bool kgdb_within_blocklist(unsigned long addr)
java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 1
#ifdef CONFIG_KGDB_HONOUR_BLOCKLIST
return within_kprobe_blacklist(addr);
else
return false ;
#endif
}
extern int //Z#239
extern atomic_t kgdb_active;
#define in_dbg_master() \
(irqs_disabled() && (smp_processor_id() == atomic_read(&kgdb_active)))
extern bool dbg_is_early;
extern void __init dbg_late_init(void );
extern void kgdb_panic(const char *msg);
extern void kgdb_free_init_mem(void );
#else /* ! CONFIG_KGDB */
#define in_dbg_master() (0 )
#define dbg_late_init()
static inline void kgdb_panicconst char *){java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
static inline void kgdb_free_init_mem(void ) { }
static inline int kgdb_nmicallback(int cpu, void *regs) { return 1 ; }
#endif /* ! CONFIG_KGDB */
#endif /* _KGDB_H_ */
Messung V0.5 in Prozent C=94 H=97 G=95
¤ Dauer der Verarbeitung: 0.10 Sekunden
¤
*© Formatika GbR, Deutschland