llvm-project/lldb
Lawrence D'Anna e2a6c08bbc [lldb] fix --source-quietly
Jim says:

lldb has a -Q or --source-quietly option, which supposedly does:

    --source-quietly     Tells the debugger to execute this one-line lldb command before any file has been loaded.

That seems like a weird description, since we don't generally use source for one line entries, but anyway, let's try it:

    > $LLDB_LLVM/clean-mono/build/Debug/bin/lldb -Q "script print('I should be quiet')" a.out -O "script print('I should be before')" -o "script print('I should be after')"
    (lldb) script print('I should be before')
    I should be before
    (lldb) target create "script print('I should be quiet')"
    error: unable to find executable for 'script print('I should be quiet')'

That was weird.  The first real -O gets sourced but not quietly, then the argument to the -Q gets treated as the target.

    > $LLDB_LLVM/clean-mono/build/Debug/bin/lldb -Q a.out -O "script print('I should be before')" -o "script print('I should be after')"
    (lldb) script print('I should be before')
    I should be before
    (lldb) target create "a.out"
    Current executable set to '/tmp/a.out' (x86_64).
    (lldb) script print('I should be after')
    I should be after

Well, that's a little better, but the -Q option seems to have done nothing.

---

This fixes the description of --source-quietly, as well as causing it
to actually suppress echoing while executing the initialization
commands.

Reviewed By: jingham

Differential Revision: https://reviews.llvm.org/D112988
2021-11-02 11:01:55 -07:00
..
bindings [lldb] Make SBType::IsTypeComplete more consistent by forcing the loading of definitions 2021-10-30 13:28:27 +02:00
cmake Use `GNUInstallDirs` to support custom installation dirs. -- LLVM 2021-11-02 10:23:30 -04:00
docs [lldb] fix --source-quietly 2021-11-02 11:01:55 -07:00
examples [formatters] Add a libstdcpp formatter for multiset and unify tests across stdlibs 2021-10-30 15:07:23 -07:00
include/lldb [lldb] Remove ConstString from TypeSystem and REPL plugin names 2021-11-02 16:13:52 +01:00
packages/Python [lldb-vscode] Fix coredump load source mapping for first file 2021-11-01 10:47:42 -05:00
resources [lldb] Remove stale LLDB-Info.plist 2021-01-08 10:12:16 -08:00
scripts Prefer /usr/bin/env xxx over /usr/bin/xxx where xxx = perl, python, awk 2021-02-25 11:32:27 +01:00
source [lldb] Remove ConstString from TypeSystem and REPL plugin names 2021-11-02 16:13:52 +01:00
test [lldb] fix --source-quietly 2021-11-02 11:01:55 -07:00
third_party/Python/module [LLDB] Change pexpect timeout to 30 to 60 2021-08-02 06:34:11 +05:00
tools [lldb] fix --source-quietly 2021-11-02 11:01:55 -07:00
unittests [lldb] Fix a use-after-free in FindFileTest.cpp 2021-11-02 12:39:26 +01:00
utils [lldb] Match test dependencies name to other LLVM projects. 2021-05-21 00:10:27 -07:00
.clang-format
.clang-tidy [lldb] Replace default bodies of special member functions with = default; 2021-07-02 11:31:16 -07:00
.gitignore
CMakeLists.txt [lldb/lua] Supplement Lua bindings for lldb module 2021-10-12 22:10:21 +08:00
CODE_OWNERS.txt
LICENSE.TXT
use_lldb_suite_root.py