This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA 10/11] Use gdbpy_ref in py-prettyprint.c


On 11/19/2016 05:08 PM, Tom Tromey wrote:
>>>>>> "Tom" == Tom Tromey <tom@tromey.com> writes:
> 
> Tom> This changes some spots in py-prettyprint.c to use gdbpy_ref.
> Tom> 2016-11-12  Tom Tromey  <tom@tromey.com>
> Tom> 	* python/py-prettyprint.c (print_stack_unless_memory_error)
> Tom> 	(print_string_repr, print_children): Use gdbpy_ref.
> 
> The buildbot revealed that this patch had some problems.  I had failed
> to notice that push_dummy_python_frame, a subroutine of print_children,
> created a cleanup that had to be run by the caller.  This code path is
> only used by Python 2, which is why I didn't see it in my local testing.
> (I usually build only against Python 3, but curiously the buildbot only
> seems to build against Python 2.)
> 
> This updated patch rewrites push_dummy_python_frame to be a class that
> handles the necessary cleanup in its destructor.
> 
> I've tested this on x86-64 Fedora 24 using both Python 2 and Python 3.
> 
> I think the patch has changed enough to require re-review.

LGTM.

Thanks,
Pedro Alves


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]