A change in how we search for saved register values unintentionally
allowed volatile registers to be returned up the stack.  That leads
to unexpected/incorrect values provided to the user and we need to
avoid that.
<rdar://problem/12714247>

llvm-svn: 168123
diff --git a/lldb/source/Plugins/Process/Utility/UnwindLLDB.cpp b/lldb/source/Plugins/Process/Utility/UnwindLLDB.cpp
index 587ec88..459a729 100644
--- a/lldb/source/Plugins/Process/Utility/UnwindLLDB.cpp
+++ b/lldb/source/Plugins/Process/Utility/UnwindLLDB.cpp
@@ -272,15 +272,21 @@
     // isn't saved by frame_num, none of the frames lower on the stack will have a useful value.
     if (pc_or_return_address_reg)
     {
-        if (m_frames[frame_num]->reg_ctx_lldb_sp->SavedLocationForRegister (lldb_regnum, regloc))
+        UnwindLLDB::RegisterSearchResult result;
+        result = m_frames[frame_num]->reg_ctx_lldb_sp->SavedLocationForRegister (lldb_regnum, regloc);
+        if (result == UnwindLLDB::RegisterSearchResult::eRegisterFound)
           return true;
         else
           return false;
     }
     while (frame_num >= 0)
     {
-        if (m_frames[frame_num]->reg_ctx_lldb_sp->SavedLocationForRegister (lldb_regnum, regloc))
+        UnwindLLDB::RegisterSearchResult result;
+        result = m_frames[frame_num]->reg_ctx_lldb_sp->SavedLocationForRegister (lldb_regnum, regloc);
+        if (result == UnwindLLDB::RegisterSearchResult::eRegisterFound)
             return true;
+        if (result == UnwindLLDB::RegisterSearchResult::eRegisterIsVolatile)
+            return false;
         frame_num--;
     }
     return false;