From: Mark Florisson Date: Tue, 16 Nov 2010 12:45:45 +0000 (+0100) Subject: Skip local variables that are optimized out for 'cy exec' (in case user didn't build... X-Git-Tag: 0.14.beta0~1^2~17 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=8bc85fe298625d958dbe7ae4413abc370382f54f;p=cython.git Skip local variables that are optimized out for 'cy exec' (in case user didn't build with Cython's build_ext) --- diff --git a/Cython/Debugger/libcython.py b/Cython/Debugger/libcython.py index a781bcf0..32f26b76 100644 --- a/Cython/Debugger/libcython.py +++ b/Cython/Debugger/libcython.py @@ -1141,6 +1141,14 @@ class CyExec(CythonCommand, libpython.PyExec): if (cyvar.type == PythonObject and self.is_initialized(cython_func, name)): + try: + val = gdb.parse_and_eval(cyvar.cname) + except RuntimeError: + continue + else: + if val.is_optimized_out: + continue + pystringp = executor.alloc_pystring(name) code = ''' PyDict_SetItem(