2015-01-01 09:32:14 +00:00
|
|
|
# Copyright 1998-2015 Free Software Foundation, Inc.
|
1999-04-16 01:35:26 +00:00
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
2007-08-23 18:14:19 +00:00
|
|
|
# the Free Software Foundation; either version 3 of the License, or
|
1999-04-16 01:35:26 +00:00
|
|
|
# (at your option) any later version.
|
2007-08-23 18:14:19 +00:00
|
|
|
#
|
1999-04-16 01:35:26 +00:00
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
2007-08-23 18:14:19 +00:00
|
|
|
#
|
1999-04-16 01:35:26 +00:00
|
|
|
# You should have received a copy of the GNU General Public License
|
2007-08-23 18:14:19 +00:00
|
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
1999-04-16 01:35:26 +00:00
|
|
|
|
|
|
|
# This file was written by Michael Snyder (msnyder@cygnus.com)
|
|
|
|
|
2013-06-07 17:31:09 +00:00
|
|
|
load_lib "trace-support.exp"
|
1999-04-16 01:35:26 +00:00
|
|
|
|
|
|
|
|
|
|
|
gdb_exit
|
|
|
|
gdb_start
|
|
|
|
|
2012-06-26 18:25:19 +00:00
|
|
|
standard_testfile actions.c
|
* config/m68k-emc.exp, lib/emc-support.exp,
gdb.trace/gdb_c_test.c: Delete.
* gdb.trace/actions.exp, gdb.trace/backtrace.exp, gdb.trace/circ.exp,
gdb.trace/collection.exp, gdb.trace/deltrace.exp,
gdb.trace/infotrace.exp, gdb.trace/limits.exp, gdb.trace/packetlen.exp,
gdb.trace/passc-dyn.exp, gdb.trace/passcount.exp, gdb.trace/report.exp,
gdb.trace/save-trace.exp, gdb.trace/tfind.exp, gdb.trace/tracecmd.exp,
gdb.trace/while-dyn.exp, gdb.trace/while-stepping.exp: Remove special
casing for m68k-*-elf.
2009-11-05 20:06:03 +00:00
|
|
|
if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
|
|
|
|
executable {debug nowarnings}] != "" } {
|
|
|
|
untested report.exp
|
|
|
|
return -1
|
1999-04-16 01:35:26 +00:00
|
|
|
}
|
* config/m68k-emc.exp, lib/emc-support.exp,
gdb.trace/gdb_c_test.c: Delete.
* gdb.trace/actions.exp, gdb.trace/backtrace.exp, gdb.trace/circ.exp,
gdb.trace/collection.exp, gdb.trace/deltrace.exp,
gdb.trace/infotrace.exp, gdb.trace/limits.exp, gdb.trace/packetlen.exp,
gdb.trace/passc-dyn.exp, gdb.trace/passcount.exp, gdb.trace/report.exp,
gdb.trace/save-trace.exp, gdb.trace/tfind.exp, gdb.trace/tracecmd.exp,
gdb.trace/while-dyn.exp, gdb.trace/while-stepping.exp: Remove special
casing for m68k-*-elf.
2009-11-05 20:06:03 +00:00
|
|
|
gdb_load $binfile
|
2010-06-08 22:58:03 +00:00
|
|
|
gdb_test "tstop" ".*" ""
|
|
|
|
gdb_test "tfind none" ".*" ""
|
* config/m68k-emc.exp, lib/emc-support.exp,
gdb.trace/gdb_c_test.c: Delete.
* gdb.trace/actions.exp, gdb.trace/backtrace.exp, gdb.trace/circ.exp,
gdb.trace/collection.exp, gdb.trace/deltrace.exp,
gdb.trace/infotrace.exp, gdb.trace/limits.exp, gdb.trace/packetlen.exp,
gdb.trace/passc-dyn.exp, gdb.trace/passcount.exp, gdb.trace/report.exp,
gdb.trace/save-trace.exp, gdb.trace/tfind.exp, gdb.trace/tracecmd.exp,
gdb.trace/while-dyn.exp, gdb.trace/while-stepping.exp: Remove special
casing for m68k-*-elf.
2009-11-05 20:06:03 +00:00
|
|
|
runto_main
|
1999-04-16 01:35:26 +00:00
|
|
|
gdb_reinitialize_dir $srcdir/$subdir
|
|
|
|
|
|
|
|
if { ![gdb_target_supports_trace] } then {
|
2012-02-15 18:09:20 +00:00
|
|
|
unsupported "Current target does not support trace"
|
gdb/testsuite/
* config/monitor.exp (gdb_target_cmd): Remove semicolon after
'return'.
(gdb_target_monitor, gdb_load): Likewise.
* config/sid.exp (gdb_load): Likewise.
* config/slite.exp (gdb_load): Likewise.
* config/vx.exp (gdb_start, spawn_vxgdb): Likewise.
* gdb.ada/arrayidx.exp, gdb.ada/null_array.exp: Likewise.
* gdb.arch/mips-octeon-bbit.exp (single_step): Likewise.
(single_step_until): Likewise.
* gdb.arch/powerpc-d128-regs.exp: Likewise.
* gdb.arch/system-gcore.exp: Likewise.
* gdb.base/bigcore.exp (extract_heap): Likewise.
* gdb.base/break-on-linker-gcd-function.exp: Likewise.
* gdb.base/call-ar-st.exp: Likewise.
* gdb.base/call-rt-st.exp: Likewise.
* gdb.base/call-sc.exp, gdb.base/call-strs.exp: Likewise.
* gdb.base/callfuncs.exp, gdb.base/completion.exp: Likewise.
* gdb.base/condbreak.exp, gdb.base/constvars.exp: Likewise.
* gdb.base/corefile.exp: Likewise.
* gdb.base/dbx.exp (gdb_file_cmd): Likewise.
* gdb.base/exprs.exp, gdb.base/fileio.exp: Likewise.
* gdb.base/fixsection.exp: Likewise.
* gdb.base/funcargs.exp: Likewise.
* gdb.base/gcore-buffer-overflow.exp: Likewise.
* gdb.base/gcore-relro.exp: Likewise.
* gdb.base/gcore.exp, gdb.base/gdb11530.exp: Likewise.
* gdb.base/gdb11531.exp, gdb.base/gnu-ifunc.exp: Likewise.
* gdb.base/info-os.exp, gdb.base/info-proc.exp: Likewise.
* gdb.base/interp.exp, gdb.base/langs.exp:: Likewise.
* gdb.base/list.exp: Likewise.
(set_listsize): Likewise.
* gdb.base/logical.exp, gdb.base/mips_pro.exp: Likewise.
* gdb.base/miscexprs.exp, gdb.base/nodebug.exp: Likewise.
* gdb.base/opaque.exp, gdb.base/pointers.exp: Likewise.
* gdb.base/psymtab.exp, gdb.base/ptype.exp: Likewise.
* gdb.base/relational.exp, gdb.base/scope.exp: Likewise.
* gdb.base/setvar.exp: Likewise.
(test_set): Likewise.
* gdb.base/signals.exp, gdb.base/sizeof.exp: Likewise.
* gdb.base/solib-overlap.exp: Likewise.
* gdb.base/store.exp, gdb.base/structs.exp: Likewise.
* gdb.base/structs2.exp, gdb.base/volatile.exp: Likewise.
* gdb.base/watchpoint.exp (initialize): Likewise.
(test_simple_watchpoint): Likewise.
(test_disabling_watchpoints): Likewise.
(test_watchpoint_triggered_in_syscall): Likewise.
* gdb.base/whatis.exp, gdb.cp/ambiguous.exp: Likewise.
* gdb.cp/casts.exp, gdb.cp/ctti.exp: Likewise.
* gdb.cp/namespace.exp, gdb.cp/nsdecl.exp: Likewise.
* gdb.cp/psmang.exp, gdb.dwarf2/dw2-ranges.exp: Likewise.
* gdb.hp/gdb.aCC/optimize.exp: Likewise.
* gdb.hp/gdb.aCC/watch-cmd.exp: Likewise.
* gdb.hp/gdb.base-hp/callfwmall.exp: Likewise.
* gdb.hp/gdb.base-hp/pxdb.exp: Likewise.
* gdb.hp/gdb.compat/xdb1.exp: Likewise.
* gdb.hp/gdb.compat/xdb2.exp: Likewise.
* gdb.hp/gdb.compat/xdb3.exp: Likewise.
* gdb.hp/gdb.defects/bs14602.exp: Likewise.
* gdb.hp/gdb.defects/solib-d.exp: Likewise.
* gdb.mi/gdb792.exp: Likewise.
* gdb.mi/mi-inheritance-syntax-error.exp: Likewise.
* gdb.mi/mi-logging.exp, gdb.mi/mi-var-cp.exp : Likewise.
* gdb.mi/mi-var-rtti.exp, gdb.python/py-type.exp: Likewise.
* gdb.threads/gcore-thread.exp: Likewise.
(load_core): Likewise.
* gdb.threads/pthreads.exp (all_threads_running): Likewise.
(test_startup, check_control_c): Likewise.
* gdb.threads/sigstep-threads.exp: Likewise.
* gdb.threads/thread_check.exp: Likewise.
* gdb.trace/backtrace.exp, gdb.trace/change-loc.exp: Likewise.
* gdb.trace/circ.exp (run_trace_experiment): Likewise.
(set_a_tracepoint, trace_buffer_normal): Likewise.
(gdb_trace_circular_tests): Likewise.
* gdb.trace/collection.exp: Likewise.
* gdb.trace/disconnected-tracing.exp: Likewise.
* gdb.trace/infotrace.exp: Likewise.
* gdb.trace/mi-traceframe-changed.exp: Likewise.
* gdb.trace/mi-tracepoint-changed.exp: Likewise.
* gdb.trace/mi-tsv-changed.exp (test_create_delete_modify_tsv): Likewise.
* gdb.trace/packetlen.exp, gdb.trace/passc-dyn.exp: Likewise.
* gdb.trace/pending.exp, gdb.trace/report.exp: Likewise.
* gdb.trace/stap-trace.exp: Likewise.
* gdb.trace/status-stop.exp,gdb.trace/strace.exp: Likewise.
* gdb.trace/tfind.exp, gdb.trace/trace-break.exp: Likewise.
* gdb.trace/trace-buffer-size.exp: Likewise.
* gdb.trace/tspeed.exp, gdb.trace/tsv.exp: Likewise.
* gdb.trace/unavailable.exp: Likewise.
* gdb.trace/while-dyn.exp: Likewise.
* lib/fortran.exp (set_lang_fortran): Likewise.
* lib/gdb.exp (default_gdb_version, gdb_start_cmd): Likewise.
(gdb_breakpoint, gdb_reinitialize_dir): Likewise.
(default_gdb_start, get_compiler_info): Likewise.
(gdb_compile, gdb_compile_objc, gdb_reload, gdb_init): Likewise.
(get_debug_format, setup_xfail_format): Likewise.
(rerun_to_main, gdb_skip_float_test): Likewise.
(build_id_debug_filename_get, get_remotetimeout): Likewise.
* lib/java.exp (set_lang_java): Likewise.
* lib/mi-support.exp (default_mi_gdb_start): Likewise.
(mi_gdb_reinitialize_dir, mi_gdb_target_cmd): Likewise.
(mi_gdb_file_cmd, mi_gdb_test): Likewise.
(mi_run_cmd_full, mi_expect_interrupt): Likewise.
* lib/objc.exp (set_lang_objc): Likewise.
* lib/pascal.exp (set_lang_pascal): Likewise.
* lib/prompt.exp (default_prompt_gdb_start): Likewise.
* lib/trace-support.exp (gdb_trace_setactions, gdb_tfind_test): Likewise.
(gdb_readexpr, gdb_gettpnum, gdb_find_recursion_test_baseline): Likewise.
2013-03-14 13:34:06 +00:00
|
|
|
return 1
|
1999-04-16 01:35:26 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
set cr "\[\r\n\]+"
|
|
|
|
|
|
|
|
# If testing on a remote host, download the source file.
|
|
|
|
# remote_download host $srcdir/$subdir/$srcfile
|
|
|
|
|
|
|
|
#
|
|
|
|
# test general reporting of trace experiment results
|
|
|
|
#
|
|
|
|
|
|
|
|
set testline1 0
|
|
|
|
set testline2 0
|
|
|
|
set testline3 0
|
|
|
|
set testline4 0
|
|
|
|
set testline5 0
|
|
|
|
set testline6 0
|
|
|
|
|
|
|
|
set arg1 1
|
|
|
|
set arg2 2
|
|
|
|
set arg3 3
|
|
|
|
set arg4 4
|
|
|
|
set arg5 5
|
|
|
|
set arg6 6
|
|
|
|
|
2013-06-07 17:31:09 +00:00
|
|
|
set gdb_recursion_test_baseline [gdb_find_recursion_test_baseline $srcfile]
|
1999-04-16 01:35:26 +00:00
|
|
|
if { $gdb_recursion_test_baseline == -1 } {
|
|
|
|
fail "Could not find gdb_recursion_test function"
|
2013-06-07 17:31:09 +00:00
|
|
|
return
|
1999-04-16 01:35:26 +00:00
|
|
|
}
|
|
|
|
|
2010-06-02 19:41:11 +00:00
|
|
|
set return_me 0
|
|
|
|
|
|
|
|
gdb_test_multiple "list $gdb_recursion_test_baseline, +12" "" {
|
1999-04-16 01:35:26 +00:00
|
|
|
-re "\[\r\n\](\[0-9\]+)\[^\r\n\]+gdbtestline 1 " {
|
|
|
|
set testline1 $expect_out(1,string)
|
|
|
|
exp_continue
|
|
|
|
}
|
|
|
|
-re "\[\r\n\](\[0-9\]+)\[^\r\n\]+gdbtestline 2 " {
|
|
|
|
set testline2 $expect_out(1,string)
|
|
|
|
exp_continue
|
|
|
|
}
|
|
|
|
-re "\[\r\n\](\[0-9\]+)\[^\r\n\]+gdbtestline 3 " {
|
|
|
|
set testline3 $expect_out(1,string)
|
|
|
|
exp_continue
|
|
|
|
}
|
|
|
|
-re "\[\r\n\](\[0-9\]+)\[^\r\n\]+gdbtestline 4 " {
|
|
|
|
set testline4 $expect_out(1,string)
|
|
|
|
exp_continue
|
|
|
|
}
|
|
|
|
-re "\[\r\n\](\[0-9\]+)\[^\r\n\]+gdbtestline 5 " {
|
|
|
|
set testline5 $expect_out(1,string)
|
|
|
|
exp_continue
|
|
|
|
}
|
|
|
|
-re "\[\r\n\](\[0-9\]+)\[^\r\n\]+gdbtestline 6 " {
|
|
|
|
set testline6 $expect_out(1,string)
|
|
|
|
exp_continue
|
|
|
|
}
|
|
|
|
-re ".*$gdb_prompt $" {
|
|
|
|
if { ($testline1 == 0) || ($testline2 == 0) || ($testline3 == 0) || ($testline4 == 0) || ($testline5 == 0) || ($testline6 == 0) } {
|
2006-08-10 05:27:22 +00:00
|
|
|
untested report.exp
|
2010-06-02 19:41:11 +00:00
|
|
|
set return_me 1
|
1999-04-16 01:35:26 +00:00
|
|
|
all tests in this module will fail."
|
|
|
|
}
|
|
|
|
}
|
|
|
|
default {
|
2006-08-10 05:27:22 +00:00
|
|
|
untested report.exp
|
2010-06-02 19:41:11 +00:00
|
|
|
set return_me 1
|
1999-04-16 01:35:26 +00:00
|
|
|
all tests in this module will fail."
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2010-06-02 19:41:11 +00:00
|
|
|
if { $return_me == 1 } then {
|
gdb/testsuite/
* config/monitor.exp (gdb_target_cmd): Remove semicolon after
'return'.
(gdb_target_monitor, gdb_load): Likewise.
* config/sid.exp (gdb_load): Likewise.
* config/slite.exp (gdb_load): Likewise.
* config/vx.exp (gdb_start, spawn_vxgdb): Likewise.
* gdb.ada/arrayidx.exp, gdb.ada/null_array.exp: Likewise.
* gdb.arch/mips-octeon-bbit.exp (single_step): Likewise.
(single_step_until): Likewise.
* gdb.arch/powerpc-d128-regs.exp: Likewise.
* gdb.arch/system-gcore.exp: Likewise.
* gdb.base/bigcore.exp (extract_heap): Likewise.
* gdb.base/break-on-linker-gcd-function.exp: Likewise.
* gdb.base/call-ar-st.exp: Likewise.
* gdb.base/call-rt-st.exp: Likewise.
* gdb.base/call-sc.exp, gdb.base/call-strs.exp: Likewise.
* gdb.base/callfuncs.exp, gdb.base/completion.exp: Likewise.
* gdb.base/condbreak.exp, gdb.base/constvars.exp: Likewise.
* gdb.base/corefile.exp: Likewise.
* gdb.base/dbx.exp (gdb_file_cmd): Likewise.
* gdb.base/exprs.exp, gdb.base/fileio.exp: Likewise.
* gdb.base/fixsection.exp: Likewise.
* gdb.base/funcargs.exp: Likewise.
* gdb.base/gcore-buffer-overflow.exp: Likewise.
* gdb.base/gcore-relro.exp: Likewise.
* gdb.base/gcore.exp, gdb.base/gdb11530.exp: Likewise.
* gdb.base/gdb11531.exp, gdb.base/gnu-ifunc.exp: Likewise.
* gdb.base/info-os.exp, gdb.base/info-proc.exp: Likewise.
* gdb.base/interp.exp, gdb.base/langs.exp:: Likewise.
* gdb.base/list.exp: Likewise.
(set_listsize): Likewise.
* gdb.base/logical.exp, gdb.base/mips_pro.exp: Likewise.
* gdb.base/miscexprs.exp, gdb.base/nodebug.exp: Likewise.
* gdb.base/opaque.exp, gdb.base/pointers.exp: Likewise.
* gdb.base/psymtab.exp, gdb.base/ptype.exp: Likewise.
* gdb.base/relational.exp, gdb.base/scope.exp: Likewise.
* gdb.base/setvar.exp: Likewise.
(test_set): Likewise.
* gdb.base/signals.exp, gdb.base/sizeof.exp: Likewise.
* gdb.base/solib-overlap.exp: Likewise.
* gdb.base/store.exp, gdb.base/structs.exp: Likewise.
* gdb.base/structs2.exp, gdb.base/volatile.exp: Likewise.
* gdb.base/watchpoint.exp (initialize): Likewise.
(test_simple_watchpoint): Likewise.
(test_disabling_watchpoints): Likewise.
(test_watchpoint_triggered_in_syscall): Likewise.
* gdb.base/whatis.exp, gdb.cp/ambiguous.exp: Likewise.
* gdb.cp/casts.exp, gdb.cp/ctti.exp: Likewise.
* gdb.cp/namespace.exp, gdb.cp/nsdecl.exp: Likewise.
* gdb.cp/psmang.exp, gdb.dwarf2/dw2-ranges.exp: Likewise.
* gdb.hp/gdb.aCC/optimize.exp: Likewise.
* gdb.hp/gdb.aCC/watch-cmd.exp: Likewise.
* gdb.hp/gdb.base-hp/callfwmall.exp: Likewise.
* gdb.hp/gdb.base-hp/pxdb.exp: Likewise.
* gdb.hp/gdb.compat/xdb1.exp: Likewise.
* gdb.hp/gdb.compat/xdb2.exp: Likewise.
* gdb.hp/gdb.compat/xdb3.exp: Likewise.
* gdb.hp/gdb.defects/bs14602.exp: Likewise.
* gdb.hp/gdb.defects/solib-d.exp: Likewise.
* gdb.mi/gdb792.exp: Likewise.
* gdb.mi/mi-inheritance-syntax-error.exp: Likewise.
* gdb.mi/mi-logging.exp, gdb.mi/mi-var-cp.exp : Likewise.
* gdb.mi/mi-var-rtti.exp, gdb.python/py-type.exp: Likewise.
* gdb.threads/gcore-thread.exp: Likewise.
(load_core): Likewise.
* gdb.threads/pthreads.exp (all_threads_running): Likewise.
(test_startup, check_control_c): Likewise.
* gdb.threads/sigstep-threads.exp: Likewise.
* gdb.threads/thread_check.exp: Likewise.
* gdb.trace/backtrace.exp, gdb.trace/change-loc.exp: Likewise.
* gdb.trace/circ.exp (run_trace_experiment): Likewise.
(set_a_tracepoint, trace_buffer_normal): Likewise.
(gdb_trace_circular_tests): Likewise.
* gdb.trace/collection.exp: Likewise.
* gdb.trace/disconnected-tracing.exp: Likewise.
* gdb.trace/infotrace.exp: Likewise.
* gdb.trace/mi-traceframe-changed.exp: Likewise.
* gdb.trace/mi-tracepoint-changed.exp: Likewise.
* gdb.trace/mi-tsv-changed.exp (test_create_delete_modify_tsv): Likewise.
* gdb.trace/packetlen.exp, gdb.trace/passc-dyn.exp: Likewise.
* gdb.trace/pending.exp, gdb.trace/report.exp: Likewise.
* gdb.trace/stap-trace.exp: Likewise.
* gdb.trace/status-stop.exp,gdb.trace/strace.exp: Likewise.
* gdb.trace/tfind.exp, gdb.trace/trace-break.exp: Likewise.
* gdb.trace/trace-buffer-size.exp: Likewise.
* gdb.trace/tspeed.exp, gdb.trace/tsv.exp: Likewise.
* gdb.trace/unavailable.exp: Likewise.
* gdb.trace/while-dyn.exp: Likewise.
* lib/fortran.exp (set_lang_fortran): Likewise.
* lib/gdb.exp (default_gdb_version, gdb_start_cmd): Likewise.
(gdb_breakpoint, gdb_reinitialize_dir): Likewise.
(default_gdb_start, get_compiler_info): Likewise.
(gdb_compile, gdb_compile_objc, gdb_reload, gdb_init): Likewise.
(get_debug_format, setup_xfail_format): Likewise.
(rerun_to_main, gdb_skip_float_test): Likewise.
(build_id_debug_filename_get, get_remotetimeout): Likewise.
* lib/java.exp (set_lang_java): Likewise.
* lib/mi-support.exp (default_mi_gdb_start): Likewise.
(mi_gdb_reinitialize_dir, mi_gdb_target_cmd): Likewise.
(mi_gdb_file_cmd, mi_gdb_test): Likewise.
(mi_run_cmd_full, mi_expect_interrupt): Likewise.
* lib/objc.exp (set_lang_objc): Likewise.
* lib/pascal.exp (set_lang_pascal): Likewise.
* lib/prompt.exp (default_prompt_gdb_start): Likewise.
* lib/trace-support.exp (gdb_trace_setactions, gdb_tfind_test): Likewise.
(gdb_readexpr, gdb_gettpnum, gdb_find_recursion_test_baseline): Likewise.
2013-03-14 13:34:06 +00:00
|
|
|
return -1
|
2010-06-02 19:41:11 +00:00
|
|
|
}
|
|
|
|
|
1999-04-16 01:35:26 +00:00
|
|
|
#
|
|
|
|
# Setup trace experiment. This will involve:
|
|
|
|
# 1) a tracepoint where nothing is collected
|
|
|
|
# 2) a tracepoint where only regs are collected
|
|
|
|
# 3) a tracepoint where only args are collected
|
|
|
|
# 4) a tracepoint where only locals are collected
|
|
|
|
# 5) a tracepoint where some amount of stack memory is collected.
|
|
|
|
# 6) a tracepoint where some expressions are collected.
|
|
|
|
#
|
|
|
|
|
|
|
|
gdb_delete_tracepoints
|
|
|
|
set tdp1 [gdb_gettpnum $testline1]
|
|
|
|
set tdp2 [gdb_gettpnum $testline2]
|
|
|
|
set tdp3 [gdb_gettpnum $testline3]
|
|
|
|
set tdp4 [gdb_gettpnum $testline4]
|
|
|
|
set tdp5 [gdb_gettpnum $testline5]
|
|
|
|
set tdp6 [gdb_gettpnum $testline6]
|
|
|
|
|
|
|
|
if { $tdp1 <= 0 || $tdp2 <= 0 || $tdp3 <= 0 || \
|
|
|
|
$tdp4 <= 0 || $tdp5 <= 0 || $tdp6 <= 0 } then {
|
|
|
|
fail "setting tracepoints failed"
|
2013-06-07 17:31:09 +00:00
|
|
|
return
|
1999-04-16 01:35:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
gdb_trace_setactions "9.x: setup TP to collect regs" \
|
|
|
|
"$tdp2" \
|
|
|
|
"collect \$regs" "^$"
|
|
|
|
|
|
|
|
|
|
|
|
gdb_trace_setactions "9.x: setup TP to collect args" \
|
|
|
|
"$tdp3" \
|
|
|
|
"collect \$args" "^$"
|
|
|
|
|
|
|
|
gdb_trace_setactions "9.x: setup TP to collect locals" \
|
|
|
|
"$tdp4" \
|
|
|
|
"collect \$locs" "^$"
|
|
|
|
|
2011-09-08 17:40:54 +00:00
|
|
|
if [is_amd64_regs_target] {
|
2010-03-12 04:04:40 +00:00
|
|
|
set fpreg "rbp"
|
|
|
|
set spreg "rsp"
|
|
|
|
set pcreg "rip"
|
2011-09-08 17:40:54 +00:00
|
|
|
} elseif [is_x86_like_target] {
|
2010-03-12 04:04:40 +00:00
|
|
|
set fpreg "ebp"
|
|
|
|
set spreg "esp"
|
|
|
|
set pcreg "eip"
|
|
|
|
} else {
|
|
|
|
set fpreg "fp"
|
|
|
|
set spreg "sp"
|
|
|
|
set pcreg "pc"
|
|
|
|
}
|
|
|
|
|
1999-04-16 01:35:26 +00:00
|
|
|
gdb_trace_setactions "9.x: setup TP to collect stack memory" \
|
|
|
|
"$tdp5" \
|
2010-03-12 04:04:40 +00:00
|
|
|
"collect \$$fpreg, \*\(void \*\*\) \$$spreg @ 64" "^$"
|
1999-04-16 01:35:26 +00:00
|
|
|
|
|
|
|
gdb_trace_setactions "9.x: setup TP to collect expressions" \
|
|
|
|
"$tdp6" \
|
|
|
|
"collect gdb_char_test, gdb_short_test, gdb_long_test" "^$"
|
|
|
|
|
2010-06-08 22:58:03 +00:00
|
|
|
gdb_test "tstart" ".*" ""
|
1999-04-16 01:35:26 +00:00
|
|
|
|
2010-06-08 22:58:03 +00:00
|
|
|
gdb_test "break end" ".*" ""
|
* config/m68k-emc.exp, lib/emc-support.exp,
gdb.trace/gdb_c_test.c: Delete.
* gdb.trace/actions.exp, gdb.trace/backtrace.exp, gdb.trace/circ.exp,
gdb.trace/collection.exp, gdb.trace/deltrace.exp,
gdb.trace/infotrace.exp, gdb.trace/limits.exp, gdb.trace/packetlen.exp,
gdb.trace/passc-dyn.exp, gdb.trace/passcount.exp, gdb.trace/report.exp,
gdb.trace/save-trace.exp, gdb.trace/tfind.exp, gdb.trace/tracecmd.exp,
gdb.trace/while-dyn.exp, gdb.trace/while-stepping.exp: Remove special
casing for m68k-*-elf.
2009-11-05 20:06:03 +00:00
|
|
|
gdb_test "continue" \
|
|
|
|
"Continuing.*Breakpoint $decimal, end.*" \
|
|
|
|
"run trace experiment"
|
1999-04-16 01:35:26 +00:00
|
|
|
|
2010-06-08 22:58:03 +00:00
|
|
|
gdb_test "tstop" ".*" ""
|
1999-04-16 01:35:26 +00:00
|
|
|
|
2013-02-28 00:42:20 +00:00
|
|
|
gdb_tfind_test "9.1: init: make sure not debugging any trace frame" \
|
|
|
|
"none" "-1"
|
1999-04-16 01:35:26 +00:00
|
|
|
|
2013-02-28 00:42:20 +00:00
|
|
|
# 9.3 help tdump
|
1999-04-16 01:35:26 +00:00
|
|
|
|
2013-02-28 00:42:20 +00:00
|
|
|
gdb_test "help tdump" "Print everything collected at the current.*" \
|
|
|
|
"9.3: help tdump"
|
1999-04-16 01:35:26 +00:00
|
|
|
|
2013-02-28 00:42:20 +00:00
|
|
|
# Check the collected trace data from different sources, such as live
|
|
|
|
# inferior and tfile.
|
|
|
|
|
2013-03-15 01:41:29 +00:00
|
|
|
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
|
2014-01-30 02:09:11 +00:00
|
|
|
global srcfile srcdir subdir binfile
|
2013-03-15 01:41:29 +00:00
|
|
|
global arg1 arg3
|
|
|
|
global decimal hex gdb_prompt
|
|
|
|
#
|
|
|
|
# 9.1 test the tdump command
|
|
|
|
#
|
|
|
|
|
|
|
|
set timeout 60
|
|
|
|
|
|
|
|
gdb_tfind_test "9.1: find frame for TP $tdp1" "tracepoint $tdp1" \
|
|
|
|
"\$tracepoint" "$tdp1"
|
|
|
|
|
|
|
|
# Nothing was collected at tdp1, so this tdump should be empty.
|
|
|
|
gdb_test "tdump" \
|
|
|
|
"Data collected at tracepoint $tdp1, trace frame $decimal:" \
|
|
|
|
"9.1: tdump, nothing collected"
|
|
|
|
|
|
|
|
gdb_tfind_test "9.1: find frame for TP $tdp2" "tracepoint $tdp2" \
|
|
|
|
"\$tracepoint" "$tdp2"
|
|
|
|
|
|
|
|
# regs were collected at tdp2.
|
|
|
|
# How to match for the output of "info registers" on an unknown architecture?
|
|
|
|
# For now, assume that most architectures have a register called "pc".
|
|
|
|
|
|
|
|
gdb_test "tdump" \
|
|
|
|
"\[\r\n\]$pcreg .*" \
|
|
|
|
"9.1: tdump, regs collected"
|
|
|
|
|
|
|
|
gdb_tfind_test "9.1: find frame for TP $tdp3" "tracepoint $tdp3" \
|
|
|
|
"\$tracepoint" "$tdp3"
|
|
|
|
|
|
|
|
# args were collected at tdp3
|
|
|
|
gdb_test "tdump" \
|
|
|
|
"depth = 3.*q1 = 2.*q2 = 2.*q3 = 3.*q4 = 4.*q5 = 5.*q6 = 6" \
|
|
|
|
"9.1: tdump, args collected"
|
|
|
|
|
|
|
|
gdb_tfind_test "9.1: find frame for TP $tdp4" "tracepoint $tdp4" \
|
|
|
|
"\$tracepoint" "$tdp4"
|
|
|
|
|
|
|
|
# locals were collected at tdp4
|
|
|
|
gdb_test "tdump" \
|
|
|
|
"q = 1" \
|
|
|
|
"9.1: tdump, locals collected"
|
|
|
|
|
|
|
|
gdb_tfind_test "9.1: find frame for TP $tdp5" "tracepoint $tdp5" \
|
|
|
|
"\$tracepoint" "$tdp5"
|
|
|
|
|
|
|
|
# stack was collected at tdp5, plus the frame pointer
|
|
|
|
gdb_test "tdump" \
|
|
|
|
".$fpreg = .*$spreg @ 64 = .*" \
|
|
|
|
"9.1: tdump, memrange collected"
|
|
|
|
|
|
|
|
gdb_tfind_test "9.1: find frame for TP $tdp6" "tracepoint $tdp6" \
|
|
|
|
"\$tracepoint" "$tdp6"
|
|
|
|
|
|
|
|
# globals were collected at tdp6
|
|
|
|
gdb_test "tdump" \
|
|
|
|
"gdb_char_test = 1.*gdb_short_test = 2.*gdb_long_test = 3" \
|
|
|
|
"9.1: tdump, global variables collected"
|
|
|
|
|
|
|
|
# 9.2 test tdump with arguments
|
|
|
|
# [no go, tdump doesn't have any arguments]
|
|
|
|
|
|
|
|
set linecount1 0
|
|
|
|
set linecount2 0
|
|
|
|
set linecount3 0
|
|
|
|
set linecount4 0
|
|
|
|
set linecount5 0
|
|
|
|
set linecount6 0
|
|
|
|
|
|
|
|
gdb_tfind_test "11.x, 12.1: find start frame" "start" "0"
|
|
|
|
|
|
|
|
#
|
|
|
|
# 11.x test built-in trace variables $trace_frame, $trace_line etc.
|
|
|
|
#
|
|
|
|
|
|
|
|
gdb_test "printf \"x %d x\\n\", \$trace_frame" "x 0 x" \
|
|
|
|
"11.1: test \$trace_frame"
|
|
|
|
|
|
|
|
gdb_test "printf \"x %d x\\n\", \$tracepoint" "x $tdp1 x" \
|
|
|
|
"11.2: test \$tracepoint"
|
|
|
|
|
|
|
|
gdb_test "printf \"x %d x\\n\", \$trace_line" "x $testline1 x" \
|
|
|
|
"11.3: test \$trace_line"
|
|
|
|
|
|
|
|
gdb_test_multiple "print \$trace_file" "11.4: test \$trace_file" {
|
|
|
|
-re "\\$\[0-9\]+ = \"$srcfile\"\[\r\n\]+$gdb_prompt $" {
|
|
|
|
pass "11.4: test \$trace_file"
|
|
|
|
}
|
|
|
|
-re "\\$\[0-9\]+ = \"$srcdir/$subdir/$srcfile\"\[\r\n\]+$gdb_prompt $" {
|
|
|
|
pass "11.4: test \$trace_file"
|
|
|
|
}
|
2013-02-28 00:42:20 +00:00
|
|
|
}
|
1999-04-16 01:35:26 +00:00
|
|
|
|
2013-03-15 01:41:29 +00:00
|
|
|
#gdb_test "print \$trace_file" "\"$srcdir/$subdir/$srcfile\"" \
|
|
|
|
# "11.4: test \$trace_file"
|
1999-04-16 01:35:26 +00:00
|
|
|
|
2013-03-15 01:41:29 +00:00
|
|
|
#
|
|
|
|
# 12.x test report generation using arbitrary GDB commands, loops etc.
|
|
|
|
#
|
1999-04-16 01:35:26 +00:00
|
|
|
|
2013-03-15 01:41:29 +00:00
|
|
|
gdb_test_multiple "while \$trace_frame != -1\n output \$trace_file\n printf \", line \%d \(tracepoint #\%d\)\\n\", \$trace_line, \$tracepoint\n tfind\n end" "12.1: trace report #1" {
|
|
|
|
-re "> end\r\n" {
|
|
|
|
exp_continue
|
|
|
|
}
|
|
|
|
-re "^Found trace frame \[0-9\]+, tracepoint \[0-9\]+\r\n" {
|
|
|
|
exp_continue
|
|
|
|
}
|
|
|
|
-re "^\[^\r\n\]* line $testline1 .tracepoint .$tdp1\\)\r\n" {
|
|
|
|
set linecount1 [expr $linecount1 + 1]
|
|
|
|
exp_continue
|
|
|
|
}
|
|
|
|
-re "^\[^\r\n\]* line $testline2 .tracepoint .$tdp2\\)\r\n" {
|
|
|
|
set linecount2 [expr $linecount2 + 1]
|
|
|
|
exp_continue
|
|
|
|
}
|
|
|
|
-re "^\[^\r\n\]* line $testline3 .tracepoint .$tdp3\\)\r\n" {
|
|
|
|
set linecount3 [expr $linecount3 + 1]
|
|
|
|
exp_continue
|
|
|
|
}
|
|
|
|
-re "^\[^\r\n\]* line $testline4 .tracepoint .$tdp4\\)\r\n" {
|
|
|
|
set linecount4 [expr $linecount4 + 1]
|
|
|
|
exp_continue
|
|
|
|
}
|
|
|
|
-re "^\[^\r\n\]* line $testline5 .tracepoint .$tdp5\\)\r\n" {
|
|
|
|
set linecount5 [expr $linecount5 + 1]
|
|
|
|
exp_continue
|
|
|
|
}
|
|
|
|
-re "^\[^\r\n\]* line $testline6 .tracepoint .$tdp6\\)\r\n" {
|
|
|
|
set linecount6 [expr $linecount6 + 1]
|
|
|
|
exp_continue
|
|
|
|
}
|
|
|
|
-re "^No trace frame found\r\n$gdb_prompt $" {
|
|
|
|
if { ($linecount1 < 4) || ($linecount2 < 4) || ($linecount3 < 4) || ($linecount4 < 4) || ($linecount5 < 4) || ($linecount6 < 4) } {
|
|
|
|
fail "12.1: trace report #1"
|
|
|
|
} else {
|
|
|
|
pass "12.1: trace report #1"
|
|
|
|
}
|
2013-02-28 00:42:20 +00:00
|
|
|
}
|
1999-04-16 01:35:26 +00:00
|
|
|
}
|
|
|
|
|
2013-03-15 01:41:29 +00:00
|
|
|
gdb_tfind_test "12.2: tfind end, selects no frame" "end" "-1"
|
|
|
|
gdb_tfind_test "12.2: find first TDP #2 frame" "tracepoint $tdp2" \
|
|
|
|
"\$tracepoint" "$tdp2"
|
1999-04-16 01:35:26 +00:00
|
|
|
|
2013-03-15 01:41:29 +00:00
|
|
|
set linecount2 0
|
1999-04-16 01:35:26 +00:00
|
|
|
|
2013-03-15 01:41:29 +00:00
|
|
|
gdb_test_multiple "while \$trace_frame != -1\n printf \"tracepoint #\%d, FP 0x\%08x, SP 0x\%08x, PC 0x%08x\\n\", \$tracepoint, \$fp, \$sp, \$pc\n tfind tracepoint\n end" "12.2: trace report #2" {
|
|
|
|
-re "tracepoint #$tdp2, FP $hex, SP $hex, PC $hex" {
|
|
|
|
set linecount2 [expr $linecount2 + 1]
|
|
|
|
exp_continue
|
|
|
|
}
|
|
|
|
-re ".*$gdb_prompt $" {
|
|
|
|
if { ($linecount2 < 4) } {
|
|
|
|
fail "12.2: trace report #2"
|
|
|
|
} else {
|
|
|
|
pass "12.2: trace report #2"
|
|
|
|
}
|
2013-02-28 00:42:20 +00:00
|
|
|
}
|
1999-04-16 01:35:26 +00:00
|
|
|
}
|
|
|
|
|
2013-03-15 01:41:29 +00:00
|
|
|
gdb_tfind_test "12.3: tfind end, selects no frame" "end" "-1"
|
|
|
|
gdb_tfind_test "12.3: find first TDP #3 frame" "tracepoint $tdp3" \
|
|
|
|
"\$tracepoint" "$tdp3"
|
1999-04-16 01:35:26 +00:00
|
|
|
|
2013-03-15 01:41:29 +00:00
|
|
|
set linecount3 0
|
1999-04-16 01:35:26 +00:00
|
|
|
|
2013-03-15 01:41:29 +00:00
|
|
|
gdb_test_multiple "while \$trace_frame != -1\n printf \"TDP #\%d, frame \%d: depth = \%d, q1 = \%d\\n\", \$tracepoint, \$trace_frame, depth, q1\n tfind tracepoint\n end" "12.3: trace report #3" {
|
|
|
|
-re "TDP #$tdp3, frame $decimal: depth = $decimal, q1 = $decimal" {
|
|
|
|
set linecount3 [expr $linecount3 + 1]
|
|
|
|
exp_continue
|
|
|
|
}
|
|
|
|
-re ".*$gdb_prompt $" {
|
|
|
|
if { ($linecount3 < 4) } {
|
|
|
|
fail "12.3: trace report #3"
|
|
|
|
} else {
|
|
|
|
pass "12.3: trace report #3"
|
|
|
|
}
|
2013-02-28 00:42:20 +00:00
|
|
|
}
|
1999-04-16 01:35:26 +00:00
|
|
|
}
|
|
|
|
|
2013-03-15 01:41:29 +00:00
|
|
|
gdb_tfind_test "12.4: tfind end, selects no frame" "end" "-1"
|
|
|
|
gdb_tfind_test "12.4: find first TDP #6 frame" "tracepoint $tdp6" \
|
|
|
|
"\$tracepoint" "$tdp6"
|
1999-04-16 01:35:26 +00:00
|
|
|
|
2013-03-15 01:41:29 +00:00
|
|
|
set linecount6 0
|
1999-04-16 01:35:26 +00:00
|
|
|
|
2013-03-15 01:41:29 +00:00
|
|
|
gdb_test_multiple "while \$trace_frame != -1\n printf \"TDP #\%d, frame %d: char_test = \%d, long_test = \%d\\n\", \$tracepoint, \$trace_frame, gdb_char_test, gdb_long_test\n tfind tracepoint\n end" "12.4: trace report #4" {
|
|
|
|
-re "TDP #$tdp6, frame $decimal: char_test = $arg1, long_test = $arg3" {
|
|
|
|
set linecount6 [expr $linecount6 + 1]
|
|
|
|
exp_continue
|
|
|
|
}
|
|
|
|
-re ".*$gdb_prompt $" {
|
|
|
|
if { ($linecount6 < 4) } {
|
|
|
|
fail "12.4: trace report #4"
|
|
|
|
} else {
|
|
|
|
pass "12.4: trace report #4"
|
|
|
|
}
|
2013-02-28 00:42:20 +00:00
|
|
|
}
|
1999-04-16 01:35:26 +00:00
|
|
|
}
|
2014-01-30 02:09:11 +00:00
|
|
|
|
|
|
|
# There is always a thread of an inferior, either a live one or
|
|
|
|
# a faked one.
|
|
|
|
gdb_test "info threads" "\\* ${decimal} (process|Thread) ${decimal}\[ \t\].*"
|
|
|
|
gdb_test "info inferiors" "\\* 1 process ${decimal} \[ \t\]+${binfile}.*"
|
1999-04-16 01:35:26 +00:00
|
|
|
}
|
|
|
|
}
|
2013-02-28 00:42:20 +00:00
|
|
|
|
|
|
|
use_collected_data "live"
|
1999-04-16 01:35:26 +00:00
|
|
|
|
|
|
|
# Finished!
|
2013-02-28 00:42:20 +00:00
|
|
|
gdb_tfind_test "finished: make sure not debugging any trace frame" \
|
|
|
|
"none" "-1"
|
|
|
|
|
|
|
|
# Save trace frames to tfile.
|
2013-04-10 05:35:56 +00:00
|
|
|
set tracefile [standard_output_file ${testfile}]
|
|
|
|
gdb_test "tsave ${tracefile}.tf" \
|
|
|
|
"Trace data saved to file '${tracefile}.tf'.*" \
|
|
|
|
"save tfile trace file"
|
2013-02-28 00:42:20 +00:00
|
|
|
|
gdb/
2013-04-10 Hui Zhu <hui@codesourcery.com>
Yao Qi <yao@codesourcery.com>
* configure.ac: Check libbabeltrace is installed.
* config.in: Regenerate.
* configure: Regenerate.
* Makefile.in (LIBBABELTRACE): New.
(CLIBS): Add LIBBABELTRACE.
* ctf.c: Include "exec.h".
(CTF_EVENT_ID_STATUS, CTF_EVENT_ID_TSV_DEF): New macros.
(CTF_EVENT_ID_TP_DEF, ctf_save_write_int32): New macros.
(ctf_save_metadata_header): Define new type aliases in
metadata.
(ctf_write_header): Define event type "tsv_def" and "tp_def"
in metadata. Start a new faked packet for trace status.
(ctf_write_status): Write trace status to CTF.
(ctf_write_uploaded_tsv): Write TSV to CTF.
(ctf_write_uploaded_tp): Write tracepoint definition to CTF.
(ctf_write_definition_end): End the faked packet.
(ctx, ctf_iter, trace_dirname): New.
(start_pos): New variable.
(ctf_destroy, ctf_open_dir, ctf_open): New.
(SET_INT32_FIELD, SET_ARRAY_FIELD, SET_STRING_FIELD): New
macros.
(ctf_read_tsv, ctf_read_tp, ctf_close, ctf_files_info): New.
(ctf_fetch_registers, ctf_xfer_partial): New.
(ctf_get_trace_state_variable_value): New.
(ctf_get_tpnum_from_frame_event): New.
(ctf_get_traceframe_address): New.
(ctf_trace_find, ctf_has_stack): New.
(ctf_has_registers, ctf_traceframe_info, init_ctf_ops): New.
(ctf_get_trace_status, ctf_read_status): New.
(_initialize_ctf): New.
* tracepoint.c (get_tracepoint_number): New
(get_uploaded_tsv): Remove 'static'.
(struct traceframe_info, trace_regblock_size): Move it to ...
* tracepoint.h: ... here.
(get_tracepoint_number): Declare it.
(get_uploaded_tsv): Declare it.
* NEWS: Mention new configure option.
gdb/doc/
2013-04-10 Yao Qi <yao@codesourcery.com>
* gdb.texinfo (Trace Files): Add "target ctf".
gdb/testsuite/
2013-04-10 Yao Qi <yao@codesourcery.com>
* gdb.trace/actions.exp: Save trace data to CTF.
Change to ctf target if GDB supports, read CTF data in ctf
target, and check the actions of tracepoints.
* gdb.trace/while-stepping.exp: Likewise.
* gdb.trace/report.exp: Test GDB saves trace data to CTF
format and read CTF trace file if GDB supports.
* gdb.trace/tstatus.exp: Save trace data to CTF. If ctf
target is supported, change to ctf target, read trace data and
check output of command "tstatus".
* gdb.trace/tsv.exp: Save trace frame to CTF. If GDB supports,
read CTF data by target ctf and call check_tsv.
2013-04-10 09:42:57 +00:00
|
|
|
# Save trace frames to ctf.
|
|
|
|
gdb_test "tsave -ctf ${tracefile}.ctf" \
|
|
|
|
"Trace data saved to directory '${tracefile}.ctf'.*" \
|
|
|
|
"save ctf trace file"
|
|
|
|
|
2013-02-28 00:42:20 +00:00
|
|
|
# Change target to tfile.
|
|
|
|
set test "change to tfile target"
|
2013-04-10 05:35:56 +00:00
|
|
|
gdb_test_multiple "target tfile ${tracefile}.tf" "$test" {
|
2013-02-28 00:42:20 +00:00
|
|
|
-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"
|
gdb/
2013-04-10 Hui Zhu <hui@codesourcery.com>
Yao Qi <yao@codesourcery.com>
* configure.ac: Check libbabeltrace is installed.
* config.in: Regenerate.
* configure: Regenerate.
* Makefile.in (LIBBABELTRACE): New.
(CLIBS): Add LIBBABELTRACE.
* ctf.c: Include "exec.h".
(CTF_EVENT_ID_STATUS, CTF_EVENT_ID_TSV_DEF): New macros.
(CTF_EVENT_ID_TP_DEF, ctf_save_write_int32): New macros.
(ctf_save_metadata_header): Define new type aliases in
metadata.
(ctf_write_header): Define event type "tsv_def" and "tp_def"
in metadata. Start a new faked packet for trace status.
(ctf_write_status): Write trace status to CTF.
(ctf_write_uploaded_tsv): Write TSV to CTF.
(ctf_write_uploaded_tp): Write tracepoint definition to CTF.
(ctf_write_definition_end): End the faked packet.
(ctx, ctf_iter, trace_dirname): New.
(start_pos): New variable.
(ctf_destroy, ctf_open_dir, ctf_open): New.
(SET_INT32_FIELD, SET_ARRAY_FIELD, SET_STRING_FIELD): New
macros.
(ctf_read_tsv, ctf_read_tp, ctf_close, ctf_files_info): New.
(ctf_fetch_registers, ctf_xfer_partial): New.
(ctf_get_trace_state_variable_value): New.
(ctf_get_tpnum_from_frame_event): New.
(ctf_get_traceframe_address): New.
(ctf_trace_find, ctf_has_stack): New.
(ctf_has_registers, ctf_traceframe_info, init_ctf_ops): New.
(ctf_get_trace_status, ctf_read_status): New.
(_initialize_ctf): New.
* tracepoint.c (get_tracepoint_number): New
(get_uploaded_tsv): Remove 'static'.
(struct traceframe_info, trace_regblock_size): Move it to ...
* tracepoint.h: ... here.
(get_tracepoint_number): Declare it.
(get_uploaded_tsv): Declare it.
* NEWS: Mention new configure option.
gdb/doc/
2013-04-10 Yao Qi <yao@codesourcery.com>
* gdb.texinfo (Trace Files): Add "target ctf".
gdb/testsuite/
2013-04-10 Yao Qi <yao@codesourcery.com>
* gdb.trace/actions.exp: Save trace data to CTF.
Change to ctf target if GDB supports, read CTF data in ctf
target, and check the actions of tracepoints.
* gdb.trace/while-stepping.exp: Likewise.
* gdb.trace/report.exp: Test GDB saves trace data to CTF
format and read CTF trace file if GDB supports.
* gdb.trace/tstatus.exp: Save trace data to CTF. If ctf
target is supported, change to ctf target, read trace data and
check output of command "tstatus".
* gdb.trace/tsv.exp: Save trace frame to CTF. If GDB supports,
read CTF data by target ctf and call check_tsv.
2013-04-10 09:42:57 +00:00
|
|
|
|
|
|
|
# Try to read ctf data if GDB supports.
|
|
|
|
gdb_test_multiple "target ctf ${tracefile}.ctf" "" {
|
|
|
|
-re "Undefined target command: \"ctf ${tracefile}.ctf\"\. Try \"help target\"\.\r\n$gdb_prompt $" {
|
|
|
|
}
|
|
|
|
-re ".*\r\n$gdb_prompt $" {
|
|
|
|
use_collected_data "ctf"
|
|
|
|
}
|
|
|
|
}
|