[Bug 51458] New: 'process launch -s' uses gdb-remote connection only if target was created before connecting

Bug ID 51458
Summary ‘process launch -s’ uses gdb-remote connection only if target was created before connecting
Product lldb
Version unspecified
Hardware PC
OS Linux
Status NEW
Severity normal
Priority P
Component All Bugs
Assignee lldb-dev@lists.llvm.org
Reporter mgorny@gentoo.org
CC jdevlieghere@apple.com, llvm-bugs@lists.llvm.org

Basically:

$ ./bin/lldb
(lldb) target create a.out 
Current executable set to '/home/mgorny/git/llvm-project/build/a.out' (x86_64).
(lldb) gdb-remote 1234
(lldb) process launch
Process 2070224 launched: '/home/mgorny/git/llvm-project/build/a.out' (x86_64)
Process 2070224 exited with status = 0 (0x00000000) 

-> uses remote lldb-server to start the process

but:

$ ./bin/lldb
(lldb) gdb-remote 1234
(lldb) target create a.out
Current executable set to '/home/mgorny/git/llvm-project/build/a.out' (x86_64).
(lldb) process launch
Process 2075735 launched: '/home/mgorny/git/llvm-project/build/a.out' (x86_64)
Process 2075735 exited with status = 0 (0x00000000) 

-> starts a new lldb-server