/* * Kernel Debugger Architecture Independent Private Headers * * This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive * for more details. * * Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved. * Copyright (c) 2009 Wind River Systems, Inc. All Rights Reserved.
*/
#include <linux/kgdb.h> #include"../debug_core.h"
/* Kernel Debugger Command codes. Must not overlap with error codes. */ #define KDB_CMD_GO (-1001) #define KDB_CMD_CPU (-1002) #define KDB_CMD_SS (-1003) #define KDB_CMD_KGDB (-1005)
/* * KDB_MAXBPT describes the total number of breakpoints * supported by this architecture.
*/ #define KDB_MAXBPT 16
/* Symbol table format returned by kallsyms. */ typedefstruct __ksymtab { unsignedlong value; /* Address of symbol */ constchar *mod_name; /* Module containing symbol or
* "kernel" */ unsignedlong mod_start; unsignedlong mod_end; constchar *sec_name; /* Section containing symbol */ unsignedlong sec_start; unsignedlong sec_end; constchar *sym_name; /* Full symbol name, including
* any version */ unsignedlong sym_start; unsignedlong sym_end;
} kdb_symtab_t; externint kallsyms_symbol_next(char *prefix_name, int flag, int buf_size); externint kallsyms_symbol_complete(char *prefix_name, int max_len);
/* Exported Symbols for kernel loadable modules to use. */ externint kdb_getarea_size(void *, unsignedlong, size_t); externint kdb_putarea_size(unsignedlong, void *, size_t);
/* * Like get_user and put_user, kdb_getarea and kdb_putarea take variable * names, not pointers. The underlying *_size functions take pointers.
*/ #define kdb_getarea(x, addr) kdb_getarea_size(&(x), addr, sizeof((x))) #define kdb_putarea(addr, x) kdb_putarea_size(addr, &(x), sizeof((x)))
/* Routine for debugging the debugger state. */ externvoid kdb_print_state(constchar *, int);
externint kdb_state; #define KDB_STATE_KDB 0x00000001 /* Cpu is inside kdb */ #define KDB_STATE_LEAVING 0x00000002 /* Cpu is leaving kdb */ #define KDB_STATE_CMD 0x00000004 /* Running a kdb command */ #define KDB_STATE_KDB_CONTROL 0x00000008 /* This cpu is under
* kdb control */ #define KDB_STATE_HOLD_CPU 0x00000010 /* Hold this cpu inside kdb */ #define KDB_STATE_DOING_SS 0x00000020 /* Doing ss command */ #define KDB_STATE_SSBPT 0x00000080 /* Install breakpoint * after one ss, independent of
* DOING_SS */ #define KDB_STATE_REENTRY 0x00000100 /* Valid re-entry into kdb */ #define KDB_STATE_SUPPRESS 0x00000200 /* Suppress error messages */ #define KDB_STATE_PAGER 0x00000400 /* pager is available */ #define KDB_STATE_GO_SWITCH 0x00000800 /* go is switching
* back to initial cpu */ #define KDB_STATE_WAIT_IPI 0x00002000 /* Waiting for kdb_ipi() NMI */ #define KDB_STATE_RECURSE 0x00004000 /* Recursive entry to kdb */ #define KDB_STATE_IP_ADJUSTED 0x00008000 /* Restart IP has been
* adjusted */ #define KDB_STATE_GO1 0x00010000 /* go only releases one cpu */ #define KDB_STATE_KEYBOARD 0x00020000 /* kdb entered via
* keyboard on this cpu */ #define KDB_STATE_KEXEC 0x00040000 /* kexec issued */ #define KDB_STATE_DOING_KGDB 0x00080000 /* kgdb enter now issued */ #define KDB_STATE_KGDB_TRANS 0x00200000 /* Transition to kgdb */ #define KDB_STATE_ARCH 0xff000000 /* Reserved for arch
* specific use */
/* Defines for kdb_symbol_print */ #define KDB_SP_SPACEB 0x0001 /* Space before string */ #define KDB_SP_SPACEA 0x0002 /* Space after string */ #define KDB_SP_PAREN 0x0004 /* Parenthesis around string */ #define KDB_SP_VALUE 0x0008 /* Print the value of the address */ #define KDB_SP_SYMSIZE 0x0010 /* Print the size of the symbol */ #define KDB_SP_NEWLINE 0x0020 /* Newline after string */ #define KDB_SP_DEFAULT (KDB_SP_VALUE|KDB_SP_PAREN)
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.