"""find_pc_line (pc) -> Symtab_and_line.
Return the gdb.Symtab_and_line object corresponding to the pc value."""
return current_progspace().find_pc_line(pc)
+
+try:
+ from pygments import formatters, lexers, highlight
+ def colorize(filename, contents):
+ # Don't want any errors.
+ try:
+ lexer = lexers.get_lexer_for_filename(filename)
+ formatter = formatters.TerminalFormatter()
+ return highlight(contents, lexer, formatter)
+ except:
+ return None
+except:
+ def colorize(filename, contents):
+ return None