summaryrefslogtreecommitdiffstats
path: root/lldb/source/Commands/CommandObjectTarget.cpp
diff options
context:
space:
mode:
authorJohnny Chen <johnny.chen@apple.com>2011-02-03 00:30:19 +0000
committerJohnny Chen <johnny.chen@apple.com>2011-02-03 00:30:19 +0000
commit7791b3320bcd7aff800fc436b62bceb52b584259 (patch)
tree3b522c70c06479501b9ce6bd2c5971595c45d498 /lldb/source/Commands/CommandObjectTarget.cpp
parent7846c1e99b169ad53ba0fbf778de8f9f8f2c6f4a (diff)
downloadbcm5719-llvm-7791b3320bcd7aff800fc436b62bceb52b584259.tar.gz
bcm5719-llvm-7791b3320bcd7aff800fc436b62bceb52b584259.zip
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. llvm-svn: 124762
Diffstat (limited to 'lldb/source/Commands/CommandObjectTarget.cpp')
-rw-r--r--lldb/source/Commands/CommandObjectTarget.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/lldb/source/Commands/CommandObjectTarget.cpp b/lldb/source/Commands/CommandObjectTarget.cpp
index ecbbb729047..01bdfa9a261 100644
--- a/lldb/source/Commands/CommandObjectTarget.cpp
+++ b/lldb/source/Commands/CommandObjectTarget.cpp
@@ -92,6 +92,7 @@ public:
target->GetImageSearchPathList().Append (ConstString(from),
ConstString(to),
last_pair); // Notify if this is the last pair
+ result.SetStatus (eReturnStatusSuccessFinishNoResult);
}
else
{
@@ -138,6 +139,7 @@ public:
{
bool notify = true;
target->GetImageSearchPathList().Clear(notify);
+ result.SetStatus (eReturnStatusSuccessFinishNoResult);
}
else
{
@@ -233,6 +235,7 @@ public:
ConstString(to),
insert_idx,
last_pair);
+ result.SetStatus (eReturnStatusSuccessFinishNoResult);
}
else
{
@@ -293,6 +296,7 @@ public:
}
target->GetImageSearchPathList().Dump(&result.GetOutputStream());
+ result.SetStatus (eReturnStatusSuccessFinishResult);
}
else
{
@@ -351,6 +355,8 @@ public:
result.GetOutputStream().Printf("%s\n", transformed.GetCString());
else
result.GetOutputStream().Printf("%s\n", orig.GetCString());
+
+ result.SetStatus (eReturnStatusSuccessFinishResult);
}
else
{
OpenPOWER on IntegriCloud