diff options
-rw-r--r-- | lldb/lit/Driver/TestTarget.test | 7 | ||||
-rw-r--r-- | lldb/source/Commands/CommandObjectTarget.cpp | 3 |
2 files changed, 9 insertions, 1 deletions
diff --git a/lldb/lit/Driver/TestTarget.test b/lldb/lit/Driver/TestTarget.test new file mode 100644 index 00000000000..fcf7f776bbc --- /dev/null +++ b/lldb/lit/Driver/TestTarget.test @@ -0,0 +1,7 @@ +# Make sure lldb resolves the target path. +# RUN: mkdir -p %t/foo +# RUN: cd %t/foo +# RUN: %clang %p/Inputs/hello.c -g -o a.out +# RUN: %lldb -b a.out | FileCheck %s + +# CHECK: Current executable set to '{{.*}}foo{{[/\\\\]+}}a.out' diff --git a/lldb/source/Commands/CommandObjectTarget.cpp b/lldb/source/Commands/CommandObjectTarget.cpp index 52a77314e8f..b1879c12904 100644 --- a/lldb/source/Commands/CommandObjectTarget.cpp +++ b/lldb/source/Commands/CommandObjectTarget.cpp @@ -450,7 +450,8 @@ protected: } } else { result.AppendMessageWithFormat( - "Current executable set to '%s' (%s).\n", file_path, + "Current executable set to '%s' (%s).\n", + file_spec.GetPath().c_str(), target_sp->GetArchitecture().GetArchitectureName()); result.SetStatus(eReturnStatusSuccessFinishNoResult); } |