Blame SOURCES/gdb-6.5-last-address-space-byte-test.patch

f9426a
Index: ./gdb/testsuite/gdb.base/largecore-last-address-lock.exp
f9426a
===================================================================
f9426a
RCS file: ./gdb/testsuite/gdb.base/largecore-last-address-lock.exp
f9426a
diff -N ./gdb/testsuite/gdb.base/largecore-last-address-lock.exp
f9426a
--- /dev/null	1 Jan 1970 00:00:00 -0000
f9426a
+++ ./gdb/testsuite/gdb.base/largecore-last-address-lock.exp	15 Nov 2006 21:43:24 -0000
f9426a
@@ -0,0 +1,49 @@
f9426a
+# Copyright 2006 Free Software Foundation, Inc.
f9426a
+
f9426a
+# This program is free software; you can redistribute it and/or modify
f9426a
+# it under the terms of the GNU General Public License as published by
f9426a
+# the Free Software Foundation; either version 2 of the License, or
f9426a
+# (at your option) any later version.
f9426a
+# 
f9426a
+# This program is distributed in the hope that it will be useful,
f9426a
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
f9426a
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
f9426a
+# GNU General Public License for more details.
f9426a
+# 
f9426a
+# You should have received a copy of the GNU General Public License
f9426a
+# along with this program; if not, write to the Free Software
f9426a
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  
f9426a
+
f9426a
+if $tracelevel then {
f9426a
+    strace $tracelevel
f9426a
+}
f9426a
+
f9426a
+# Get things started.
f9426a
+
f9426a
+gdb_exit
f9426a
+gdb_start
f9426a
+
f9426a
+# i386 (32-bit) only: gdb with Red Hat largecore patch did lock up:
f9426a
+# https://enterprise.redhat.com/issue-tracker/?module=issues&action=view&tid=103263
f9426a
+# https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=210614
f9426a
+
f9426a
+# i386: Bug exists when the `target_xfer_memory' condition
f9426a
+# `(memaddr + len < region->hi)' operates on 64-bit operands on
f9426a
+# largecore-patched with 32-bit addresses and so it can get `false' with
f9426a
+# arbitrary `len'.
f9426a
+
f9426a
+# x86_64: The bug is not present as the operands and calculations have the same
f9426a
+# bit size.  Would would still need to pass there the highest address
f9426a
+# (`memaddr == 0xffffffffffffffff') but we would need to pass `len == 0'
f9426a
+# to make the condition `(memaddr + len < region->hi)' false.
f9426a
+# `len == 0' would get caught eariler.
f9426a
+
f9426a
+# Error in the success case is immediate.
f9426a
+set timeoutold ${timeout}
f9426a
+set timeout 10
f9426a
+
f9426a
+gdb_test "x/xb 0xffffffff" \
f9426a
+         "Cannot access memory at address 0xffffffff" \
f9426a
+         "Read the last address space byte"
f9426a
+
f9426a
+set timeout ${timeoutold}