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 Index: gdb-7.1.90.20100711/gdb/config/i386/nm-linux64.h
15 ===================================================================
16 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
17 +++ gdb-7.1.90.20100711/gdb/config/i386/nm-linux64.h 2010-07-13 19:02:28.000000000 +0200
19 +/* Native support for GNU/Linux amd64.
21 + Copyright 2010 Free Software Foundation, Inc.
23 + This file is part of GDB.
25 + This program is free software; you can redistribute it and/or modify
26 + it under the terms of the GNU General Public License as published by
27 + the Free Software Foundation; either version 3 of the License, or
28 + (at your option) any later version.
30 + This program is distributed in the hope that it will be useful,
31 + but WITHOUT ANY WARRANTY; without even the implied warranty of
32 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
33 + GNU General Public License for more details.
35 + You should have received a copy of the GNU General Public License
36 + along with this program. If not, see <http://www.gnu.org/licenses/>. */
41 +#include "config/nm-linux.h"
43 +/* Red Hat backward compatibility with gdb-6.8. */
44 +#define target_can_use_hardware_watchpoint(type, cnt, ot) 1
46 +#endif /* NM_LINUX64_H */
47 Index: gdb-7.1.90.20100711/gdb/target.h
48 ===================================================================
49 --- gdb-7.1.90.20100711.orig/gdb/target.h 2010-07-12 23:07:34.000000000 +0200
50 +++ gdb-7.1.90.20100711/gdb/target.h 2010-07-13 19:02:28.000000000 +0200
51 @@ -1298,8 +1298,10 @@ extern char *normal_pid_to_str (ptid_t p
52 bp_hardware_breakpoint. CNT is the number of such watchpoints used so far
53 (including this one?). OTHERTYPE is who knows what... */
55 +#ifndef target_can_use_hardware_watchpoint
56 #define target_can_use_hardware_watchpoint(TYPE,CNT,OTHERTYPE) \
57 (*current_target.to_can_use_hw_breakpoint) (TYPE, CNT, OTHERTYPE);
60 #define target_region_ok_for_hw_watchpoint(addr, len) \
61 (*current_target.to_region_ok_for_hw_watchpoint) (addr, len)
62 Index: gdb-7.1.90.20100711/gdb/testsuite/gdb.base/watchpoint-hw-before-run.exp
63 ===================================================================
64 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
65 +++ gdb-7.1.90.20100711/gdb/testsuite/gdb.base/watchpoint-hw-before-run.exp 2010-07-13 19:02:28.000000000 +0200
67 +# Copyright 2009, 2010 Free Software Foundation, Inc.
69 +# This program is free software; you can redistribute it and/or modify
70 +# it under the terms of the GNU General Public License as published by
71 +# the Free Software Foundation; either version 3 of the License, or
72 +# (at your option) any later version.
74 +# This program is distributed in the hope that it will be useful,
75 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
76 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
77 +# GNU General Public License for more details.
79 +# You should have received a copy of the GNU General Public License
80 +# along with this program. If not, see <http://www.gnu.org/licenses/>.
82 +# Arch not supporting hw watchpoints does not imply no_hardware_watchpoints set.
83 +if {(![istarget "i?86-*-*"] && ![istarget "x86_64-*-*"]
84 + && ![istarget "ia64-*-*"])
85 + || [target_info exists gdb,no_hardware_watchpoints]} then {
86 + verbose "Skipping watchpoint-hw-before-run test."
90 +set test watchpoint-hw-before-run
91 +set srcfile watchpoint-hw-hit-once.c
92 +if { [prepare_for_testing ${test}.exp ${test} ${srcfile}] } {
96 +gdb_test "rwatch watchee" "ardware read watchpoint 1: watchee"
98 +# `runto_main' or `runto main' would delete the watchpoint created above.
100 +if { [gdb_start_cmd] < 0 } {
104 +gdb_test "" "main .* at .*" "start"
106 +gdb_test "continue" "Continuing.\r\nHardware read watchpoint \[0-9\]+: watchee\r\n\r\nValue = 0\r\n.*"