Add a test case test_image_search_paths() to test lldb's ability to do image search paths
substitutions in order to achieve file mappings.
Modify CommandObjectTarget.cpp to properly set the status of the return object to make
scripting like this:
self.runCmd("target image-search-paths add %s %s" % (os.getcwd(), new_dir))
works.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@124762 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Commands/CommandObjectTarget.cpp b/source/Commands/CommandObjectTarget.cpp
index ecbbb72..01bdfa9 100644
--- a/source/Commands/CommandObjectTarget.cpp
+++ b/source/Commands/CommandObjectTarget.cpp
@@ -92,6 +92,7 @@
target->GetImageSearchPathList().Append (ConstString(from),
ConstString(to),
last_pair); // Notify if this is the last pair
+ result.SetStatus (eReturnStatusSuccessFinishNoResult);
}
else
{
@@ -138,6 +139,7 @@
{
bool notify = true;
target->GetImageSearchPathList().Clear(notify);
+ result.SetStatus (eReturnStatusSuccessFinishNoResult);
}
else
{
@@ -233,6 +235,7 @@
ConstString(to),
insert_idx,
last_pair);
+ result.SetStatus (eReturnStatusSuccessFinishNoResult);
}
else
{
@@ -293,6 +296,7 @@
}
target->GetImageSearchPathList().Dump(&result.GetOutputStream());
+ result.SetStatus (eReturnStatusSuccessFinishResult);
}
else
{
@@ -351,6 +355,8 @@
result.GetOutputStream().Printf("%s\n", transformed.GetCString());
else
result.GetOutputStream().Printf("%s\n", orig.GetCString());
+
+ result.SetStatus (eReturnStatusSuccessFinishResult);
}
else
{