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

Fixed writing debug information with the --cplus flag

parent 08643650
......@@ -185,7 +185,7 @@ class Context(object):
from ParseTreeTransforms import DebugTransform
self.debug_outputwriter = DebugWriter.CythonDebugWriter(
options.output_dir)
debug_transform = [DebugTransform(self, options)]
debug_transform = [DebugTransform(self, options, result)]
else:
debug_transform = []
......
......@@ -1474,13 +1474,14 @@ class DebugTransform(CythonTransform):
to enable debugging.
"""
def __init__(self, context, options):
def __init__(self, context, options, result):
super(DebugTransform, self).__init__(context)
self.visited = set()
# our treebuilder and debug output writer
# (see Cython.Debugger.debug_output.CythonDebugWriter)
self.tb = self.context.debug_outputwriter
self.c_output_file = options.output_file
#self.c_output_file = options.output_file
self.c_output_file = result.c_file
# tells visit_NameNode whether it should register step-into functions
self.register_stepinto = False
......
......@@ -68,4 +68,4 @@ class CythonDebugWriter(object):
kw['pretty_print'] = True
fn = "cython_debug_info_" + self.module_name
et.write(os.path.join(self.output_dir, fn), encoding="UTF-8", **kw)
\ No newline at end of file
et.write(os.path.join(self.output_dir, fn), encoding="UTF-8", **kw)
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