diff options
author | Tom Tromey <tom@tromey.com> | 2016-11-08 15:15:01 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2017-01-10 19:13:48 -0700 |
commit | 396a78b6271c45410fc22c4bc7f8cff75da3d153 (patch) | |
tree | f71459c4a00509ef2319bbf2d4bdc70b6caadf40 | |
parent | a88b13c7e36e8eb0a3bf772d508380682536c0da (diff) | |
download | gdb-396a78b6271c45410fc22c4bc7f8cff75da3d153.zip gdb-396a78b6271c45410fc22c4bc7f8cff75da3d153.tar.gz gdb-396a78b6271c45410fc22c4bc7f8cff75da3d153.tar.bz2 |
Use gdbpy_enter in python_interactive_command
This changes python_interactive_command to use gdbpy_enter.
Previously this function was leaving a dangling cleanup -- this is
sort of ok in a command function, but IMO it's still better to clean
up.
2017-01-10 Tom Tromey <tom@tromey.com>
* python/python.c (python_interactive_command): Use gdbpy_enter.
-rw-r--r-- | gdb/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/python/python.c | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index efd786a..1d650ac 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,9 @@ 2017-01-10 Tom Tromey <tom@tromey.com> + * python/python.c (python_interactive_command): Use gdbpy_enter. + +2017-01-10 Tom Tromey <tom@tromey.com> + * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter, gdbpy_ref. diff --git a/gdb/python/python.c b/gdb/python/python.c index 235477c..71c4063 100644 --- a/gdb/python/python.c +++ b/gdb/python/python.c @@ -321,7 +321,7 @@ python_interactive_command (char *arg, int from_tty) arg = skip_spaces (arg); - ensure_python_env (get_current_arch (), current_language); + gdbpy_enter enter_py (get_current_arch (), current_language); if (arg && *arg) { |