~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/kernel/debug/debug_core.h

Version: ~ [ linux-5.12-rc1 ] ~ [ linux-5.11.2 ] ~ [ linux-5.10.19 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.101 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.177 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.222 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.258 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.258 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.18.140 ] ~ [ linux-3.16.85 ] ~ [ linux-3.14.79 ] ~ [ linux-3.12.74 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /*
  2  * Created by: Jason Wessel <jason.wessel@windriver.com>
  3  *
  4  * Copyright (c) 2009 Wind River Systems, Inc.  All Rights Reserved.
  5  *
  6  * This file is licensed under the terms of the GNU General Public
  7  * License version 2. This program is licensed "as is" without any
  8  * warranty of any kind, whether express or implied.
  9  */
 10 
 11 #ifndef _DEBUG_CORE_H_
 12 #define _DEBUG_CORE_H_
 13 /*
 14  * These are the private implementation headers between the kernel
 15  * debugger core and the debugger front end code.
 16  */
 17 
 18 /* kernel debug core data structures */
 19 struct kgdb_state {
 20         int                     ex_vector;
 21         int                     signo;
 22         int                     err_code;
 23         int                     cpu;
 24         int                     pass_exception;
 25         unsigned long           thr_query;
 26         unsigned long           threadid;
 27         long                    kgdb_usethreadid;
 28         struct pt_regs          *linux_regs;
 29         atomic_t                *send_ready;
 30 };
 31 
 32 /* Exception state values */
 33 #define DCPU_WANT_MASTER 0x1 /* Waiting to become a master kgdb cpu */
 34 #define DCPU_NEXT_MASTER 0x2 /* Transition from one master cpu to another */
 35 #define DCPU_IS_SLAVE    0x4 /* Slave cpu enter exception */
 36 #define DCPU_SSTEP       0x8 /* CPU is single stepping */
 37 
 38 struct debuggerinfo_struct {
 39         void                    *debuggerinfo;
 40         struct task_struct      *task;
 41         int                     exception_state;
 42         int                     ret_state;
 43         int                     irq_depth;
 44         int                     enter_kgdb;
 45         bool                    rounding_up;
 46 };
 47 
 48 extern struct debuggerinfo_struct kgdb_info[];
 49 
 50 /* kernel debug core break point routines */
 51 extern int dbg_remove_all_break(void);
 52 extern int dbg_set_sw_break(unsigned long addr);
 53 extern int dbg_remove_sw_break(unsigned long addr);
 54 extern int dbg_activate_sw_breakpoints(void);
 55 extern int dbg_deactivate_sw_breakpoints(void);
 56 
 57 /* polled character access to i/o module */
 58 extern int dbg_io_get_char(void);
 59 
 60 /* stub return value for switching between the gdbstub and kdb */
 61 #define DBG_PASS_EVENT -12345
 62 /* Switch from one cpu to another */
 63 #define DBG_SWITCH_CPU_EVENT -123456
 64 extern int dbg_switch_cpu;
 65 
 66 /* gdbstub interface functions */
 67 extern int gdb_serial_stub(struct kgdb_state *ks);
 68 extern void gdbstub_msg_write(const char *s, int len);
 69 
 70 /* gdbstub functions used for kdb <-> gdbstub transition */
 71 extern int gdbstub_state(struct kgdb_state *ks, char *cmd);
 72 extern int dbg_kdb_mode;
 73 
 74 #ifdef CONFIG_KGDB_KDB
 75 extern int kdb_stub(struct kgdb_state *ks);
 76 extern int kdb_parse(const char *cmdstr);
 77 extern int kdb_common_init_state(struct kgdb_state *ks);
 78 extern int kdb_common_deinit_state(void);
 79 #else /* ! CONFIG_KGDB_KDB */
 80 static inline int kdb_stub(struct kgdb_state *ks)
 81 {
 82         return DBG_PASS_EVENT;
 83 }
 84 #endif /* CONFIG_KGDB_KDB */
 85 
 86 #endif /* _DEBUG_CORE_H_ */
 87 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp