1 Index: gdb-7.4.50.20111218/gdb/config/i386/linux64.mh
2 ===================================================================
3 --- gdb-7.4.50.20111218.orig/gdb/config/i386/linux64.mh 2011-08-24 14:07:26.000000000 +0200
4 +++ gdb-7.4.50.20111218/gdb/config/i386/linux64.mh 2011-12-19 01:40:49.492625837 +0100
5 @@ -4,7 +4,7 @@ NATDEPFILES= inf-ptrace.o fork-child.o \
6 linux-nat.o linux-osdata.o \
7 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 Index: gdb-7.4.50.20111218/gdb/config/i386/linux.mh
15 ===================================================================
16 --- gdb-7.4.50.20111218.orig/gdb/config/i386/linux.mh 2011-08-24 14:07:26.000000000 +0200
17 +++ gdb-7.4.50.20111218/gdb/config/i386/linux.mh 2011-12-19 01:40:32.453689006 +0100
19 # Host: Intel 386 running GNU/Linux.
21 -NAT_FILE= config/nm-linux.h
23 NATDEPFILES= inf-ptrace.o fork-child.o \
24 i386-nat.o i386-linux-nat.o \
25 proc-service.o linux-thread-db.o \
26 Index: gdb-7.4.50.20111218/gdb/config/i386/nm-linux.h
27 ===================================================================
28 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
29 +++ gdb-7.4.50.20111218/gdb/config/i386/nm-linux.h 2011-12-19 01:40:32.454689002 +0100
31 +/* Native support for GNU/Linux i386.
33 + Copyright 2010 Free Software Foundation, Inc.
35 + This file is part of GDB.
37 + This program is free software; you can redistribute it and/or modify
38 + it under the terms of the GNU General Public License as published by
39 + the Free Software Foundation; either version 3 of the License, or
40 + (at your option) any later version.
42 + This program is distributed in the hope that it will be useful,
43 + but WITHOUT ANY WARRANTY; without even the implied warranty of
44 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
45 + GNU General Public License for more details.
47 + You should have received a copy of the GNU General Public License
48 + along with this program. If not, see <http://www.gnu.org/licenses/>. */
53 +#include "config/nm-linux.h"
55 +/* Red Hat backward compatibility with gdb-6.8. */
56 +#define target_can_use_hardware_watchpoint(type, cnt, ot) 1
58 +#endif /* NM_LINUX64_H */
59 Index: gdb-7.4.50.20111218/gdb/config/i386/nm-linux64.h
60 ===================================================================
61 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
62 +++ gdb-7.4.50.20111218/gdb/config/i386/nm-linux64.h 2011-12-19 01:40:32.455688998 +0100
64 +/* Native support for GNU/Linux amd64.
66 + Copyright 2010 Free Software Foundation, Inc.
68 + This file is part of GDB.
70 + This program is free software; you can redistribute it and/or modify
71 + it under the terms of the GNU General Public License as published by
72 + the Free Software Foundation; either version 3 of the License, or
73 + (at your option) any later version.
75 + This program is distributed in the hope that it will be useful,
76 + but WITHOUT ANY WARRANTY; without even the implied warranty of
77 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
78 + GNU General Public License for more details.
80 + You should have received a copy of the GNU General Public License
81 + along with this program. If not, see <http://www.gnu.org/licenses/>. */
86 +#include "config/nm-linux.h"
88 +/* Red Hat backward compatibility with gdb-6.8. */
89 +#define target_can_use_hardware_watchpoint(type, cnt, ot) 1
91 +#endif /* NM_LINUX64_H */
92 Index: gdb-7.4.50.20111218/gdb/target.h
93 ===================================================================
94 --- gdb-7.4.50.20111218.orig/gdb/target.h 2011-12-06 21:03:13.000000000 +0100
95 +++ gdb-7.4.50.20111218/gdb/target.h 2011-12-19 01:40:32.456688995 +0100
96 @@ -1391,8 +1391,10 @@ extern char *target_thread_name (struct
97 bp_hardware_breakpoint. CNT is the number of such watchpoints used so far
98 (including this one?). OTHERTYPE is who knows what... */
100 +#ifndef target_can_use_hardware_watchpoint
101 #define target_can_use_hardware_watchpoint(TYPE,CNT,OTHERTYPE) \
102 (*current_target.to_can_use_hw_breakpoint) (TYPE, CNT, OTHERTYPE);
105 /* Returns the number of debug registers needed to watch the given
106 memory region, or zero if not supported. */
107 Index: gdb-7.4.50.20111218/gdb/testsuite/gdb.base/watchpoint-hw-before-run.exp
108 ===================================================================
109 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
110 +++ gdb-7.4.50.20111218/gdb/testsuite/gdb.base/watchpoint-hw-before-run.exp 2011-12-19 01:40:32.464688965 +0100
112 +# Copyright 2009, 2010 Free Software Foundation, Inc.
114 +# This program is free software; you can redistribute it and/or modify
115 +# it under the terms of the GNU General Public License as published by
116 +# the Free Software Foundation; either version 3 of the License, or
117 +# (at your option) any later version.
119 +# This program is distributed in the hope that it will be useful,
120 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
121 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
122 +# GNU General Public License for more details.
124 +# You should have received a copy of the GNU General Public License
125 +# along with this program. If not, see <http://www.gnu.org/licenses/>.
127 +# Arch not supporting hw watchpoints does not imply no_hardware_watchpoints set.
128 +if {(![istarget "i?86-*-*"] && ![istarget "x86_64-*-*"]
129 + && ![istarget "ia64-*-*"])
130 + || [target_info exists gdb,no_hardware_watchpoints]} then {
131 + verbose "Skipping watchpoint-hw-before-run test."
135 +set test watchpoint-hw-before-run
136 +set srcfile watchpoint-hw-hit-once.c
137 +if { [prepare_for_testing ${test}.exp ${test} ${srcfile}] } {
141 +gdb_test "rwatch watchee" "ardware read watchpoint 1: watchee"
143 +# `runto_main' or `runto main' would delete the watchpoint created above.
145 +if { [gdb_start_cmd] < 0 } {
149 +gdb_test "" "main .* at .*" "start"
151 +gdb_test "continue" "Continuing.\r\nHardware read watchpoint \[0-9\]+: watchee\r\n\r\nValue = 0\r\n.*"