Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ShExBy/shex_roo.../usr/include/sys
File: debugreg.h
/* Copyright (C) 2001-2018 Free Software Foundation, Inc.
[0] Fix | Delete
This file is part of the GNU C Library.
[1] Fix | Delete
[2] Fix | Delete
The GNU C Library is free software; you can redistribute it and/or
[3] Fix | Delete
modify it under the terms of the GNU Lesser General Public
[4] Fix | Delete
License as published by the Free Software Foundation; either
[5] Fix | Delete
version 2.1 of the License, or (at your option) any later version.
[6] Fix | Delete
[7] Fix | Delete
The GNU C Library is distributed in the hope that it will be useful,
[8] Fix | Delete
but WITHOUT ANY WARRANTY; without even the implied warranty of
[9] Fix | Delete
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
[10] Fix | Delete
Lesser General Public License for more details.
[11] Fix | Delete
[12] Fix | Delete
You should have received a copy of the GNU Lesser General Public
[13] Fix | Delete
License along with the GNU C Library; if not, see
[14] Fix | Delete
<http://www.gnu.org/licenses/>. */
[15] Fix | Delete
[16] Fix | Delete
#ifndef _SYS_DEBUGREG_H
[17] Fix | Delete
#define _SYS_DEBUGREG_H 1
[18] Fix | Delete
[19] Fix | Delete
/* Indicate the register numbers for a number of the specific
[20] Fix | Delete
debug registers. Registers 0-3 contain the addresses we wish to trap on */
[21] Fix | Delete
#define DR_FIRSTADDR 0 /* u_debugreg[DR_FIRSTADDR] */
[22] Fix | Delete
#define DR_LASTADDR 3 /* u_debugreg[DR_LASTADDR] */
[23] Fix | Delete
[24] Fix | Delete
#define DR_STATUS 6 /* u_debugreg[DR_STATUS] */
[25] Fix | Delete
#define DR_CONTROL 7 /* u_debugreg[DR_CONTROL] */
[26] Fix | Delete
[27] Fix | Delete
/* Define a few things for the status register. We can use this to determine
[28] Fix | Delete
which debugging register was responsible for the trap. The other bits
[29] Fix | Delete
are either reserved or not of interest to us. */
[30] Fix | Delete
[31] Fix | Delete
#define DR_TRAP0 (0x1) /* db0 */
[32] Fix | Delete
#define DR_TRAP1 (0x2) /* db1 */
[33] Fix | Delete
#define DR_TRAP2 (0x4) /* db2 */
[34] Fix | Delete
#define DR_TRAP3 (0x8) /* db3 */
[35] Fix | Delete
[36] Fix | Delete
#define DR_STEP (0x4000) /* single-step */
[37] Fix | Delete
#define DR_SWITCH (0x8000) /* task switch */
[38] Fix | Delete
[39] Fix | Delete
/* Now define a bunch of things for manipulating the control register.
[40] Fix | Delete
The top two bytes of the control register consist of 4 fields of 4
[41] Fix | Delete
bits - each field corresponds to one of the four debug registers,
[42] Fix | Delete
and indicates what types of access we trap on, and how large the data
[43] Fix | Delete
field is that we are looking at */
[44] Fix | Delete
[45] Fix | Delete
#define DR_CONTROL_SHIFT 16 /* Skip this many bits in ctl register */
[46] Fix | Delete
#define DR_CONTROL_SIZE 4 /* 4 control bits per register */
[47] Fix | Delete
[48] Fix | Delete
#define DR_RW_EXECUTE (0x0) /* Settings for the access types to trap on */
[49] Fix | Delete
#define DR_RW_WRITE (0x1)
[50] Fix | Delete
#define DR_RW_READ (0x3)
[51] Fix | Delete
[52] Fix | Delete
#define DR_LEN_1 (0x0) /* Settings for data length to trap on */
[53] Fix | Delete
#define DR_LEN_2 (0x4)
[54] Fix | Delete
#define DR_LEN_4 (0xC)
[55] Fix | Delete
#ifdef __x86_64__
[56] Fix | Delete
# define DR_LEN_8 (0x8)
[57] Fix | Delete
#endif
[58] Fix | Delete
[59] Fix | Delete
/* The low byte to the control register determine which registers are
[60] Fix | Delete
enabled. There are 4 fields of two bits. One bit is "local", meaning
[61] Fix | Delete
that the processor will reset the bit after a task switch and the other
[62] Fix | Delete
is global meaning that we have to explicitly reset the bit. With linux,
[63] Fix | Delete
you can use either one, since we explicitly zero the register when we enter
[64] Fix | Delete
kernel mode. */
[65] Fix | Delete
[66] Fix | Delete
#define DR_LOCAL_ENABLE_SHIFT 0 /* Extra shift to the local enable bit */
[67] Fix | Delete
#define DR_GLOBAL_ENABLE_SHIFT 1 /* Extra shift to the global enable bit */
[68] Fix | Delete
#define DR_ENABLE_SIZE 2 /* 2 enable bits per register */
[69] Fix | Delete
[70] Fix | Delete
#define DR_LOCAL_ENABLE_MASK (0x55) /* Set local bits for all 4 regs */
[71] Fix | Delete
#define DR_GLOBAL_ENABLE_MASK (0xAA) /* Set global bits for all 4 regs */
[72] Fix | Delete
[73] Fix | Delete
/* The second byte to the control register has a few special
[74] Fix | Delete
things. */
[75] Fix | Delete
[76] Fix | Delete
[77] Fix | Delete
[78] Fix | Delete
#ifdef __x86_64__
[79] Fix | Delete
# define DR_CONTROL_RESERVED (0xFFFFFFFF0000FC00ULL) /* Reserved */
[80] Fix | Delete
#else
[81] Fix | Delete
# define DR_CONTROL_RESERVED (0x00FC00U) /* Reserved */
[82] Fix | Delete
#endif
[83] Fix | Delete
#define DR_LOCAL_SLOWDOWN (0x100) /* Local slow the pipeline */
[84] Fix | Delete
#define DR_GLOBAL_SLOWDOWN (0x200) /* Global slow the pipeline */
[85] Fix | Delete
[86] Fix | Delete
#endif /* sys/debugreg.h */
[87] Fix | Delete
[88] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function