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
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
13 # The dynamically loaded libthread_db needs access to symbols in the
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
17 # Host: Intel 386 running GNU/Linux.
19 -NAT_FILE= config/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
27 +/* Native support for GNU/Linux i386.
29 + Copyright 2010 Free Software Foundation, Inc.
31 + This file is part of GDB.
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.
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.
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/>. */
49 +#include "config/nm-linux.h"
51 +/* Red Hat backward compatibility with gdb-6.8. */
52 +#define target_can_use_hardware_watchpoint(type, cnt, ot) 1
54 +#endif /* NM_LINUX64_H */
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
60 +/* Native support for GNU/Linux amd64.
62 + Copyright 2010 Free Software Foundation, Inc.
64 + This file is part of GDB.
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.
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.
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/>. */
82 +#include "config/nm-linux.h"
84 +/* Red Hat backward compatibility with gdb-6.8. */
85 +#define target_can_use_hardware_watchpoint(type, cnt, ot) 1
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... */
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);
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
108 +# Copyright 2009, 2010 Free Software Foundation, Inc.
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.
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.
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/>.
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."
131 +set test watchpoint-hw-before-run
132 +set srcfile watchpoint-hw-hit-once.c
133 +if { [prepare_for_testing ${test}.exp ${test} ${srcfile}] } {
137 +gdb_test "rwatch watchee" "ardware read watchpoint 1: watchee"
139 +# `runto_main' or `runto main' would delete the watchpoint created above.
141 +if { [gdb_start_cmd] < 0 } {
145 +gdb_test "" "main .* at .*" "start"
147 +gdb_test "continue" "Continuing.\r\nHardware read watchpoint \[0-9\]+: watchee\r\n\r\nValue = 0\r\n.*"