From bc9f0842f1f46aa754b20c5f2e12e2fa035041e3 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Fri, 25 Jun 2010 18:15:18 +0000 Subject: gdb PR python/10808: * python/python.c (execute_gdb_command): Add keywords. Accept "to_string" argument. (struct restore_ui_file_closure): New. (restore_ui_file): New function. (make_cleanup_restore_ui_file): Likewise. (GdbMethods) : Update. gdb/doc PR python/10808: * gdb.texinfo (Basic Python): Document new gdb.execute argument. gdb/testsuite PR python/10808: * gdb.python/python.exp: Add new tests. --- gdb/testsuite/gdb.python/python.exp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gdb/testsuite/gdb.python') diff --git a/gdb/testsuite/gdb.python/python.exp b/gdb/testsuite/gdb.python/python.exp index 185f45d..d0e6c63 100644 --- a/gdb/testsuite/gdb.python/python.exp +++ b/gdb/testsuite/gdb.python/python.exp @@ -83,3 +83,7 @@ gdb_test "python print gdb.objfiles()" "\\\[\\\]" # Test http://bugs.python.org/issue4434 workaround in configure.ac gdb_test "python import itertools; print 'IMPOR'+'TED'" "IMPORTED" "pythonX.Y/lib-dynload/*.so" + +gdb_test_no_output \ + "python x = gdb.execute('printf \"%d\", 23', to_string = True)" +gdb_test "python print x" "23" -- cgit v1.1