Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

LLDB setting arguments from external program or shell

Tags:

shell

gdb

lldb

I'm starting to use LLDB as an alternative for GDB. Normally I can invoke debugger for specific target with

$ gdb target
(gdb) set args `python -c 'print "a"*200'`

or alternatively,

$ gdb target
(gdb) set args $(python -c 'print "a"*200')

which means I can invoke Python in shell and use its piped output as arguments in GDB. But I cannot do it in LLDB even LLDB is similar to GDB in many ways.

$ lldb target
(lldb) settings set target.run-args `python -c 'print "a"*200'`

I know it could be done by

$ lldb target -- `python -c 'print "a"*200'`

at the very beginning, however, later I cannot change arguments without quitting LLDB. Any better idea?

Thank you!


1 Answers

just run 'run arg1 arg2' in lldb , solved this problem for me!

like image 114
Princekin Avatar answered Aug 05 '26 20:08

Princekin



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!