diff options
-rw-r--r-- | gdb/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/python/python.c | 3 | ||||
-rw-r--r-- | gdb/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/testsuite/gdb.python/python.exp | 1 |
4 files changed, 15 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 1630bd8..d562a4b 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2018-11-21 Benno Fünfstück <benno.fuenfstueck@gmail.com> + + PR python/23714 + * gdb/python/python.c (execute_gdb_command): Call + prevent_dont_repeat earlier to avoid affecting dont_repeat. + 2018-11-21 Andrew Burgess <andrew.burgess@embecosm.com> * Makefile.in (ALL_TARGET_OBS): Add arch/riscv.o. diff --git a/gdb/python/python.c b/gdb/python/python.c index a37ed10..d6453e7 100644 --- a/gdb/python/python.c +++ b/gdb/python/python.c @@ -583,6 +583,8 @@ execute_gdb_command (PyObject *self, PyObject *args, PyObject *kw) std::string to_string_res; + scoped_restore preventer = prevent_dont_repeat (); + TRY { struct interp *interp; @@ -612,7 +614,6 @@ execute_gdb_command (PyObject *self, PyObject *args, PyObject *kw) interp = interp_lookup (current_ui, "console"); current_uiout = interp->interp_ui_out (); - scoped_restore preventer = prevent_dont_repeat (); if (to_string) to_string_res = execute_control_commands_to_string (lines.get (), from_tty); diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 093603a..06a1a06 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2018-11-21 Benno Fünfstück <benno.fuenfstueck@gmail.com> + + PR python/23714 + * gdb.python/python.exp: Test command repetition after + gdb.execute. + 2018-11-20 Andrew Burgess <andrew.burgess@embecosm.com> * gdb.opt/inline-break.exp: Add test that info breakpoint output diff --git a/gdb/testsuite/gdb.python/python.exp b/gdb/testsuite/gdb.python/python.exp index 0723507..60423d2 100644 --- a/gdb/testsuite/gdb.python/python.exp +++ b/gdb/testsuite/gdb.python/python.exp @@ -121,6 +121,7 @@ gdb_test "python print (x)" "23" gdb_test "python gdb.execute('echo 2\\necho 3\\\\n\\n')" "23" \ "multi-line execute" +gdb_test " " "23" "gdb.execute does not affect repeat history" # Test post_event. gdb_py_test_multiple "post event insertion" \ |