mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-26 13:56:22 +08:00
gdb/gdbserver/
* gdb.trace/report.exp: Move some code to ... (use_collected_data): New. (top level): Call use_collected_data once on the live target. Save at file of the current trace session, load it with target tfile, and call use_collected_data again.
This commit is contained in:
@ -1,3 +1,11 @@
|
||||
2013-02-28 Yao Qi <yao@codesourcery.com>
|
||||
|
||||
* gdb.trace/report.exp: Move some code to ...
|
||||
(use_collected_data): New.
|
||||
(top level): Call use_collected_data once on the live target.
|
||||
Save at file of the current trace session, load it with target
|
||||
tfile, and call use_collected_data again.
|
||||
|
||||
2013-02-27 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
* gdb.threads/fork-thread-pending.c (main): Add alarm.
|
||||
|
@ -181,14 +181,30 @@ gdb_test "continue" \
|
||||
|
||||
gdb_test "tstop" ".*" ""
|
||||
|
||||
gdb_tfind_test "9.1: init: make sure not debugging any trace frame" \
|
||||
"none" "-1"
|
||||
|
||||
# 9.3 help tdump
|
||||
|
||||
gdb_test "help tdump" "Print everything collected at the current.*" \
|
||||
"9.3: help tdump"
|
||||
|
||||
# Check the collected trace data from different sources, such as live
|
||||
# inferior and tfile.
|
||||
|
||||
proc use_collected_data { data_source } { with_test_prefix "${data_source}" {
|
||||
global tdp1 tdp2 tdp3 tdp4 tdp5 tdp6
|
||||
global testline1 testline2 testline3 testline4 testline5 testline6
|
||||
global pcreg fpreg spreg
|
||||
global srcfile srcdir subdir
|
||||
global arg1 arg3
|
||||
global decimal hex gdb_prompt
|
||||
#
|
||||
# 9.1 test the tdump command
|
||||
#
|
||||
|
||||
set timeout 60
|
||||
|
||||
gdb_tfind_test "9.1: init: make sure not debugging any trace frame" "none" "-1"
|
||||
|
||||
gdb_tfind_test "9.1: find frame for TP $tdp1" "tracepoint $tdp1" \
|
||||
"\$tracepoint" "$tdp1"
|
||||
|
||||
@ -243,11 +259,6 @@ gdb_test "tdump" \
|
||||
# 9.2 test tdump with arguments
|
||||
# [no go, tdump doesn't have any arguments]
|
||||
|
||||
# 9.3 help tdump
|
||||
|
||||
gdb_test "help tdump" "Print everything collected at the current.*" \
|
||||
"9.3: help tdump"
|
||||
|
||||
set linecount1 0
|
||||
set linecount2 0
|
||||
set linecount3 0
|
||||
@ -385,6 +396,28 @@ gdb_test_multiple "while \$trace_frame != -1\n printf \"TDP #\%d, frame %d: char
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
use_collected_data "live"
|
||||
|
||||
# Finished!
|
||||
gdb_tfind_test "finished: make sure not debugging any trace frame" "none" "-1"
|
||||
gdb_tfind_test "finished: make sure not debugging any trace frame" \
|
||||
"none" "-1"
|
||||
|
||||
# Save trace frames to tfile.
|
||||
gdb_test "tsave report.tf" "Trace data saved to file 'report.tf'.*"
|
||||
|
||||
# Change target to tfile.
|
||||
set test "change to tfile target"
|
||||
gdb_test_multiple "target tfile report.tf" "$test" {
|
||||
-re "A program is being debugged already. Kill it. .y or n. " {
|
||||
send_gdb "y\n"
|
||||
exp_continue
|
||||
}
|
||||
-re "$gdb_prompt $" {
|
||||
pass "$test"
|
||||
}
|
||||
}
|
||||
# Test the collected trace frames from tfile.
|
||||
use_collected_data "tfile"
|
||||
|
Reference in New Issue
Block a user