[Lldb-commits] [lldb] r170079 - /lldb/trunk/source/Commands/CommandObjectTarget.cpp

Sean Callanan scallanan at apple.com
Wed Dec 12 17:39:39 PST 2012


Author: spyffe
Date: Wed Dec 12 19:39:39 2012
New Revision: 170079

URL: http://llvm.org/viewvc/llvm-project?rev=170079&view=rev
Log:
Made "target modules add" flush the process to
reset stack frames etc.

<rdar://problem/12842024>

Modified:
    lldb/trunk/source/Commands/CommandObjectTarget.cpp

Modified: lldb/trunk/source/Commands/CommandObjectTarget.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectTarget.cpp?rev=170079&r1=170078&r2=170079&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectTarget.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectTarget.cpp Wed Dec 12 19:39:39 2012
@@ -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();
     }
 





More information about the lldb-commits mailing list