diff options
author | Stan Shebs <shebs@codesourcery.com> | 2009-12-31 17:47:43 +0000 |
---|---|---|
committer | Stan Shebs <shebs@codesourcery.com> | 2009-12-31 17:47:43 +0000 |
commit | 6da95a677b977e132bc936a73b2bb92844b14f32 (patch) | |
tree | 85f0857e05cc28c9838bda2cf7129bccfb465657 /gdb/testsuite/gdb.trace/actions.exp | |
parent | 383e5f855398acb5ff53f32cde88bdfa675d7931 (diff) | |
download | gdb-6da95a677b977e132bc936a73b2bb92844b14f32.zip gdb-6da95a677b977e132bc936a73b2bb92844b14f32.tar.gz gdb-6da95a677b977e132bc936a73b2bb92844b14f32.tar.bz2 |
Add new tracepoint action teval.
* tracepoint.c (teval_pseudocommand): New function.
(validate_actionline): Add teval action case.
(encode_actions): Ditto.
(_initialize_tracepoint): Define teval pseudocommand.
* NEWS: Mention teval.
* gdb.texinfo (Tracepoint Actions): Describe teval.
* gdb.trace/actions.exp: Test teval action.
Diffstat (limited to 'gdb/testsuite/gdb.trace/actions.exp')
-rw-r--r-- | gdb/testsuite/gdb.trace/actions.exp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.trace/actions.exp b/gdb/testsuite/gdb.trace/actions.exp index bb7277f..616a656 100644 --- a/gdb/testsuite/gdb.trace/actions.exp +++ b/gdb/testsuite/gdb.trace/actions.exp @@ -212,3 +212,31 @@ gdb_test "set default-collect gdb_char_test, gdb_long_test - 100" \ gdb_test "show default-collect" \ "The list of expressions to collect by default is \"gdb_char_test, gdb_long_test - 100\"..*" \ "5.9b: show default-collect" + +# 5.10 teval + +gdb_test "tvariable \$tsv" \ + "Trace state variable \\\$tsv created, with initial value 0." \ + "Create a trace state variable" + +gdb_trace_setactions "5.10a: set teval action for first tracepoint" \ + "$trcpt1" \ + "teval gdb_char_test" "^$" + +gdb_trace_setactions "5.10a: set teval action for second tracepoint" \ + "$trcpt2" \ + "teval \$tsv += 1" "^$" + +gdb_test "info tracepoints" \ + "Num Type\[ \]+Disp Enb Address\[ \]+What.* +\[0-9\]+\[\t \]+tracepoint keep y.* in gdb_c_test at .*$srcfile:\[0-9\]+. +\[\t \]+A\[\t \]+teval gdb_char_test. +\[\t \]+A\[\t \]+end. +\[0-9\]+\[\t \]+tracepoint keep y.* in gdb_asm_test at .*$srcfile:\[0-9\]+. +\[\t \]+A\[\t \]+teval \\\$tsv \\\+= 1. +\[\t \]+A\[\t \]+end. +\[0-9\]+\[\t \]+tracepoint keep y.* in gdb_recursion_test at .*$srcfile:\[0-9\]+. +\[\t \]+A\[\t \]+collect gdb_long_test. +\[\t \]+A\[\t \]+end." \ + "5.10a: verify teval actions set for two tracepoints" + |