[Lldb-commits] [PATCH] D141658: [lldb/crashlog] Make interactive mode the new default

Jonas Devlieghere via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Jan 13 10:02:54 PST 2023


JDevlieghere added a comment.

Another nice addition here would be checking if stdout is a tty (`sys.stdout.isatty()`) and continuing to use the textual format if it isn't. A quick experiment seems to show this does the right thing from inside LLDB:

  $ echo -e "script\nimport sys\nsys.stdout.isatty()" | lldb -b
  (lldb) script
  Python Interactive Interpreter. To exit, type 'quit()', 'exit()' or Ctrl-D.
  >>> >>> True
  now exiting InteractiveConsole...
  $ echo -e "script\nimport sys\nsys.stdout.isatty()" | lldb -b | tail
  Python Interactive Interpreter. To exit, type 'quit()', 'exit()' or Ctrl-D.
  
  now exiting InteractiveConsole...
  (lldb) script
  >>> >>> False



================
Comment at: lldb/examples/python/crashlog.py:1302
+        print("Aborting symbolication.")
+        print()
+        option_parser.print_help()
----------------
Spurious print? It doesn't look like we're printing a double newline elsewhere.


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

https://reviews.llvm.org/D141658



More information about the lldb-commits mailing list