diff options
author | Stephen Rothwell <sfr@canb.auug.org.au> | 2009-06-26 12:56:04 +1000 |
---|---|---|
committer | Stephen Rothwell <sfr@canb.auug.org.au> | 2009-06-26 12:56:04 +1000 |
commit | a291e496647620179c3ed6edaf5ebd9f9a24e1d1 (patch) | |
tree | 4929974e6eaf45e58703288fb6ce91ca1c9694b0 /include | |
parent | 85b3db2ce39074a407d1c536d392667f21aed8a7 (diff) | |
parent | 98ddb33cecfe5752836a3359148ec0469617c8b6 (diff) |
Merge commit 'kgdb/kgdb-next'
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/kgdb.h | 48 |
1 files changed, 42 insertions, 6 deletions
diff --git a/include/linux/kgdb.h b/include/linux/kgdb.h index 6adcc297e354..cedae0b71192 100644 --- a/include/linux/kgdb.h +++ b/include/linux/kgdb.h @@ -29,8 +29,7 @@ struct pt_regs; * * On some architectures it is required to skip a breakpoint * exception when it occurs after a breakpoint has been removed. - * This can be implemented in the architecture specific portion of - * for kgdb. + * This can be implemented in the architecture specific portion of kgdb. */ extern int kgdb_skipexception(int exception, struct pt_regs *regs); @@ -65,7 +64,7 @@ struct uart_port; /** * kgdb_breakpoint - compiled in breakpoint * - * This will be impelmented a static inline per architecture. This + * This will be implemented as a static inline per architecture. This * function is called by the kgdb core to execute an architecture * specific trap to cause kgdb to enter the exception processing. * @@ -190,7 +189,7 @@ kgdb_arch_handle_exception(int vector, int signo, int err_code, * @flags: Current IRQ state * * On SMP systems, we need to get the attention of the other CPUs - * and get them be in a known state. This should do what is needed + * 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. For example, * in case of MIPS, smp_call_function() is used to roundup CPUs. In @@ -267,8 +266,45 @@ 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 int kgdb_hex2long(char **ptr, unsigned long *long_val); -extern int kgdb_mem2hex(char *mem, char *buf, int count); -extern int kgdb_hex2mem(char *buf, char *mem, int count); + +/** + * kgdb_mem2hex - (optional arch override) translate bin to hex chars + * @mem: source buffer + * @buf: target buffer + * @count: number of bytes in mem + * + * Architectures which do not support probe_kernel_(read|write), + * can make an alternate implementation of this function. + * This function safely reads memory into hex + * characters for use with the kgdb protocol. + */ +extern int __weak kgdb_mem2hex(char *mem, char *buf, int count); + +/** + * kgdb_hex2mem - (optional arch override) translate hex chars to bin + * @buf: source buffer + * @mem: target buffer + * @count: number of bytes in mem + * + * Architectures which do not support probe_kernel_(read|write), + * can make an alternate implementation of this function. + * This function safely writes hex characters into memory + * for use with the kgdb protocol. + */ +extern int __weak kgdb_hex2mem(char *buf, char *mem, int count); + +/** + * kgdb_ebin2mem - (optional arch override) Copy binary array from @buf into @mem + * @buf: source buffer + * @mem: target buffer + * @count: number of bytes in mem + * + * Architectures which do not support probe_kernel_(read|write), + * can make an alternate implementation of this function. + * This function safely copies binary array into memory + * for use with the kgdb protocol. + */ +extern int __weak kgdb_ebin2mem(char *buf, char *mem, int count); extern int kgdb_isremovedbreak(unsigned long addr); |