Made "target modules add" flush the process to
reset stack frames etc.
<rdar://problem/12842024>
llvm-svn: 170079
diff --git a/lldb/source/Commands/CommandObjectTarget.cpp b/lldb/source/Commands/CommandObjectTarget.cpp
index 4286d96..028bce5 100644
--- a/lldb/source/Commands/CommandObjectTarget.cpp
+++ b/lldb/source/Commands/CommandObjectTarget.cpp
@@ -2644,6 +2644,8 @@
}
else
{
+ bool flush = false;
+
const size_t argc = args.GetArgumentCount();
if (argc == 0)
{
@@ -2664,6 +2666,8 @@
}
else
{
+ flush = true;
+
StreamString strm;
module_spec.GetUUID().Dump (&strm);
if (module_spec.GetFileSpec())
@@ -2737,6 +2741,10 @@
result.SetStatus (eReturnStatusFailed);
return false;
}
+ else
+ {
+ flush = true;
+ }
result.SetStatus (eReturnStatusSuccessFinishResult);
}
else
@@ -2757,7 +2765,15 @@
}
}
}
+
+ if (flush)
+ {
+ ProcessSP process = target->GetProcessSP();
+ if (process)
+ process->Flush();
+ }
}
+
return result.Succeeded();
}