summaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.base/break-interp.exp
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2012-02-21 21:55:39 +0000
committerPedro Alves <palves@redhat.com>2012-02-21 21:55:39 +0000
commit6a5870cea1620f9309c730a1dd97afac8ca2f8ed (patch)
treeeb0cba7d00a91ce406316ab4e6b22c711d3888b0 /gdb/testsuite/gdb.base/break-interp.exp
parentb54a8fd70210fd1fc7b4f41c4679737066951033 (diff)
2012-02-21 Pedro Alves <palves@redhat.com>
Tom Tromey <tromey@redhat.com> * lib/gdb.exp: Add description of test prefixes. (with_test_prefix): New procedure. * gdb.arch/altivec-abi.exp: Use with_test_prefix. * gdb.base/attach-pie-misread.exp: Use with_test_prefix. * gdb.base/break-interp.exp: Use with_test_prefix. Use append instead of lappend to append to pf_prefix. * gdb.base/catch-load.exp: Use with_test_prefix. * gdb.base/disp-step-syscall.exp: Use with_test_prefix. * gdb.base/jit-so.exp: Use with_test_prefix. * gdb.base/jit.exp: Use with_test_prefix. * gdb.base/return-nodebug.exp (do_test): Use append instead of lappend to append to pf_prefix. * gdb.base/sepdebug.exp: Use with_test_prefix. * gdb.base/solib-display.exp: Use with_test_prefix. * gdb.base/solib-overlap.exp: Use with_test_prefix. * gdb.base/watch-cond-infcall.exp: Use with_test_prefix. * gdb.base/watchpoint.exp: Use with_test_prefix. * gdb.dwarf2/dw2-noloc.exp: Use with_test_prefix. * gdb.mi/mi-watch.exp: Use with_test_prefix. * gdb.mi/mi2-watch.exp: Use with_test_prefix. * gdb.threads/non-ldr-exc-1.exp: Use with_test_prefix. * gdb.threads/non-ldr-exc-2.exp: Use with_test_prefix. * gdb.threads/non-ldr-exc-3.exp: Use with_test_prefix. * gdb.threads/non-ldr-exc-4.exp: Use with_test_prefix. * gdb.threads/watchpoint-fork.exp: Use with_test_prefix. Use append instead of lappend to append to pf_prefix. * gdb.threads/watchthreads-reorder.exp: Use with_test_prefix. * gdb.trace/change-loc.exp: Use with_test_prefix. * gdb.trace/pending.exp: Use with_test_prefix. * gdb.trace/status-stop.exp: Use with_test_prefix. * gdb.trace/strace.exp: Use with_test_prefix. * gdb.trace/trace-break.exp: Use with_test_prefix. * gdb.trace/unavailable.exp: Use with_test_prefix. Use append instead of lappend to append to pf_prefix.
Diffstat (limited to 'gdb/testsuite/gdb.base/break-interp.exp')
-rw-r--r--gdb/testsuite/gdb.base/break-interp.exp36
1 files changed, 10 insertions, 26 deletions
diff --git a/gdb/testsuite/gdb.base/break-interp.exp b/gdb/testsuite/gdb.base/break-interp.exp
index 575e8f0a15..d6267ac4d9 100644
--- a/gdb/testsuite/gdb.base/break-interp.exp
+++ b/gdb/testsuite/gdb.base/break-interp.exp
@@ -185,16 +185,12 @@ proc reach_1 {func command displacement} {
# displacement of 0 bytes to be present, "NONZERO" for displacement of non-0
# bytes to be present and "PRESENT" if both "ZERO" and "NONZERO" are valid.
proc reach {func command displacement} {
- global pf_prefix
- set old_ldprefix $pf_prefix
- lappend pf_prefix "reach-$func:"
-
- reach_1 $func $command $displacement
-
- set pf_prefix $old_ldprefix
+ with_test_prefix " reach-$func:" {
+ reach_1 $func $command $displacement
+ }
}
-proc test_core {file displacement} {
+proc test_core {file displacement} { with_test_prefix " core:" {
global srcdir subdir gdb_prompt expect_out
set corefile [core_find $file {} "segv"]
@@ -202,10 +198,6 @@ proc test_core {file displacement} {
return
}
- global pf_prefix
- set old_ldprefix $pf_prefix
- lappend pf_prefix "core:"
-
gdb_exit
gdb_start
# Clear it to never find any separate debug infos in $debug_root.
@@ -245,17 +237,11 @@ proc test_core {file displacement} {
}
gdb_test "bt" "#\[0-9\]+ +\[^\r\n\]*\\mlibfunc\\M\[^\r\n\]*\r\n#\[0-9\]+ +\[^\r\n\]*\\mmain\\M.*" "core main bt"
+}}
- set pf_prefix $old_ldprefix
-}
-
-proc test_attach_gdb {file pid displacement prefix} {
+proc test_attach_gdb {file pid displacement prefix} { with_test_prefix " $prefix:" {
global gdb_prompt expect_out
- global pf_prefix
- set old_ldprefix $pf_prefix
- lappend pf_prefix "$prefix:"
-
gdb_exit
gdb_start
@@ -300,9 +286,7 @@ proc test_attach_gdb {file pid displacement prefix} {
gdb_test "bt" "#\[0-9\]+ +\[^\r\n\]*\\mlibfunc\\M\[^\r\n\]*\r\n#\[0-9\]+ +\[^\r\n\]*\\mmain\\M.*" "attach main bt"
gdb_exit
-
- set pf_prefix $old_ldprefix
-}
+}}
proc test_attach {file displacement {relink_args ""}} {
global board_info
@@ -429,7 +413,7 @@ proc test_ld {file ifmain trynosym displacement} {
global pf_prefix
set old_ldprefix $pf_prefix
- lappend pf_prefix "symbol-less:"
+ append pf_prefix " symbol-less:"
# Test also `exec-file'-command loaded $FILE - therefore without symbols.
# SYMBOL_OBJFILE is not available and only EXEC_BFD must be used.
@@ -544,7 +528,7 @@ foreach ldprelink {NO YES} {
set interp_saved ${interp}-saved
set pf_prefix $old_ldprefix
- lappend pf_prefix "$ldname:"
+ append pf_prefix " $ldname:"
if {$ldsepdebug == "NO"} {
file_copy $interp_system $interp
@@ -626,7 +610,7 @@ foreach ldprelink {NO YES} {
set exec $binprefix-$binname
set pf_prefix $old_binprefix
- lappend pf_prefix "$binname:"
+ append pf_prefix " $binname:"
set opts "ldflags=-Wl,$binfile_lib,-rpath,[file dirname $binfile_lib]"
if {$binsepdebug != "NO"} {