Use gdbpy_enter in python_interactive_command
authorTom Tromey <tom@tromey.com>
Tue, 8 Nov 2016 22:15:01 +0000 (15:15 -0700)
committerTom Tromey <tom@tromey.com>
Wed, 11 Jan 2017 02:13:48 +0000 (19:13 -0700)
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.

gdb/ChangeLog
gdb/python/python.c

index efd786a71b300086b237c305c461003ff37cc21b..1d650ac7129fa8414638a2bf9318ddd846d6823f 100644 (file)
@@ -1,3 +1,7 @@
+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,
index 235477c9f618e1cf17ac244b028e55ece47a2a37..71c406352205dc8785f8460503351ee34097c39e 100644 (file)
@@ -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)
     {
This page took 0.027475 seconds and 4 git commands to generate.