mib added inline comments.
================ Comment at: lldb/examples/python/crashlog.py:460-464 + def __init__(self, debugger, path, verbose): + super().__init__(debugger, path, verbose) + # List of DarwinImages sorted by their index. + self.images = list() + ---------------- Why do we need this ? ================ Comment at: lldb/examples/python/crashlog.py:515 def parse_images(self, json_images): - idx = 0 - for json_image in json_images: + for idx, json_image in enumerate(json_images): img_uuid = uuid.UUID(json_image['uuid']) ---------------- What do we use `idx` for ? ================ Comment at: lldb/examples/python/crashlog.py:526-527 self.verbose) + self.images.append(darwin_image) self.crashlog.images.append(darwin_image) ---------------- Seems like we're doing the same things for both `self.images` and `self.crashlog.images` ... In that case, is `self.images` really necessary ? ================ Comment at: lldb/examples/python/scripted_process/crashlog_scripted_process.py:25-33 + if self.load_all_images: + for image in self.crashlog.images: + image.resolve = True + else: + for thread in self.crashlog.threads: + if thread.did_crash(): + for ident in thread.idents: ---------------- Nice! ================ Comment at: lldb/examples/python/symbolication.py:387 + if not self.module and self.section_infos: + name = pathlib.Path(self.path).name + with tempfile.NamedTemporaryFile(suffix='.' + name) as tf: ---------------- Fancy! Can't we just do this and remove the extra import ? ================ Comment at: lldb/examples/python/symbolication.py:402-403 + }) + for symbol in self.symbols.values(): + data['symbols'].append(symbol) + with open(tf.name, 'w') as f: ---------------- This should work, right ? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148172/new/ https://reviews.llvm.org/D148172 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits