[lldb-dev] -o "process launch" and stdio forwarding
Pavel Labath
labath at google.com
Tue Mar 10 03:42:03 PDT 2015
Thanks for the replies.
On Linux, I was testing this with lldb-server. But actually, this does not
work on Mac either. That is why I was unsure and wanted to double check the
expected behavior. You can reproduce it like this:
labath-macbookair ~/ll/lldb/DerivedData $ cat a.cc
#include <iostream>
int main() {
std::string s;
std::cin >> s;
std::cout << "Read: " << s << std::endl;
}
labath-macbookair ~/ll/lldb/DerivedData $ clang++ a.cc
labath-macbookair ~/ll/lldb/DerivedData $ ./a.out
asdf
Read: asdf
labath-macbookair ~/ll/lldb/DerivedData $ lldb/Build/Products/Debug/lldb
./a.out -o "process launch"
(lldb) target create "./a.out"
Current executable set to './a.out' (x86_64).
(lldb) process launch
sadgljhsdlkg
sadlgkjlskd
^CProcess 22694 stopped
* thread #1: tid = 0x434ef4, 0x00007fff8df928ea
libsystem_kernel.dylib`__read_nocancel + 10, queue =
'com.apple.main-thread', stop reason = signal SIGSTOP
Since we seem to agree that this is a bug, I will try to find a solution to
fix it.
cheers,
pl
On 9 March 2015 at 20:18, Greg Clayton <gclayton at apple.com> wrote:
> This is a bug. It works on MacOSX, so this will be something we need to
> fix for Linux. The question is: is this with lldb-server or with the
> ProcessLinux?
>
> Greg
>
> > On Mar 9, 2015, at 6:03 AM, Pavel Labath <labath at google.com> wrote:
> >
> > Hi all,
> >
> > I have noticed that after starting a debug session with -o "process
> launch", the standard input does not get forwarded to the debugged process.
> Is this the indented behavior (not forwarding stdio when debugging with a
> script), or a bug? I would consider it a bug, because it means I can't just
> start the debug session from the command line and wait for the bug to occur
> if I need to give input to the application for the bug to manifest.
> >
> > cheers,
> > pavel
> > _______________________________________________
> > lldb-dev mailing list
> > lldb-dev at cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20150310/c872d7c5/attachment.html>
More information about the lldb-dev
mailing list