[Lldb-commits] [PATCH] D65611: [Driver] Expand the executable path in the target create output
Jonas Devlieghere via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Tue Aug 6 09:42:23 PDT 2019
JDevlieghere updated this revision to Diff 213640.
JDevlieghere retitled this revision from "[Driver] Expand the target in the driver." to "[Driver] Expand the executable path in the target create output".
JDevlieghere edited the summary of this revision.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D65611/new/
https://reviews.llvm.org/D65611
Files:
lldb/lit/Driver/TestTarget.test
lldb/source/Commands/CommandObjectTarget.cpp
Index: lldb/source/Commands/CommandObjectTarget.cpp
===================================================================
--- lldb/source/Commands/CommandObjectTarget.cpp
+++ lldb/source/Commands/CommandObjectTarget.cpp
@@ -450,7 +450,8 @@
}
} 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);
}
@@ -2631,7 +2632,7 @@
if (!module_spec.GetArchitecture().IsValid())
module_spec.GetArchitecture() = target->GetArchitecture();
Status error;
- ModuleSP module_sp(target->GetOrCreateModule(module_spec,
+ ModuleSP module_sp(target->GetOrCreateModule(module_spec,
true /* notify */, &error));
if (!module_sp) {
const char *error_cstr = error.AsCString();
@@ -4747,7 +4748,7 @@
new_hook_sp->SetThreadSpecifier(thread_spec);
}
-
+
new_hook_sp->SetAutoContinue(m_options.m_auto_continue);
if (m_options.m_use_one_liner) {
// Use one-liners.
Index: lldb/lit/Driver/TestTarget.test
===================================================================
--- /dev/null
+++ 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'
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D65611.213640.patch
Type: text/x-patch
Size: 1753 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20190806/fc33e853/attachment.bin>
More information about the lldb-commits
mailing list