Reverting r237460 to fix test failures introduced on OSX & Linux

TestExitDuringStep.py
TestNumThreads.py
TestThreadExit.py
TestThreadStates.py

llvm-svn: 237479
diff --git a/lldb/source/API/SBTarget.cpp b/lldb/source/API/SBTarget.cpp
index 6f56c08..b7e53d7 100644
--- a/lldb/source/API/SBTarget.cpp
+++ b/lldb/source/API/SBTarget.cpp
@@ -808,8 +808,7 @@
         const LazyBool skip_prologue = eLazyBoolCalculate;
         const bool internal = false;
         const bool hardware = false;
-        const LazyBool move_to_nearest_code = eLazyBoolCalculate;
-        *sb_bp = target_sp->CreateBreakpoint (NULL, *sb_file_spec, line, check_inlines, skip_prologue, internal, hardware, move_to_nearest_code);
+        *sb_bp = target_sp->CreateBreakpoint (NULL, *sb_file_spec, line, check_inlines, skip_prologue, internal, hardware);
     }
 
     if (log)
@@ -1056,7 +1055,6 @@
         RegularExpression regexp(source_regex);
         FileSpecList source_file_spec_list;
         const bool hardware = false;
-        const LazyBool move_to_nearest_code = eLazyBoolCalculate;
         source_file_spec_list.Append (source_file.ref());
 
         if (module_name && module_name[0])
@@ -1064,11 +1062,11 @@
             FileSpecList module_spec_list;
             module_spec_list.Append (FileSpec (module_name, false));
 
-            *sb_bp = target_sp->CreateSourceRegexBreakpoint (&module_spec_list, &source_file_spec_list, regexp, false, hardware, move_to_nearest_code);
+            *sb_bp = target_sp->CreateSourceRegexBreakpoint (&module_spec_list, &source_file_spec_list, regexp, false, hardware);
         }
         else
         {
-            *sb_bp = target_sp->CreateSourceRegexBreakpoint (NULL, &source_file_spec_list, regexp, false, hardware, move_to_nearest_code);
+            *sb_bp = target_sp->CreateSourceRegexBreakpoint (NULL, &source_file_spec_list, regexp, false, hardware);
         }
     }
 
@@ -1097,9 +1095,8 @@
     {
         Mutex::Locker api_locker (target_sp->GetAPIMutex());
         const bool hardware = false;
-        const LazyBool move_to_nearest_code = eLazyBoolCalculate;
         RegularExpression regexp(source_regex);
-        *sb_bp = target_sp->CreateSourceRegexBreakpoint (module_list.get(), source_file_list.get(), regexp, false, hardware, move_to_nearest_code);
+        *sb_bp = target_sp->CreateSourceRegexBreakpoint (module_list.get(), source_file_list.get(), regexp, false, hardware);
     }
 
     if (log)
diff --git a/lldb/source/Breakpoint/BreakpointResolverFileLine.cpp b/lldb/source/Breakpoint/BreakpointResolverFileLine.cpp
index 408998e..3b93067 100644
--- a/lldb/source/Breakpoint/BreakpointResolverFileLine.cpp
+++ b/lldb/source/Breakpoint/BreakpointResolverFileLine.cpp
@@ -32,15 +32,13 @@
     const FileSpec &file_spec,
     uint32_t line_no,
     bool check_inlines,
-    bool skip_prologue,
-    bool exact_match
+    bool skip_prologue
 ) :
     BreakpointResolver (bkpt, BreakpointResolver::FileLineResolver),
     m_file_spec (file_spec),
     m_line_number (line_no),
     m_inlines (check_inlines),
-    m_skip_prologue(skip_prologue),
-    m_exact_match(exact_match)
+    m_skip_prologue(skip_prologue)
 {
 }
 
@@ -80,7 +78,7 @@
         if (cu_sp)
         {
             if (filter.CompUnitPasses(*cu_sp))
-                cu_sp->ResolveSymbolContext (m_file_spec, m_line_number, m_inlines, m_exact_match, eSymbolContextEverything, sc_list);
+                cu_sp->ResolveSymbolContext (m_file_spec, m_line_number, m_inlines, false, eSymbolContextEverything, sc_list);
         }
     }
     StreamString s;
@@ -102,7 +100,7 @@
 void
 BreakpointResolverFileLine::GetDescription (Stream *s)
 {
-    s->Printf ("file = '%s', line = %u, exact_match = %d", m_file_spec.GetPath().c_str(), m_line_number, m_exact_match);
+    s->Printf ("file = '%s', line = %u", m_file_spec.GetPath().c_str(), m_line_number);
 }
 
 void
@@ -118,8 +116,7 @@
                                                                      m_file_spec,
                                                                      m_line_number,
                                                                      m_inlines,
-                                                                     m_skip_prologue,
-                                                                     m_exact_match));
+                                                                     m_skip_prologue));
 
     return ret_sp;
 }
diff --git a/lldb/source/Breakpoint/BreakpointResolverFileRegex.cpp b/lldb/source/Breakpoint/BreakpointResolverFileRegex.cpp
index e7bce05..046c268 100644
--- a/lldb/source/Breakpoint/BreakpointResolverFileRegex.cpp
+++ b/lldb/source/Breakpoint/BreakpointResolverFileRegex.cpp
@@ -29,12 +29,10 @@
 BreakpointResolverFileRegex::BreakpointResolverFileRegex
 (
     Breakpoint *bkpt,
-    RegularExpression &regex,
-    bool exact_match
+    RegularExpression &regex
 ) :
     BreakpointResolver (bkpt, BreakpointResolver::FileLineResolver),
-    m_regex (regex),
-    m_exact_match (exact_match)
+    m_regex (regex)
 {
 }
 
@@ -66,8 +64,9 @@
     {
         SymbolContextList sc_list;
         const bool search_inlines = false;
+        const bool exact = false;
         
-        cu->ResolveSymbolContext (cu_file_spec, line_matches[i], search_inlines, m_exact_match, eSymbolContextEverything, sc_list);
+        cu->ResolveSymbolContext (cu_file_spec, line_matches[i], search_inlines, exact, eSymbolContextEverything, sc_list);
         const bool skip_prologue = true;
         
         BreakpointResolver::SetSCMatchesByLine (filter, sc_list, skip_prologue, m_regex.GetText());
@@ -86,7 +85,7 @@
 void
 BreakpointResolverFileRegex::GetDescription (Stream *s)
 {
-    s->Printf ("source regex = \"%s\", exact_match = %d", m_regex.GetText(), m_exact_match);
+    s->Printf ("source regex = \"%s\"", m_regex.GetText());
 }
 
 void
@@ -98,7 +97,7 @@
 lldb::BreakpointResolverSP
 BreakpointResolverFileRegex::CopyForBreakpoint (Breakpoint &breakpoint)
 {
-    lldb::BreakpointResolverSP ret_sp(new BreakpointResolverFileRegex(&breakpoint, m_regex, m_exact_match));
+    lldb::BreakpointResolverSP ret_sp(new BreakpointResolverFileRegex(&breakpoint, m_regex));
     return ret_sp;
 }
 
diff --git a/lldb/source/Commands/CommandObjectBreakpoint.cpp b/lldb/source/Commands/CommandObjectBreakpoint.cpp
index 9fdea4e..8bd3861 100644
--- a/lldb/source/Commands/CommandObjectBreakpoint.cpp
+++ b/lldb/source/Commands/CommandObjectBreakpoint.cpp
@@ -115,8 +115,7 @@
             m_exception_language (eLanguageTypeUnknown),
             m_skip_prologue (eLazyBoolCalculate),
             m_one_shot (false),
-            m_all_files (false),
-            m_move_to_nearest_code (eLazyBoolCalculate)
+            m_all_files (false)
         {
         }
 
@@ -250,22 +249,6 @@
                         error.SetErrorStringWithFormat ("invalid line number: %s.", option_arg);
                     break;
                 }
-
-                case 'm':
-                {
-                    bool success;
-                    bool value;
-                    value = Args::StringToBoolean (option_arg, true, &success);
-                    if (value)
-                        m_move_to_nearest_code = eLazyBoolYes;
-                    else
-                        m_move_to_nearest_code = eLazyBoolNo;
-                        
-                    if (!success)
-                        error.SetErrorStringWithFormat ("Invalid boolean value for move-to-nearest-code option: '%s'", option_arg);
-                    break;
-                }
-
                 case 'M':
                     m_func_names.push_back (option_arg);
                     m_func_name_type_mask |= eFunctionNameTypeMethod;
@@ -378,7 +361,6 @@
             m_breakpoint_names.clear();
             m_all_files = false;
             m_exception_extra_args.Clear();
-            m_move_to_nearest_code = eLazyBoolCalculate;
         }
     
         const OptionDefinition*
@@ -418,7 +400,6 @@
         bool m_use_dummy;
         bool m_all_files;
         Args m_exception_extra_args;
-        LazyBool m_move_to_nearest_code;
 
     };
 
@@ -496,8 +477,7 @@
                                                    check_inlines,
                                                    m_options.m_skip_prologue,
                                                    internal,
-                                                   m_options.m_hardware,
-                                                   m_options.m_move_to_nearest_code).get();
+                                                   m_options.m_hardware).get();
                 }
                 break;
 
@@ -578,8 +558,7 @@
                                                               &(m_options.m_filenames),
                                                               regexp,
                                                               internal,
-                                                              m_options.m_hardware,
-                                                              m_options.m_move_to_nearest_code).get();
+                                                              m_options.m_hardware).get();
                 }
                 break;
             case eSetTypeException:
@@ -710,7 +689,6 @@
 #define LLDB_OPT_FILE ( LLDB_OPT_SET_FROM_TO(1, 9) & ~LLDB_OPT_SET_2 )
 #define LLDB_OPT_NOT_10 ( LLDB_OPT_SET_FROM_TO(1, 10) & ~LLDB_OPT_SET_10 )
 #define LLDB_OPT_SKIP_PROLOGUE ( LLDB_OPT_SET_1 | LLDB_OPT_SET_FROM_TO(3,8) )
-#define LLDB_OPT_MOVE_TO_NEAREST_CODE ( LLDB_OPT_SET_1 | LLDB_OPT_SET_9 )
 
 OptionDefinition
 CommandObjectBreakpointSet::CommandOptions::g_option_table[] =
@@ -811,9 +789,6 @@
     { LLDB_OPT_SET_ALL, false, "breakpoint-name", 'N', OptionParser::eRequiredArgument, NULL, NULL, 0, eArgTypeBreakpointName,
         "Adds this to the list of names for this breakopint."},
 
-    { LLDB_OPT_MOVE_TO_NEAREST_CODE, false, "move-to-nearest-code", 'm', OptionParser::eRequiredArgument, NULL, NULL, 0, eArgTypeBoolean,
-        "Move breakpoints to nearest code. If not set the target.move-to-nearest-code setting is used." },
-
     { 0, false, NULL, 0, 0, NULL, NULL, 0, eArgTypeNone, NULL }
 };
 
diff --git a/lldb/source/Core/IOHandler.cpp b/lldb/source/Core/IOHandler.cpp
index 77e9202..81afae5 100644
--- a/lldb/source/Core/IOHandler.cpp
+++ b/lldb/source/Core/IOHandler.cpp
@@ -5326,8 +5326,7 @@
                                                                                       eLazyBoolCalculate,        // Check inlines using global setting
                                                                                       eLazyBoolCalculate,        // Skip prologue using global setting,
                                                                                       false,                     // internal
-                                                                                      false,                     // request_hardware
-                                                                                      eLazyBoolCalculate);       // move_to_nearest_code
+                                                                                      false);                    // request_hardware
                         // Make breakpoint one shot
                         bp_sp->GetOptions()->SetOneShot(true);
                         exe_ctx.GetProcessRef().Resume();
@@ -5362,8 +5361,7 @@
                                                                                       eLazyBoolCalculate,        // Check inlines using global setting
                                                                                       eLazyBoolCalculate,        // Skip prologue using global setting,
                                                                                       false,                     // internal
-                                                                                      false,                     // request_hardware
-                                                                                      eLazyBoolCalculate);       // move_to_nearest_code
+                                                                                      false);                    // request_hardware
                     }
                 }
                 else if (m_selected_line < GetNumDisassemblyLines())
diff --git a/lldb/source/Target/Target.cpp b/lldb/source/Target/Target.cpp
index f8d547d..0827f01 100644
--- a/lldb/source/Target/Target.cpp
+++ b/lldb/source/Target/Target.cpp
@@ -273,13 +273,10 @@
                                      const FileSpecList *source_file_spec_list,
                                      RegularExpression &source_regex,
                                      bool internal,
-                                     bool hardware,
-                                     LazyBool move_to_nearest_code)
+                                     bool hardware)
 {
     SearchFilterSP filter_sp(GetSearchFilterForModuleAndCUList (containingModules, source_file_spec_list));
-    if (move_to_nearest_code == eLazyBoolCalculate)
-        move_to_nearest_code = GetMoveToNearestCode() ? eLazyBoolYes : eLazyBoolNo;
-    BreakpointResolverSP resolver_sp(new BreakpointResolverFileRegex (NULL, source_regex, !static_cast<bool>(move_to_nearest_code)));
+    BreakpointResolverSP resolver_sp(new BreakpointResolverFileRegex (NULL, source_regex));
     return CreateBreakpoint (filter_sp, resolver_sp, internal, hardware, true);
 }
 
@@ -291,8 +288,7 @@
                           LazyBool check_inlines,
                           LazyBool skip_prologue,
                           bool internal,
-                          bool hardware,
-                          LazyBool move_to_nearest_code)
+                          bool hardware)
 {
     if (check_inlines == eLazyBoolCalculate)
     {
@@ -329,15 +325,12 @@
     }
     if (skip_prologue == eLazyBoolCalculate)
         skip_prologue = GetSkipPrologue() ? eLazyBoolYes : eLazyBoolNo;
-    if (move_to_nearest_code == eLazyBoolCalculate)
-        move_to_nearest_code = GetMoveToNearestCode() ? eLazyBoolYes : eLazyBoolNo;
 
     BreakpointResolverSP resolver_sp(new BreakpointResolverFileLine (NULL,
                                                                      file,
                                                                      line_no,
                                                                      check_inlines,
-                                                                     skip_prologue,
-                                                                     !static_cast<bool>(move_to_nearest_code)));
+                                                                     skip_prologue));
     return CreateBreakpoint (filter_sp, resolver_sp, internal, hardware, true);
 }
 
@@ -2935,7 +2928,6 @@
 g_properties[] =
 {
     { "default-arch"                       , OptionValue::eTypeArch      , true , 0                         , NULL, NULL, "Default architecture to choose, when there's a choice." },
-    { "move-to-nearest-code"               , OptionValue::eTypeBoolean   , false, true                      , NULL, NULL, "Move breakpoints to nearest code." },
     { "expr-prefix"                        , OptionValue::eTypeFileSpec  , false, 0                         , NULL, NULL, "Path to a file containing expressions to be prepended to all expressions." },
     { "prefer-dynamic-value"               , OptionValue::eTypeEnum      , false, eDynamicDontRunTarget     , NULL, g_dynamic_value_types, "Should printed values be shown as their dynamic value." },
     { "enable-synthetic-value"             , OptionValue::eTypeBoolean   , false, true                      , NULL, NULL, "Should synthetic values be used by default whenever available." },
@@ -2993,7 +2985,6 @@
 enum
 {
     ePropertyDefaultArch,
-    ePropertyMoveToNearestCode,
     ePropertyExprPrefix,
     ePropertyPreferDynamic,
     ePropertyEnableSynthetic,
@@ -3202,13 +3193,6 @@
         return value->SetCurrentValue(arch, true);
 }
 
-bool
-TargetProperties::GetMoveToNearestCode() const
-{
-    const uint32_t idx = ePropertyMoveToNearestCode;
-    return m_collection_sp->GetPropertyAtIndexAsBoolean (NULL, idx, g_properties[idx].default_uint_value != 0);
-}
-
 lldb::DynamicValueType
 TargetProperties::GetPreferDynamicValue() const
 {