Discussion:
[Bug python/22730] New: can't execute multi-line commands with gdb.execute
tromey at sourceware dot org
2018-01-18 21:21:44 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=22730

Bug ID: 22730
Summary: can't execute multi-line commands with gdb.execute
Product: gdb
Version: HEAD
Status: NEW
Severity: normal
Priority: P2
Component: python
Assignee: unassigned at sourceware dot org
Reporter: tromey at sourceware dot org
Target Milestone: ---

See
https://stackoverflow.com/questions/48312903/how-to-set-or-modify-breakpoint-commands-in-a-gdb-python-script

There's no way to execute a multi-line command using gdb.execute;
but there should be.
--
You are receiving this mail because:
You are on the CC list for the bug.
tromey at sourceware dot org
2018-04-19 02:55:36 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=22730

Tom Tromey <tromey at sourceware dot org> changed:

What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at sourceware dot org |tromey at sourceware dot org

--- Comment #1 from Tom Tromey <tromey at sourceware dot org> ---
I have a patch for this.
--
You are receiving this mail because:
You are on the CC list for the bug.
cvs-commit at gcc dot gnu.org
2018-05-04 22:05:42 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=22730

--- Comment #2 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Tom Tromey <***@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=56bcdbea2bed27ea83bf0e4fe472ab744b4beaa1

commit 56bcdbea2bed27ea83bf0e4fe472ab744b4beaa1
Author: Tom Tromey <***@tromey.com>
Date: Wed Apr 18 20:10:43 2018 -0600

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 <***@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 <***@tromey.com>

PR python/22730:
* gdb.python/python.exp: Test multi-line execute.
--
You are receiving this mail because:
You are on the CC list for the bug.
tromey at sourceware dot org
2018-05-04 22:06:52 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=22730

Tom Tromey <tromey at sourceware dot org> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
Target Milestone|--- |8.2

--- Comment #3 from Tom Tromey <tromey at sourceware dot org> ---
Fixed.
--
You are receiving this mail because:
You are on the CC list for the bug.
Loading...