summaryrefslogtreecommitdiff
path: root/package/gdb/patches/patch-gdb_amd64-linux-nat_c
blob: c50f1adf164212156c479f97f05b8ae7c169a51b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
--- gdb-7.6.orig/gdb/amd64-linux-nat.c	2013-03-11 09:25:57.000000000 +0100
+++ gdb-7.6/gdb/amd64-linux-nat.c	2013-10-26 22:30:11.000000000 +0200
@@ -25,15 +25,13 @@
 #include "regset.h"
 #include "linux-nat.h"
 #include "amd64-linux-tdep.h"
-#include "linux-btrace.h"
-#include "btrace.h"
 
 #include "gdb_assert.h"
 #include "gdb_string.h"
 #include "elf/common.h"
 #include <sys/uio.h>
 #include <sys/ptrace.h>
-#include <sys/debugreg.h>
+#include "debugreg.h"
 #include <sys/syscall.h>
 #include <sys/procfs.h>
 #include <sys/user.h>
@@ -1121,47 +1119,6 @@ amd64_linux_read_description (struct tar
     }
 }
 
-/* Enable branch tracing.  */
-
-static struct btrace_target_info *
-amd64_linux_enable_btrace (ptid_t ptid)
-{
-  struct btrace_target_info *tinfo;
-  struct gdbarch *gdbarch;
-
-  errno = 0;
-  tinfo = linux_enable_btrace (ptid);
-
-  if (tinfo == NULL)
-    error (_("Could not enable branch tracing for %s: %s."),
-	   target_pid_to_str (ptid), safe_strerror (errno));
-
-  /* Fill in the size of a pointer in bits.  */
-  gdbarch = target_thread_architecture (ptid);
-  tinfo->ptr_bits = gdbarch_ptr_bit (gdbarch);
-
-  return tinfo;
-}
-
-/* Disable branch tracing.  */
-
-static void
-amd64_linux_disable_btrace (struct btrace_target_info *tinfo)
-{
-  int errcode = linux_disable_btrace (tinfo);
-
-  if (errcode != 0)
-    error (_("Could not disable branch tracing: %s."), safe_strerror (errcode));
-}
-
-/* Teardown branch tracing.  */
-
-static void
-amd64_linux_teardown_btrace (struct btrace_target_info *tinfo)
-{
-  /* Ignore errors.  */
-  linux_disable_btrace (tinfo);
-}
 
 /* Provide a prototype to silence -Wmissing-prototypes.  */
 void _initialize_amd64_linux_nat (void);
@@ -1201,13 +1158,6 @@ _initialize_amd64_linux_nat (void)
 
   t->to_read_description = amd64_linux_read_description;
 
-  /* Add btrace methods.  */
-  t->to_supports_btrace = linux_supports_btrace;
-  t->to_enable_btrace = amd64_linux_enable_btrace;
-  t->to_disable_btrace = amd64_linux_disable_btrace;
-  t->to_teardown_btrace = amd64_linux_teardown_btrace;
-  t->to_read_btrace = linux_read_btrace;
-
   /* Register the target.  */
   linux_nat_add_target (t);
   linux_nat_set_new_thread (t, amd64_linux_new_thread);