[lldb-dev] Debugging a running process with lldb

Matthew Gardiner mg11 at csr.com
Wed May 14 03:22:47 PDT 2014


More thoughts:

I've read http://lldb.llvm.org/tutorial.html in more depth now ;-) 
(appreciating that the debugger and the inferior require separate stdins.)
I see there's an option, "--no-stdin", proposing to mitigate the issue I 
found

"If you attach to a process, or launch a process with the "|--no-stdin|" 
option, the command interpreter is always available to enter commands. 
This might be a little disconcerting to gdb users when always have an 
|(lldb)| prompt. This allows you to set a breakpoint, etc without having 
to explicitly interrupt the program you are debugging:

|(lldb) process continue
(lldb) breakpoint set --name stop_here |
"

However, it seems that --no-stdin is not present as a "process launch" 
option anymore, but rather we have "--no-stdio". (Perhaps a typo, 
somewhere?). I tried this option:

(lldb) process launch -s --no-stdio
Process 2344 launching
Process 2344 launched: './forever' (x86_64)
Process 2344 stopped
* thread #1: tid = 2344, 0x0000003675a011f0, name = 'forever', stop 
reason = trace
     frame #0: 0x0000003675a011f0
-> 0x3675a011f0:  movq   %rsp, %rdi
    0x3675a011f3:  callq  0x3675a046e0
    0x3675a011f8:  movq   %rax, %r12
    0x3675a011fb:  movl   0x21eb97(%rip), %eax
(lldb) process continue
Process 2344 resuming

The interpreter prompt still fails to appear, so I still think I'm 
either seeing a bug, or that the documentation is incomplete as to 
describing how to run lldb such that the command interpreter, is always 
available when the inferior is running.

thanks
Matt





Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom
More information can be found at www.csr.com. Keep up to date with CSR on our technical blog, www.csr.com/blog, CSR people blog, www.csr.com/people, YouTube, www.youtube.com/user/CSRplc, Facebook, www.facebook.com/pages/CSR/191038434253534, or follow us on Twitter at www.twitter.com/CSR_plc.
New for 2014, you can now access the wide range of products powered by aptX at www.aptx.com.



More information about the lldb-dev mailing list