blarsen / rpms / gdb

Forked from rpms/gdb 2 years ago
Clone
dd46ae6
Index: gdb-7.1.90.20100711/gdb/config/i386/linux64.mh
dd46ae6
===================================================================
dd46ae6
--- gdb-7.1.90.20100711.orig/gdb/config/i386/linux64.mh	2010-05-28 20:50:31.000000000 +0200
dd46ae6
+++ gdb-7.1.90.20100711/gdb/config/i386/linux64.mh	2010-07-13 19:02:54.000000000 +0200
c874340
@@ -2,7 +2,7 @@
c874340
 NATDEPFILES= inf-ptrace.o fork-child.o \
c874340
 	i386-nat.o amd64-nat.o amd64-linux-nat.o linux-nat.o \
c874340
 	proc-service.o linux-thread-db.o linux-fork.o
c874340
-NAT_FILE= config/nm-linux.h
c874340
+NAT_FILE= nm-linux64.h
dd46ae6
 NAT_CDEPS = $(srcdir)/proc-service.list
c874340
 
c874340
 # The dynamically loaded libthread_db needs access to symbols in the
dd46ae6
Index: gdb-7.1.90.20100711/gdb/config/i386/nm-linux64.h
dd46ae6
===================================================================
dd46ae6
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
dd46ae6
+++ gdb-7.1.90.20100711/gdb/config/i386/nm-linux64.h	2010-07-13 19:02:28.000000000 +0200
c874340
@@ -0,0 +1,28 @@
c874340
+/* Native support for GNU/Linux amd64.
c874340
+
c874340
+   Copyright 2010 Free Software Foundation, Inc.
c874340
+
c874340
+   This file is part of GDB.
c874340
+
c874340
+   This program is free software; you can redistribute it and/or modify
c874340
+   it under the terms of the GNU General Public License as published by
c874340
+   the Free Software Foundation; either version 3 of the License, or
c874340
+   (at your option) any later version.
c874340
+
c874340
+   This program is distributed in the hope that it will be useful,
c874340
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
c874340
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
c874340
+   GNU General Public License for more details.
c874340
+
c874340
+   You should have received a copy of the GNU General Public License
c874340
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
c874340
+
c874340
+#ifndef NM_LINUX64_H
c874340
+#define NM_LINUX64_H
c874340
+
c874340
+#include "config/nm-linux.h"
c874340
+
c874340
+/* Red Hat backward compatibility with gdb-6.8.  */
c874340
+#define target_can_use_hardware_watchpoint(type, cnt, ot) 1
c874340
+
c874340
+#endif /* NM_LINUX64_H */
dd46ae6
Index: gdb-7.1.90.20100711/gdb/target.h
dd46ae6
===================================================================
dd46ae6
--- gdb-7.1.90.20100711.orig/gdb/target.h	2010-07-12 23:07:34.000000000 +0200
dd46ae6
+++ gdb-7.1.90.20100711/gdb/target.h	2010-07-13 19:02:28.000000000 +0200
dd46ae6
@@ -1298,8 +1298,10 @@ extern char *normal_pid_to_str (ptid_t p
c874340
    bp_hardware_breakpoint.  CNT is the number of such watchpoints used so far
c874340
    (including this one?).  OTHERTYPE is who knows what...  */
c874340
 
c874340
+#ifndef target_can_use_hardware_watchpoint
c874340
 #define target_can_use_hardware_watchpoint(TYPE,CNT,OTHERTYPE) \
c874340
  (*current_target.to_can_use_hw_breakpoint) (TYPE, CNT, OTHERTYPE);
c874340
+#endif
c874340
 
c874340
 #define target_region_ok_for_hw_watchpoint(addr, len) \
c874340
     (*current_target.to_region_ok_for_hw_watchpoint) (addr, len)
dd46ae6
Index: gdb-7.1.90.20100711/gdb/testsuite/gdb.base/watchpoint-hw-before-run.exp
dd46ae6
===================================================================
dd46ae6
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
dd46ae6
+++ gdb-7.1.90.20100711/gdb/testsuite/gdb.base/watchpoint-hw-before-run.exp	2010-07-13 19:02:28.000000000 +0200
c874340
@@ -0,0 +1,40 @@
c874340
+# Copyright 2009, 2010 Free Software Foundation, Inc.
c874340
+
c874340
+# This program is free software; you can redistribute it and/or modify
c874340
+# it under the terms of the GNU General Public License as published by
c874340
+# the Free Software Foundation; either version 3 of the License, or
c874340
+# (at your option) any later version.
c874340
+#
c874340
+# This program is distributed in the hope that it will be useful,
c874340
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
c874340
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
c874340
+# GNU General Public License for more details.
c874340
+#
c874340
+# You should have received a copy of the GNU General Public License
c874340
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
c874340
+
c874340
+# Arch not supporting hw watchpoints does not imply no_hardware_watchpoints set.
c874340
+if {(![istarget "i?86-*-*"] && ![istarget "x86_64-*-*"]
c874340
+     && ![istarget "ia64-*-*"])
c874340
+    || [target_info exists gdb,no_hardware_watchpoints]} then {
c874340
+    verbose "Skipping watchpoint-hw-before-run test."
c874340
+    return
c874340
+}
c874340
+
c874340
+set test watchpoint-hw-before-run
c874340
+set srcfile watchpoint-hw-hit-once.c
c874340
+if { [prepare_for_testing ${test}.exp ${test} ${srcfile}] } {
c874340
+    return -1
c874340
+}
c874340
+
c874340
+gdb_test "rwatch watchee" "ardware read watchpoint 1: watchee"
c874340
+
c874340
+# `runto_main' or `runto main' would delete the watchpoint created above.
c874340
+
c874340
+if { [gdb_start_cmd] < 0 } {
c874340
+    untested start
c874340
+    return -1
c874340
+}
c874340
+gdb_test "" "main .* at .*" "start"
c874340
+
c874340
+gdb_test "continue" "Continuing.\r\nHardware read watchpoint \[0-9\]+: watchee\r\n\r\nValue = 0\r\n.*"