diff options
author | Yao Qi <yao@codesourcery.com> | 2013-03-15 01:41:29 +0000 |
---|---|---|
committer | Yao Qi <yao@codesourcery.com> | 2013-03-15 01:41:29 +0000 |
commit | 0a251e08fa4e7130f05462ecc9f60e6683cdefca (patch) | |
tree | c79ccfc1f502d7e7d48c54b67720381603201b98 /gdb/testsuite/gdb.base/sepdebug.exp | |
parent | 2c415c0f382fd6361d9d702ebdd71cd6d6a06d19 (diff) | |
download | binutils-gdb-0a251e08fa4e7130f05462ecc9f60e6683cdefca.tar.gz |
gdb/testsuite/
* gdb.threads/non-ldr-exc-1.exp (do_test): Fix the indent of
using with_test_prefix.
* gdb.threads/non-ldr-exc-2.exp (do_test): Likewise.
* gdb.threads/non-ldr-exc-3.exp (do_test): Likewise.
* gdb.threads/non-ldr-exc-4.exp (do_test): Likewise.
* gdb.threads/watchpoint-fork.exp (test): Likewise.
* gdb.base/break-interp.exp (test_core): Likewise.
(test_attach_gdb): Likewise.
* gdb.base/catch-load.exp (one_catch_load_test): Likewise.
* gdb.base/disp-step-syscall.exp (disp_step_cross_syscall):
Likewise.
* gdb.base/jit-so.exp (one_jit_test): Likewise.
* gdb.base/jit.exp (one_jit_test): Likewise.
* gdb.base/sepdebug.exp (test_different_dir): Likewise.
* gdb.dwarf2/dw2-dir-file-name.exp (test): Likewise.
* gdb.dwarf2/dw2-noloc.exp (file_symbols): Likewise.
* gdb.mi/mi-breakpoint-changed.exp (test_pending_resolved):
Likewise.
* gdb.mi/mi-cmd-param-changed.exp (test_command_param_changed):
Likewise.
* gdb.mi/mi-watch.exp test_watchpoint_all): Likewise.
* gdb.mi/pr11022.exp (test_memory_changed_observer): Likewise.
* gdb.trace/change-loc.exp (tracepoint_change_loc_1): Likewise.
(tracepoint_change_loc_2): Likewise.
* gdb.trace/disconnected-tracing.exp (disconnected_tracing):
Likewise.
(disconnected_tfind): Likewise.
* gdb.trace/mi-traceframe-changed.exp (test_tfind_tfile):
Likewise.
(test_tfind_remote): Likewise.
* gdb.trace/mi-tracepoint-changed.exp (test_reconnect):
Likewise.
(test_pending_resolved): Likewise.
* gdb.trace/mi-tsv-changed.exp (test_create_delete_modify_tsv):
Likewise.
(test_upload_tsv): Likewise.
* gdb.trace/pending.exp (pending_tracepoint_resolved):
Likewise.
(pending_tracepoint_works): Likewise.
* gdb.trace/report.exp (use_collected_data): Likewise.
* gdb.trace/status-stop.exp (test_tstart_tstop_tstart):
Likewise.
(test_tstart_tstart, test_buffer_full_tstart): Likewise.
* gdb.trace/strace.exp (strace_info_marker): Likewise.
(strace_trace_on_same_addr): Likewise.
(strace_trace_on_diff_addr): Likewise.
* gdb.trace/unavailable.exp (gdb_collect_args_test): Likewise.
(gdb_collect_locals_test): Likewise.
(gdb_unavailable_registers_test): Likewise.
(gdb_collect_globals_test): Likewise.
Diffstat (limited to 'gdb/testsuite/gdb.base/sepdebug.exp')
-rw-r--r-- | gdb/testsuite/gdb.base/sepdebug.exp | 172 |
1 files changed, 87 insertions, 85 deletions
diff --git a/gdb/testsuite/gdb.base/sepdebug.exp b/gdb/testsuite/gdb.base/sepdebug.exp index 8e3709a3035..1e63835c2a3 100644 --- a/gdb/testsuite/gdb.base/sepdebug.exp +++ b/gdb/testsuite/gdb.base/sepdebug.exp @@ -648,101 +648,103 @@ test_next_with_recursion #******** -proc test_different_dir {type test_different_dir xfail} { with_test_prefix "$type" { - global srcdir subdir objdir binfile srcfile timeout gdb_prompt - global bp_location6 decimal hex - - gdb_exit - gdb_start - gdb_reinitialize_dir $srcdir/$subdir - gdb_test_no_output "set debug-file-directory ${test_different_dir}" \ - "set separate debug location" - gdb_load ${binfile} - - # - # test break at function - # - if {$xfail} { - setup_xfail "*-*-*" - } - gdb_test "break main" \ - "Breakpoint.*at.* file .*$srcfile, line.*" \ - "breakpoint function, optimized file" - - # - # test break at function - # - if {$xfail} { - setup_xfail "*-*-*" - } - gdb_test "break marker4" \ - "Breakpoint.*at.* file .*$srcfile, line.*" \ - "breakpoint small function, optimized file" - - # - # run until the breakpoint at main is hit. For non-stubs-using targets. - # - gdb_run_cmd - if {$xfail} { - setup_xfail "*-*-*" - } - gdb_expect { - -re "Breakpoint \[0-9\]+,.*main .*argc.*argv.* at .*$srcfile:$bp_location6.*$bp_location6\[\t \]+if .argc.* \{.*$gdb_prompt $" { - pass "run until function breakpoint, optimized file" +proc test_different_dir {type test_different_dir xfail} { + with_test_prefix "$type" { + global srcdir subdir objdir binfile srcfile timeout gdb_prompt + global bp_location6 decimal hex + + gdb_exit + gdb_start + gdb_reinitialize_dir $srcdir/$subdir + gdb_test_no_output "set debug-file-directory ${test_different_dir}" \ + "set separate debug location" + gdb_load ${binfile} + + # + # test break at function + # + if {$xfail} { + setup_xfail "*-*-*" } - -re "Breakpoint \[0-9\]+,.*main .*argc.*argv.* at .*$gdb_prompt $" { - pass "run until function breakpoint, optimized file (code motion)" + gdb_test "break main" \ + "Breakpoint.*at.* file .*$srcfile, line.*" \ + "breakpoint function, optimized file" + + # + # test break at function + # + if {$xfail} { + setup_xfail "*-*-*" } - -re "$gdb_prompt $" { - fail "run until function breakpoint, optimized file" + gdb_test "break marker4" \ + "Breakpoint.*at.* file .*$srcfile, line.*" \ + "breakpoint small function, optimized file" + + # + # run until the breakpoint at main is hit. For non-stubs-using targets. + # + gdb_run_cmd + if {$xfail} { + setup_xfail "*-*-*" } - timeout { - fail "run until function breakpoint, optimized file (timeout)" + gdb_expect { + -re "Breakpoint \[0-9\]+,.*main .*argc.*argv.* at .*$srcfile:$bp_location6.*$bp_location6\[\t \]+if .argc.* \{.*$gdb_prompt $" { + pass "run until function breakpoint, optimized file" + } + -re "Breakpoint \[0-9\]+,.*main .*argc.*argv.* at .*$gdb_prompt $" { + pass "run until function breakpoint, optimized file (code motion)" + } + -re "$gdb_prompt $" { + fail "run until function breakpoint, optimized file" + } + timeout { + fail "run until function breakpoint, optimized file (timeout)" + } } - } - - # - # run until the breakpoint at a small function - # - - # - # Add a second pass pattern. The behavior differs here between stabs - # and dwarf for one-line functions. Stabs preserves two line symbols - # (one before the prologue and one after) with the same line number, - # but dwarf regards these as duplicates and discards one of them. - # Therefore the address after the prologue (where the breakpoint is) - # has no exactly matching line symbol, and GDB reports the breakpoint - # as if it were in the middle of a line rather than at the beginning. - - set bp_location13 [gdb_get_line_number "set breakpoint 13 here"] - set bp_location14 [gdb_get_line_number "set breakpoint 14 here"] - if {$xfail} { - setup_xfail "*-*-*" - } - gdb_test_multiple "continue" "run until breakpoint set at small function, optimized file" { - -re "Breakpoint $decimal, marker4 \\(d=177601976\\) at .*$srcfile:$bp_location13\[\r\n\]+$bp_location13\[\t \]+void marker4.*$gdb_prompt $" { - pass "run until breakpoint set at small function, optimized file" - } - -re "Breakpoint $decimal, $hex in marker4 \\(d=177601976\\) at .*$srcfile:$bp_location13\[\r\n\]+$bp_location13\[\t \]+void marker4.*$gdb_prompt $" { - pass "run until breakpoint set at small function, optimized file" + # + # run until the breakpoint at a small function + # + + # + # Add a second pass pattern. The behavior differs here between stabs + # and dwarf for one-line functions. Stabs preserves two line symbols + # (one before the prologue and one after) with the same line number, + # but dwarf regards these as duplicates and discards one of them. + # Therefore the address after the prologue (where the breakpoint is) + # has no exactly matching line symbol, and GDB reports the breakpoint + # as if it were in the middle of a line rather than at the beginning. + + set bp_location13 [gdb_get_line_number "set breakpoint 13 here"] + set bp_location14 [gdb_get_line_number "set breakpoint 14 here"] + if {$xfail} { + setup_xfail "*-*-*" } - -re "Breakpoint $decimal, marker4 \\(d=177601976\\) at .*$srcfile:$bp_location14\[\r\n\]+$bp_location14\[\t \]+void marker4.*$gdb_prompt $" { - # marker4() is defined at line 46 when compiled with -DPROTOTYPES - pass "run until breakpoint set at small function, optimized file (line bp_location14)" + + gdb_test_multiple "continue" "run until breakpoint set at small function, optimized file" { + -re "Breakpoint $decimal, marker4 \\(d=177601976\\) at .*$srcfile:$bp_location13\[\r\n\]+$bp_location13\[\t \]+void marker4.*$gdb_prompt $" { + pass "run until breakpoint set at small function, optimized file" + } + -re "Breakpoint $decimal, $hex in marker4 \\(d=177601976\\) at .*$srcfile:$bp_location13\[\r\n\]+$bp_location13\[\t \]+void marker4.*$gdb_prompt $" { + pass "run until breakpoint set at small function, optimized file" + } + -re "Breakpoint $decimal, marker4 \\(d=177601976\\) at .*$srcfile:$bp_location14\[\r\n\]+$bp_location14\[\t \]+void marker4.*$gdb_prompt $" { + # marker4() is defined at line 46 when compiled with -DPROTOTYPES + pass "run until breakpoint set at small function, optimized file (line bp_location14)" + } } - } - # Reset the default arguments for VxWorks - if [istarget "*-*-vxworks*"] { - set timeout 10 - verbose "Timeout is now $timeout seconds" 2 - gdb_test_no_output "set args main" - } + # Reset the default arguments for VxWorks + if [istarget "*-*-vxworks*"] { + set timeout 10 + verbose "Timeout is now $timeout seconds" 2 + gdb_test_no_output "set args main" + } -# proc test_different_dir -}} + # proc test_different_dir + } +} # now move the .debug file to a different location so that we can test |