Commit 8bc85fe2 authored by Mark Florisson's avatar Mark Florisson

Skip local variables that are optimized out for 'cy exec' (in case user didn't...

Skip local variables that are optimized out for 'cy exec' (in case user didn't build with Cython's build_ext)
parent 415e7ea3
...@@ -1141,6 +1141,14 @@ class CyExec(CythonCommand, libpython.PyExec): ...@@ -1141,6 +1141,14 @@ class CyExec(CythonCommand, libpython.PyExec):
if (cyvar.type == PythonObject and if (cyvar.type == PythonObject and
self.is_initialized(cython_func, name)): 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) pystringp = executor.alloc_pystring(name)
code = ''' code = '''
PyDict_SetItem( PyDict_SetItem(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment