aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.trace/pending.exp
diff options
context:
space:
mode:
authorYao Qi <yao@codesourcery.com>2013-03-15 01:41:29 +0000
committerYao Qi <yao@codesourcery.com>2013-03-15 01:41:29 +0000
commit0a251e08fa4e7130f05462ecc9f60e6683cdefca (patch)
treec79ccfc1f502d7e7d48c54b67720381603201b98 /gdb/testsuite/gdb.trace/pending.exp
parent2c415c0f382fd6361d9d702ebdd71cd6d6a06d19 (diff)
downloadgdb-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.trace/pending.exp')
-rw-r--r--gdb/testsuite/gdb.trace/pending.exp162
1 files changed, 86 insertions, 76 deletions
diff --git a/gdb/testsuite/gdb.trace/pending.exp b/gdb/testsuite/gdb.trace/pending.exp
index c70600a..0308e13 100644
--- a/gdb/testsuite/gdb.trace/pending.exp
+++ b/gdb/testsuite/gdb.trace/pending.exp
@@ -58,107 +58,117 @@ if ![gdb_target_supports_trace] {
# Verify pending tracepoint is resolved to running to main.
-proc pending_tracepoint_resolved { trace_type } { with_test_prefix "$trace_type resolved" {
- global srcdir
- global subdir
- global binfile
- global srcfile
- global lib_sl1
-
- # Start with a fresh gdb.
- gdb_exit
- gdb_start
- gdb_reinitialize_dir $srcdir/$subdir
-
- gdb_test_multiple "$trace_type set_point1" "set pending tracepoint" {
- -re ".*Make \(fast |\)tracepoint pending.*y or \\\[n\\\]. $" {
- gdb_test "y" "\(Fast t|T\)racepoint.*set_point1.*pending." \
- "set pending tracepoint (without symbols)"
+proc pending_tracepoint_resolved { trace_type } {
+ with_test_prefix "$trace_type resolved" {
+ global srcdir
+ global subdir
+ global binfile
+ global srcfile
+ global lib_sl1
+
+ # Start with a fresh gdb.
+ gdb_exit
+ gdb_start
+ gdb_reinitialize_dir $srcdir/$subdir
+
+ gdb_test_multiple "$trace_type set_point1" "set pending tracepoint" {
+ -re ".*Make \(fast |\)tracepoint pending.*y or \\\[n\\\]. $" {
+ gdb_test "y" "\(Fast t|T\)racepoint.*set_point1.*pending." \
+ "set pending tracepoint (without symbols)"
+ }
}
- }
- gdb_test "info trace" \
- "Num Type\[ \]+Disp Enb Address\[ \]+What.*
+ gdb_test "info trace" \
+ "Num Type\[ \]+Disp Enb Address\[ \]+What.*
\[0-9\]+\[\t \]+\(fast |\)tracepoint\[ \]+keep y.*PENDING.*set_point1.*" \
- "single pending tracepoint info (without symbols)"
+ "single pending tracepoint info (without symbols)"
- gdb_load ${binfile}
+ gdb_load ${binfile}
- gdb_test "break main" "Breakpoint.*at.* file .*$srcfile, line.*" \
- "breakpoint function"
+ gdb_test "break main" "Breakpoint.*at.* file .*$srcfile, line.*" \
+ "breakpoint function"
- gdb_run_cmd
- gdb_test "" "Breakpoint 2, main.*"
+ gdb_run_cmd
+ gdb_test "" "Breakpoint 2, main.*"
- # Run to main which should resolve a pending tracepoint
- gdb_test "info trace" \
- "Num Type\[ \]+Disp Enb Address\[ \]+What.*
+ # Run to main which should resolve a pending tracepoint
+ gdb_test "info trace" \
+ "Num Type\[ \]+Disp Enb Address\[ \]+What.*
\[0-9\]+\[\t \]+\(fast |\)tracepoint\[ \]+keep y.*pendfunc.*" \
- "single tracepoint info"
-}}
+ "single tracepoint info"
+ }
+}
# Verify pending tracepoint is resolved and works as expected.
-proc pending_tracepoint_works { trace_type } { with_test_prefix "$trace_type works" {
- global executable
- global srcfile
- global lib_sl1
- global gdb_prompt
+proc pending_tracepoint_works { trace_type } {
+ with_test_prefix "$trace_type works" {
+ global executable
+ global srcfile
+ global lib_sl1
+ global gdb_prompt
- # Restart with a fresh gdb.
- clean_restart $executable
+ # Restart with a fresh gdb.
+ clean_restart $executable
- # Test setting and querying pending tracepoints
+ # Test setting and querying pending tracepoints
- gdb_test_multiple "$trace_type set_point1" "set pending tracepoint" {
- -re ".*Make \(fast |\)tracepoint pending.*y or \\\[n\\\]. $" {
- gdb_test "y" "\(Fast t|T\)racepoint.*set_point1.*pending." "set pending tracepoint"
+ gdb_test_multiple "$trace_type set_point1" "set pending tracepoint" {
+ -re ".*Make \(fast |\)tracepoint pending.*y or \\\[n\\\]. $" {
+ gdb_test "y" \
+ "\(Fast t|T\)racepoint.*set_point1.*pending." \
+ "set pending tracepoint"
+ }
}
- }
- gdb_test "info trace" \
- "Num Type\[ \]+Disp Enb Address\[ \]+What.*
+ gdb_test "info trace" \
+ "Num Type\[ \]+Disp Enb Address\[ \]+What.*
\[0-9\]+\[\t \]+\(fast |\)tracepoint\[ \]+keep y.*PENDING.*set_point1.*" \
- "single pending tracepoint info"
+ "single pending tracepoint info"
- # Run to main which should resolve a pending tracepoint
- gdb_test "break main" "Breakpoint.*at.* file .*$srcfile, line.*" \
- "breakpoint function"
- gdb_run_cmd
- gdb_test "" "Breakpoint 2, main.*"
+ # Run to main which should resolve a pending tracepoint
+ gdb_test "break main" "Breakpoint.*at.* file .*$srcfile, line.*" \
+ "breakpoint function"
+ gdb_run_cmd
+ gdb_test "" "Breakpoint 2, main.*"
- gdb_test "break marker" "Breakpoint.*at.* file .*$srcfile, line.*" \
- "breakpoint on marker"
+ gdb_test "break marker" "Breakpoint.*at.* file .*$srcfile, line.*" \
+ "breakpoint on marker"
- set test "start trace experiment"
- gdb_test_multiple "tstart" $test {
- -re "^tstart\r\n$gdb_prompt $" {
- pass $test
- }
- -re "Target returns error code .* too far .*$gdb_prompt $" {
- if [string equal $trace_type "ftrace"] {
- # The target was unable to install the fast tracepoint
- # (e.g., jump pad too far from tracepoint).
- pass "$test (too far)"
- # Skip the rest of the tests.
- return
- } else {
- fail $test
+ set test "start trace experiment"
+ gdb_test_multiple "tstart" $test {
+ -re "^tstart\r\n$gdb_prompt $" {
+ pass $test
+ }
+ -re "Target returns error code .* too far .*$gdb_prompt $" {
+ if [string equal $trace_type "ftrace"] {
+ # The target was unable to install the fast tracepoint
+ # (e.g., jump pad too far from tracepoint).
+ pass "$test (too far)"
+ # Skip the rest of the tests.
+ return
+ } else {
+ fail $test
+ }
}
- }
- }
+ }
- gdb_test "continue" "Continuing.\r\n\r\nBreakpoint.*marker.*at.*$srcfile.*" \
- "continue to marker"
+ gdb_test "continue" "Continuing.\r\n\r\nBreakpoint.*marker.*at.*$srcfile.*" \
+ "continue to marker"
- gdb_test "tstop" "\[\r\n\]+" "stop trace experiment"
+ gdb_test "tstop" "\[\r\n\]+" "stop trace experiment"
- gdb_test "tfind start" "#0 .*" "tfind test frame 0"
- gdb_test "tfind" "Found trace frame 1, tracepoint 1.*" "tfind test frame 1"
- gdb_test "tfind" "Found trace frame 2, tracepoint 1.*" "tfind test frame 2"
- gdb_test "tfind" "Target failed to find requested trace frame..*" "tfind test frame"
-}}
+ gdb_test "tfind start" "#0 .*" "tfind test frame 0"
+ gdb_test "tfind" "Found trace frame 1, tracepoint 1.*" \
+ "tfind test frame 1"
+ gdb_test "tfind" "Found trace frame 2, tracepoint 1.*" \
+ "tfind test frame 2"
+ gdb_test "tfind" \
+ "Target failed to find requested trace frame..*" \
+ "tfind test frame"
+ }
+}
# Verify pending tracepoint is resolved during trace.