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/catch-load.exp | |
parent | 2c415c0f382fd6361d9d702ebdd71cd6d6a06d19 (diff) | |
download | gdb-0a251e08fa4e7130f05462ecc9f60e6683cdefca.zip gdb-0a251e08fa4e7130f05462ecc9f60e6683cdefca.tar.gz gdb-0a251e08fa4e7130f05462ecc9f60e6683cdefca.tar.bz2 |
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/catch-load.exp')
-rw-r--r-- | gdb/testsuite/gdb.base/catch-load.exp | 74 |
1 files changed, 38 insertions, 36 deletions
diff --git a/gdb/testsuite/gdb.base/catch-load.exp b/gdb/testsuite/gdb.base/catch-load.exp index 75a9707..c66318e 100644 --- a/gdb/testsuite/gdb.base/catch-load.exp +++ b/gdb/testsuite/gdb.base/catch-load.exp @@ -46,54 +46,56 @@ if { [gdb_compile_shlib "${srcdir}/${subdir}/${srcfile2}" ${binfile2} {debug}] ! # names. # KIND is passed to the "catch" command. # MATCH is a boolean saying whether we expect the catchpoint to be hit. -proc one_catch_load_test {scenario kind match sostop} { with_test_prefix "${scenario}" { - global verbose testfile testfile2 binfile2 binfile2_dlopen - global srcfile - global decimal gdb_prompt +proc one_catch_load_test {scenario kind match sostop} { + with_test_prefix "${scenario}" { + global verbose testfile testfile2 binfile2 binfile2_dlopen + global srcfile + global decimal gdb_prompt - clean_restart $testfile - gdb_load_shlibs $binfile2 + clean_restart $testfile + gdb_load_shlibs $binfile2 - if {![runto_main]} { - fail "can't run to main" - return - } + if {![runto_main]} { + fail "can't run to main" + return + } - gdb_breakpoint [gdb_get_line_number "final breakpoint here"] - gdb_test_no_output "set var libname = \"$binfile2_dlopen\"" - gdb_test_no_output "set stop-on-solib-events $sostop" - gdb_test "catch $kind" "Catchpoint $decimal \\(.*\\)" + gdb_breakpoint [gdb_get_line_number "final breakpoint here"] + gdb_test_no_output "set var libname = \"$binfile2_dlopen\"" + gdb_test_no_output "set stop-on-solib-events $sostop" + gdb_test "catch $kind" "Catchpoint $decimal \\(.*\\)" - gdb_test_multiple "continue" "continue" { - -re "Catchpoint $decimal\r\n.*loaded .*/$testfile2.*\r\n.*$gdb_prompt $" { - if {$match} { - pass "continue" - } else { - fail "continue" + gdb_test_multiple "continue" "continue" { + -re "Catchpoint $decimal\r\n.*loaded .*/$testfile2.*\r\n.*$gdb_prompt $" { + if {$match} { + pass "continue" + } else { + fail "continue" + } } - } - -re "Stopped due to shared library event.*\r\n$gdb_prompt $" { - if {$sostop} { - pass "continue" - } else { - fail "continue" + -re "Stopped due to shared library event.*\r\n$gdb_prompt $" { + if {$sostop} { + pass "continue" + } else { + fail "continue" + } } - } - -re "Breakpoint $decimal, .*\r\n$gdb_prompt $" { - if {!$match} { - pass "continue" - } else { - fail "continue" + -re "Breakpoint $decimal, .*\r\n$gdb_prompt $" { + if {!$match} { + pass "continue" + } else { + fail "continue" + } } - } - -re ".*$gdb_prompt $" { - fail "continue" + -re ".*$gdb_prompt $" { + fail "continue" + } } } -}} +} one_catch_load_test "plain load" "load" 1 0 one_catch_load_test "plain load with stop-on-solib-events" "load" 1 1 |