From: Keith Seitz Date: Fri, 24 Jul 1998 22:11:22 +0000 (+0000) Subject: * gdb.gdbtk/Makefile.in: Add new example program "stack". X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=313f4e31ddc560ec2a0b4172857c56f5c9431b38;p=binutils-gdb.git * gdb.gdbtk/Makefile.in: Add new example program "stack". * gdb.gdbtk/browser.test,browser.exp: Add browser window tests. * gdb.gdbtk/stack1.c,stack2.c: Test case for browser window. --- diff --git a/gdb/testsuite/gdb.gdbtk/.Sanitize b/gdb/testsuite/gdb.gdbtk/.Sanitize index 52f7b4637b1..beedc2f9681 100644 --- a/gdb/testsuite/gdb.gdbtk/.Sanitize +++ b/gdb/testsuite/gdb.gdbtk/.Sanitize @@ -24,12 +24,16 @@ Do-first: Things-to-keep: Makefile.in +browser.exp +browser.test configure.in configure console.exp console.test defs simple.c +stack1.c +stack2.c Things-to-lose: diff --git a/gdb/testsuite/gdb.gdbtk/browser.exp b/gdb/testsuite/gdb.gdbtk/browser.exp new file mode 100644 index 00000000000..2ba2b049fc7 --- /dev/null +++ b/gdb/testsuite/gdb.gdbtk/browser.exp @@ -0,0 +1,44 @@ +if {$tracelevel} { + strace $tracelevel +} + +# +# test console window +# +set prms_id 0 +set bug_id 0 + +set testfile "stack" +set binfile ${objdir}/${subdir}/${testfile} +set r [gdb_compile "${srcdir}/${subdir}/stack1.c ${srcdir}/${subdir}/stack2.c" "${binfile}" executable {debug}] +if { $r != "" } { + gdb_suppress_entire_file \ + "Testcase compile failed, so some tests in this file will automatically fail." +} + +# Start with a fresh gdbtk +gdb_exit +set results [gdbtk_start [file join $srcdir $subdir browser.test]] +set results [split $results \n] + +# Analyze results +foreach test $results { + set status [lindex $test 0] + set name [lindex $test 1] + set description [lindex $test 2] + set msg [lindex $test 3] + + switch $status { + pass { + pass "$description ($name)" + } + + fail { + fail "$description ($name)" + } + + error { + # We should do something with this... + } + } +} \ No newline at end of file diff --git a/gdb/testsuite/gdb.gdbtk/browser.test b/gdb/testsuite/gdb.gdbtk/browser.test new file mode 100644 index 00000000000..b376d6867a7 --- /dev/null +++ b/gdb/testsuite/gdb.gdbtk/browser.test @@ -0,0 +1,657 @@ +# Copyright (C) 1998 Cygnus Solutions +# +# 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 2 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, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +# Please email any bugs, comments, and/or additions to this file to: +# bug-gdb@prep.ai.mit.edu + +# This file was written by Keith Seitz (keiths@cygnus.com) + +# Read in the standard defs file + +if {![gdbtk_read_defs]} { + break +} + +global objdir test_ran + +##### ##### +# # +# Helper functions for this module # +# # +##### ##### + +# Set the search expression +proc set_regexp {exp} { + global Regexp + + $Regexp delete 0 end + $Regexp insert 0 $exp +} + +# Do the search; attempts to filter out compiler noise +# like _DYNAMIC_ and __bss_start. +proc do_search {} { + global browser Funcs + + $browser search + set m [$Funcs get 0 end] + + # Bogus -- we could get things like _DYNAMIC, __bss_start, etc... + set matches {} + foreach a $m { + if {![regexp ^_.* $a]} { + lappend matches $a + } + } + return $matches +} + +# Set search on static functions only. +proc set_static_only {on} { + if {$on} { + pref set gdb/search/static 1 + } else { + pref set gdb/search/static 0 + } +} + +# Set search to use regular expressions. +proc set_use_regexp {on} { + if {$on} { + pref set gdb/search/use_regexp 1 + } else { + pref set gdb/search/use_regexp 0 + } +} + +##### ##### +# # +# BROWSER TESTS # +# # +##### ##### + +# Load the test executable +set file [file join $objdir stack] +gdb_cmd "file $file" + +# Open a browser +set browser [manage open browser] +set Files [$browser test_get FilesLB] +set Funcs [$browser test_get FuncsLB] +set Regexp [$browser test_get Regexp] + +# Test: browser-1.1 +# Desc: Check file listbox contents +gdbtk_test browser-1.1 {file listbox contents} { + $Files get 0 end +} {stack1.c stack2.c} + +# Test: browser-2.1 +# Desc: Check all files/all funcs +gdbtk_test browser-2.1 {all files/all funcs} { + set_regexp "" + do_search +} {extern_func1_1 extern_func1_10 extern_func1_11 extern_func1_12 extern_func1_13 extern_func1_14 extern_func1_15 extern_func1_2 extern_func1_3 extern_func1_4 extern_func1_5 extern_func1_6 extern_func1_7 extern_func1_8 extern_func1_9 func_1 func_10 func_11 func_12 func_13 func_14 func_15 func_2 func_3 func_4 func_5 func_6 func_7 func_8 func_9 main static_func_1 static_func_10 static_func_11 static_func_12 static_func_13 static_func_14 static_func_15 static_func_2 static_func_3 static_func_4 static_func_5 static_func_6 static_func_7 static_func_8 static_func_9} + +# Test: browser-2.2 +# Desc: Check all functions in stack1.c +gdbtk_test browser-2.2 {all functions in stack1.c} { + set_regexp "" + $Files selection set 0 + do_search +} {func_1 func_10 func_11 func_12 func_13 func_14 func_15 func_2 func_3 func_4 func_5 func_6 func_7 func_8 func_9 main static_func_1 static_func_10 static_func_11 static_func_12 static_func_13 static_func_14 static_func_15 static_func_2 static_func_3 static_func_4 static_func_5 static_func_6 static_func_7 static_func_8 static_func_9} +if {$test_ran} { + $Files selection clear 0 end +} + +# Test: browser-2.3 +# Desc: Check all functions in stack2.c +gdbtk_test browser-2.3 {all functions in stack2.c} { + set_regexp "" + $Files selection set 1 + do_search +} {extern_func1_1 extern_func1_10 extern_func1_11 extern_func1_12 extern_func1_13 extern_func1_14 extern_func1_15 extern_func1_2 extern_func1_3 extern_func1_4 extern_func1_5 extern_func1_6 extern_func1_7 extern_func1_8 extern_func1_9} +if {$test_ran} { + $Files selection clear 0 end +} + +# Test: browser-2.4 +# Desc: Check for all functions matching "func" +gdbtk_test browser-2.4 {all functions matching "func"} { + set_regexp func + do_search +} {func_1 func_10 func_11 func_12 func_13 func_14 func_15 func_2 func_3 func_4 func_5 func_6 func_7 func_8 func_9} + +# Test: browser-2.5 +# Desc: Check all functions matching "func" in stack1.c +gdbtk_test browser-2.5 {all functions matching "func" in stack1.c} { + set_regexp func + $Files selection set 0 + do_search +} {func_1 func_10 func_11 func_12 func_13 func_14 func_15 func_2 func_3 func_4 func_5 func_6 func_7 func_8 func_9} +if {$test_ran} { + $Files selection clear 0 end +} + +# Test: browser-2.6 +# Desc: Check all functions matching "funcs" in stack2.c +gdbtk_test browser-2.6 {all functions matching "func" in stack2.c} { + set_regexp func + $Files selection set 1 + do_search +} {} +if {$test_ran} { + $Files selection clear 0 end +} + +# Test: browser-2.7 +# Desc: Check all functions matching "foobar" +gdbtk_test browser-2.7 {all functions matching "foobar"} { + set_regexp foobar + do_search +} {} + +# Test: browser-2.8 +# Desc: Check all functions matching "foobar" in stack1.c +gdbtk_test browser-2.8 {functions matching "foobar" in stack1.c} { + set_regexp foobar + $Files selection set 0 + do_search +} {} +if {$test_ran} { + $Files selection clear 0 end +} + +# Test: browser-2.9 +# Desc: Check all functions matching "foobar" in stack2.c +gdbtk_test browser-2.9 {functions matching "foobar" in stack2.c} { + set_regexp foobar + $Files selection set 1 + do_search +} {} +if {$test_ran} { + $Files selection clear 0 end +} + +# Test: browser-2.10 +# Desc: Check all functions matching regexp "func" +gdbtk_test browser-2.10 {all functions matching regexp "func"} { + set_regexp func + set_use_regexp 1 + do_search +} {extern_func1_1 extern_func1_10 extern_func1_11 extern_func1_12 extern_func1_13 extern_func1_14 extern_func1_15 extern_func1_2 extern_func1_3 extern_func1_4 extern_func1_5 extern_func1_6 extern_func1_7 extern_func1_8 extern_func1_9 func_1 func_10 func_11 func_12 func_13 func_14 func_15 func_2 func_3 func_4 func_5 func_6 func_7 func_8 func_9 static_func_1 static_func_10 static_func_11 static_func_12 static_func_13 static_func_14 static_func_15 static_func_2 static_func_3 static_func_4 static_func_5 static_func_6 static_func_7 static_func_8 static_func_9} +if {$test_ran} { + set_use_regexp 0 +} + +# Test: browser-2.11 +# Desc: Check all functions matching regexp "func" in stack1.c +gdbtk_test browser-2.11 {all functions matching regexp "func" in stack1.c} { + set_regexp func + set_use_regexp 1 + $Files selection set 0 + do_search +} {func_1 func_10 func_11 func_12 func_13 func_14 func_15 func_2 func_3 func_4 func_5 func_6 func_7 func_8 func_9 static_func_1 static_func_10 static_func_11 static_func_12 static_func_13 static_func_14 static_func_15 static_func_2 static_func_3 static_func_4 static_func_5 static_func_6 static_func_7 static_func_8 static_func_9} +if {$test_ran} { + set_use_regexp 0 + $Files selection clear 0 end +} + +# Test: browser-2.12 +# Desc: Check all functions matching regexp "func" in stack2.c +gdbtk_test browser-2.12 {all functions matching regexp "func" in stack2.c} { + set_regexp func + set_use_regexp 1 + $Files selection set 1 + do_search +} {extern_func1_1 extern_func1_10 extern_func1_11 extern_func1_12 extern_func1_13 extern_func1_14 extern_func1_15 extern_func1_2 extern_func1_3 extern_func1_4 extern_func1_5 extern_func1_6 extern_func1_7 extern_func1_8 extern_func1_9} +if {$test_ran} { + set_use_regexp 0 + $Files selection clear 0 end +} + +# Test: browser-2.13 +# Desc: Check all functions matching regexp "\_1$" +gdbtk_test browser-2.13 {all functions matching regexp "\_1$"} { + set_regexp {\_1$} + set_use_regexp 1 + do_search +} {extern_func1_1 func_1 static_func_1} +if {$test_ran} { + set_use_regexp 0 +} + +# Test: browser-2.14 +# Desc: Check all functions matching regexp "\_1$" in stack1.c +gdbtk_test browser-2.14 {all functions matching regexp "\_1$" in stack1.c} { + set_regexp {\_1$} + set_use_regexp 1 + $Files selection set 0 + do_search +} {func_1 static_func_1} +if {$test_ran} { + $Files selection clear 0 end + set_use_regexp 0 +} + +# Test: browser-2.15 +# Desc: Check all functions matching regexp "\_1$" in stack2.c +gdbtk_test browser-2.15 {all functions matching regexp "\_1$" in stack2.c} { + set_regexp {\_1$} + set_use_regexp 1 + $Files selection set 1 + do_search +} {extern_func1_1} +if {$test_ran} { + $Files selection clear 0 end + set_use_regexp 0 +} + +# Test: browser-2.16 +# Desc: Check all functions matching regexp "foobar" +gdbtk_test browser-2.16 {all functions matching regexp "foobar"} { + set_regexp foobar + set_use_regexp 1 + do_search +} {} +if {$test_ran} { + set_use_regexp 0 +} + +# Test: browser-2.17 +# Desc: Check all functions matching regexp "foobar" in stack1.c +gdbtk_test browser-2.17 {all functions matching regexp "foobar" in stack1.c} { + set_regexp foobar + set_use_regexp 1 + $Files selection set 0 + do_search +} {} +if {$test_ran} { + set_use_regexp 0 + $Files selection clear 0 end +} + +# Test: browser-2.18 +# Desc: Check all functions matching regexp "foobar" +gdbtk_test browser-2.18 {all functions matching regexp "foobar"} { + set_regexp foobar + set_use_regexp 1 + $Files selection set 1 + do_search +} {} +if {$test_ran} { + set_use_regexp 0 + $Files selection clear 0 end +} + +# Test: browser-3.1 +# Desc: Check all static funcs +gdbtk_test browser-3.1 {all static funcs} { + set_static_only 1 + set_regexp "" + do_search +} {static_func_1 static_func_10 static_func_11 static_func_12 static_func_13 static_func_14 static_func_15 static_func_2 static_func_3 static_func_4 static_func_5 static_func_6 static_func_7 static_func_8 static_func_9} +if {$test_ran} { + set_static_only 0 +} + +# Test: browser-3.2 +# Desc: Check all static functions in stack1.c +gdbtk_test browser-3.2 {all static functions in stack1.c} { + set_regexp "" + $Files selection set 0 + set_static_only 1 + do_search +} {static_func_1 static_func_10 static_func_11 static_func_12 static_func_13 static_func_14 static_func_15 static_func_2 static_func_3 static_func_4 static_func_5 static_func_6 static_func_7 static_func_8 static_func_9} +if {$test_ran} { + $Files selection clear 0 end + set_static_only 0 +} + +# Test: browser-3.3 +# Desc: Check all static functions in stack2.c +gdbtk_test browser-3.3 {all static functions in stack2.c} { + set_regexp "" + set_static_only 1 + $Files selection set 1 + do_search +} {} +if {$test_ran} { + set_static_only 0 + $Files selection clear 0 end +} + +# Test: browser-3.4 +# Desc: Check for all static functions matching "func" +gdbtk_test browser-3.4 {all static functions matching "func"} { + set_regexp func + set_static_only 1 + do_search +} {} +if {$test_ran} { + set_static_only 0 +} + +# Test: browser-3.5 +# Desc: Check for all static functions matching "func" in stack1.c +gdbtk_test browser-3.5 {all static functions matching "func" in stack1.c} { + set_regexp func + set_static_only 1 + $Files selection set 0 + do_search +} {} +if {$test_ran} { + set_static_only 0 + $Files selection clear 0 end +} + +# Test: browser-3.6 +# Desc: Check all static functions matching "func" in stack2.c +gdbtk_test browser-3.6 {all static functions matching "func" in stack2.c} { + set_regexp func + set_static_only 1 + $Files selection set 1 + do_search +} {} +if {$test_ran} { + set_static_only 0 + $Files selection clear 0 end +} + +# Test: browser-3.7 +# Desc: Check all static functions matching "foobar" +gdbtk_test browser-3.7 {all static functions matching "foobar"} { + set_regexp foobar + set_static_only 1 + do_search +} {} +if {$test_ran} { + set_static_only 0 +} + +# Test: browser-3.8 +# Desc: Check all static functions matching "foobar" in stack1.c +gdbtk_test browser-3.8 {all static functions matching "foobar" in stack1.c} { + set_regexp foobar + set_static_only 1 + $Files selection set 0 + do_search +} {} +if {$test_ran} { + set_static_only 0 + $Files selection clear 0 end +} + +# Test: browser-3.9 +# Desc: Check all static functions matching "foobar" in stack2.c +gdbtk_test browser-3.9 {all static functions matching "foobar" stack2.c} { + set_regexp foobar + set_static_only 1 + $Files selection set 1 + do_search +} {} +if {$test_ran} { + set_static_only 0 + $Files selection clear 0 end +} + +# Test: browser-3.10 +# Desc: Check all static functions matching regexp "func" +gdbtk_test browser-3.10 {all static functions matching regexp "func"} { + set_regexp func + set_static_only 1 + set_use_regexp 1 + do_search +} {static_func_1 static_func_10 static_func_11 static_func_12 static_func_13 static_func_14 static_func_15 static_func_2 static_func_3 static_func_4 static_func_5 static_func_6 static_func_7 static_func_8 static_func_9} +if {$test_ran} { + set_use_regexp 0 + set_static_only 0 +} + +# Test: browser-3.11 +# Desc: Check all static functions matching regexp "func" in stack1.c +gdbtk_test browser-3.11 {all static functions matching regexp "func" in stack1.c} { + set_regexp func + set_static_only 1 + set_use_regexp 1 + $Files selection set 0 + do_search +} {static_func_1 static_func_10 static_func_11 static_func_12 static_func_13 static_func_14 static_func_15 static_func_2 static_func_3 static_func_4 static_func_5 static_func_6 static_func_7 static_func_8 static_func_9} +if {$test_ran} { + set_use_regexp 0 + set_static_only 0 + $Files selection clear 0 end +} + +# Test: browser-3.12 +# Desc: Check all static functions matching regexp "func" in stack2.c +gdbtk_test browser-3.12 {all static functions matching regexp "func" in stack2.c} { + set_regexp func + set_static_only 1 + set_use_regexp 1 + $Files selection set 1 + do_search +} {} +if {$test_ran} { + set_use_regexp 0 + set_static_only 0 + $Files selection clear 0 end +} + +# Test: browser-3.13 +# Desc: Check all static functions matching regexp "\_1$" +gdbtk_test browser-3.13 {all static functions matching regexp "\_1$"} { + set_regexp {\_1$} + set_static_only 1 + set_use_regexp 1 + do_search +} {static_func_1} +if {$test_ran} { + set_static_only 0 + set_use_regexp 0 +} + +# Test: browser-3.14 +# Desc: Check all static functions matching regexp "\_1$" in stack1.c +gdbtk_test browser-3.14 {all static functions matching regexp "\_1$" in stack1.c} { + set_regexp {\_1$} + set_static_only 1 + set_use_regexp 1 + $Files selection set 0 + do_search +} {static_func_1} +if {$test_ran} { + set_use_regexp 0 + set_static_only 0 + $Files selection clear 0 end +} + +# Test: browser-3.15 +# Desc: Check all static functions matching regexp "\_1$" in stack2.c +gdbtk_test browser-3.15 {all static functions matching regexp "\_1$" in stack2.c} { + set_regexp {\_1$} + set_static_only 1 + set_use_regexp 1 + $Files selection set 1 + do_search +} {} +if {$test_ran} { + set_use_regexp 0 + set_static_only 0 + $Files selection clear 0 end +} + +# Test: browser-3.16 +# Desc: Check all static functions matching regexp "foobar" +gdbtk_test browser-3.16 {all static functions matching regexp "foobar"} { + set_regexp foobar + set_use_regexp 1 + set_static_only 1 + do_search +} {} +if {$test_ran} { + set_static_only 0 + set_use_regexp 0 +} + +# Test: browser-3.17 +# Desc: Check all static functions matching regexp "foobar" in stack1.c +gdbtk_test browser-3.17 {all static functions matching regexp "foobar" in stack1.c} { + set_regexp foobar + set_use_regexp 1 + set_static_only 1 + $Files selection set 0 + do_search +} {} +if {$test_ran} { + set_static_only 0 + set_use_regexp 0 + $Files selection clear 0 end +} + +# Test: browser-3.18 +# Desc: Check all static functions matching regexp "foobar" in stack2.c +gdbtk_test browser-3.18 {all static functions matching regexp "foobar" in stack2.c} { + set_regexp foobar + set_static_only 1 + set_use_regexp 1 + $Files selection set 1 + do_search +} {} +if {$test_ran} { + set_static_only 0 + set_use_regexp 0 + $Files selection clear 0 end +} + +set select [$browser test_get Select] +# Test: browser-4.1 +# Desc: Check select button text initial +gdbtk_test browser-4.1 {select all files button initial text} { + $select cget -text +} {Select All} + +# Test: browser-4.2 +# Desc: Check select button function +gdbtk_test browser-4.2 {select button - select all} { + $select invoke + $Files curselection +} {0 1} +if {$test_ran} { + $Files selection clear 0 end + $select invoke +} + +# Test: browser-4.3 +# Desc: Check select button text +gdbtk_test browser-4.3 {select button text - select none} { + $select invoke + $select cget -text +} {Select None} +if {$test_ran} { + $select invoke +} + +# Test: browser-4.4 +# Desc: Check select button function +gdbtk_test browser-4.4 {select button - select none} { + $select invoke + $select invoke + $Files curselection +} {} + +# Test: browser-4.5 +# Desc: Check select button text +gdbtk_test browser-4.5 {select button text - flip} { + $select invoke + $select invoke + $select cget -text +} {Select All} + +# Test: browser-5.1 +# Desc: Toggle all bps on +gdbtk_test browser-5.1 {toggle_all_bp on} { + set_regexp {\_1$} + set_use_regexp 1 + do_search + $browser toggle_all_bp + + set_regexp .* + set funcs [do_search] + set bps {} + foreach f $funcs { + if {[bp_exists [gdb_loc $f]] != -1} { + lappend bps 1 + } else { + lappend bps 0 + } + } + set bps +} {1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0} +if {$test_ran} { + set_use_regexp 0 + for {set i 0} {$i < 20} {incr i} { + catch {gdb_cmd "delete $i"} + } +} + +# Test: browser-5.2 +# Desc: Toggle all bps off +gdbtk_test browser-5.2 {toggle_all_bp off} { + set_regexp {\_1$} + set_use_regexp 1 + do_search + $browser toggle_all_bp + + # Turn on bps + set_regexp .* + set funcs [do_search] + + # Turn off all static bps + set_regexp {\_1$} + set_static_only 1 + do_search + $browser toggle_all_bp + set bps {} + foreach f $funcs { + if {[bp_exists [gdb_loc $f]] != -1} { + lappend bps 1 + } else { + lappend bps 0 + } + } + set bps +} {1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0} +if {$test_ran} { + set_static_only 0 + set_use_regexp 0 + for {set i 0} {$i < 20} {incr i} { + catch {gdb_cmd "delete $i"} + } +} + +# Test: browser-6.1 +# Desc: Check that search expressions are saved +gdbtk_test browser-6.1 {save last search expression} { + set_regexp hello + do_search + pref get gdb/search/last_symbol +} {hello} + +# +# Exit +# +gdbtk_test_done diff --git a/gdb/testsuite/gdb.gdbtk/stack1.c b/gdb/testsuite/gdb.gdbtk/stack1.c new file mode 100644 index 00000000000..389260a22a5 --- /dev/null +++ b/gdb/testsuite/gdb.gdbtk/stack1.c @@ -0,0 +1,231 @@ +/* Functions defined in other files */ +extern void extern_func1_1 (int a, char *b, unsigned long c); + +/* Functions defined in this file */ +static void static_func_1 (int a, char *b, unsigned long c); +static void static_func_2 (int a, char *b, unsigned long c); +static void static_func_3 (int a, char *b, unsigned long c); +static void static_func_4 (int a, char *b, unsigned long c); +static void static_func_5 (int a, char *b, unsigned long c); +static void static_func_6 (int a, char *b, unsigned long c); +static void static_func_7 (int a, char *b, unsigned long c); +static void static_func_8 (int a, char *b, unsigned long c); +static void static_func_9 (int a, char *b, unsigned long c); +static void static_func_10 (int a, char *b, unsigned long c); +static void static_func_11 (int a, char *b, unsigned long c); +static void static_func_12 (int a, char *b, unsigned long c); +static void static_func_13 (int a, char *b, unsigned long c); +static void static_func_14 (int a, char *b, unsigned long c); +static void static_func_15 (int a, char *b, unsigned long c); + +void func_1 (int a, char *b, unsigned long c); +void func_2 (int a, char *b, unsigned long c); +void func_3 (int a, char *b, unsigned long c); +void func_4 (int a, char *b, unsigned long c); +void func_5 (int a, char *b, unsigned long c); +void func_6 (int a, char *b, unsigned long c); +void func_7 (int a, char *b, unsigned long c); +void func_8 (int a, char *b, unsigned long c); +void func_9 (int a, char *b, unsigned long c); +void func_10 (int a, char *b, unsigned long c); +void func_11 (int a, char *b, unsigned long c); +void func_12 (int a, char *b, unsigned long c); +void func_13 (int a, char *b, unsigned long c); +void func_14 (int a, char *b, unsigned long c); +void func_15 (int a, char *b, unsigned long c); + +int +main (int argc, char *argv[]) +{ + int a; + char *b; + unsigned long c; + + a = 1; + b = "This is a string."; + c = 0xdeadL; + + func_1 (a, b, c); + + exit (0); +} + +void +func_1 (int a, char *b, unsigned long c) +{ + func_2 (a, b, c); +} + +void +func_2 (int a, char *b, unsigned long c) +{ + func_3 (a, b, c); +} + +void +func_3 (int a, char *b, unsigned long c) +{ + func_4 (a, b, c); +} + +void +func_4 (int a, char *b, unsigned long c) +{ + func_5 (a, b, c); +} + +void +func_5 (int a, char *b, unsigned long c) +{ + func_6 (a, b, c); +} + +void +func_6 (int a, char *b, unsigned long c) +{ + func_7 (a, b, c); +} + +void +func_7 (int a, char *b, unsigned long c) +{ + func_8 (a, b, c); +} + +void +func_8 (int a, char *b, unsigned long c) +{ + func_9 (a, b, c); +} + +void +func_9 (int a, char *b, unsigned long c) +{ + func_10 (a, b, c); +} + +void +func_10 (int a, char *b, unsigned long c) +{ + func_11 (a, b, c); +} + +void +func_11 (int a, char *b, unsigned long c) +{ + func_12 (a, b, c); +} + +void +func_12 (int a, char *b, unsigned long c) +{ + func_13 (a, b, c); +} + +void +func_13 (int a, char *b, unsigned long c) +{ + func_14 (a, b, c); +} + +void +func_14 (int a, char *b, unsigned long c) +{ + func_15 (a, b, c); +} + +void +func_15 (int a, char *b, unsigned long c) +{ + static_func_1 (a, b, c); +} + +static void +static_func_1 (int a, char *b, unsigned long c) +{ + static_func_2 (a, b, c); +} + +static void +static_func_2 (int a, char *b, unsigned long c) +{ + static_func_3 (a, b, c); +} + +static void +static_func_3 (int a, char *b, unsigned long c) +{ + static_func_4 (a, b, c); +} + +static void +static_func_4 (int a, char *b, unsigned long c) +{ + static_func_5 (a, b, c); +} + +static void +static_func_5 (int a, char *b, unsigned long c) +{ + static_func_6 (a, b, c); +} + +static void +static_func_6 (int a, char *b, unsigned long c) +{ + static_func_7 (a, b, c); +} + +static void +static_func_7 (int a, char *b, unsigned long c) +{ + static_func_8 (a, b, c); +} + +static void +static_func_8 (int a, char *b, unsigned long c) +{ + static_func_9 (a, b, c); +} + +static void +static_func_9 (int a, char *b, unsigned long c) +{ + static_func_10 (a, b, c); +} + +static void +static_func_10 (int a, char *b, unsigned long c) +{ + static_func_11 (a, b, c); +} + +static void +static_func_11 (int a, char *b, unsigned long c) +{ + static_func_12 (a, b, c); +} + +static void +static_func_12 (int a, char *b, unsigned long c) +{ + static_func_13 (a, b, c); +} + +static void +static_func_13 (int a, char *b, unsigned long c) +{ + static_func_14 (a, b, c); +} + +static void +static_func_14 (int a, char *b, unsigned long c) +{ + static_func_15 (a, b, c); +} + +static void +static_func_15 (int a, char *b, unsigned long c) +{ + extern_func1_1 (a, b, c); +} diff --git a/gdb/testsuite/gdb.gdbtk/stack2.c b/gdb/testsuite/gdb.gdbtk/stack2.c new file mode 100644 index 00000000000..db47c469e6e --- /dev/null +++ b/gdb/testsuite/gdb.gdbtk/stack2.c @@ -0,0 +1,107 @@ +/* Functions defined in this file */ +void extern_func1_1 (int, char *, unsigned long); +void extern_func1_2 (int, char *, unsigned long); +void extern_func1_3 (int, char *, unsigned long); +void extern_func1_4 (int, char *, unsigned long); +void extern_func1_5 (int, char *, unsigned long); +void extern_func1_6 (int, char *, unsigned long); +void extern_func1_7 (int, char *, unsigned long); +void extern_func1_8 (int, char *, unsigned long); +void extern_func1_9 (int, char *, unsigned long); +void extern_func1_10 (int, char *, unsigned long); +void extern_func1_11 (int, char *, unsigned long); +void extern_func1_12 (int, char *, unsigned long); +void extern_func1_13 (int, char *, unsigned long); +void extern_func1_14 (int, char *, unsigned long); +void extern_func1_15 (int, char *, unsigned long); + +void +extern_func1_1 (int a, char *b, unsigned long c) +{ + extern_func1_2 (a, b, c); +} + +void +extern_func1_2 (int a, char *b, unsigned long c) +{ + extern_func1_3 (a, b, c); +} + +void +extern_func1_3 (int a, char *b, unsigned long c) +{ + extern_func1_4 (a, b, c); +} + +void +extern_func1_4 (int a, char *b, unsigned long c) +{ + extern_func1_5 (a, b, c); +} + +void +extern_func1_5 (int a, char *b, unsigned long c) +{ + extern_func1_6 (a, b, c); +} + +void +extern_func1_6 (int a, char *b, unsigned long c) +{ + extern_func1_7 (a, b, c); +} + +void +extern_func1_7 (int a, char *b, unsigned long c) +{ + extern_func1_8 (a, b, c); +} + +void +extern_func1_8 (int a, char *b, unsigned long c) +{ + extern_func1_9 (a, b, c); +} + +void +extern_func1_9 (int a, char *b, unsigned long c) +{ + extern_func1_10 (a, b, c); +} + +void +extern_func1_10 (int a, char *b, unsigned long c) +{ + extern_func1_11 (a, b, c); +} + +void +extern_func1_11 (int a, char *b, unsigned long c) +{ + extern_func1_12 (a, b, c); +} + +void +extern_func1_12 (int a, char *b, unsigned long c) +{ + extern_func1_13 (a, b, c); +} + +void +extern_func1_13 (int a, char *b, unsigned long c) +{ + extern_func1_14 (a, b, c); +} + +void +extern_func1_14 (int a, char *b, unsigned long c) +{ + extern_func1_15 (a, b, c); +} + +void +extern_func1_15 (int a, char *b, unsigned long c) +{ + /* THE END */ + return; +}