Commit 0eb42da3 authored by Mark Florisson's avatar Mark Florisson

Locate C source code properly and lex C source code in listings

parent fd809921
...@@ -256,7 +256,7 @@ class CythonBase(object): ...@@ -256,7 +256,7 @@ class CythonBase(object):
filename = None filename = None
lineno = 0 lineno = 0
else: else:
filename = symbol_and_line_obj.symtab.filename filename = symbol_and_line_obj.symtab.fullname()
lineno = symbol_and_line_obj.line lineno = symbol_and_line_obj.line
if pygments: if pygments:
lexer = pygments.lexers.CLexer(stripall=False) lexer = pygments.lexers.CLexer(stripall=False)
...@@ -1033,7 +1033,7 @@ class CyList(CythonCommand): ...@@ -1033,7 +1033,7 @@ class CyList(CythonCommand):
command_class = gdb.COMMAND_FILES command_class = gdb.COMMAND_FILES
completer_class = gdb.COMPLETE_NONE completer_class = gdb.COMPLETE_NONE
@dispatch_on_frame(c_command='list') # @dispatch_on_frame(c_command='list')
def invoke(self, _, from_tty): def invoke(self, _, from_tty):
sd, lineno = self.get_source_desc() sd, lineno = self.get_source_desc()
source = sd.get_source(lineno - 5, lineno + 5, mark_line=lineno, source = sd.get_source(lineno - 5, lineno + 5, mark_line=lineno,
......
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