[Lldb-commits] [PATCH] D148172: [lldb] Use ObjectFileJSON to create modules for interactive crashlogs

Med Ismail Bennani via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Apr 13 10:46:01 PDT 2023


mib added inline comments.


================
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'])
----------------
mib wrote:
> JDevlieghere wrote:
> > mib wrote:
> > > What do we use `idx` for ?
> > You're right, this isn't necessary anymore.
> I'm really not a big fan of having very similar image lists ... may be we could use the from the crashlog object and skip the first entry (since we know it's the main executable).
> What do you think ?
Otherwise, we could hoist the main executable image from the image list and handle it separately.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D148172/new/

https://reviews.llvm.org/D148172



More information about the lldb-commits mailing list