gdb/gdb-bz541866-rwatch-before-run.patch
Sascha Peilicke ab51a8efb0 Accepting request 78265 from devel:gcc
- Merge from gdb-7.3-41.fc15.src.rpm.  [fate#310741]
  * Tue Jul 26 2011 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.3-41.fc15
  - Rebase to the final FSF GDB 7.3 release.
  - Improve gcc-4.6 stdarg false prologue end workaround (GDB PR 12435 + GCC PR 47471).
  
  * Sun Jul  3 2011 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.2.90.20110703-40.fc15
  - Rebase to FSF GDB 7.2.90.20110703 (which is a 7.3 pre-release).
    - Adjust the `print errno' patch due to the DW_AT_linkage_name following again.
  
  * Fri Jun 24 2011 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.2.90.20110525-39.fc15
  - Fix install-info for the gdb-doc subpackage (BZ 715228).

- Merge from gdb-7.2.90.20110525-38.fc15.src.rpm.  [fate#310741]
  * Wed May 25 2011 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.2.90.20110525-38.fc15
  - Rebase to FSF GDB 7.2.90.20110525 (which is a 7.3 pre-release).
  - [stap] Fix double free (Sergio Durigan Junior).
  
  * Tue May  3 2011 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.2.90.20110429-37.fc15
  - Search also for .<seqno> files in /usr/lib/debug/.build-id (BZ 641377).

- Merge from gdb-7.2.90.20110429-36.fc15.src.rpm.
  * Mon May  2 2011 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.2.90.20110429-36.fc15
  - Bundle readline-6.2 with a workaround of skipped "ask" (BZ 701131).
    - Use --without-system-readline, disable Requires and BuildRequires of readline.
    - Drop gdb-6.5-readline-long-line-crash.patch and gdb-readline-6.0-signal.patch.
  
  * Fri Apr 29 2011 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.2.90.20110429-35.fc15
  - Rebase to FSF GDB 7.2.90.20110429 (which is a 7.3 pre-release).
  - Fix -O2 -g breakpoints internal error + prologue skipping (BZ 612253).
  - Fix case insensitive symbols for Fortran by iFort (BZ 645773).

OBS-URL: https://build.opensuse.org/request/show/78265
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/gdb?expand=0&rev=85
2011-08-11 13:47:36 +00:00

148 lines
5.9 KiB
Diff

Index: gdb-7.2.50.20110117/gdb/config/i386/linux64.mh
===================================================================
--- gdb-7.2.50.20110117.orig/gdb/config/i386/linux64.mh 2010-05-28 20:50:31.000000000 +0200
+++ gdb-7.2.50.20110117/gdb/config/i386/linux64.mh 2011-01-17 16:01:48.000000000 +0100
@@ -2,7 +2,7 @@
NATDEPFILES= inf-ptrace.o fork-child.o \
i386-nat.o amd64-nat.o amd64-linux-nat.o linux-nat.o \
proc-service.o linux-thread-db.o linux-fork.o
-NAT_FILE= config/nm-linux.h
+NAT_FILE= nm-linux64.h
NAT_CDEPS = $(srcdir)/proc-service.list
# The dynamically loaded libthread_db needs access to symbols in the
--- gdb-7.2/gdb/config/i386/linux.mh-orig 2010-06-11 14:08:51.000000000 +0200
+++ gdb-7.2/gdb/config/i386/linux.mh 2011-03-18 12:00:32.000000000 +0100
@@ -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 \
i386-nat.o i386-linux-nat.o \
proc-service.o linux-thread-db.o \
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-7.1.90.20100711/gdb/config/i386/nm-linux.h 2010-07-13 19:02:28.000000000 +0200
@@ -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 */
Index: gdb-7.2.50.20110117/gdb/config/i386/nm-linux64.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-7.2.50.20110117/gdb/config/i386/nm-linux64.h 2011-01-17 16:01:48.000000000 +0100
@@ -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 */
Index: gdb-7.2.50.20110117/gdb/target.h
===================================================================
--- gdb-7.2.50.20110117.orig/gdb/target.h 2011-01-14 14:47:15.000000000 +0100
+++ gdb-7.2.50.20110117/gdb/target.h 2011-01-17 16:02:08.000000000 +0100
@@ -1318,8 +1318,10 @@ extern char *normal_pid_to_str (ptid_t p
bp_hardware_breakpoint. CNT is the number of such watchpoints used so far
(including this one?). OTHERTYPE is who knows what... */
+#ifndef target_can_use_hardware_watchpoint
#define target_can_use_hardware_watchpoint(TYPE,CNT,OTHERTYPE) \
(*current_target.to_can_use_hw_breakpoint) (TYPE, CNT, OTHERTYPE);
+#endif
/* Returns the number of debug registers needed to watch the given
memory region, or zero if not supported. */
Index: gdb-7.2.50.20110117/gdb/testsuite/gdb.base/watchpoint-hw-before-run.exp
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-7.2.50.20110117/gdb/testsuite/gdb.base/watchpoint-hw-before-run.exp 2011-01-17 16:01:48.000000000 +0100
@@ -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"
+
+gdb_test "continue" "Continuing.\r\nHardware read watchpoint \[0-9\]+: watchee\r\n\r\nValue = 0\r\n.*"