]>
Commit | Line | Data |
---|---|---|
51a5ef0f PS |
1 | Index: gdb-7.1.90.20100711/gdb/config/i386/linux64.mh |
2 | =================================================================== | |
3 | --- gdb-7.1.90.20100711.orig/gdb/config/i386/linux64.mh 2010-05-28 20:50:31.000000000 +0200 | |
4 | +++ gdb-7.1.90.20100711/gdb/config/i386/linux64.mh 2010-07-13 19:02:54.000000000 +0200 | |
5 | @@ -2,7 +2,7 @@ | |
6 | NATDEPFILES= inf-ptrace.o fork-child.o \ | |
7 | i386-nat.o amd64-nat.o amd64-linux-nat.o linux-nat.o \ | |
8 | proc-service.o linux-thread-db.o linux-fork.o | |
9 | -NAT_FILE= config/nm-linux.h | |
10 | +NAT_FILE= nm-linux64.h | |
11 | NAT_CDEPS = $(srcdir)/proc-service.list | |
12 | ||
13 | # The dynamically loaded libthread_db needs access to symbols in the | |
e5178960 PS |
14 | --- gdb-7.2/gdb/config/i386/linux.mh-orig 2010-06-11 14:08:51.000000000 +0200 |
15 | +++ gdb-7.2/gdb/config/i386/linux.mh 2011-03-18 12:00:32.000000000 +0100 | |
16 | @@ -1,6 +1,6 @@ | |
17 | # Host: Intel 386 running GNU/Linux. | |
18 | ||
19 | -NAT_FILE= config/nm-linux.h | |
20 | +NAT_FILE= nm-linux.h | |
21 | NATDEPFILES= inf-ptrace.o fork-child.o \ | |
22 | i386-nat.o i386-linux-nat.o \ | |
23 | proc-service.o linux-thread-db.o \ | |
24 | --- /dev/null 1970-01-01 00:00:00.000000000 +0000 | |
25 | +++ gdb-7.1.90.20100711/gdb/config/i386/nm-linux.h 2010-07-13 19:02:28.000000000 +0200 | |
26 | @@ -0,0 +1,28 @@ | |
27 | +/* Native support for GNU/Linux i386. | |
28 | + | |
29 | + Copyright 2010 Free Software Foundation, Inc. | |
30 | + | |
31 | + This file is part of GDB. | |
32 | + | |
33 | + This program is free software; you can redistribute it and/or modify | |
34 | + it under the terms of the GNU General Public License as published by | |
35 | + the Free Software Foundation; either version 3 of the License, or | |
36 | + (at your option) any later version. | |
37 | + | |
38 | + This program is distributed in the hope that it will be useful, | |
39 | + but WITHOUT ANY WARRANTY; without even the implied warranty of | |
40 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
41 | + GNU General Public License for more details. | |
42 | + | |
43 | + You should have received a copy of the GNU General Public License | |
44 | + along with this program. If not, see <http://www.gnu.org/licenses/>. */ | |
45 | + | |
46 | +#ifndef NM_LINUX_H | |
47 | +#define NM_LINUX_H | |
48 | + | |
49 | +#include "config/nm-linux.h" | |
50 | + | |
51 | +/* Red Hat backward compatibility with gdb-6.8. */ | |
52 | +#define target_can_use_hardware_watchpoint(type, cnt, ot) 1 | |
53 | + | |
54 | +#endif /* NM_LINUX64_H */ | |
51a5ef0f PS |
55 | Index: gdb-7.1.90.20100711/gdb/config/i386/nm-linux64.h |
56 | =================================================================== | |
57 | --- /dev/null 1970-01-01 00:00:00.000000000 +0000 | |
58 | +++ gdb-7.1.90.20100711/gdb/config/i386/nm-linux64.h 2010-07-13 19:02:28.000000000 +0200 | |
59 | @@ -0,0 +1,28 @@ | |
60 | +/* Native support for GNU/Linux amd64. | |
61 | + | |
62 | + Copyright 2010 Free Software Foundation, Inc. | |
63 | + | |
64 | + This file is part of GDB. | |
65 | + | |
66 | + This program is free software; you can redistribute it and/or modify | |
67 | + it under the terms of the GNU General Public License as published by | |
68 | + the Free Software Foundation; either version 3 of the License, or | |
69 | + (at your option) any later version. | |
70 | + | |
71 | + This program is distributed in the hope that it will be useful, | |
72 | + but WITHOUT ANY WARRANTY; without even the implied warranty of | |
73 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
74 | + GNU General Public License for more details. | |
75 | + | |
76 | + You should have received a copy of the GNU General Public License | |
77 | + along with this program. If not, see <http://www.gnu.org/licenses/>. */ | |
78 | + | |
79 | +#ifndef NM_LINUX64_H | |
80 | +#define NM_LINUX64_H | |
81 | + | |
82 | +#include "config/nm-linux.h" | |
83 | + | |
84 | +/* Red Hat backward compatibility with gdb-6.8. */ | |
85 | +#define target_can_use_hardware_watchpoint(type, cnt, ot) 1 | |
86 | + | |
87 | +#endif /* NM_LINUX64_H */ | |
88 | Index: gdb-7.1.90.20100711/gdb/target.h | |
89 | =================================================================== | |
90 | --- gdb-7.1.90.20100711.orig/gdb/target.h 2010-07-12 23:07:34.000000000 +0200 | |
91 | +++ gdb-7.1.90.20100711/gdb/target.h 2010-07-13 19:02:28.000000000 +0200 | |
92 | @@ -1298,8 +1298,10 @@ extern char *normal_pid_to_str (ptid_t p | |
93 | bp_hardware_breakpoint. CNT is the number of such watchpoints used so far | |
94 | (including this one?). OTHERTYPE is who knows what... */ | |
95 | ||
96 | +#ifndef target_can_use_hardware_watchpoint | |
97 | #define target_can_use_hardware_watchpoint(TYPE,CNT,OTHERTYPE) \ | |
98 | (*current_target.to_can_use_hw_breakpoint) (TYPE, CNT, OTHERTYPE); | |
99 | +#endif | |
100 | ||
101 | #define target_region_ok_for_hw_watchpoint(addr, len) \ | |
102 | (*current_target.to_region_ok_for_hw_watchpoint) (addr, len) | |
103 | Index: gdb-7.1.90.20100711/gdb/testsuite/gdb.base/watchpoint-hw-before-run.exp | |
104 | =================================================================== | |
105 | --- /dev/null 1970-01-01 00:00:00.000000000 +0000 | |
106 | +++ gdb-7.1.90.20100711/gdb/testsuite/gdb.base/watchpoint-hw-before-run.exp 2010-07-13 19:02:28.000000000 +0200 | |
107 | @@ -0,0 +1,40 @@ | |
108 | +# Copyright 2009, 2010 Free Software Foundation, Inc. | |
109 | + | |
110 | +# This program is free software; you can redistribute it and/or modify | |
111 | +# it under the terms of the GNU General Public License as published by | |
112 | +# the Free Software Foundation; either version 3 of the License, or | |
113 | +# (at your option) any later version. | |
114 | +# | |
115 | +# This program is distributed in the hope that it will be useful, | |
116 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of | |
117 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
118 | +# GNU General Public License for more details. | |
119 | +# | |
120 | +# You should have received a copy of the GNU General Public License | |
121 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. | |
122 | + | |
123 | +# Arch not supporting hw watchpoints does not imply no_hardware_watchpoints set. | |
124 | +if {(![istarget "i?86-*-*"] && ![istarget "x86_64-*-*"] | |
125 | + && ![istarget "ia64-*-*"]) | |
126 | + || [target_info exists gdb,no_hardware_watchpoints]} then { | |
127 | + verbose "Skipping watchpoint-hw-before-run test." | |
128 | + return | |
129 | +} | |
130 | + | |
131 | +set test watchpoint-hw-before-run | |
132 | +set srcfile watchpoint-hw-hit-once.c | |
133 | +if { [prepare_for_testing ${test}.exp ${test} ${srcfile}] } { | |
134 | + return -1 | |
135 | +} | |
136 | + | |
137 | +gdb_test "rwatch watchee" "ardware read watchpoint 1: watchee" | |
138 | + | |
139 | +# `runto_main' or `runto main' would delete the watchpoint created above. | |
140 | + | |
141 | +if { [gdb_start_cmd] < 0 } { | |
142 | + untested start | |
143 | + return -1 | |
144 | +} | |
145 | +gdb_test "" "main .* at .*" "start" | |
146 | + | |
147 | +gdb_test "continue" "Continuing.\r\nHardware read watchpoint \[0-9\]+: watchee\r\n\r\nValue = 0\r\n.*" |