ports

morpheus ports
git clone git://git.2f30.org/ports
Log | Files | Refs | LICENSE

gdb-amd64-debugreg.patch (1724B)


      1 diff -u -r -N gdb-7.3.1-org//gdb/amd64-linux-nat.c gdb-7.3.1-patched//gdb/amd64-linux-nat.c
      2 --- gdb-7.3.1-org//gdb/amd64-linux-nat.c	1970-01-01 00:00:00.000000000 +0000
      3 +++ gdb-7.3.1-patched//gdb/amd64-linux-nat.c	2011-09-22 22:20:23.438841813 +0000
      4 @@ -32,7 +32,7 @@
      5  #include "elf/common.h"
      6  #include <sys/uio.h>
      7  #include <sys/ptrace.h>
      8 -#include <sys/debugreg.h>
      9 +#include "debugreg.h"
     10  #include <sys/syscall.h>
     11  #include <sys/procfs.h>
     12  #include <asm/prctl.h>
     13 diff -u -r -N gdb-7.3.1-org//gdb/debugreg.h gdb-7.3.1-patched//gdb/debugreg.h
     14 --- gdb-7.3.1-org//gdb/debugreg.h	1970-01-01 00:00:00.000000000 +0000
     15 +++ gdb-7.3.1-patched//gdb/debugreg.h	2011-09-22 22:20:01.381841813 +0000
     16 @@ -0,0 +1,48 @@
     17 +#ifndef SYS_DEBUGREG_H
     18 +#define SYS_DEBUGREG_H
     19 +
     20 +#include <stdint.h>
     21 +
     22 +#define DR_FIRSTADDR 0
     23 +#define DR_LASTADDR 3
     24 +
     25 +#define DR_STATUS 6
     26 +#define DR_CONTROL 7
     27 +
     28 +#define DR_TRAP0        (0x1)
     29 +#define DR_TRAP1        (0x2)
     30 +#define DR_TRAP2        (0x4)
     31 +#define DR_TRAP3        (0x8)
     32 +
     33 +#define DR_STEP         (0x4000)
     34 +#define DR_SWITCH       (0x8000)
     35 +
     36 +#define DR_CONTROL_SHIFT 16
     37 +#define DR_CONTROL_SIZE  4
     38 +
     39 +#define DR_RW_EXECUTE   (0x0)
     40 +#define DR_RW_WRITE     (0x1)
     41 +#define DR_RW_READ      (0x3)
     42 +
     43 +#define DR_LEN_1 (0x0)
     44 +#define DR_LEN_2 (0x4)
     45 +#define DR_LEN_4 (0xC)
     46 +#define DR_LEN_8 (0x8)
     47 +
     48 +#define DR_LOCAL_ENABLE_SHIFT  0
     49 +#define DR_GLOBAL_ENABLE_SHIFT 1
     50 +#define DR_ENABLE_SIZE         2
     51 +
     52 +#define DR_LOCAL_ENABLE_MASK  (0x55)
     53 +#define DR_GLOBAL_ENABLE_MASK (0xAA)
     54 +
     55 +
     56 +#if SIZE_MAX > 4294967295
     57 +# define DR_CONTROL_RESERVED (0xFFFFFFFF0000FC00UL)
     58 +#else
     59 +# define DR_CONTROL_RESERVED (0x00FC00U)
     60 +#endif
     61 +#define DR_LOCAL_SLOWDOWN   (0x100)
     62 +#define DR_GLOBAL_SLOWDOWN  (0x200)
     63 +
     64 +#endif