[Lldb-commits] [PATCH] D157137: [lldb/crashlog] Skip images with empty path and 0 UUID from loading

Alex Langford via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Aug 4 17:10:49 PDT 2023


bulbazord added inline comments.


================
Comment at: lldb/examples/python/symbolication.py:413-418
                 name = os.path.basename(self.path)
+                if not name:
+                    if self.uuid == uuid.UUID(int=0):
+                        return None
+                    else:
+                        return "error: invalid image path with valid UUID (%s) " % uuid_str
----------------
It looks like `name` is only used below on line 435 to create `obj_file`, so you could move that computation down there and check the validity of `self.path` instead. Does that work? Or am I missing something?

Also, it seems like you might want to do this chunk of work at the beginning of the function to make sure you have a valid image before you try to process it? Is there an edge case where we'd still want to process a module with a UUID of 0 and no path?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D157137



More information about the lldb-commits mailing list