[Lldb-commits] [PATCH] D61737: [lldb] add -ex CLI option as alias to --one-line
Jan Kratochvil via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Fri May 10 11:42:20 PDT 2019
jankratochvil added a comment.
In D61737#1498297 <https://reviews.llvm.org/D61737#1498297>, @jingham wrote:
> If you have simple gdb startup commands then translating them into the lldb way should be straightforward, and the burden of learning how lldb works from the command line for these purposes is just not that great and if you are going to use lldb you should just buck up and browse "lldb --help" a bit... If you have complex gdb command lines, you are going to have to rework them anyway to deal with other differences between lldb and gdb. I don't think mixing the two would add enough value to be worth the uglification.
I use GDB to debug LLDB like: `gdb -q -ex 'set break pend on' -ex 'set build-id-verbose 0' -ex 'set env ASAN_OPTIONS=alloc_dealloc_mismatch=0:detect_leaks=0' -ex 'set env LD_PRELOAD=/lib64/libasan.so.5' -ex "set env PYTHONPATH=$PWD/lib64/python2.7/site-packages:$PWD/lib64/python2.7/site-packages/lldb" -ex "set env LD_LIBRARY_PATH=$PWD/lib:$PWD/lib64/python2.7/site-packages/lldb" -iex 'set breakpoint pending on' -iex 'b __sanitizer::internal__exit' -ex 'b lldb_private::Module::ReportError' -ex 'b lldb_private::Host::SystemLog' -ex r -ex 'set scheduler-locking on' --args python ../llvm-git/tools/lldb/test/dotest.py --executable $PWD/bin/lldb -C $PWD/bin/clang --log-success -t ../llvm-git/tools/lldb/packages/Python/lldbsuite/test/ -f HelloWatchpointTestCase.test_hello_watchpoint_using_watchpoint_set_dwarf`
I would like to switch one day from GDB to LLDB but so far I soon face some issue why I cannot use LLDB yet. It is usually some Fedora Linux port compatibility problem. It would be nice to just `s/gdb/lldb/` for the test without rewriting all the parameters only to find out there is still something remaining to port in LLDB to make the switch possible.
IIUC we should make a new GDB-like driver using `liblldb.so`+`SB API` for both GDB commandline parameters and GDB commands compatibility. For the GDB commands interpreter there could be a fallback to forward unknown commands to LLDB interpreter.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D61737/new/
https://reviews.llvm.org/D61737
More information about the lldb-commits
mailing list