2016-01-22 18:00:27 +00:00
|
|
|
Index: gdb-7.10.50.20160121/gdb/config/i386/linux64.mh
|
2010-07-21 21:30:20 +00:00
|
|
|
===================================================================
|
2016-01-22 18:00:27 +00:00
|
|
|
--- gdb-7.10.50.20160121.orig/gdb/config/i386/linux64.mh 2016-01-21 02:48:36.000000000 +0100
|
|
|
|
+++ gdb-7.10.50.20160121/gdb/config/i386/linux64.mh 2016-01-22 18:36:09.099067233 +0100
|
|
|
|
@@ -7,7 +7,7 @@
|
2014-02-07 18:38:14 +00:00
|
|
|
linux-procfs.o linux-ptrace.o linux-btrace.o \
|
2015-05-31 18:47:21 +00:00
|
|
|
linux-waitpid.o linux-personality.o x86-linux.o \
|
2015-07-10 08:25:09 +00:00
|
|
|
x86-linux-dregs.o linux-namespaces.o
|
2010-02-08 21:00:12 +00:00
|
|
|
-NAT_FILE= config/nm-linux.h
|
|
|
|
+NAT_FILE= nm-linux64.h
|
2010-07-21 21:30:20 +00:00
|
|
|
NAT_CDEPS = $(srcdir)/proc-service.list
|
2010-02-08 21:00:12 +00:00
|
|
|
|
|
|
|
# The dynamically loaded libthread_db needs access to symbols in the
|
2016-01-22 18:00:27 +00:00
|
|
|
Index: gdb-7.10.50.20160121/gdb/config/i386/linux.mh
|
2011-07-22 22:41:56 +00:00
|
|
|
===================================================================
|
2016-01-22 18:00:27 +00:00
|
|
|
--- gdb-7.10.50.20160121.orig/gdb/config/i386/linux.mh 2016-01-21 02:48:36.000000000 +0100
|
|
|
|
+++ gdb-7.10.50.20160121/gdb/config/i386/linux.mh 2016-01-22 18:36:09.099067233 +0100
|
2011-03-20 21:23:58 +00:00
|
|
|
@@ -1,6 +1,6 @@
|
|
|
|
# Host: Intel 386 running GNU/Linux.
|
|
|
|
|
|
|
|
-NAT_FILE= config/nm-linux.h
|
|
|
|
+NAT_FILE= nm-linux.h
|
|
|
|
NATDEPFILES= inf-ptrace.o fork-child.o \
|
2015-01-08 20:53:17 +00:00
|
|
|
x86-nat.o x86-dregs.o i386-linux-nat.o x86-linux-nat.o \
|
2011-03-20 21:23:58 +00:00
|
|
|
proc-service.o linux-thread-db.o \
|
2016-01-22 18:00:27 +00:00
|
|
|
Index: gdb-7.10.50.20160121/gdb/config/i386/nm-linux.h
|
2011-07-22 22:41:56 +00:00
|
|
|
===================================================================
|
2011-03-20 21:23:58 +00:00
|
|
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
2016-01-22 18:00:27 +00:00
|
|
|
+++ gdb-7.10.50.20160121/gdb/config/i386/nm-linux.h 2016-01-22 18:36:09.099067233 +0100
|
2011-03-20 21:23:58 +00:00
|
|
|
@@ -0,0 +1,28 @@
|
|
|
|
+/* Native support for GNU/Linux i386.
|
|
|
|
+
|
|
|
|
+ Copyright 2010 Free Software Foundation, Inc.
|
|
|
|
+
|
|
|
|
+ This file is part of GDB.
|
|
|
|
+
|
|
|
|
+ This program is free software; you can redistribute it and/or modify
|
|
|
|
+ it under the terms of the GNU General Public License as published by
|
|
|
|
+ the Free Software Foundation; either version 3 of the License, or
|
|
|
|
+ (at your option) any later version.
|
|
|
|
+
|
|
|
|
+ This program is distributed in the hope that it will be useful,
|
|
|
|
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
+ GNU General Public License for more details.
|
|
|
|
+
|
|
|
|
+ You should have received a copy of the GNU General Public License
|
|
|
|
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
|
|
|
+
|
|
|
|
+#ifndef NM_LINUX_H
|
|
|
|
+#define NM_LINUX_H
|
|
|
|
+
|
|
|
|
+#include "config/nm-linux.h"
|
|
|
|
+
|
|
|
|
+/* Red Hat backward compatibility with gdb-6.8. */
|
|
|
|
+#define target_can_use_hardware_watchpoint(type, cnt, ot) 1
|
|
|
|
+
|
|
|
|
+#endif /* NM_LINUX64_H */
|
2016-01-22 18:00:27 +00:00
|
|
|
Index: gdb-7.10.50.20160121/gdb/config/i386/nm-linux64.h
|
2010-07-21 21:30:20 +00:00
|
|
|
===================================================================
|
|
|
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
2016-01-22 18:00:27 +00:00
|
|
|
+++ gdb-7.10.50.20160121/gdb/config/i386/nm-linux64.h 2016-01-22 18:36:09.100067240 +0100
|
2010-02-08 21:00:12 +00:00
|
|
|
@@ -0,0 +1,28 @@
|
|
|
|
+/* Native support for GNU/Linux amd64.
|
|
|
|
+
|
|
|
|
+ Copyright 2010 Free Software Foundation, Inc.
|
|
|
|
+
|
|
|
|
+ This file is part of GDB.
|
|
|
|
+
|
|
|
|
+ This program is free software; you can redistribute it and/or modify
|
|
|
|
+ it under the terms of the GNU General Public License as published by
|
|
|
|
+ the Free Software Foundation; either version 3 of the License, or
|
|
|
|
+ (at your option) any later version.
|
|
|
|
+
|
|
|
|
+ This program is distributed in the hope that it will be useful,
|
|
|
|
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
+ GNU General Public License for more details.
|
|
|
|
+
|
|
|
|
+ You should have received a copy of the GNU General Public License
|
|
|
|
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
|
|
|
+
|
|
|
|
+#ifndef NM_LINUX64_H
|
|
|
|
+#define NM_LINUX64_H
|
|
|
|
+
|
|
|
|
+#include "config/nm-linux.h"
|
|
|
|
+
|
|
|
|
+/* Red Hat backward compatibility with gdb-6.8. */
|
|
|
|
+#define target_can_use_hardware_watchpoint(type, cnt, ot) 1
|
|
|
|
+
|
|
|
|
+#endif /* NM_LINUX64_H */
|
2016-01-22 18:00:27 +00:00
|
|
|
Index: gdb-7.10.50.20160121/gdb/target.h
|
2010-07-21 21:30:20 +00:00
|
|
|
===================================================================
|
2016-01-22 18:00:27 +00:00
|
|
|
--- gdb-7.10.50.20160121.orig/gdb/target.h 2016-01-21 02:48:36.000000000 +0100
|
|
|
|
+++ gdb-7.10.50.20160121/gdb/target.h 2016-01-22 18:36:09.100067240 +0100
|
|
|
|
@@ -1924,9 +1924,11 @@
|
2015-05-31 18:47:21 +00:00
|
|
|
CNT is the number of such watchpoints used so far, including this
|
|
|
|
one. OTHERTYPE is who knows what... */
|
2010-02-08 21:00:12 +00:00
|
|
|
|
|
|
|
+#ifndef target_can_use_hardware_watchpoint
|
|
|
|
#define target_can_use_hardware_watchpoint(TYPE,CNT,OTHERTYPE) \
|
2014-06-19 20:14:32 +00:00
|
|
|
(*current_target.to_can_use_hw_breakpoint) (¤t_target, \
|
2015-05-31 18:47:21 +00:00
|
|
|
TYPE, CNT, OTHERTYPE)
|
2010-02-08 21:00:12 +00:00
|
|
|
+#endif
|
|
|
|
|
2011-01-17 15:31:43 +00:00
|
|
|
/* Returns the number of debug registers needed to watch the given
|
|
|
|
memory region, or zero if not supported. */
|
2016-01-22 18:00:27 +00:00
|
|
|
Index: gdb-7.10.50.20160121/gdb/testsuite/gdb.base/watchpoint-hw-before-run.exp
|
2010-07-21 21:30:20 +00:00
|
|
|
===================================================================
|
|
|
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
2016-01-22 18:00:27 +00:00
|
|
|
+++ gdb-7.10.50.20160121/gdb/testsuite/gdb.base/watchpoint-hw-before-run.exp 2016-01-22 18:38:58.350155294 +0100
|
2010-02-08 21:00:12 +00:00
|
|
|
@@ -0,0 +1,40 @@
|
|
|
|
+# Copyright 2009, 2010 Free Software Foundation, Inc.
|
|
|
|
+
|
|
|
|
+# This program is free software; you can redistribute it and/or modify
|
|
|
|
+# it under the terms of the GNU General Public License as published by
|
|
|
|
+# the Free Software Foundation; either version 3 of the License, or
|
|
|
|
+# (at your option) any later version.
|
|
|
|
+#
|
|
|
|
+# This program is distributed in the hope that it will be useful,
|
|
|
|
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
+# GNU General Public License for more details.
|
|
|
|
+#
|
|
|
|
+# You should have received a copy of the GNU General Public License
|
|
|
|
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
+
|
|
|
|
+# Arch not supporting hw watchpoints does not imply no_hardware_watchpoints set.
|
|
|
|
+if {(![istarget "i?86-*-*"] && ![istarget "x86_64-*-*"]
|
|
|
|
+ && ![istarget "ia64-*-*"])
|
|
|
|
+ || [target_info exists gdb,no_hardware_watchpoints]} then {
|
|
|
|
+ verbose "Skipping watchpoint-hw-before-run test."
|
|
|
|
+ return
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+set test watchpoint-hw-before-run
|
|
|
|
+set srcfile watchpoint-hw-hit-once.c
|
|
|
|
+if { [prepare_for_testing ${test}.exp ${test} ${srcfile}] } {
|
|
|
|
+ return -1
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+gdb_test "rwatch watchee" "ardware read watchpoint 1: watchee"
|
|
|
|
+
|
|
|
|
+# `runto_main' or `runto main' would delete the watchpoint created above.
|
|
|
|
+
|
|
|
|
+if { [gdb_start_cmd] < 0 } {
|
|
|
|
+ untested start
|
|
|
|
+ return -1
|
|
|
|
+}
|
|
|
|
+gdb_test "" "main .* at .*" "start"
|
|
|
|
+
|
2016-01-22 18:00:27 +00:00
|
|
|
+gdb_test "continue" "Continuing.\r\n\r\nHardware read watchpoint \[0-9\]+: watchee\r\n\r\nValue = 0\r\n.*"
|