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

TOMOYO Linux Cross Reference
Linux/arch/x86/include/asm/kgdb.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ 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.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0 */
  2 #ifndef _ASM_X86_KGDB_H
  3 #define _ASM_X86_KGDB_H
  4 
  5 /*
  6  * Copyright (C) 2001-2004 Amit S. Kale
  7  * Copyright (C) 2008 Wind River Systems, Inc.
  8  */
  9 
 10 #include <asm/ptrace.h>
 11 
 12 /*
 13  * BUFMAX defines the maximum number of characters in inbound/outbound
 14  * buffers at least NUMREGBYTES*2 are needed for register packets
 15  * Longer buffer is needed to list all threads
 16  */
 17 #define BUFMAX                  1024
 18 
 19 /*
 20  *  Note that this register image is in a different order than
 21  *  the register image that Linux produces at interrupt time.
 22  *
 23  *  Linux's register image is defined by struct pt_regs in ptrace.h.
 24  *  Just why GDB uses a different order is a historical mystery.
 25  */
 26 #ifdef CONFIG_X86_32
 27 enum regnames {
 28         GDB_AX,                 /* 0 */
 29         GDB_CX,                 /* 1 */
 30         GDB_DX,                 /* 2 */
 31         GDB_BX,                 /* 3 */
 32         GDB_SP,                 /* 4 */
 33         GDB_BP,                 /* 5 */
 34         GDB_SI,                 /* 6 */
 35         GDB_DI,                 /* 7 */
 36         GDB_PC,                 /* 8 also known as eip */
 37         GDB_PS,                 /* 9 also known as eflags */
 38         GDB_CS,                 /* 10 */
 39         GDB_SS,                 /* 11 */
 40         GDB_DS,                 /* 12 */
 41         GDB_ES,                 /* 13 */
 42         GDB_FS,                 /* 14 */
 43         GDB_GS,                 /* 15 */
 44 };
 45 #define GDB_ORIG_AX             41
 46 #define DBG_MAX_REG_NUM         16
 47 #define NUMREGBYTES             ((GDB_GS+1)*4)
 48 #else /* ! CONFIG_X86_32 */
 49 enum regnames {
 50         GDB_AX,                 /* 0 */
 51         GDB_BX,                 /* 1 */
 52         GDB_CX,                 /* 2 */
 53         GDB_DX,                 /* 3 */
 54         GDB_SI,                 /* 4 */
 55         GDB_DI,                 /* 5 */
 56         GDB_BP,                 /* 6 */
 57         GDB_SP,                 /* 7 */
 58         GDB_R8,                 /* 8 */
 59         GDB_R9,                 /* 9 */
 60         GDB_R10,                /* 10 */
 61         GDB_R11,                /* 11 */
 62         GDB_R12,                /* 12 */
 63         GDB_R13,                /* 13 */
 64         GDB_R14,                /* 14 */
 65         GDB_R15,                /* 15 */
 66         GDB_PC,                 /* 16 */
 67         GDB_PS,                 /* 17 */
 68         GDB_CS,                 /* 18 */
 69         GDB_SS,                 /* 19 */
 70         GDB_DS,                 /* 20 */
 71         GDB_ES,                 /* 21 */
 72         GDB_FS,                 /* 22 */
 73         GDB_GS,                 /* 23 */
 74 };
 75 #define GDB_ORIG_AX             57
 76 #define DBG_MAX_REG_NUM         24
 77 /* 17 64 bit regs and 5 32 bit regs */
 78 #define NUMREGBYTES             ((17 * 8) + (5 * 4))
 79 #endif /* ! CONFIG_X86_32 */
 80 
 81 static inline void arch_kgdb_breakpoint(void)
 82 {
 83         asm("   int $3");
 84 }
 85 #define BREAK_INSTR_SIZE        1
 86 #define CACHE_FLUSH_IS_SAFE     1
 87 #define GDB_ADJUSTS_BREAK_OFFSET
 88 
 89 extern int kgdb_ll_trap(int cmd, const char *str,
 90                         struct pt_regs *regs, long err, int trap, int sig);
 91 
 92 #endif /* _ASM_X86_KGDB_H */
 93 

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

kernel.org | git.kernel.org | LWN.net | Project Home | 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.

sflogo.php