1 diff -u -rup gdb-6.3-orig/gdb/testsuite/gdb.base/unwind-leak.c gdb-6.3/gdb/testsuite/gdb.base/unwind-leak.c
2 --- gdb-6.3-orig/gdb/testsuite/gdb.base/unwind-leak.c 2007-12-19 15:12:55.000000000 -0500
3 +++ gdb-6.3/gdb/testsuite/gdb.base/unwind-leak.c 2007-12-19 13:55:22.000000000 -0500
5 +/* This testcase is part of GDB, the GNU debugger.
7 + Copyright 2007 Free Software Foundation, Inc.
9 + This program is free software; you can redistribute it and/or modify
10 + it under the terms of the GNU General Public License as published by
11 + the Free Software Foundation; either version 2 of the License, or
12 + (at your option) any later version.
14 + This program is distributed in the hope that it will be useful,
15 + but WITHOUT ANY WARRANTY; without even the implied warranty of
16 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 + GNU General Public License for more details.
19 + You should have received a copy of the GNU General Public License
20 + along with this program; if not, write to the Free Software
21 + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
23 + Please email any bugs, comments, and/or additions to this file to:
24 + bug-gdb@prep.ai.mit.edu */
34 diff -u -rup gdb-6.3-orig/gdb/testsuite/gdb.base/unwind-leak.exp gdb-6.3/gdb/testsuite/gdb.base/unwind-leak.exp
35 --- gdb-6.3-orig/gdb/testsuite/gdb.base/unwind-leak.exp 2007-12-19 15:12:53.000000000 -0500
36 +++ gdb-6.3/gdb/testsuite/gdb.base/unwind-leak.exp 2007-12-19 15:11:35.000000000 -0500
38 +# Copyright 2007 Free Software Foundation, Inc.
40 +# This program is free software; you can redistribute it and/or modify
41 +# it under the terms of the GNU General Public License as published by
42 +# the Free Software Foundation; either version 2 of the License, or
43 +# (at your option) any later version.
45 +# This program is distributed in the hope that it will be useful,
46 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
47 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
48 +# GNU General Public License for more details.
50 +# You should have received a copy of the GNU General Public License
51 +# along with this program; if not, write to the Free Software
52 +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
54 +set testfile unwind-leak
55 +set srcfile ${testfile}.c
56 +set shfile ${objdir}/${subdir}/${testfile}-gdb.sh
57 +set binfile ${objdir}/${subdir}/${testfile}
58 +if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
59 + untested "Couldn't compile test program"
63 +# Get things started.
67 +gdb_reinitialize_dir $srcdir/$subdir
70 +set pid [exp_pid -i [board_info host fileid]]
72 +# For C programs, "start" should stop in main().
75 + "main \\(\\) at .*$srcfile.*" \
78 +set loc [gdb_get_line_number "alarm"]
83 + set fd [open "/proc/$pid/statm"]
86 + # number of pages of data/stack
87 + scan $line "%*d%*d%*d%*d%*d%d" drs
92 +# For 100 cycles it was 1308: from = 363 KB, to = 1671 KB
94 +verbose -log "cycles = $cycles, permit_kb = $permit_kb"
97 +set test "breakpoint stop/continue cycles"
98 +for {set i $cycles} {$i > 0} {set i [expr {$i - 1}]} {
99 + gdb_test_multiple "continue" $test {
100 + -re "Breakpoint 2, main .*alarm .*.*${gdb_prompt} $" {
102 + -re "Segmentation fault" {
108 + if ![info exists from] {
109 + set from [memory_get]
114 + verbose -log "from = $from KB, to = $to KB"
115 + if {$from > 0 && $to > 10 && $to < $from + $permit_kb} {