Let gdb.execute handle multi-line commands
authorTom Tromey <tom@tromey.com>
Thu, 19 Apr 2018 02:10:43 +0000 (20:10 -0600)
committerTom Tromey <tom@tromey.com>
Fri, 4 May 2018 21:58:09 +0000 (15:58 -0600)
commit56bcdbea2bed27ea83bf0e4fe472ab744b4beaa1
tree8d7b32e4411b6a6f73e51fde7b20f0489d685dc2
parenta913fffbdee21fdd50e8de0596358be425775678
Let gdb.execute handle multi-line commands

This changes the Python API so that gdb.execute can now handle
multi-line commands, like "commands" or "define".

ChangeLog
2018-05-04  Tom Tromey  <tom@tromey.com>

PR python/22730:
* NEWS: Mention gdb.execute change.
* gdbcmd.h (execute_control_command): Don't declare.
* python/python.c (execute_gdb_command): Use read_command_lines_1,
execute_control_commands, execute_control_commands_to_string.
* cli/cli-script.h (execute_control_commands)
(execute_control_commands_to_string): Declare.
(execute_control_command): Add from_tty parameter.
* cli/cli-script.c (execute_control_commands)
(execute_control_commands_to_string): New functions.
(execute_user_command): Use execute_control_commands.
(execute_control_command_1): Add "from_tty" parameter.  Update.
(execute_control_command): Likewise.

testsuite/ChangeLog
2018-05-04  Tom Tromey  <tom@tromey.com>

PR python/22730:
* gdb.python/python.exp: Test multi-line execute.
gdb/ChangeLog
gdb/NEWS
gdb/cli/cli-script.c
gdb/cli/cli-script.h
gdb/gdbcmd.h
gdb/python/python.c
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.python/python.exp