mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-07-29 12:53:43 +08:00
Make command-repeat work after gdb.execute
Since commit 56bcdbea2bed ("Let gdb.execute handle multi-line commands") command repetition after using the `gdb.execute` Python function fails (the previous command is not repeated anymore). This happens because read_command_lines_1 sets dont_repeat, but the call to prevent_dont_repeat in execute_gdb_command is later. The fix is to move the call to prevent_dont_repeat to the beginning of the function. Tested on my laptop (ArchLinux-x86_64). gdb/ChangeLog: PR python/23714 * gdb/python/python.c (execute_gdb_command): Call prevent_dont_repeat earlier to avoid affecting dont_repeat. gdb/testuite/ChangeLog: PR python/23714 * gdb.python/python.exp: Test command repetition after gdb.execute.
This commit is contained in:

committed by
Pedro Alves

parent
ca94519e70
commit
1c97054b87
@ -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" \
|
||||
|
Reference in New Issue
Block a user