[Bug 16443] New: target create doesn't expand ~ on Linux

Bug ID 16443
Summary target create doesn’t expand ~ on Linux
Product lldb
Version unspecified
Hardware PC
OS Linux
Status NEW
Severity normal
Priority P
Component All Bugs
Assignee lldb-dev@cs.uiuc.edu
Reporter sorrels.m@gmail.com
Classification Unclassified

If you start lldb and do a target create on a path with a ~ as part of the
path, it is accepted but when trying to run the process the launch fails.

Here's an example where the test binary is ~/a.out  it is also
/home/matthews/a.out which works fine.  Both paths work fine when used on the
command line (most likely due to shell expansion)

matthews@matthews-linux:~/work/llvm/llvm/build$ bin/lldb
(lldb) version
lldb version 3.4 ( [http://llvm.org/svn/llvm-project/lldb/trunk](http://llvm.org/svn/llvm-project/lldb/trunk) revision 184861)
(lldb) target create ~/a.out
Current executable set to '~/a.out' (x86_64).
(lldb) run
error: process launch failed: Child exec failed.

(lldb) target create /home/matthews/a.out
Current executable set to '/home/matthews/a.out' (x86_64).
(lldb) run
Process 4493 launched: '/home/matthews/a.out' (x86_64)
Hello world!
Function 106
Process 4493 exited with status = 13 (0x0000000d) 
(lldb) 

The target list command shows the full path to the file, but that full path
isn't being used when the process is started with run.

(lldb) target create ~/a.out
Current executable set to '~/a.out' (x86_64).
(lldb) target list
Current targets:
* target #0: /home/matthews/a.out ( arch=x86_64--linux, platform=localhost )

Michael Sartain changed bug 16443

What Removed Added
Status NEW RESOLVED
CC mikesart@valvesoftware.com
Resolution FIXED

Comment # 3 on bug 16443 from Michael Sartain

This is fixed now.