diff options
author | Tom Tromey <tromey@redhat.com> | 2009-09-22 17:39:54 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2009-09-22 17:39:54 +0000 |
commit | 329719ec1d3002c2e148acbf7287fee1dcd531c7 (patch) | |
tree | 6bd836db9acc4a8708ba39578e5ac0489e572e8d /gdb/testsuite/gdb.python/py-function.exp | |
parent | 074d710de74bfa99c9fb9ac2c3013508149d16e5 (diff) | |
download | binutils-329719ec1d3002c2e148acbf7287fee1dcd531c7.zip binutils-329719ec1d3002c2e148acbf7287fee1dcd531c7.tar.gz binutils-329719ec1d3002c2e148acbf7287fee1dcd531c7.tar.bz2 |
gdb
PR python/10680:
* eval.c (evaluate_subexp_standard) <do_call_it>: Handle internal
functions in EVAL_AVOID_SIDE_EFFECTS case.
gdb/testsuite
* gdb.python/py-function.exp: Add regression tests.
Diffstat (limited to 'gdb/testsuite/gdb.python/py-function.exp')
-rw-r--r-- | gdb/testsuite/gdb.python/py-function.exp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.python/py-function.exp b/gdb/testsuite/gdb.python/py-function.exp index 7feca2b..30fde7d 100644 --- a/gdb/testsuite/gdb.python/py-function.exp +++ b/gdb/testsuite/gdb.python/py-function.exp @@ -77,3 +77,16 @@ gdb_py_test_multiple "input value-returning convenience function" \ "end" "" gdb_test "print \$double (1)" "= 2" "call value-returning function" + +gdb_py_test_multiple "input int-returning function" \ + "python" "" \ + "class Yes(gdb.Function):" "" \ + " def __init__(self):" "" \ + " gdb.Function.__init__(self, 'yes')" "" \ + " def invoke(self):" "" \ + " return 1" "" \ + "Yes ()" "" \ + "end" "" + +gdb_test "print \$yes() && \$yes()" " = 1" "call yes with &&" +gdb_test "print \$yes() || \$yes()" " = 1" "call yes with ||" |