[Lldb-commits] [PATCH] D141658: [lldb/crashlog] Default interactive mode & report progress on image loading

Jonas Devlieghere via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Jan 13 09:07:21 PST 2023


JDevlieghere added a comment.

Switching the default over seems fine. The symbol lookup stuff seems orthogonal to that and maybe should be its own patch?



================
Comment at: lldb/examples/python/crashlog.py:452
 
-        with open(path, 'r', encoding='utf-8') as f:
+        with open(os.path.normpath(os.path.expanduser(path)), 'r', encoding='utf-8') as f:
             buffer = f.read()
----------------
It's not obvious why this is necessary (and we can't rely on open/the OS to do this for us) so let's add a comment. 


================
Comment at: lldb/examples/python/crashlog.py:1106-1108
+    ci.HandleCommand('settings set symbols.enable-background-lookup true', result)
+    if not result.Succeeded():
+        raise InteractiveCrashLogException("couldn't enable background symbol lookup")
----------------
Background lookup is lazy: it's only going to start looking for symbols after we've determined they might be of interest. Right now that means after seeing an imagine in the backtrace. Without anything else, the first backtrace is still going be unsymbolicated (unless we had the symbols already available on the host).

It seems like you're doing the symbol loading explicitly in the C++ implementation of the scripted process, so what's depending on this?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D141658



More information about the lldb-commits mailing list