[Lldb-commits] [lldb] 66009a1 - [crashlog] Remove commented out code (NFC)

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Mon Nov 2 19:47:11 PST 2020


Author: Jonas Devlieghere
Date: 2020-11-02T19:46:53-08:00
New Revision: 66009a19e5ae20660efe4a70dce839a90b306dcf

URL: https://github.com/llvm/llvm-project/commit/66009a19e5ae20660efe4a70dce839a90b306dcf
DIFF: https://github.com/llvm/llvm-project/commit/66009a19e5ae20660efe4a70dce839a90b306dcf.diff

LOG: [crashlog] Remove commented out code (NFC)

Remove commented out code and print statements.

Added: 
    

Modified: 
    lldb/examples/python/crashlog.py

Removed: 
    


################################################################################
diff  --git a/lldb/examples/python/crashlog.py b/lldb/examples/python/crashlog.py
index 0819ae8fe1f66..85387756ce181 100755
--- a/lldb/examples/python/crashlog.py
+++ b/lldb/examples/python/crashlog.py
@@ -34,7 +34,6 @@
 import os
 import platform
 import plistlib
-import pprint  # pp = pprint.PrettyPrinter(indent=4); pp.pprint(command_args)
 import re
 import shlex
 import string
@@ -141,7 +140,6 @@ def dump_symbolicated(self, crash_log, options):
                     return
 
             print("%s" % self)
-            #prev_frame_index = -1
             display_frame_idx = -1
             for frame_idx, frame in enumerate(self.frames):
                 disassemble = (
@@ -395,7 +393,6 @@ def __init__(self, path, verbose):
                     if len(self.info_lines) > 0 and len(self.info_lines[-1]):
                         self.info_lines.append(line)
                 parse_mode = CrashLogParseMode.NORMAL
-                # print 'CrashLogParseMode.NORMAL'
             elif parse_mode == CrashLogParseMode.NORMAL:
                 if line.startswith('Process:'):
                     (self.process_name, pid_with_brackets) = line[
@@ -525,10 +522,7 @@ def __init__(self, path, verbose):
                 reg_values = re.findall(
                     '([a-zA-Z0-9]+: 0[Xx][0-9a-fA-F]+) *', stripped_line)
                 for reg_value in reg_values:
-                    # print 'reg_value = "%s"' % reg_value
                     (reg, value) = reg_value.split(': ')
-                    # print 'reg = "%s"' % reg
-                    # print 'value = "%s"' % value
                     thread.registers[reg.strip()] = int(value, 0)
             elif parse_mode == CrashLogParseMode.SYSTEM:
                 self.system_profile.append(line)
@@ -561,7 +555,6 @@ def find_image_with_identifier(self, identifier):
         return None
 
     def create_target(self):
-        # print 'crashlog.create_target()...'
         if self.target is None:
             self.target = symbolication.Symbolicator.create_target(self)
             if self.target:
@@ -709,7 +702,6 @@ def interactive_crashlogs(options, args):
 
     crash_logs = list()
     for crash_log_file in crash_log_files:
-        # print 'crash_log_file = "%s"' % crash_log_file
         crash_log = CrashLog(crash_log_file, options.verbose)
         if crash_log.error:
             print(crash_log.error)
@@ -898,7 +890,6 @@ def SymbolicateCrashLog(crash_log, options):
             if err:
                 print(err)
             else:
-                # print 'loaded %s' % image
                 loaded_images.append(image)
 
     if crash_log.backtraces:


        


More information about the lldb-commits mailing list