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.
This commit is contained in:
parent
074d710de7
commit
329719ec1d
4 changed files with 34 additions and 4 deletions
|
@ -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 ||"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue