diff options
author | Stan Shebs <shebs@codesourcery.com> | 2010-03-19 22:00:17 +0000 |
---|---|---|
committer | Stan Shebs <shebs@codesourcery.com> | 2010-03-19 22:00:17 +0000 |
commit | 3b11a015276722f29673ef40f940e648f4a370ce (patch) | |
tree | fad4ad5578533331c9254bd7b1f8c01888d9b79c /gdb/testsuite/gdb.trace | |
parent | d099120c64430117a80fc95c0bff2da9ff5d8657 (diff) | |
download | gdb-3b11a015276722f29673ef40f940e648f4a370ce.zip gdb-3b11a015276722f29673ef40f940e648f4a370ce.tar.gz gdb-3b11a015276722f29673ef40f940e648f4a370ce.tar.bz2 |
2010-03-19 Stan Shebs <stan@codesourcery.com>
* ax-gdb.c (gen_fetch): Handle bool.
(gen_usual_unary): Ditto.
(gen_cast): Ditto.
(gen_equal): New function.
(gen_less): New function.
(gen_expr_binop_rest): Call them, also return integer type from
logical operations.
(gen_expr): Ditto.
* gdb.trace/ax.exp: New file.
Diffstat (limited to 'gdb/testsuite/gdb.trace')
-rw-r--r-- | gdb/testsuite/gdb.trace/ax.exp | 138 |
1 files changed, 138 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.trace/ax.exp b/gdb/testsuite/gdb.trace/ax.exp new file mode 100644 index 0000000..0105ed6 --- /dev/null +++ b/gdb/testsuite/gdb.trace/ax.exp @@ -0,0 +1,138 @@ +# Copyright 2010 Free Software Foundation, Inc. +# +# 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 +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# 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. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + +# Tests of agent expression handling. + +# The tests that use the maintenance command do not need tracepoint +# support on the target, but they do want a live program. + +load_lib "trace-support.exp"; + +if $tracelevel then { + strace $tracelevel +} + +set prms_id 0 +set bug_id 0 + +gdb_exit +gdb_start +set testfile "actions" +set srcfile ${testfile}.c +set binfile $objdir/$subdir/ax +if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \ + executable {debug nowarnings}] != "" } { + untested ax.exp + return -1 +} + +gdb_load $binfile +runto_main +gdb_reinitialize_dir $srcdir/$subdir + +gdb_test "maint agent 12" ".*const8 12.*pop.*end.*" "maint agent 12" + +gdb_test "maint agent gdb_char_test" "" "maint agent gdb_char_test" + +gdb_test "maint agent gdb_arr_test\[12\]" "" "maint agent gdb_arr_test\[12\]" + +gdb_test "maint agent gdb_arr_test\[gdb_short_test\]" "" "maint agent gdb_arr_test\[gdb_short_test\]" + +gdb_test "maint agent gdb_struct1_test" "" "maint agent gdb_struct1_test" + +gdb_test "maint agent gdb_struct1_test.s" "" "maint agent gdb_struct1_test.s" + +gdb_test "maint agent gdb_struct1_test.arr\[gdb_struct1_test.c\]" "" "maint agent gdb_struct1_test.arr\[gdb_struct1_test.c\]" + +gdb_test "maint agent gdb_structp_test" "" "maint agent gdb_structp_test" + +gdb_test "maint agent gdb_structp_test->l" "" "maint agent gdb_structp_test->l" + +gdb_test "maint agent gdb_structp_test->bfield" "" "maint agent gdb_structp_test->bfield" + +gdb_test "maint agent gdb_long_test + gdb_short_test" "" "maint agent gdb_long_test + gdb_short_test" + +gdb_test "maint agent gdb_long_test - gdb_short_test" "" "maint agent gdb_long_test - gdb_short_test" + +gdb_test "maint agent gdb_long_test * gdb_short_test" "" "maint agent gdb_long_test * gdb_short_test" + +gdb_test "maint agent gdb_long_test / gdb_short_test" "" "maint agent gdb_long_test / gdb_short_test" + +gdb_test "maint agent gdb_structp_test + 1" "" "maint agent gdb_structp_test + 1" + +gdb_test "maint agent gdb_long_test == gdb_short_test" "" "maint agent gdb_long_test == gdb_short_test" + +gdb_test "maint agent gdb_long_test != gdb_short_test" "" "maint agent gdb_long_test != gdb_short_test" + +gdb_test "maint agent gdb_long_test < gdb_short_test" "" "maint agent gdb_long_test < gdb_short_test" + +gdb_test "maint agent gdb_long_test <= gdb_short_test" "" "maint agent gdb_long_test <= gdb_short_test" + +gdb_test "maint agent gdb_long_test > gdb_short_test" "" "maint agent gdb_long_test > gdb_short_test" + +gdb_test "maint agent gdb_long_test >= gdb_short_test" "" "maint agent gdb_long_test >= gdb_short_test" + +gdb_test "maint agent &gdb_long_test == &gdb_short_test" "" "maint agent &gdb_long_test == &gdb_short_test" + +gdb_test "maint agent &gdb_long_test < &gdb_short_test" "" "maint agent &gdb_long_test < &gdb_short_test" + +# Now test eval version of agent expressions. + +gdb_test "maint agent-eval 12" ".*const8 12.*end.*" "maint agent-eval 12" + +gdb_test "maint agent-eval gdb_char_test" "" "maint agent-eval gdb_char_test" + +gdb_test "maint agent-eval gdb_arr_test\[12\]" "" "maint agent-eval gdb_arr_test\[12\]" + +gdb_test "maint agent-eval gdb_arr_test\[gdb_short_test\]" "" "maint agent-eval gdb_arr_test\[gdb_short_test\]" + +gdb_test "maint agent-eval gdb_struct1_test" "" "maint agent-eval gdb_struct1_test" + +gdb_test "maint agent-eval gdb_struct1_test.s" "" "maint agent-eval gdb_struct1_test.s" + +gdb_test "maint agent-eval gdb_struct1_test.arr\[gdb_struct1_test.c\]" "" "maint agent-eval gdb_struct1_test.arr\[gdb_struct1_test.c\]" + +gdb_test "maint agent-eval gdb_structp_test" "" "maint agent-eval gdb_structp_test" + +gdb_test "maint agent-eval gdb_structp_test->l" "" "maint agent-eval gdb_structp_test->l" + +gdb_test "maint agent-eval gdb_structp_test->bfield" "" "maint agent-eval gdb_structp_test->bfield" + +gdb_test "maint agent-eval gdb_long_test + gdb_short_test" "" "maint agent-eval gdb_long_test + gdb_short_test" + +gdb_test "maint agent-eval gdb_long_test - gdb_short_test" "" "maint agent-eval gdb_long_test - gdb_short_test" + +gdb_test "maint agent-eval gdb_long_test * gdb_short_test" "" "maint agent-eval gdb_long_test * gdb_short_test" + +gdb_test "maint agent-eval gdb_long_test / gdb_short_test" "" "maint agent-eval gdb_long_test / gdb_short_test" + +gdb_test "maint agent-eval gdb_structp_test + 1" "" "maint agent-eval gdb_structp_test + 1" + +gdb_test "maint agent-eval gdb_long_test == gdb_short_test" "" "maint agent-eval gdb_long_test == gdb_short_test" + +gdb_test "maint agent-eval gdb_long_test != gdb_short_test" "" "maint agent-eval gdb_long_test != gdb_short_test" + +gdb_test "maint agent-eval gdb_long_test < gdb_short_test" "" "maint agent-eval gdb_long_test < gdb_short_test" + +gdb_test "maint agent-eval gdb_long_test <= gdb_short_test" "" "maint agent-eval gdb_long_test <= gdb_short_test" + +gdb_test "maint agent-eval gdb_long_test > gdb_short_test" "" "maint agent-eval gdb_long_test > gdb_short_test" + +gdb_test "maint agent-eval gdb_long_test >= gdb_short_test" "" "maint agent-eval gdb_long_test >= gdb_short_test" + +gdb_test "maint agent-eval &gdb_long_test == &gdb_short_test" ".*equal.*end.*" "maint agent-eval &gdb_long_test == &gdb_short_test" + +gdb_test "maint agent-eval &gdb_long_test < &gdb_short_test" "" "maint agent-eval &gdb_long_test < &gdb_short_test" + |