From b36c6c0955128242a43b12430606d4ff4d8974a1 Mon Sep 17 00:00:00 2001 From: Sean Callanan Date: Thu, 13 Dec 2012 01:39:39 +0000 Subject: [PATCH] Made "target modules add" flush the process to reset stack frames etc. llvm-svn: 170079 --- lldb/source/Commands/CommandObjectTarget.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) 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 @@ protected: } else { + bool flush = false; + const size_t argc = args.GetArgumentCount(); if (argc == 0) { @@ -2664,6 +2666,8 @@ protected: } else { + flush = true; + StreamString strm; module_spec.GetUUID().Dump (&strm); if (module_spec.GetFileSpec()) @@ -2737,6 +2741,10 @@ protected: result.SetStatus (eReturnStatusFailed); return false; } + else + { + flush = true; + } result.SetStatus (eReturnStatusSuccessFinishResult); } else @@ -2757,7 +2765,15 @@ protected: } } } + + if (flush) + { + ProcessSP process = target->GetProcessSP(); + if (process) + process->Flush(); + } } + return result.Succeeded(); } -- 2.7.4