[llvm-branch-commits] [lldb] r183468 - Update platform branch with top of tree.

Greg Clayton gclayton at apple.com
Thu Jun 6 17:08:09 PDT 2013


Author: gclayton
Date: Thu Jun  6 19:06:43 2013
New Revision: 183468

URL: http://llvm.org/viewvc/llvm-project?rev=183468&view=rev
Log:
Update platform branch with top of tree.

Major fixes:
- Made the "vFile:" GDB remote I/O packets work again and back them with the correct flags for open()
- Improved the security of launching the remote GDB server so it only accepts connections from the host that is connected to the remote platform
- Fixed the platform file commands to use the right arguments so they work on 32/64 bit systems (GetFile()/PutFile()/OpenFile()/CloseFile(), etc)
- Added error objects to the Platform file APIs


Added:
    lldb/branches/lldb-platform-work/.arcconfig
      - copied unchanged from r182884, lldb/trunk/.arcconfig
    lldb/branches/lldb-platform-work/CMakeLists.txt
      - copied, changed from r182522, lldb/trunk/CMakeLists.txt
    lldb/branches/lldb-platform-work/docs/CMakeLists.txt
      - copied unchanged from r182884, lldb/trunk/docs/CMakeLists.txt
    lldb/branches/lldb-platform-work/docs/doxygen.cfg.in
      - copied unchanged from r182884, lldb/trunk/docs/doxygen.cfg.in
    lldb/branches/lldb-platform-work/docs/doxygen.footer
      - copied unchanged from r182884, lldb/trunk/docs/doxygen.footer
    lldb/branches/lldb-platform-work/docs/doxygen.header
      - copied unchanged from r182884, lldb/trunk/docs/doxygen.header
    lldb/branches/lldb-platform-work/docs/doxygen.intro
      - copied unchanged from r182884, lldb/trunk/docs/doxygen.intro
    lldb/branches/lldb-platform-work/examples/plugins/
      - copied from r182522, lldb/trunk/examples/plugins/
    lldb/branches/lldb-platform-work/examples/plugins/commands/
      - copied from r182522, lldb/trunk/examples/plugins/commands/
    lldb/branches/lldb-platform-work/examples/plugins/commands/fooplugin.cpp
      - copied unchanged from r182522, lldb/trunk/examples/plugins/commands/fooplugin.cpp
    lldb/branches/lldb-platform-work/examples/python/diagnose_nsstring.py
      - copied unchanged from r183050, lldb/trunk/examples/python/diagnose_nsstring.py
    lldb/branches/lldb-platform-work/examples/python/diagnose_unwind.py
      - copied, changed from r182522, lldb/trunk/examples/python/diagnose_unwind.py
    lldb/branches/lldb-platform-work/examples/python/gdb_disassemble.py
      - copied unchanged from r182522, lldb/trunk/examples/python/gdb_disassemble.py
    lldb/branches/lldb-platform-work/examples/python/jump.py
      - copied unchanged from r182522, lldb/trunk/examples/python/jump.py
    lldb/branches/lldb-platform-work/examples/python/lldb_module_utils.py
      - copied unchanged from r182522, lldb/trunk/examples/python/lldb_module_utils.py
    lldb/branches/lldb-platform-work/examples/python/operating_system.py
      - copied unchanged from r182522, lldb/trunk/examples/python/operating_system.py
    lldb/branches/lldb-platform-work/examples/python/performance.py
      - copied unchanged from r182522, lldb/trunk/examples/python/performance.py
    lldb/branches/lldb-platform-work/examples/python/process_events.py
      - copied unchanged from r182522, lldb/trunk/examples/python/process_events.py
    lldb/branches/lldb-platform-work/examples/python/pytracer.py
      - copied unchanged from r182522, lldb/trunk/examples/python/pytracer.py
    lldb/branches/lldb-platform-work/examples/python/stacks.py
      - copied unchanged from r182522, lldb/trunk/examples/python/stacks.py
    lldb/branches/lldb-platform-work/examples/test/.lldb-loggings
      - copied unchanged from r182522, lldb/trunk/examples/test/.lldb-loggings
    lldb/branches/lldb-platform-work/examples/test/tmp/
      - copied from r182522, lldb/trunk/examples/test/tmp/
    lldb/branches/lldb-platform-work/examples/test/tmp/lldb_log-x86_64-clang-TestBreakpointCommand.BreakpointCommandTestCase.test_with_dsym.txt
      - copied unchanged from r182522, lldb/trunk/examples/test/tmp/lldb_log-x86_64-clang-TestBreakpointCommand.BreakpointCommandTestCase.test_with_dsym.txt
    lldb/branches/lldb-platform-work/examples/test/tmp/lldb_log-x86_64-clang-TestBreakpointCommand.BreakpointCommandTestCase.test_with_dwarf.txt
      - copied unchanged from r182522, lldb/trunk/examples/test/tmp/lldb_log-x86_64-clang-TestBreakpointCommand.BreakpointCommandTestCase.test_with_dwarf.txt
    lldb/branches/lldb-platform-work/examples/test/usage-lldb-loggings
      - copied unchanged from r182522, lldb/trunk/examples/test/usage-lldb-loggings
    lldb/branches/lldb-platform-work/include/lldb/API/SBDeclaration.h
      - copied unchanged from r182522, lldb/trunk/include/lldb/API/SBDeclaration.h
    lldb/branches/lldb-platform-work/include/lldb/API/SBExpressionOptions.h
      - copied unchanged from r182522, lldb/trunk/include/lldb/API/SBExpressionOptions.h
    lldb/branches/lldb-platform-work/include/lldb/Core/ModuleSpec.h
      - copied unchanged from r182522, lldb/trunk/include/lldb/Core/ModuleSpec.h
    lldb/branches/lldb-platform-work/include/lldb/Core/ValueObjectCast.h
      - copied unchanged from r182522, lldb/trunk/include/lldb/Core/ValueObjectCast.h
    lldb/branches/lldb-platform-work/include/lldb/DataFormatters/
      - copied from r182522, lldb/trunk/include/lldb/DataFormatters/
    lldb/branches/lldb-platform-work/include/lldb/DataFormatters/CXXFormatterFunctions.h
      - copied unchanged from r182522, lldb/trunk/include/lldb/DataFormatters/CXXFormatterFunctions.h
    lldb/branches/lldb-platform-work/include/lldb/DataFormatters/DataVisualization.h
      - copied unchanged from r182522, lldb/trunk/include/lldb/DataFormatters/DataVisualization.h
    lldb/branches/lldb-platform-work/include/lldb/DataFormatters/FormatCache.h
      - copied unchanged from r182522, lldb/trunk/include/lldb/DataFormatters/FormatCache.h
    lldb/branches/lldb-platform-work/include/lldb/DataFormatters/FormatClasses.h
      - copied unchanged from r182522, lldb/trunk/include/lldb/DataFormatters/FormatClasses.h
    lldb/branches/lldb-platform-work/include/lldb/DataFormatters/FormatManager.h
      - copied unchanged from r182522, lldb/trunk/include/lldb/DataFormatters/FormatManager.h
    lldb/branches/lldb-platform-work/include/lldb/DataFormatters/FormatNavigator.h
      - copied unchanged from r182522, lldb/trunk/include/lldb/DataFormatters/FormatNavigator.h
    lldb/branches/lldb-platform-work/include/lldb/DataFormatters/TypeCategory.h
      - copied unchanged from r182522, lldb/trunk/include/lldb/DataFormatters/TypeCategory.h
    lldb/branches/lldb-platform-work/include/lldb/DataFormatters/TypeCategoryMap.h
      - copied unchanged from r182522, lldb/trunk/include/lldb/DataFormatters/TypeCategoryMap.h
    lldb/branches/lldb-platform-work/include/lldb/DataFormatters/TypeFormat.h
      - copied unchanged from r182522, lldb/trunk/include/lldb/DataFormatters/TypeFormat.h
    lldb/branches/lldb-platform-work/include/lldb/DataFormatters/TypeSummary.h
      - copied unchanged from r182522, lldb/trunk/include/lldb/DataFormatters/TypeSummary.h
    lldb/branches/lldb-platform-work/include/lldb/DataFormatters/TypeSynthetic.h
      - copied unchanged from r182522, lldb/trunk/include/lldb/DataFormatters/TypeSynthetic.h
    lldb/branches/lldb-platform-work/include/lldb/Expression/IRExecutionUnit.h
      - copied unchanged from r182522, lldb/trunk/include/lldb/Expression/IRExecutionUnit.h
    lldb/branches/lldb-platform-work/include/lldb/Expression/IRMemoryMap.h
      - copied, changed from r182522, lldb/trunk/include/lldb/Expression/IRMemoryMap.h
    lldb/branches/lldb-platform-work/include/lldb/Expression/Materializer.h
      - copied, changed from r182522, lldb/trunk/include/lldb/Expression/Materializer.h
    lldb/branches/lldb-platform-work/include/lldb/Host/DynamicLibrary.h
      - copied unchanged from r182522, lldb/trunk/include/lldb/Host/DynamicLibrary.h
    lldb/branches/lldb-platform-work/include/lldb/Interpreter/OptionGroupString.h
      - copied unchanged from r182522, lldb/trunk/include/lldb/Interpreter/OptionGroupString.h
    lldb/branches/lldb-platform-work/include/lldb/Interpreter/OptionValue.h
      - copied unchanged from r182522, lldb/trunk/include/lldb/Interpreter/OptionValue.h
    lldb/branches/lldb-platform-work/include/lldb/Interpreter/OptionValueArch.h
      - copied unchanged from r182522, lldb/trunk/include/lldb/Interpreter/OptionValueArch.h
    lldb/branches/lldb-platform-work/include/lldb/Interpreter/OptionValueArgs.h
      - copied unchanged from r182522, lldb/trunk/include/lldb/Interpreter/OptionValueArgs.h
    lldb/branches/lldb-platform-work/include/lldb/Interpreter/OptionValueArray.h
      - copied unchanged from r182522, lldb/trunk/include/lldb/Interpreter/OptionValueArray.h
    lldb/branches/lldb-platform-work/include/lldb/Interpreter/OptionValueBoolean.h
      - copied unchanged from r182522, lldb/trunk/include/lldb/Interpreter/OptionValueBoolean.h
    lldb/branches/lldb-platform-work/include/lldb/Interpreter/OptionValueDictionary.h
      - copied unchanged from r182522, lldb/trunk/include/lldb/Interpreter/OptionValueDictionary.h
    lldb/branches/lldb-platform-work/include/lldb/Interpreter/OptionValueEnumeration.h
      - copied unchanged from r182522, lldb/trunk/include/lldb/Interpreter/OptionValueEnumeration.h
    lldb/branches/lldb-platform-work/include/lldb/Interpreter/OptionValueFileSpec.h
      - copied unchanged from r182522, lldb/trunk/include/lldb/Interpreter/OptionValueFileSpec.h
    lldb/branches/lldb-platform-work/include/lldb/Interpreter/OptionValueFileSpecList.h
      - copied unchanged from r182522, lldb/trunk/include/lldb/Interpreter/OptionValueFileSpecList.h
    lldb/branches/lldb-platform-work/include/lldb/Interpreter/OptionValueFormat.h
      - copied unchanged from r182522, lldb/trunk/include/lldb/Interpreter/OptionValueFormat.h
    lldb/branches/lldb-platform-work/include/lldb/Interpreter/OptionValuePathMappings.h
      - copied unchanged from r182522, lldb/trunk/include/lldb/Interpreter/OptionValuePathMappings.h
    lldb/branches/lldb-platform-work/include/lldb/Interpreter/OptionValueProperties.h
      - copied unchanged from r182522, lldb/trunk/include/lldb/Interpreter/OptionValueProperties.h
    lldb/branches/lldb-platform-work/include/lldb/Interpreter/OptionValueRegex.h
      - copied unchanged from r182522, lldb/trunk/include/lldb/Interpreter/OptionValueRegex.h
    lldb/branches/lldb-platform-work/include/lldb/Interpreter/OptionValueSInt64.h
      - copied unchanged from r182522, lldb/trunk/include/lldb/Interpreter/OptionValueSInt64.h
    lldb/branches/lldb-platform-work/include/lldb/Interpreter/OptionValueString.h
      - copied unchanged from r182522, lldb/trunk/include/lldb/Interpreter/OptionValueString.h
    lldb/branches/lldb-platform-work/include/lldb/Interpreter/OptionValueUInt64.h
      - copied unchanged from r182522, lldb/trunk/include/lldb/Interpreter/OptionValueUInt64.h
    lldb/branches/lldb-platform-work/include/lldb/Interpreter/OptionValueUUID.h
      - copied unchanged from r182522, lldb/trunk/include/lldb/Interpreter/OptionValueUUID.h
    lldb/branches/lldb-platform-work/include/lldb/Interpreter/OptionValues.h
      - copied unchanged from r182522, lldb/trunk/include/lldb/Interpreter/OptionValues.h
    lldb/branches/lldb-platform-work/include/lldb/Interpreter/Property.h
      - copied unchanged from r182522, lldb/trunk/include/lldb/Interpreter/Property.h
    lldb/branches/lldb-platform-work/include/lldb/Interpreter/PythonDataObjects.h
      - copied, changed from r182522, lldb/trunk/include/lldb/Interpreter/PythonDataObjects.h
    lldb/branches/lldb-platform-work/include/lldb/Symbol/TypeVendor.h
      - copied unchanged from r182522, lldb/trunk/include/lldb/Symbol/TypeVendor.h
    lldb/branches/lldb-platform-work/include/lldb/lldb-python.h
      - copied unchanged from r182522, lldb/trunk/include/lldb/lldb-python.h
    lldb/branches/lldb-platform-work/include/lldb/lldb-versioning.h
      - copied unchanged from r183274, lldb/trunk/include/lldb/lldb-versioning.h
    lldb/branches/lldb-platform-work/lldb.xcodeproj/xcshareddata/xcschemes/Run Testsuite.xcscheme
      - copied unchanged from r182522, lldb/trunk/lldb.xcodeproj/xcshareddata/xcschemes/Run Testsuite.xcscheme
    lldb/branches/lldb-platform-work/scripts/CMakeLists.txt
      - copied unchanged from r182522, lldb/trunk/scripts/CMakeLists.txt
    lldb/branches/lldb-platform-work/scripts/Python/interface/SBDeclaration.i
      - copied unchanged from r182522, lldb/trunk/scripts/Python/interface/SBDeclaration.i
    lldb/branches/lldb-platform-work/scripts/Python/interface/SBExpressionOptions.i
      - copied unchanged from r182522, lldb/trunk/scripts/Python/interface/SBExpressionOptions.i
    lldb/branches/lldb-platform-work/scripts/lldb_python_module.cmake
      - copied unchanged from r182522, lldb/trunk/scripts/lldb_python_module.cmake
    lldb/branches/lldb-platform-work/scripts/verify_api.py
      - copied unchanged from r182522, lldb/trunk/scripts/verify_api.py
    lldb/branches/lldb-platform-work/source/API/CMakeLists.txt
      - copied unchanged from r182522, lldb/trunk/source/API/CMakeLists.txt
    lldb/branches/lldb-platform-work/source/API/SBDeclaration.cpp
      - copied unchanged from r182522, lldb/trunk/source/API/SBDeclaration.cpp
    lldb/branches/lldb-platform-work/source/API/SBExpressionOptions.cpp
      - copied unchanged from r182522, lldb/trunk/source/API/SBExpressionOptions.cpp
    lldb/branches/lldb-platform-work/source/Breakpoint/CMakeLists.txt
      - copied unchanged from r182522, lldb/trunk/source/Breakpoint/CMakeLists.txt
    lldb/branches/lldb-platform-work/source/CMakeLists.txt
      - copied, changed from r182522, lldb/trunk/source/CMakeLists.txt
    lldb/branches/lldb-platform-work/source/Commands/CMakeLists.txt
      - copied unchanged from r182522, lldb/trunk/source/Commands/CMakeLists.txt
    lldb/branches/lldb-platform-work/source/Commands/CommandObjectPlugin.cpp
      - copied unchanged from r182522, lldb/trunk/source/Commands/CommandObjectPlugin.cpp
    lldb/branches/lldb-platform-work/source/Commands/CommandObjectPlugin.h
      - copied unchanged from r182522, lldb/trunk/source/Commands/CommandObjectPlugin.h
    lldb/branches/lldb-platform-work/source/Core/CMakeLists.txt
      - copied unchanged from r182522, lldb/trunk/source/Core/CMakeLists.txt
    lldb/branches/lldb-platform-work/source/Core/ValueObjectCast.cpp
      - copied unchanged from r182522, lldb/trunk/source/Core/ValueObjectCast.cpp
    lldb/branches/lldb-platform-work/source/DataFormatters/
      - copied from r182522, lldb/trunk/source/DataFormatters/
    lldb/branches/lldb-platform-work/source/DataFormatters/CF.cpp
      - copied, changed from r182522, lldb/trunk/source/DataFormatters/CF.cpp
    lldb/branches/lldb-platform-work/source/DataFormatters/CMakeLists.txt
      - copied unchanged from r182522, lldb/trunk/source/DataFormatters/CMakeLists.txt
    lldb/branches/lldb-platform-work/source/DataFormatters/CXXFormatterFunctions.cpp
      - copied, changed from r182522, lldb/trunk/source/DataFormatters/CXXFormatterFunctions.cpp
    lldb/branches/lldb-platform-work/source/DataFormatters/Cocoa.cpp
      - copied, changed from r182522, lldb/trunk/source/DataFormatters/Cocoa.cpp
    lldb/branches/lldb-platform-work/source/DataFormatters/DataVisualization.cpp
      - copied unchanged from r182522, lldb/trunk/source/DataFormatters/DataVisualization.cpp
    lldb/branches/lldb-platform-work/source/DataFormatters/FormatCache.cpp
      - copied unchanged from r182522, lldb/trunk/source/DataFormatters/FormatCache.cpp
    lldb/branches/lldb-platform-work/source/DataFormatters/FormatClasses.cpp
      - copied unchanged from r182522, lldb/trunk/source/DataFormatters/FormatClasses.cpp
    lldb/branches/lldb-platform-work/source/DataFormatters/FormatManager.cpp
      - copied, changed from r182522, lldb/trunk/source/DataFormatters/FormatManager.cpp
    lldb/branches/lldb-platform-work/source/DataFormatters/LibCxx.cpp
      - copied, changed from r182522, lldb/trunk/source/DataFormatters/LibCxx.cpp
    lldb/branches/lldb-platform-work/source/DataFormatters/LibCxxList.cpp
      - copied, changed from r182522, lldb/trunk/source/DataFormatters/LibCxxList.cpp
    lldb/branches/lldb-platform-work/source/DataFormatters/LibCxxMap.cpp
      - copied, changed from r182522, lldb/trunk/source/DataFormatters/LibCxxMap.cpp
    lldb/branches/lldb-platform-work/source/DataFormatters/LibStdcpp.cpp
      - copied unchanged from r182522, lldb/trunk/source/DataFormatters/LibStdcpp.cpp
    lldb/branches/lldb-platform-work/source/DataFormatters/Makefile
      - copied unchanged from r182522, lldb/trunk/source/DataFormatters/Makefile
    lldb/branches/lldb-platform-work/source/DataFormatters/NSArray.cpp
      - copied unchanged from r182522, lldb/trunk/source/DataFormatters/NSArray.cpp
    lldb/branches/lldb-platform-work/source/DataFormatters/NSDictionary.cpp
      - copied unchanged from r182522, lldb/trunk/source/DataFormatters/NSDictionary.cpp
    lldb/branches/lldb-platform-work/source/DataFormatters/NSSet.cpp
      - copied unchanged from r182522, lldb/trunk/source/DataFormatters/NSSet.cpp
    lldb/branches/lldb-platform-work/source/DataFormatters/TypeCategory.cpp
      - copied unchanged from r182522, lldb/trunk/source/DataFormatters/TypeCategory.cpp
    lldb/branches/lldb-platform-work/source/DataFormatters/TypeCategoryMap.cpp
      - copied unchanged from r182522, lldb/trunk/source/DataFormatters/TypeCategoryMap.cpp
    lldb/branches/lldb-platform-work/source/DataFormatters/TypeFormat.cpp
      - copied unchanged from r182522, lldb/trunk/source/DataFormatters/TypeFormat.cpp
    lldb/branches/lldb-platform-work/source/DataFormatters/TypeSummary.cpp
      - copied, changed from r182522, lldb/trunk/source/DataFormatters/TypeSummary.cpp
    lldb/branches/lldb-platform-work/source/DataFormatters/TypeSynthetic.cpp
      - copied unchanged from r182522, lldb/trunk/source/DataFormatters/TypeSynthetic.cpp
    lldb/branches/lldb-platform-work/source/Expression/CMakeLists.txt
      - copied unchanged from r182522, lldb/trunk/source/Expression/CMakeLists.txt
    lldb/branches/lldb-platform-work/source/Expression/IRExecutionUnit.cpp
      - copied unchanged from r182522, lldb/trunk/source/Expression/IRExecutionUnit.cpp
    lldb/branches/lldb-platform-work/source/Expression/IRMemoryMap.cpp
      - copied, changed from r182522, lldb/trunk/source/Expression/IRMemoryMap.cpp
    lldb/branches/lldb-platform-work/source/Expression/Materializer.cpp
      - copied, changed from r182522, lldb/trunk/source/Expression/Materializer.cpp
    lldb/branches/lldb-platform-work/source/Host/CMakeLists.txt
      - copied unchanged from r182522, lldb/trunk/source/Host/CMakeLists.txt
    lldb/branches/lldb-platform-work/source/Host/common/CMakeLists.txt
      - copied unchanged from r182522, lldb/trunk/source/Host/common/CMakeLists.txt
    lldb/branches/lldb-platform-work/source/Host/common/DynamicLibrary.cpp
      - copied unchanged from r182522, lldb/trunk/source/Host/common/DynamicLibrary.cpp
    lldb/branches/lldb-platform-work/source/Host/freebsd/CMakeLists.txt
      - copied unchanged from r182522, lldb/trunk/source/Host/freebsd/CMakeLists.txt
    lldb/branches/lldb-platform-work/source/Host/linux/CMakeLists.txt
      - copied unchanged from r182522, lldb/trunk/source/Host/linux/CMakeLists.txt
    lldb/branches/lldb-platform-work/source/Host/macosx/CMakeLists.txt
      - copied unchanged from r182522, lldb/trunk/source/Host/macosx/CMakeLists.txt
    lldb/branches/lldb-platform-work/source/Interpreter/CMakeLists.txt
      - copied unchanged from r182522, lldb/trunk/source/Interpreter/CMakeLists.txt
    lldb/branches/lldb-platform-work/source/Interpreter/OptionGroupString.cpp
      - copied unchanged from r182522, lldb/trunk/source/Interpreter/OptionGroupString.cpp
    lldb/branches/lldb-platform-work/source/Interpreter/OptionValue.cpp
      - copied unchanged from r182522, lldb/trunk/source/Interpreter/OptionValue.cpp
    lldb/branches/lldb-platform-work/source/Interpreter/OptionValueArch.cpp
      - copied unchanged from r182522, lldb/trunk/source/Interpreter/OptionValueArch.cpp
    lldb/branches/lldb-platform-work/source/Interpreter/OptionValueArgs.cpp
      - copied unchanged from r182522, lldb/trunk/source/Interpreter/OptionValueArgs.cpp
    lldb/branches/lldb-platform-work/source/Interpreter/OptionValueArray.cpp
      - copied unchanged from r182522, lldb/trunk/source/Interpreter/OptionValueArray.cpp
    lldb/branches/lldb-platform-work/source/Interpreter/OptionValueBoolean.cpp
      - copied unchanged from r182522, lldb/trunk/source/Interpreter/OptionValueBoolean.cpp
    lldb/branches/lldb-platform-work/source/Interpreter/OptionValueDictionary.cpp
      - copied unchanged from r182522, lldb/trunk/source/Interpreter/OptionValueDictionary.cpp
    lldb/branches/lldb-platform-work/source/Interpreter/OptionValueEnumeration.cpp
      - copied unchanged from r182522, lldb/trunk/source/Interpreter/OptionValueEnumeration.cpp
    lldb/branches/lldb-platform-work/source/Interpreter/OptionValueFileSpec.cpp
      - copied unchanged from r182522, lldb/trunk/source/Interpreter/OptionValueFileSpec.cpp
    lldb/branches/lldb-platform-work/source/Interpreter/OptionValueFileSpecLIst.cpp
      - copied unchanged from r182522, lldb/trunk/source/Interpreter/OptionValueFileSpecLIst.cpp
    lldb/branches/lldb-platform-work/source/Interpreter/OptionValueFormat.cpp
      - copied unchanged from r182522, lldb/trunk/source/Interpreter/OptionValueFormat.cpp
    lldb/branches/lldb-platform-work/source/Interpreter/OptionValuePathMappings.cpp
      - copied unchanged from r182522, lldb/trunk/source/Interpreter/OptionValuePathMappings.cpp
    lldb/branches/lldb-platform-work/source/Interpreter/OptionValueProperties.cpp
      - copied unchanged from r182522, lldb/trunk/source/Interpreter/OptionValueProperties.cpp
    lldb/branches/lldb-platform-work/source/Interpreter/OptionValueRegex.cpp
      - copied unchanged from r182522, lldb/trunk/source/Interpreter/OptionValueRegex.cpp
    lldb/branches/lldb-platform-work/source/Interpreter/OptionValueSInt64.cpp
      - copied unchanged from r182522, lldb/trunk/source/Interpreter/OptionValueSInt64.cpp
    lldb/branches/lldb-platform-work/source/Interpreter/OptionValueString.cpp
      - copied unchanged from r182522, lldb/trunk/source/Interpreter/OptionValueString.cpp
    lldb/branches/lldb-platform-work/source/Interpreter/OptionValueUInt64.cpp
      - copied unchanged from r182522, lldb/trunk/source/Interpreter/OptionValueUInt64.cpp
    lldb/branches/lldb-platform-work/source/Interpreter/OptionValueUUID.cpp
      - copied unchanged from r182522, lldb/trunk/source/Interpreter/OptionValueUUID.cpp
    lldb/branches/lldb-platform-work/source/Interpreter/Property.cpp
      - copied unchanged from r182522, lldb/trunk/source/Interpreter/Property.cpp
    lldb/branches/lldb-platform-work/source/Interpreter/PythonDataObjects.cpp
      - copied, changed from r182522, lldb/trunk/source/Interpreter/PythonDataObjects.cpp
    lldb/branches/lldb-platform-work/source/Plugins/ABI/CMakeLists.txt
      - copied unchanged from r182522, lldb/trunk/source/Plugins/ABI/CMakeLists.txt
    lldb/branches/lldb-platform-work/source/Plugins/ABI/MacOSX-arm/CMakeLists.txt
      - copied unchanged from r182522, lldb/trunk/source/Plugins/ABI/MacOSX-arm/CMakeLists.txt
    lldb/branches/lldb-platform-work/source/Plugins/ABI/MacOSX-i386/CMakeLists.txt
      - copied unchanged from r182522, lldb/trunk/source/Plugins/ABI/MacOSX-i386/CMakeLists.txt
    lldb/branches/lldb-platform-work/source/Plugins/ABI/SysV-x86_64/CMakeLists.txt
      - copied unchanged from r182522, lldb/trunk/source/Plugins/ABI/SysV-x86_64/CMakeLists.txt
    lldb/branches/lldb-platform-work/source/Plugins/CMakeLists.txt
      - copied unchanged from r182522, lldb/trunk/source/Plugins/CMakeLists.txt
    lldb/branches/lldb-platform-work/source/Plugins/Disassembler/CMakeLists.txt
      - copied unchanged from r182522, lldb/trunk/source/Plugins/Disassembler/CMakeLists.txt
    lldb/branches/lldb-platform-work/source/Plugins/Disassembler/llvm/CMakeLists.txt
      - copied unchanged from r182522, lldb/trunk/source/Plugins/Disassembler/llvm/CMakeLists.txt
    lldb/branches/lldb-platform-work/source/Plugins/DynamicLoader/CMakeLists.txt
      - copied unchanged from r182522, lldb/trunk/source/Plugins/DynamicLoader/CMakeLists.txt
    lldb/branches/lldb-platform-work/source/Plugins/DynamicLoader/Darwin-Kernel/CMakeLists.txt
      - copied unchanged from r182522, lldb/trunk/source/Plugins/DynamicLoader/Darwin-Kernel/CMakeLists.txt
    lldb/branches/lldb-platform-work/source/Plugins/DynamicLoader/MacOSX-DYLD/CMakeLists.txt
      - copied unchanged from r182522, lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/CMakeLists.txt
    lldb/branches/lldb-platform-work/source/Plugins/DynamicLoader/POSIX-DYLD/CMakeLists.txt
      - copied unchanged from r182522, lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/CMakeLists.txt
    lldb/branches/lldb-platform-work/source/Plugins/DynamicLoader/Static/CMakeLists.txt
      - copied unchanged from r182522, lldb/trunk/source/Plugins/DynamicLoader/Static/CMakeLists.txt
    lldb/branches/lldb-platform-work/source/Plugins/Instruction/ARM/CMakeLists.txt
      - copied unchanged from r182522, lldb/trunk/source/Plugins/Instruction/ARM/CMakeLists.txt
    lldb/branches/lldb-platform-work/source/Plugins/Instruction/CMakeLists.txt
      - copied unchanged from r182522, lldb/trunk/source/Plugins/Instruction/CMakeLists.txt
    lldb/branches/lldb-platform-work/source/Plugins/LanguageRuntime/CMakeLists.txt
      - copied unchanged from r182522, lldb/trunk/source/Plugins/LanguageRuntime/CMakeLists.txt
    lldb/branches/lldb-platform-work/source/Plugins/LanguageRuntime/CPlusPlus/CMakeLists.txt
      - copied unchanged from r182522, lldb/trunk/source/Plugins/LanguageRuntime/CPlusPlus/CMakeLists.txt
    lldb/branches/lldb-platform-work/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/CMakeLists.txt
      - copied unchanged from r182522, lldb/trunk/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/CMakeLists.txt
    lldb/branches/lldb-platform-work/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeVendor.cpp
      - copied unchanged from r182522, lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeVendor.cpp
    lldb/branches/lldb-platform-work/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeVendor.h
      - copied unchanged from r182522, lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeVendor.h
    lldb/branches/lldb-platform-work/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/CMakeLists.txt
      - copied unchanged from r182522, lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/CMakeLists.txt
    lldb/branches/lldb-platform-work/source/Plugins/LanguageRuntime/ObjC/CMakeLists.txt
      - copied unchanged from r182522, lldb/trunk/source/Plugins/LanguageRuntime/ObjC/CMakeLists.txt
    lldb/branches/lldb-platform-work/source/Plugins/ObjectContainer/BSD-Archive/CMakeLists.txt
      - copied unchanged from r182522, lldb/trunk/source/Plugins/ObjectContainer/BSD-Archive/CMakeLists.txt
    lldb/branches/lldb-platform-work/source/Plugins/ObjectContainer/CMakeLists.txt
      - copied unchanged from r182522, lldb/trunk/source/Plugins/ObjectContainer/CMakeLists.txt
    lldb/branches/lldb-platform-work/source/Plugins/ObjectContainer/Universal-Mach-O/CMakeLists.txt
      - copied unchanged from r182522, lldb/trunk/source/Plugins/ObjectContainer/Universal-Mach-O/CMakeLists.txt
    lldb/branches/lldb-platform-work/source/Plugins/ObjectFile/CMakeLists.txt
      - copied unchanged from r182522, lldb/trunk/source/Plugins/ObjectFile/CMakeLists.txt
    lldb/branches/lldb-platform-work/source/Plugins/ObjectFile/ELF/CMakeLists.txt
      - copied unchanged from r182522, lldb/trunk/source/Plugins/ObjectFile/ELF/CMakeLists.txt
    lldb/branches/lldb-platform-work/source/Plugins/ObjectFile/Mach-O/CMakeLists.txt
      - copied unchanged from r182522, lldb/trunk/source/Plugins/ObjectFile/Mach-O/CMakeLists.txt
    lldb/branches/lldb-platform-work/source/Plugins/ObjectFile/PECOFF/CMakeLists.txt
      - copied unchanged from r182522, lldb/trunk/source/Plugins/ObjectFile/PECOFF/CMakeLists.txt
    lldb/branches/lldb-platform-work/source/Plugins/OperatingSystem/CMakeLists.txt
      - copied unchanged from r182522, lldb/trunk/source/Plugins/OperatingSystem/CMakeLists.txt
    lldb/branches/lldb-platform-work/source/Plugins/OperatingSystem/Python/
      - copied from r182522, lldb/trunk/source/Plugins/OperatingSystem/Python/
    lldb/branches/lldb-platform-work/source/Plugins/OperatingSystem/Python/CMakeLists.txt
      - copied unchanged from r182522, lldb/trunk/source/Plugins/OperatingSystem/Python/CMakeLists.txt
    lldb/branches/lldb-platform-work/source/Plugins/OperatingSystem/Python/Makefile
      - copied unchanged from r182522, lldb/trunk/source/Plugins/OperatingSystem/Python/Makefile
    lldb/branches/lldb-platform-work/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp
      - copied, changed from r182522, lldb/trunk/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp
    lldb/branches/lldb-platform-work/source/Plugins/OperatingSystem/Python/OperatingSystemPython.h
      - copied unchanged from r182522, lldb/trunk/source/Plugins/OperatingSystem/Python/OperatingSystemPython.h
    lldb/branches/lldb-platform-work/source/Plugins/Platform/CMakeLists.txt
      - copied unchanged from r182522, lldb/trunk/source/Plugins/Platform/CMakeLists.txt
    lldb/branches/lldb-platform-work/source/Plugins/Platform/FreeBSD/CMakeLists.txt
      - copied unchanged from r182522, lldb/trunk/source/Plugins/Platform/FreeBSD/CMakeLists.txt
    lldb/branches/lldb-platform-work/source/Plugins/Platform/Linux/CMakeLists.txt
      - copied unchanged from r182522, lldb/trunk/source/Plugins/Platform/Linux/CMakeLists.txt
    lldb/branches/lldb-platform-work/source/Plugins/Platform/MacOSX/CMakeLists.txt
      - copied unchanged from r182522, lldb/trunk/source/Plugins/Platform/MacOSX/CMakeLists.txt
    lldb/branches/lldb-platform-work/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp
      - copied unchanged from r182522, lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp
    lldb/branches/lldb-platform-work/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.h
      - copied unchanged from r182522, lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.h
    lldb/branches/lldb-platform-work/source/Plugins/Platform/gdb-server/CMakeLists.txt
      - copied unchanged from r182522, lldb/trunk/source/Plugins/Platform/gdb-server/CMakeLists.txt
    lldb/branches/lldb-platform-work/source/Plugins/Process/CMakeLists.txt
      - copied, changed from r182522, lldb/trunk/source/Plugins/Process/CMakeLists.txt
    lldb/branches/lldb-platform-work/source/Plugins/Process/FreeBSD/CMakeLists.txt
      - copied, changed from r182522, lldb/trunk/source/Plugins/Process/FreeBSD/CMakeLists.txt
    lldb/branches/lldb-platform-work/source/Plugins/Process/Linux/CMakeLists.txt
      - copied unchanged from r182522, lldb/trunk/source/Plugins/Process/Linux/CMakeLists.txt
    lldb/branches/lldb-platform-work/source/Plugins/Process/MacOSX-Kernel/CMakeLists.txt
      - copied unchanged from r182522, lldb/trunk/source/Plugins/Process/MacOSX-Kernel/CMakeLists.txt
    lldb/branches/lldb-platform-work/source/Plugins/Process/POSIX/CMakeLists.txt
      - copied unchanged from r182522, lldb/trunk/source/Plugins/Process/POSIX/CMakeLists.txt
    lldb/branches/lldb-platform-work/source/Plugins/Process/POSIX/RegisterContextFreeBSD_x86_64.cpp
      - copied, changed from r182522, lldb/trunk/source/Plugins/Process/POSIX/RegisterContextFreeBSD_x86_64.cpp
    lldb/branches/lldb-platform-work/source/Plugins/Process/POSIX/RegisterContextFreeBSD_x86_64.h
      - copied, changed from r182522, lldb/trunk/source/Plugins/Process/POSIX/RegisterContextFreeBSD_x86_64.h
    lldb/branches/lldb-platform-work/source/Plugins/Process/POSIX/RegisterContextLinux_x86_64.cpp
      - copied, changed from r182522, lldb/trunk/source/Plugins/Process/POSIX/RegisterContextLinux_x86_64.cpp
    lldb/branches/lldb-platform-work/source/Plugins/Process/POSIX/RegisterContextLinux_x86_64.h
      - copied, changed from r182522, lldb/trunk/source/Plugins/Process/POSIX/RegisterContextLinux_x86_64.h
    lldb/branches/lldb-platform-work/source/Plugins/Process/POSIX/RegisterContext_x86.h
      - copied unchanged from r182522, lldb/trunk/source/Plugins/Process/POSIX/RegisterContext_x86.h
    lldb/branches/lldb-platform-work/source/Plugins/Process/Utility/CMakeLists.txt
      - copied unchanged from r182522, lldb/trunk/source/Plugins/Process/Utility/CMakeLists.txt
    lldb/branches/lldb-platform-work/source/Plugins/Process/Utility/RegisterContextDummy.cpp
      - copied unchanged from r182522, lldb/trunk/source/Plugins/Process/Utility/RegisterContextDummy.cpp
    lldb/branches/lldb-platform-work/source/Plugins/Process/Utility/RegisterContextDummy.h
      - copied unchanged from r182522, lldb/trunk/source/Plugins/Process/Utility/RegisterContextDummy.h
    lldb/branches/lldb-platform-work/source/Plugins/Process/Utility/RegisterContextThreadMemory.cpp
      - copied unchanged from r182522, lldb/trunk/source/Plugins/Process/Utility/RegisterContextThreadMemory.cpp
    lldb/branches/lldb-platform-work/source/Plugins/Process/Utility/RegisterContextThreadMemory.h
      - copied unchanged from r182522, lldb/trunk/source/Plugins/Process/Utility/RegisterContextThreadMemory.h
    lldb/branches/lldb-platform-work/source/Plugins/Process/gdb-remote/CMakeLists.txt
      - copied unchanged from r182522, lldb/trunk/source/Plugins/Process/gdb-remote/CMakeLists.txt
    lldb/branches/lldb-platform-work/source/Plugins/Process/mach-core/CMakeLists.txt
      - copied unchanged from r182522, lldb/trunk/source/Plugins/Process/mach-core/CMakeLists.txt
    lldb/branches/lldb-platform-work/source/Plugins/SymbolFile/CMakeLists.txt
      - copied unchanged from r182522, lldb/trunk/source/Plugins/SymbolFile/CMakeLists.txt
    lldb/branches/lldb-platform-work/source/Plugins/SymbolFile/DWARF/CMakeLists.txt
      - copied unchanged from r182522, lldb/trunk/source/Plugins/SymbolFile/DWARF/CMakeLists.txt
    lldb/branches/lldb-platform-work/source/Plugins/SymbolFile/Symtab/CMakeLists.txt
      - copied unchanged from r182522, lldb/trunk/source/Plugins/SymbolFile/Symtab/CMakeLists.txt
    lldb/branches/lldb-platform-work/source/Plugins/SymbolVendor/CMakeLists.txt
      - copied unchanged from r182522, lldb/trunk/source/Plugins/SymbolVendor/CMakeLists.txt
    lldb/branches/lldb-platform-work/source/Plugins/SymbolVendor/MacOSX/CMakeLists.txt
      - copied unchanged from r182522, lldb/trunk/source/Plugins/SymbolVendor/MacOSX/CMakeLists.txt
    lldb/branches/lldb-platform-work/source/Plugins/UnwindAssembly/CMakeLists.txt
      - copied unchanged from r182522, lldb/trunk/source/Plugins/UnwindAssembly/CMakeLists.txt
    lldb/branches/lldb-platform-work/source/Plugins/UnwindAssembly/InstEmulation/CMakeLists.txt
      - copied unchanged from r182522, lldb/trunk/source/Plugins/UnwindAssembly/InstEmulation/CMakeLists.txt
    lldb/branches/lldb-platform-work/source/Plugins/UnwindAssembly/x86/CMakeLists.txt
      - copied unchanged from r182522, lldb/trunk/source/Plugins/UnwindAssembly/x86/CMakeLists.txt
    lldb/branches/lldb-platform-work/source/Symbol/CMakeLists.txt
      - copied unchanged from r182522, lldb/trunk/source/Symbol/CMakeLists.txt
    lldb/branches/lldb-platform-work/source/Target/CMakeLists.txt
      - copied unchanged from r182522, lldb/trunk/source/Target/CMakeLists.txt
    lldb/branches/lldb-platform-work/source/Utility/CMakeLists.txt
      - copied unchanged from r182522, lldb/trunk/source/Utility/CMakeLists.txt
    lldb/branches/lldb-platform-work/source/Utility/KQueue.cpp
      - copied unchanged from r182522, lldb/trunk/source/Utility/KQueue.cpp
    lldb/branches/lldb-platform-work/source/Utility/KQueue.h
      - copied unchanged from r182522, lldb/trunk/source/Utility/KQueue.h
    lldb/branches/lldb-platform-work/source/Utility/TimeSpecTimeout.cpp
      - copied unchanged from r182522, lldb/trunk/source/Utility/TimeSpecTimeout.cpp
    lldb/branches/lldb-platform-work/source/Utility/TimeSpecTimeout.h
      - copied unchanged from r182522, lldb/trunk/source/Utility/TimeSpecTimeout.h
    lldb/branches/lldb-platform-work/source/Utility/UuidCompatibility.h
      - copied unchanged from r182522, lldb/trunk/source/Utility/UuidCompatibility.h
    lldb/branches/lldb-platform-work/test/.categories
      - copied unchanged from r182522, lldb/trunk/test/.categories
    lldb/branches/lldb-platform-work/test/CMakeLists.txt
      - copied unchanged from r182522, lldb/trunk/test/CMakeLists.txt
    lldb/branches/lldb-platform-work/test/api/multithreaded/
      - copied from r182522, lldb/trunk/test/api/multithreaded/
    lldb/branches/lldb-platform-work/test/api/multithreaded/Makefile
      - copied unchanged from r182522, lldb/trunk/test/api/multithreaded/Makefile
    lldb/branches/lldb-platform-work/test/api/multithreaded/TestMultithreaded.py
      - copied unchanged from r182522, lldb/trunk/test/api/multithreaded/TestMultithreaded.py
    lldb/branches/lldb-platform-work/test/api/multithreaded/common.h
      - copied unchanged from r182522, lldb/trunk/test/api/multithreaded/common.h
    lldb/branches/lldb-platform-work/test/api/multithreaded/driver.cpp
      - copied unchanged from r182522, lldb/trunk/test/api/multithreaded/driver.cpp
    lldb/branches/lldb-platform-work/test/api/multithreaded/inferior.cpp
      - copied unchanged from r182522, lldb/trunk/test/api/multithreaded/inferior.cpp
    lldb/branches/lldb-platform-work/test/api/multithreaded/listener_test.cpp
      - copied unchanged from r182522, lldb/trunk/test/api/multithreaded/listener_test.cpp
    lldb/branches/lldb-platform-work/test/api/multithreaded/lldb-headers.h
      - copied unchanged from r182522, lldb/trunk/test/api/multithreaded/lldb-headers.h
    lldb/branches/lldb-platform-work/test/api/multithreaded/test_breakpoint_callback.cpp
      - copied unchanged from r182522, lldb/trunk/test/api/multithreaded/test_breakpoint_callback.cpp
    lldb/branches/lldb-platform-work/test/api/multithreaded/test_listener_event_description.cpp
      - copied unchanged from r182522, lldb/trunk/test/api/multithreaded/test_listener_event_description.cpp
    lldb/branches/lldb-platform-work/test/api/multithreaded/test_listener_event_process_state.cpp
      - copied unchanged from r182522, lldb/trunk/test/api/multithreaded/test_listener_event_process_state.cpp
    lldb/branches/lldb-platform-work/test/api/multithreaded/test_listener_resume.cpp
      - copied unchanged from r182522, lldb/trunk/test/api/multithreaded/test_listener_resume.cpp
    lldb/branches/lldb-platform-work/test/argparse_compat.py
      - copied unchanged from r182522, lldb/trunk/test/argparse_compat.py
    lldb/branches/lldb-platform-work/test/expression_command/.categories
      - copied unchanged from r182522, lldb/trunk/test/expression_command/.categories
    lldb/branches/lldb-platform-work/test/expression_command/call-restarts/
      - copied from r182522, lldb/trunk/test/expression_command/call-restarts/
    lldb/branches/lldb-platform-work/test/expression_command/call-restarts/Makefile
      - copied unchanged from r182522, lldb/trunk/test/expression_command/call-restarts/Makefile
    lldb/branches/lldb-platform-work/test/expression_command/call-restarts/TestCallThatRestarts.py
      - copied unchanged from r182522, lldb/trunk/test/expression_command/call-restarts/TestCallThatRestarts.py
    lldb/branches/lldb-platform-work/test/expression_command/call-restarts/lotta-signals.c
      - copied unchanged from r182522, lldb/trunk/test/expression_command/call-restarts/lotta-signals.c
    lldb/branches/lldb-platform-work/test/expression_command/call-throws/
      - copied from r182522, lldb/trunk/test/expression_command/call-throws/
    lldb/branches/lldb-platform-work/test/expression_command/call-throws/Makefile
      - copied unchanged from r182522, lldb/trunk/test/expression_command/call-throws/Makefile
    lldb/branches/lldb-platform-work/test/expression_command/call-throws/TestCallThatThrows.py
      - copied unchanged from r182522, lldb/trunk/test/expression_command/call-throws/TestCallThatThrows.py
    lldb/branches/lldb-platform-work/test/expression_command/call-throws/call-throws.m
      - copied unchanged from r182522, lldb/trunk/test/expression_command/call-throws/call-throws.m
    lldb/branches/lldb-platform-work/test/expression_command/timeout/
      - copied from r182522, lldb/trunk/test/expression_command/timeout/
    lldb/branches/lldb-platform-work/test/expression_command/timeout/Makefile
      - copied unchanged from r182522, lldb/trunk/test/expression_command/timeout/Makefile
    lldb/branches/lldb-platform-work/test/expression_command/timeout/TestCallWithTimeout.py
      - copied unchanged from r182522, lldb/trunk/test/expression_command/timeout/TestCallWithTimeout.py
    lldb/branches/lldb-platform-work/test/expression_command/timeout/wait-a-while.c
      - copied unchanged from r182522, lldb/trunk/test/expression_command/timeout/wait-a-while.c
    lldb/branches/lldb-platform-work/test/functionalities/breakpoint/breakpoint_command/TestRegexpBreakCommand.py
      - copied unchanged from r182522, lldb/trunk/test/functionalities/breakpoint/breakpoint_command/TestRegexpBreakCommand.py
    lldb/branches/lldb-platform-work/test/functionalities/command_script/import/rdar-12586188/
      - copied from r182522, lldb/trunk/test/functionalities/command_script/import/rdar-12586188/
    lldb/branches/lldb-platform-work/test/functionalities/command_script/import/rdar-12586188/Makefile
      - copied unchanged from r182522, lldb/trunk/test/functionalities/command_script/import/rdar-12586188/Makefile
    lldb/branches/lldb-platform-work/test/functionalities/command_script/import/rdar-12586188/TestRdar12586188.py
      - copied unchanged from r182522, lldb/trunk/test/functionalities/command_script/import/rdar-12586188/TestRdar12586188.py
    lldb/branches/lldb-platform-work/test/functionalities/command_script/import/rdar-12586188/fail12586188.py
      - copied unchanged from r182522, lldb/trunk/test/functionalities/command_script/import/rdar-12586188/fail12586188.py
    lldb/branches/lldb-platform-work/test/functionalities/command_script/import/rdar-12586188/fail212586188.py
      - copied unchanged from r182522, lldb/trunk/test/functionalities/command_script/import/rdar-12586188/fail212586188.py
    lldb/branches/lldb-platform-work/test/functionalities/command_script/import/thepackage/
      - copied from r182522, lldb/trunk/test/functionalities/command_script/import/thepackage/
    lldb/branches/lldb-platform-work/test/functionalities/command_script/import/thepackage/TPunitA.py
      - copied unchanged from r182522, lldb/trunk/test/functionalities/command_script/import/thepackage/TPunitA.py
    lldb/branches/lldb-platform-work/test/functionalities/command_script/import/thepackage/TPunitB.py
      - copied unchanged from r182522, lldb/trunk/test/functionalities/command_script/import/thepackage/TPunitB.py
    lldb/branches/lldb-platform-work/test/functionalities/command_script/import/thepackage/__init__.py
      - copied unchanged from r182522, lldb/trunk/test/functionalities/command_script/import/thepackage/__init__.py
    lldb/branches/lldb-platform-work/test/functionalities/data-formatter/.categories
      - copied unchanged from r182522, lldb/trunk/test/functionalities/data-formatter/.categories
    lldb/branches/lldb-platform-work/test/functionalities/data-formatter/data-formatter-objc/.categories
      - copied unchanged from r182522, lldb/trunk/test/functionalities/data-formatter/data-formatter-objc/.categories
    lldb/branches/lldb-platform-work/test/functionalities/data-formatter/data-formatter-stl/libcxx/iterator/
      - copied from r182522, lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/iterator/
    lldb/branches/lldb-platform-work/test/functionalities/data-formatter/data-formatter-stl/libcxx/iterator/Makefile
      - copied unchanged from r182522, lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/iterator/Makefile
    lldb/branches/lldb-platform-work/test/functionalities/data-formatter/data-formatter-stl/libcxx/iterator/TestDataFormatterLibccIterator.py
      - copied unchanged from r182522, lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/iterator/TestDataFormatterLibccIterator.py
    lldb/branches/lldb-platform-work/test/functionalities/data-formatter/data-formatter-stl/libcxx/iterator/main.cpp
      - copied unchanged from r182522, lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/iterator/main.cpp
    lldb/branches/lldb-platform-work/test/functionalities/data-formatter/data-formatter-stl/libcxx/multimap/
      - copied from r183363, lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/multimap/
    lldb/branches/lldb-platform-work/test/functionalities/data-formatter/data-formatter-stl/libcxx/multimap/Makefile
      - copied unchanged from r183363, lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/multimap/Makefile
    lldb/branches/lldb-platform-work/test/functionalities/data-formatter/data-formatter-stl/libcxx/multimap/TestDataFormatterLibccMultiMap.py
      - copied unchanged from r183363, lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/multimap/TestDataFormatterLibccMultiMap.py
    lldb/branches/lldb-platform-work/test/functionalities/data-formatter/data-formatter-stl/libcxx/multimap/main.cpp
      - copied unchanged from r183363, lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/multimap/main.cpp
    lldb/branches/lldb-platform-work/test/functionalities/data-formatter/data-formatter-stl/libcxx/multiset/
      - copied from r183363, lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/multiset/
    lldb/branches/lldb-platform-work/test/functionalities/data-formatter/data-formatter-stl/libcxx/multiset/Makefile
      - copied unchanged from r183363, lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/multiset/Makefile
    lldb/branches/lldb-platform-work/test/functionalities/data-formatter/data-formatter-stl/libcxx/multiset/TestDataFormatterLibcxxMultiSet.py
      - copied unchanged from r183363, lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/multiset/TestDataFormatterLibcxxMultiSet.py
    lldb/branches/lldb-platform-work/test/functionalities/data-formatter/data-formatter-stl/libcxx/multiset/main.cpp
      - copied unchanged from r183363, lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/multiset/main.cpp
    lldb/branches/lldb-platform-work/test/functionalities/data-formatter/data-formatter-stl/libcxx/set/
      - copied from r183363, lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/set/
    lldb/branches/lldb-platform-work/test/functionalities/data-formatter/data-formatter-stl/libcxx/set/Makefile
      - copied unchanged from r183363, lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/set/Makefile
    lldb/branches/lldb-platform-work/test/functionalities/data-formatter/data-formatter-stl/libcxx/set/TestDataFormatterLibcxxSet.py
      - copied unchanged from r183363, lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/set/TestDataFormatterLibcxxSet.py
    lldb/branches/lldb-platform-work/test/functionalities/data-formatter/data-formatter-stl/libcxx/set/main.cpp
      - copied unchanged from r183363, lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/set/main.cpp
    lldb/branches/lldb-platform-work/test/functionalities/data-formatter/data-formatter-stl/libcxx/string/
      - copied from r182522, lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/string/
    lldb/branches/lldb-platform-work/test/functionalities/data-formatter/data-formatter-stl/libcxx/string/Makefile
      - copied unchanged from r182522, lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/string/Makefile
    lldb/branches/lldb-platform-work/test/functionalities/data-formatter/data-formatter-stl/libcxx/string/TestDataFormatterLibcxxString.py
      - copied unchanged from r182522, lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/string/TestDataFormatterLibcxxString.py
    lldb/branches/lldb-platform-work/test/functionalities/data-formatter/data-formatter-stl/libcxx/string/main.cpp
      - copied unchanged from r182522, lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/string/main.cpp
    lldb/branches/lldb-platform-work/test/functionalities/data-formatter/data-formatter-stl/libcxx/vbool/
      - copied from r182522, lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/vbool/
    lldb/branches/lldb-platform-work/test/functionalities/data-formatter/data-formatter-stl/libcxx/vbool/Makefile
      - copied unchanged from r182522, lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/vbool/Makefile
    lldb/branches/lldb-platform-work/test/functionalities/data-formatter/data-formatter-stl/libcxx/vbool/TestDataFormatterLibcxxVBool.py
      - copied unchanged from r182522, lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/vbool/TestDataFormatterLibcxxVBool.py
    lldb/branches/lldb-platform-work/test/functionalities/data-formatter/data-formatter-stl/libcxx/vbool/main.cpp
      - copied unchanged from r182522, lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/vbool/main.cpp
    lldb/branches/lldb-platform-work/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/iterator/
      - copied from r182522, lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/iterator/
    lldb/branches/lldb-platform-work/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/iterator/Makefile
      - copied, changed from r182522, lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/iterator/Makefile
    lldb/branches/lldb-platform-work/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/iterator/TestDataFormatterStdIterator.py
      - copied unchanged from r182522, lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/iterator/TestDataFormatterStdIterator.py
    lldb/branches/lldb-platform-work/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/iterator/main.cpp
      - copied unchanged from r182522, lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/iterator/main.cpp
    lldb/branches/lldb-platform-work/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/string/
      - copied from r182522, lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/string/
    lldb/branches/lldb-platform-work/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/string/Makefile
      - copied, changed from r182522, lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/string/Makefile
    lldb/branches/lldb-platform-work/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/string/TestDataFormatterStdString.py
      - copied unchanged from r182522, lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/string/TestDataFormatterStdString.py
    lldb/branches/lldb-platform-work/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/string/main.cpp
      - copied unchanged from r182522, lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/string/main.cpp
    lldb/branches/lldb-platform-work/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vbool/
      - copied from r182522, lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vbool/
    lldb/branches/lldb-platform-work/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vbool/Makefile
      - copied, changed from r182522, lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vbool/Makefile
    lldb/branches/lldb-platform-work/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vbool/TestDataFormatterStdVBool.py
      - copied unchanged from r182522, lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vbool/TestDataFormatterStdVBool.py
    lldb/branches/lldb-platform-work/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vbool/main.cpp
      - copied unchanged from r182522, lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vbool/main.cpp
    lldb/branches/lldb-platform-work/test/functionalities/data-formatter/format-propagation/
      - copied from r183050, lldb/trunk/test/functionalities/data-formatter/format-propagation/
    lldb/branches/lldb-platform-work/test/functionalities/data-formatter/format-propagation/Makefile
      - copied unchanged from r183050, lldb/trunk/test/functionalities/data-formatter/format-propagation/Makefile
    lldb/branches/lldb-platform-work/test/functionalities/data-formatter/format-propagation/TestFormatPropagation.py
      - copied unchanged from r183050, lldb/trunk/test/functionalities/data-formatter/format-propagation/TestFormatPropagation.py
    lldb/branches/lldb-platform-work/test/functionalities/data-formatter/format-propagation/main.cpp
      - copied unchanged from r183050, lldb/trunk/test/functionalities/data-formatter/format-propagation/main.cpp
    lldb/branches/lldb-platform-work/test/functionalities/data-formatter/rdar-11086338/
      - copied from r182522, lldb/trunk/test/functionalities/data-formatter/rdar-11086338/
    lldb/branches/lldb-platform-work/test/functionalities/data-formatter/rdar-11086338/Makefile
      - copied unchanged from r182522, lldb/trunk/test/functionalities/data-formatter/rdar-11086338/Makefile
    lldb/branches/lldb-platform-work/test/functionalities/data-formatter/rdar-11086338/TestRdar11086338.py
      - copied unchanged from r182522, lldb/trunk/test/functionalities/data-formatter/rdar-11086338/TestRdar11086338.py
    lldb/branches/lldb-platform-work/test/functionalities/data-formatter/rdar-11086338/main.m
      - copied unchanged from r182522, lldb/trunk/test/functionalities/data-formatter/rdar-11086338/main.m
    lldb/branches/lldb-platform-work/test/functionalities/data-formatter/rdar-11988289/
      - copied from r182522, lldb/trunk/test/functionalities/data-formatter/rdar-11988289/
    lldb/branches/lldb-platform-work/test/functionalities/data-formatter/rdar-11988289/Makefile
      - copied unchanged from r182522, lldb/trunk/test/functionalities/data-formatter/rdar-11988289/Makefile
    lldb/branches/lldb-platform-work/test/functionalities/data-formatter/rdar-11988289/TestRdar 11988289.py
      - copied unchanged from r182522, lldb/trunk/test/functionalities/data-formatter/rdar-11988289/TestRdar 11988289.py
    lldb/branches/lldb-platform-work/test/functionalities/data-formatter/rdar-11988289/main.m
      - copied unchanged from r182522, lldb/trunk/test/functionalities/data-formatter/rdar-11988289/main.m
    lldb/branches/lldb-platform-work/test/functionalities/data-formatter/rdar-12437442/
      - copied from r182522, lldb/trunk/test/functionalities/data-formatter/rdar-12437442/
    lldb/branches/lldb-platform-work/test/functionalities/data-formatter/rdar-12437442/Makefile
      - copied unchanged from r182522, lldb/trunk/test/functionalities/data-formatter/rdar-12437442/Makefile
    lldb/branches/lldb-platform-work/test/functionalities/data-formatter/rdar-12437442/TestRdar12437442.py
      - copied unchanged from r182522, lldb/trunk/test/functionalities/data-formatter/rdar-12437442/TestRdar12437442.py
    lldb/branches/lldb-platform-work/test/functionalities/data-formatter/rdar-12437442/main.m
      - copied unchanged from r182522, lldb/trunk/test/functionalities/data-formatter/rdar-12437442/main.m
    lldb/branches/lldb-platform-work/test/functionalities/data-formatter/rdar-12529957/
      - copied from r182522, lldb/trunk/test/functionalities/data-formatter/rdar-12529957/
    lldb/branches/lldb-platform-work/test/functionalities/data-formatter/rdar-12529957/Makefile
      - copied unchanged from r182522, lldb/trunk/test/functionalities/data-formatter/rdar-12529957/Makefile
    lldb/branches/lldb-platform-work/test/functionalities/data-formatter/rdar-12529957/TestRdar12529957.py
      - copied unchanged from r182522, lldb/trunk/test/functionalities/data-formatter/rdar-12529957/TestRdar12529957.py
    lldb/branches/lldb-platform-work/test/functionalities/data-formatter/rdar-12529957/main.m
      - copied unchanged from r182522, lldb/trunk/test/functionalities/data-formatter/rdar-12529957/main.m
    lldb/branches/lldb-platform-work/test/functionalities/data-formatter/rdar-13338477/
      - copied from r182522, lldb/trunk/test/functionalities/data-formatter/rdar-13338477/
    lldb/branches/lldb-platform-work/test/functionalities/data-formatter/rdar-13338477/Makefile
      - copied unchanged from r182522, lldb/trunk/test/functionalities/data-formatter/rdar-13338477/Makefile
    lldb/branches/lldb-platform-work/test/functionalities/data-formatter/rdar-13338477/Test-rdar-13338477.py
      - copied unchanged from r182522, lldb/trunk/test/functionalities/data-formatter/rdar-13338477/Test-rdar-13338477.py
    lldb/branches/lldb-platform-work/test/functionalities/data-formatter/rdar-13338477/main.cpp
      - copied unchanged from r182522, lldb/trunk/test/functionalities/data-formatter/rdar-13338477/main.cpp
    lldb/branches/lldb-platform-work/test/functionalities/exec/
      - copied from r182522, lldb/trunk/test/functionalities/exec/
    lldb/branches/lldb-platform-work/test/functionalities/exec/Makefile
      - copied unchanged from r182522, lldb/trunk/test/functionalities/exec/Makefile
    lldb/branches/lldb-platform-work/test/functionalities/exec/TestExec.py
      - copied unchanged from r182522, lldb/trunk/test/functionalities/exec/TestExec.py
    lldb/branches/lldb-platform-work/test/functionalities/exec/main.cpp
      - copied unchanged from r182522, lldb/trunk/test/functionalities/exec/main.cpp
    lldb/branches/lldb-platform-work/test/functionalities/expr-doesnt-deadlock/.categories
      - copied unchanged from r182522, lldb/trunk/test/functionalities/expr-doesnt-deadlock/.categories
    lldb/branches/lldb-platform-work/test/functionalities/fat_archives/
      - copied from r182522, lldb/trunk/test/functionalities/fat_archives/
    lldb/branches/lldb-platform-work/test/functionalities/fat_archives/Makefile
      - copied unchanged from r182522, lldb/trunk/test/functionalities/fat_archives/Makefile
    lldb/branches/lldb-platform-work/test/functionalities/fat_archives/TestFatArchives.py
      - copied unchanged from r182522, lldb/trunk/test/functionalities/fat_archives/TestFatArchives.py
    lldb/branches/lldb-platform-work/test/functionalities/fat_archives/a.c
      - copied unchanged from r182522, lldb/trunk/test/functionalities/fat_archives/a.c
    lldb/branches/lldb-platform-work/test/functionalities/fat_archives/a.h
      - copied unchanged from r182522, lldb/trunk/test/functionalities/fat_archives/a.h
    lldb/branches/lldb-platform-work/test/functionalities/fat_archives/main.c
      - copied unchanged from r182522, lldb/trunk/test/functionalities/fat_archives/main.c
    lldb/branches/lldb-platform-work/test/functionalities/inferior-assert/
      - copied from r182522, lldb/trunk/test/functionalities/inferior-assert/
    lldb/branches/lldb-platform-work/test/functionalities/inferior-assert/Makefile
      - copied unchanged from r182522, lldb/trunk/test/functionalities/inferior-assert/Makefile
    lldb/branches/lldb-platform-work/test/functionalities/inferior-assert/TestInferiorAssert.py
      - copied unchanged from r182522, lldb/trunk/test/functionalities/inferior-assert/TestInferiorAssert.py
    lldb/branches/lldb-platform-work/test/functionalities/inferior-assert/main.c
      - copied unchanged from r182522, lldb/trunk/test/functionalities/inferior-assert/main.c
    lldb/branches/lldb-platform-work/test/functionalities/inferior-crashing/recursive-inferior/
      - copied from r183457, lldb/trunk/test/functionalities/inferior-crashing/recursive-inferior/
    lldb/branches/lldb-platform-work/test/functionalities/inferior-crashing/recursive-inferior/Makefile
      - copied unchanged from r183457, lldb/trunk/test/functionalities/inferior-crashing/recursive-inferior/Makefile
    lldb/branches/lldb-platform-work/test/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferior.py
      - copied unchanged from r183457, lldb/trunk/test/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferior.py
    lldb/branches/lldb-platform-work/test/functionalities/inferior-crashing/recursive-inferior/main.c
      - copied unchanged from r183457, lldb/trunk/test/functionalities/inferior-crashing/recursive-inferior/main.c
    lldb/branches/lldb-platform-work/test/functionalities/inline-stepping/
      - copied from r182522, lldb/trunk/test/functionalities/inline-stepping/
    lldb/branches/lldb-platform-work/test/functionalities/inline-stepping/Makefile
      - copied unchanged from r182522, lldb/trunk/test/functionalities/inline-stepping/Makefile
    lldb/branches/lldb-platform-work/test/functionalities/inline-stepping/TestInlineStepping.py
      - copied unchanged from r182522, lldb/trunk/test/functionalities/inline-stepping/TestInlineStepping.py
    lldb/branches/lldb-platform-work/test/functionalities/inline-stepping/calling.cpp
      - copied unchanged from r182522, lldb/trunk/test/functionalities/inline-stepping/calling.cpp
    lldb/branches/lldb-platform-work/test/functionalities/plugins/
      - copied from r182522, lldb/trunk/test/functionalities/plugins/
    lldb/branches/lldb-platform-work/test/functionalities/plugins/commands/
      - copied from r182522, lldb/trunk/test/functionalities/plugins/commands/
    lldb/branches/lldb-platform-work/test/functionalities/plugins/commands/Makefile
      - copied unchanged from r182522, lldb/trunk/test/functionalities/plugins/commands/Makefile
    lldb/branches/lldb-platform-work/test/functionalities/plugins/commands/TestPluginCommands.py
      - copied unchanged from r182522, lldb/trunk/test/functionalities/plugins/commands/TestPluginCommands.py
    lldb/branches/lldb-platform-work/test/functionalities/plugins/commands/plugin.cpp
      - copied unchanged from r182522, lldb/trunk/test/functionalities/plugins/commands/plugin.cpp
    lldb/branches/lldb-platform-work/test/functionalities/process_attach/
      - copied from r182522, lldb/trunk/test/functionalities/process_attach/
    lldb/branches/lldb-platform-work/test/functionalities/process_attach/Makefile
      - copied unchanged from r182522, lldb/trunk/test/functionalities/process_attach/Makefile
    lldb/branches/lldb-platform-work/test/functionalities/process_attach/TestProcessAttach.py
      - copied unchanged from r182522, lldb/trunk/test/functionalities/process_attach/TestProcessAttach.py
    lldb/branches/lldb-platform-work/test/functionalities/process_attach/main.c
      - copied unchanged from r182522, lldb/trunk/test/functionalities/process_attach/main.c
    lldb/branches/lldb-platform-work/test/functionalities/recursion/
      - copied from r182522, lldb/trunk/test/functionalities/recursion/
    lldb/branches/lldb-platform-work/test/functionalities/recursion/Makefile
      - copied unchanged from r182522, lldb/trunk/test/functionalities/recursion/Makefile
    lldb/branches/lldb-platform-work/test/functionalities/recursion/TestValueObjectRecursion.py
      - copied unchanged from r182522, lldb/trunk/test/functionalities/recursion/TestValueObjectRecursion.py
    lldb/branches/lldb-platform-work/test/functionalities/recursion/main.cpp
      - copied unchanged from r182522, lldb/trunk/test/functionalities/recursion/main.cpp
    lldb/branches/lldb-platform-work/test/functionalities/set-data/
      - copied from r182522, lldb/trunk/test/functionalities/set-data/
    lldb/branches/lldb-platform-work/test/functionalities/set-data/Makefile
      - copied unchanged from r182522, lldb/trunk/test/functionalities/set-data/Makefile
    lldb/branches/lldb-platform-work/test/functionalities/set-data/TestSetData.py
      - copied unchanged from r182522, lldb/trunk/test/functionalities/set-data/TestSetData.py
    lldb/branches/lldb-platform-work/test/functionalities/set-data/main.m
      - copied unchanged from r182522, lldb/trunk/test/functionalities/set-data/main.m
    lldb/branches/lldb-platform-work/test/functionalities/thread/
      - copied from r182522, lldb/trunk/test/functionalities/thread/
    lldb/branches/lldb-platform-work/test/functionalities/thread/Makefile
      - copied unchanged from r182522, lldb/trunk/test/functionalities/thread/Makefile
    lldb/branches/lldb-platform-work/test/functionalities/thread/TestNumThreads.py
      - copied unchanged from r182522, lldb/trunk/test/functionalities/thread/TestNumThreads.py
    lldb/branches/lldb-platform-work/test/functionalities/thread/break_after_join/
      - copied from r182884, lldb/trunk/test/functionalities/thread/break_after_join/
    lldb/branches/lldb-platform-work/test/functionalities/thread/break_after_join/Makefile
      - copied unchanged from r182884, lldb/trunk/test/functionalities/thread/break_after_join/Makefile
    lldb/branches/lldb-platform-work/test/functionalities/thread/break_after_join/TestBreakAfterJoin.py
      - copied, changed from r182884, lldb/trunk/test/functionalities/thread/break_after_join/TestBreakAfterJoin.py
    lldb/branches/lldb-platform-work/test/functionalities/thread/break_after_join/main.cpp
      - copied unchanged from r182884, lldb/trunk/test/functionalities/thread/break_after_join/main.cpp
    lldb/branches/lldb-platform-work/test/functionalities/thread/create_after_attach/
      - copied from r183363, lldb/trunk/test/functionalities/thread/create_after_attach/
    lldb/branches/lldb-platform-work/test/functionalities/thread/create_after_attach/Makefile
      - copied unchanged from r183363, lldb/trunk/test/functionalities/thread/create_after_attach/Makefile
    lldb/branches/lldb-platform-work/test/functionalities/thread/create_after_attach/TestCreateAfterAttach.py
      - copied unchanged from r183363, lldb/trunk/test/functionalities/thread/create_after_attach/TestCreateAfterAttach.py
    lldb/branches/lldb-platform-work/test/functionalities/thread/create_after_attach/main.c
      - copied unchanged from r183363, lldb/trunk/test/functionalities/thread/create_after_attach/main.c
    lldb/branches/lldb-platform-work/test/functionalities/thread/create_during_step/
      - copied from r182884, lldb/trunk/test/functionalities/thread/create_during_step/
    lldb/branches/lldb-platform-work/test/functionalities/thread/create_during_step/Makefile
      - copied unchanged from r182884, lldb/trunk/test/functionalities/thread/create_during_step/Makefile
    lldb/branches/lldb-platform-work/test/functionalities/thread/create_during_step/TestCreateDuringStep.py
      - copied, changed from r182884, lldb/trunk/test/functionalities/thread/create_during_step/TestCreateDuringStep.py
    lldb/branches/lldb-platform-work/test/functionalities/thread/create_during_step/main.cpp
      - copied unchanged from r182884, lldb/trunk/test/functionalities/thread/create_during_step/main.cpp
    lldb/branches/lldb-platform-work/test/functionalities/thread/exit_during_break/
      - copied from r182884, lldb/trunk/test/functionalities/thread/exit_during_break/
    lldb/branches/lldb-platform-work/test/functionalities/thread/exit_during_break/Makefile
      - copied unchanged from r182884, lldb/trunk/test/functionalities/thread/exit_during_break/Makefile
    lldb/branches/lldb-platform-work/test/functionalities/thread/exit_during_break/TestExitDuringBreak.py
      - copied unchanged from r182884, lldb/trunk/test/functionalities/thread/exit_during_break/TestExitDuringBreak.py
    lldb/branches/lldb-platform-work/test/functionalities/thread/exit_during_break/main.cpp
      - copied unchanged from r182884, lldb/trunk/test/functionalities/thread/exit_during_break/main.cpp
    lldb/branches/lldb-platform-work/test/functionalities/thread/exit_during_step/
      - copied from r182884, lldb/trunk/test/functionalities/thread/exit_during_step/
    lldb/branches/lldb-platform-work/test/functionalities/thread/exit_during_step/Makefile
      - copied unchanged from r182884, lldb/trunk/test/functionalities/thread/exit_during_step/Makefile
    lldb/branches/lldb-platform-work/test/functionalities/thread/exit_during_step/TestExitDuringStep.py
      - copied, changed from r182884, lldb/trunk/test/functionalities/thread/exit_during_step/TestExitDuringStep.py
    lldb/branches/lldb-platform-work/test/functionalities/thread/exit_during_step/main.cpp
      - copied unchanged from r182884, lldb/trunk/test/functionalities/thread/exit_during_step/main.cpp
    lldb/branches/lldb-platform-work/test/functionalities/thread/main.c
      - copied unchanged from r182522, lldb/trunk/test/functionalities/thread/main.c
    lldb/branches/lldb-platform-work/test/functionalities/thread/multi_break/
      - copied from r182884, lldb/trunk/test/functionalities/thread/multi_break/
    lldb/branches/lldb-platform-work/test/functionalities/thread/multi_break/Makefile
      - copied unchanged from r182884, lldb/trunk/test/functionalities/thread/multi_break/Makefile
    lldb/branches/lldb-platform-work/test/functionalities/thread/multi_break/TestMultipleBreakpoints.py
      - copied unchanged from r182884, lldb/trunk/test/functionalities/thread/multi_break/TestMultipleBreakpoints.py
    lldb/branches/lldb-platform-work/test/functionalities/thread/multi_break/main.cpp
      - copied unchanged from r182884, lldb/trunk/test/functionalities/thread/multi_break/main.cpp
    lldb/branches/lldb-platform-work/test/functionalities/thread/state/
      - copied from r182522, lldb/trunk/test/functionalities/thread/state/
    lldb/branches/lldb-platform-work/test/functionalities/thread/state/Makefile
      - copied, changed from r182522, lldb/trunk/test/functionalities/thread/state/Makefile
    lldb/branches/lldb-platform-work/test/functionalities/thread/state/TestThreadStates.py
      - copied, changed from r182522, lldb/trunk/test/functionalities/thread/state/TestThreadStates.py
    lldb/branches/lldb-platform-work/test/functionalities/thread/state/main.c
      - copied unchanged from r182522, lldb/trunk/test/functionalities/thread/state/main.c
    lldb/branches/lldb-platform-work/test/functionalities/thread/thread_exit/
      - copied from r182884, lldb/trunk/test/functionalities/thread/thread_exit/
    lldb/branches/lldb-platform-work/test/functionalities/thread/thread_exit/Makefile
      - copied unchanged from r182884, lldb/trunk/test/functionalities/thread/thread_exit/Makefile
    lldb/branches/lldb-platform-work/test/functionalities/thread/thread_exit/TestThreadExit.py
      - copied unchanged from r182884, lldb/trunk/test/functionalities/thread/thread_exit/TestThreadExit.py
    lldb/branches/lldb-platform-work/test/functionalities/thread/thread_exit/main.cpp
      - copied unchanged from r182884, lldb/trunk/test/functionalities/thread/thread_exit/main.cpp
    lldb/branches/lldb-platform-work/test/functionalities/watchpoint/variable_out_of_scope/
      - copied from r182522, lldb/trunk/test/functionalities/watchpoint/variable_out_of_scope/
    lldb/branches/lldb-platform-work/test/functionalities/watchpoint/variable_out_of_scope/Makefile
      - copied unchanged from r182522, lldb/trunk/test/functionalities/watchpoint/variable_out_of_scope/Makefile
    lldb/branches/lldb-platform-work/test/functionalities/watchpoint/variable_out_of_scope/TestWatchedVarHitWhenInScope.py
      - copied unchanged from r182522, lldb/trunk/test/functionalities/watchpoint/variable_out_of_scope/TestWatchedVarHitWhenInScope.py
    lldb/branches/lldb-platform-work/test/functionalities/watchpoint/variable_out_of_scope/main.c
      - copied unchanged from r182522, lldb/trunk/test/functionalities/watchpoint/variable_out_of_scope/main.c
    lldb/branches/lldb-platform-work/test/functionalities/watchpoint/watchpoint_events/
      - copied from r182522, lldb/trunk/test/functionalities/watchpoint/watchpoint_events/
    lldb/branches/lldb-platform-work/test/functionalities/watchpoint/watchpoint_events/Makefile
      - copied unchanged from r182522, lldb/trunk/test/functionalities/watchpoint/watchpoint_events/Makefile
    lldb/branches/lldb-platform-work/test/functionalities/watchpoint/watchpoint_events/TestWatchpointEvents.py
      - copied unchanged from r182522, lldb/trunk/test/functionalities/watchpoint/watchpoint_events/TestWatchpointEvents.py
    lldb/branches/lldb-platform-work/test/functionalities/watchpoint/watchpoint_events/main.c
      - copied unchanged from r182522, lldb/trunk/test/functionalities/watchpoint/watchpoint_events/main.c
    lldb/branches/lldb-platform-work/test/lang/c/const_variables/
      - copied from r182522, lldb/trunk/test/lang/c/const_variables/
    lldb/branches/lldb-platform-work/test/lang/c/const_variables/Makefile
      - copied unchanged from r182522, lldb/trunk/test/lang/c/const_variables/Makefile
    lldb/branches/lldb-platform-work/test/lang/c/const_variables/TestConstVariables.py
      - copied unchanged from r182522, lldb/trunk/test/lang/c/const_variables/TestConstVariables.py
    lldb/branches/lldb-platform-work/test/lang/c/const_variables/functions.c
      - copied unchanged from r182522, lldb/trunk/test/lang/c/const_variables/functions.c
    lldb/branches/lldb-platform-work/test/lang/c/const_variables/main.c
      - copied unchanged from r182522, lldb/trunk/test/lang/c/const_variables/main.c
    lldb/branches/lldb-platform-work/test/lang/cpp/bool/
      - copied from r182522, lldb/trunk/test/lang/cpp/bool/
    lldb/branches/lldb-platform-work/test/lang/cpp/bool/Makefile
      - copied unchanged from r182522, lldb/trunk/test/lang/cpp/bool/Makefile
    lldb/branches/lldb-platform-work/test/lang/cpp/bool/TestCPPBool.py
      - copied unchanged from r182522, lldb/trunk/test/lang/cpp/bool/TestCPPBool.py
    lldb/branches/lldb-platform-work/test/lang/cpp/bool/main.cpp
      - copied unchanged from r182522, lldb/trunk/test/lang/cpp/bool/main.cpp
    lldb/branches/lldb-platform-work/test/lang/cpp/call-function/
      - copied from r182522, lldb/trunk/test/lang/cpp/call-function/
    lldb/branches/lldb-platform-work/test/lang/cpp/call-function/Makefile
      - copied unchanged from r182522, lldb/trunk/test/lang/cpp/call-function/Makefile
    lldb/branches/lldb-platform-work/test/lang/cpp/call-function/TestCallCPPFunction.py
      - copied unchanged from r182522, lldb/trunk/test/lang/cpp/call-function/TestCallCPPFunction.py
    lldb/branches/lldb-platform-work/test/lang/cpp/call-function/main.cpp
      - copied unchanged from r182522, lldb/trunk/test/lang/cpp/call-function/main.cpp
    lldb/branches/lldb-platform-work/test/lang/cpp/char1632_t/
      - copied from r182522, lldb/trunk/test/lang/cpp/char1632_t/
    lldb/branches/lldb-platform-work/test/lang/cpp/char1632_t/.categories
      - copied unchanged from r182522, lldb/trunk/test/lang/cpp/char1632_t/.categories
    lldb/branches/lldb-platform-work/test/lang/cpp/char1632_t/Makefile
      - copied unchanged from r182522, lldb/trunk/test/lang/cpp/char1632_t/Makefile
    lldb/branches/lldb-platform-work/test/lang/cpp/char1632_t/TestChar1632T.py
      - copied unchanged from r182522, lldb/trunk/test/lang/cpp/char1632_t/TestChar1632T.py
    lldb/branches/lldb-platform-work/test/lang/cpp/char1632_t/main.cpp
      - copied unchanged from r182522, lldb/trunk/test/lang/cpp/char1632_t/main.cpp
    lldb/branches/lldb-platform-work/test/lang/cpp/enum_types/
      - copied from r182522, lldb/trunk/test/lang/cpp/enum_types/
    lldb/branches/lldb-platform-work/test/lang/cpp/enum_types/Makefile
      - copied unchanged from r182522, lldb/trunk/test/lang/cpp/enum_types/Makefile
    lldb/branches/lldb-platform-work/test/lang/cpp/enum_types/TestCPP11EnumTypes.py
      - copied unchanged from r182522, lldb/trunk/test/lang/cpp/enum_types/TestCPP11EnumTypes.py
    lldb/branches/lldb-platform-work/test/lang/cpp/enum_types/main.cpp
      - copied unchanged from r182522, lldb/trunk/test/lang/cpp/enum_types/main.cpp
    lldb/branches/lldb-platform-work/test/lang/cpp/overloaded-functions/
      - copied from r182522, lldb/trunk/test/lang/cpp/overloaded-functions/
    lldb/branches/lldb-platform-work/test/lang/cpp/overloaded-functions/Makefile
      - copied unchanged from r182522, lldb/trunk/test/lang/cpp/overloaded-functions/Makefile
    lldb/branches/lldb-platform-work/test/lang/cpp/overloaded-functions/TestOverloadedFunctions.py
      - copied unchanged from r182522, lldb/trunk/test/lang/cpp/overloaded-functions/TestOverloadedFunctions.py
    lldb/branches/lldb-platform-work/test/lang/cpp/overloaded-functions/main.cpp
      - copied unchanged from r182522, lldb/trunk/test/lang/cpp/overloaded-functions/main.cpp
    lldb/branches/lldb-platform-work/test/lang/cpp/overloaded-functions/static-a.cpp
      - copied unchanged from r182522, lldb/trunk/test/lang/cpp/overloaded-functions/static-a.cpp
    lldb/branches/lldb-platform-work/test/lang/cpp/overloaded-functions/static-b.cpp
      - copied unchanged from r182522, lldb/trunk/test/lang/cpp/overloaded-functions/static-b.cpp
    lldb/branches/lldb-platform-work/test/lang/cpp/rdar12991846/
      - copied from r182522, lldb/trunk/test/lang/cpp/rdar12991846/
    lldb/branches/lldb-platform-work/test/lang/cpp/rdar12991846/Makefile
      - copied unchanged from r182522, lldb/trunk/test/lang/cpp/rdar12991846/Makefile
    lldb/branches/lldb-platform-work/test/lang/cpp/rdar12991846/TestRdar12991846.py
      - copied unchanged from r182522, lldb/trunk/test/lang/cpp/rdar12991846/TestRdar12991846.py
    lldb/branches/lldb-platform-work/test/lang/cpp/rdar12991846/main.cpp
      - copied unchanged from r182522, lldb/trunk/test/lang/cpp/rdar12991846/main.cpp
    lldb/branches/lldb-platform-work/test/lang/cpp/static_members/
      - copied from r182522, lldb/trunk/test/lang/cpp/static_members/
    lldb/branches/lldb-platform-work/test/lang/cpp/static_members/Makefile
      - copied unchanged from r182522, lldb/trunk/test/lang/cpp/static_members/Makefile
    lldb/branches/lldb-platform-work/test/lang/cpp/static_members/TestCPPStaticMembers.py
      - copied unchanged from r182522, lldb/trunk/test/lang/cpp/static_members/TestCPPStaticMembers.py
    lldb/branches/lldb-platform-work/test/lang/cpp/static_members/main.cpp
      - copied unchanged from r182522, lldb/trunk/test/lang/cpp/static_members/main.cpp
    lldb/branches/lldb-platform-work/test/lang/cpp/wchar_t/
      - copied from r182522, lldb/trunk/test/lang/cpp/wchar_t/
    lldb/branches/lldb-platform-work/test/lang/cpp/wchar_t/.categories
      - copied unchanged from r182522, lldb/trunk/test/lang/cpp/wchar_t/.categories
    lldb/branches/lldb-platform-work/test/lang/cpp/wchar_t/Makefile
      - copied unchanged from r182522, lldb/trunk/test/lang/cpp/wchar_t/Makefile
    lldb/branches/lldb-platform-work/test/lang/cpp/wchar_t/TestCxxWCharT.py
      - copied unchanged from r182522, lldb/trunk/test/lang/cpp/wchar_t/TestCxxWCharT.py
    lldb/branches/lldb-platform-work/test/lang/cpp/wchar_t/main.cpp
      - copied unchanged from r182522, lldb/trunk/test/lang/cpp/wchar_t/main.cpp
    lldb/branches/lldb-platform-work/test/lang/objc/.categories
      - copied unchanged from r182522, lldb/trunk/test/lang/objc/.categories
    lldb/branches/lldb-platform-work/test/lang/objc/blocks/
      - copied from r182522, lldb/trunk/test/lang/objc/blocks/
    lldb/branches/lldb-platform-work/test/lang/objc/blocks/Makefile
      - copied unchanged from r182522, lldb/trunk/test/lang/objc/blocks/Makefile
    lldb/branches/lldb-platform-work/test/lang/objc/blocks/TestObjCIvarsInBlocks.py
      - copied unchanged from r182522, lldb/trunk/test/lang/objc/blocks/TestObjCIvarsInBlocks.py
    lldb/branches/lldb-platform-work/test/lang/objc/blocks/ivars-in-blocks.h
      - copied unchanged from r182522, lldb/trunk/test/lang/objc/blocks/ivars-in-blocks.h
    lldb/branches/lldb-platform-work/test/lang/objc/blocks/ivars-in-blocks.m
      - copied unchanged from r182522, lldb/trunk/test/lang/objc/blocks/ivars-in-blocks.m
    lldb/branches/lldb-platform-work/test/lang/objc/blocks/main.m
      - copied unchanged from r182522, lldb/trunk/test/lang/objc/blocks/main.m
    lldb/branches/lldb-platform-work/test/lang/objc/foundation/TestRuntimeTypes.py
      - copied unchanged from r182522, lldb/trunk/test/lang/objc/foundation/TestRuntimeTypes.py
    lldb/branches/lldb-platform-work/test/lang/objc/objc-ivar-stripped/
      - copied from r182522, lldb/trunk/test/lang/objc/objc-ivar-stripped/
    lldb/branches/lldb-platform-work/test/lang/objc/objc-ivar-stripped/Makefile
      - copied unchanged from r182522, lldb/trunk/test/lang/objc/objc-ivar-stripped/Makefile
    lldb/branches/lldb-platform-work/test/lang/objc/objc-ivar-stripped/TestObjCIvarStripped.py
      - copied unchanged from r182522, lldb/trunk/test/lang/objc/objc-ivar-stripped/TestObjCIvarStripped.py
    lldb/branches/lldb-platform-work/test/lang/objc/objc-ivar-stripped/main.m
      - copied unchanged from r182522, lldb/trunk/test/lang/objc/objc-ivar-stripped/main.m
    lldb/branches/lldb-platform-work/test/lang/objc/objc-static-method-stripped/
      - copied from r182522, lldb/trunk/test/lang/objc/objc-static-method-stripped/
    lldb/branches/lldb-platform-work/test/lang/objc/objc-static-method-stripped/Makefile
      - copied unchanged from r182522, lldb/trunk/test/lang/objc/objc-static-method-stripped/Makefile
    lldb/branches/lldb-platform-work/test/lang/objc/objc-static-method-stripped/TestObjCStaticMethodStripped.py
      - copied unchanged from r182522, lldb/trunk/test/lang/objc/objc-static-method-stripped/TestObjCStaticMethodStripped.py
    lldb/branches/lldb-platform-work/test/lang/objc/objc-static-method-stripped/static.m
      - copied unchanged from r182522, lldb/trunk/test/lang/objc/objc-static-method-stripped/static.m
    lldb/branches/lldb-platform-work/test/lang/objc/objc-super/
      - copied from r182522, lldb/trunk/test/lang/objc/objc-super/
    lldb/branches/lldb-platform-work/test/lang/objc/objc-super/Makefile
      - copied unchanged from r182522, lldb/trunk/test/lang/objc/objc-super/Makefile
    lldb/branches/lldb-platform-work/test/lang/objc/objc-super/TestObjCSuper.py
      - copied unchanged from r182522, lldb/trunk/test/lang/objc/objc-super/TestObjCSuper.py
    lldb/branches/lldb-platform-work/test/lang/objc/objc-super/class.m
      - copied unchanged from r182522, lldb/trunk/test/lang/objc/objc-super/class.m
    lldb/branches/lldb-platform-work/test/lang/objc/rdar-12408181/
      - copied from r182522, lldb/trunk/test/lang/objc/rdar-12408181/
    lldb/branches/lldb-platform-work/test/lang/objc/rdar-12408181/Makefile
      - copied unchanged from r182522, lldb/trunk/test/lang/objc/rdar-12408181/Makefile
    lldb/branches/lldb-platform-work/test/lang/objc/rdar-12408181/TestRdar12408181.py
      - copied unchanged from r182522, lldb/trunk/test/lang/objc/rdar-12408181/TestRdar12408181.py
    lldb/branches/lldb-platform-work/test/lang/objc/rdar-12408181/main.m
      - copied unchanged from r182522, lldb/trunk/test/lang/objc/rdar-12408181/main.m
    lldb/branches/lldb-platform-work/test/linux/
      - copied from r182522, lldb/trunk/test/linux/
    lldb/branches/lldb-platform-work/test/linux/builtin_trap/
      - copied from r182522, lldb/trunk/test/linux/builtin_trap/
    lldb/branches/lldb-platform-work/test/linux/builtin_trap/Makefile
      - copied unchanged from r182522, lldb/trunk/test/linux/builtin_trap/Makefile
    lldb/branches/lldb-platform-work/test/linux/builtin_trap/TestBuiltinTrap.py
      - copied unchanged from r182522, lldb/trunk/test/linux/builtin_trap/TestBuiltinTrap.py
    lldb/branches/lldb-platform-work/test/linux/builtin_trap/main.cpp
      - copied unchanged from r182522, lldb/trunk/test/linux/builtin_trap/main.cpp
    lldb/branches/lldb-platform-work/test/progress.py
      - copied unchanged from r182522, lldb/trunk/test/progress.py
    lldb/branches/lldb-platform-work/test/python_api/.categories
      - copied unchanged from r182522, lldb/trunk/test/python_api/.categories
    lldb/branches/lldb-platform-work/test/python_api/input_reader/
      - copied from r182522, lldb/trunk/test/python_api/input_reader/
    lldb/branches/lldb-platform-work/test/python_api/input_reader/Makefile
      - copied unchanged from r182522, lldb/trunk/test/python_api/input_reader/Makefile
    lldb/branches/lldb-platform-work/test/python_api/input_reader/TestInputReaderCallback.py
      - copied unchanged from r182522, lldb/trunk/test/python_api/input_reader/TestInputReaderCallback.py
    lldb/branches/lldb-platform-work/test/python_api/input_reader/main.c
      - copied unchanged from r182522, lldb/trunk/test/python_api/input_reader/main.c
    lldb/branches/lldb-platform-work/test/python_api/rdar-12481949/
      - copied from r182522, lldb/trunk/test/python_api/rdar-12481949/
    lldb/branches/lldb-platform-work/test/python_api/rdar-12481949/Makefile
      - copied unchanged from r182522, lldb/trunk/test/python_api/rdar-12481949/Makefile
    lldb/branches/lldb-platform-work/test/python_api/rdar-12481949/Test-rdar-12481949.py
      - copied unchanged from r182522, lldb/trunk/test/python_api/rdar-12481949/Test-rdar-12481949.py
    lldb/branches/lldb-platform-work/test/python_api/rdar-12481949/main.cpp
      - copied unchanged from r182522, lldb/trunk/test/python_api/rdar-12481949/main.cpp
    lldb/branches/lldb-platform-work/test/warnings/uuid/TestAddDsymCommand.py
      - copied unchanged from r182522, lldb/trunk/test/warnings/uuid/TestAddDsymCommand.py
    lldb/branches/lldb-platform-work/tools/CMakeLists.txt
      - copied unchanged from r182522, lldb/trunk/tools/CMakeLists.txt
    lldb/branches/lldb-platform-work/tools/debugserver/scripts/diagnose-termination.d
      - copied unchanged from r182522, lldb/trunk/tools/debugserver/scripts/diagnose-termination.d
    lldb/branches/lldb-platform-work/tools/debugserver/source/com.apple.debugserver.applist.internal.plist
      - copied unchanged from r182522, lldb/trunk/tools/debugserver/source/com.apple.debugserver.applist.internal.plist
    lldb/branches/lldb-platform-work/tools/debugserver/source/com.apple.debugserver.internal.plist
      - copied unchanged from r182522, lldb/trunk/tools/debugserver/source/com.apple.debugserver.internal.plist
    lldb/branches/lldb-platform-work/tools/debugserver/source/com.apple.debugserver.posix.plist
      - copied unchanged from r182522, lldb/trunk/tools/debugserver/source/com.apple.debugserver.posix.plist
    lldb/branches/lldb-platform-work/tools/debugserver/source/libdebugserver.cpp
      - copied unchanged from r182522, lldb/trunk/tools/debugserver/source/libdebugserver.cpp
    lldb/branches/lldb-platform-work/tools/debugserver/source/libdebugserver.h
      - copied unchanged from r182522, lldb/trunk/tools/debugserver/source/libdebugserver.h
    lldb/branches/lldb-platform-work/tools/driver/CMakeLists.txt
      - copied unchanged from r182522, lldb/trunk/tools/driver/CMakeLists.txt
    lldb/branches/lldb-platform-work/tools/lldb-perf/
      - copied from r182522, lldb/trunk/tools/lldb-perf/
    lldb/branches/lldb-platform-work/tools/lldb-perf/README
      - copied unchanged from r182522, lldb/trunk/tools/lldb-perf/README
    lldb/branches/lldb-platform-work/tools/lldb-perf/common/
      - copied from r182522, lldb/trunk/tools/lldb-perf/common/
    lldb/branches/lldb-platform-work/tools/lldb-perf/common/clang/
      - copied from r182522, lldb/trunk/tools/lldb-perf/common/clang/
    lldb/branches/lldb-platform-work/tools/lldb-perf/common/clang/build-clang.sh
      - copied unchanged from r182522, lldb/trunk/tools/lldb-perf/common/clang/build-clang.sh
    lldb/branches/lldb-platform-work/tools/lldb-perf/common/clang/lldb_perf_clang.cpp
      - copied unchanged from r182522, lldb/trunk/tools/lldb-perf/common/clang/lldb_perf_clang.cpp
    lldb/branches/lldb-platform-work/tools/lldb-perf/common/clang/main.cpp
      - copied unchanged from r182522, lldb/trunk/tools/lldb-perf/common/clang/main.cpp
    lldb/branches/lldb-platform-work/tools/lldb-perf/common/stepping/
      - copied from r182522, lldb/trunk/tools/lldb-perf/common/stepping/
    lldb/branches/lldb-platform-work/tools/lldb-perf/common/stepping/lldb-perf-stepping.cpp
      - copied unchanged from r182522, lldb/trunk/tools/lldb-perf/common/stepping/lldb-perf-stepping.cpp
    lldb/branches/lldb-platform-work/tools/lldb-perf/common/stepping/stepping-testcase.cpp
      - copied unchanged from r182522, lldb/trunk/tools/lldb-perf/common/stepping/stepping-testcase.cpp
    lldb/branches/lldb-platform-work/tools/lldb-perf/darwin/
      - copied from r182522, lldb/trunk/tools/lldb-perf/darwin/
    lldb/branches/lldb-platform-work/tools/lldb-perf/darwin/formatters/
      - copied from r182522, lldb/trunk/tools/lldb-perf/darwin/formatters/
    lldb/branches/lldb-platform-work/tools/lldb-perf/darwin/formatters/fmts_tester.mm
      - copied unchanged from r182522, lldb/trunk/tools/lldb-perf/darwin/formatters/fmts_tester.mm
    lldb/branches/lldb-platform-work/tools/lldb-perf/darwin/formatters/formatters.cpp
      - copied unchanged from r182522, lldb/trunk/tools/lldb-perf/darwin/formatters/formatters.cpp
    lldb/branches/lldb-platform-work/tools/lldb-perf/darwin/sketch/
      - copied from r182522, lldb/trunk/tools/lldb-perf/darwin/sketch/
    lldb/branches/lldb-platform-work/tools/lldb-perf/darwin/sketch/foobar.sketch2
      - copied unchanged from r182522, lldb/trunk/tools/lldb-perf/darwin/sketch/foobar.sketch2
    lldb/branches/lldb-platform-work/tools/lldb-perf/darwin/sketch/sketch.cpp
      - copied unchanged from r182522, lldb/trunk/tools/lldb-perf/darwin/sketch/sketch.cpp
    lldb/branches/lldb-platform-work/tools/lldb-perf/lib/
      - copied from r182522, lldb/trunk/tools/lldb-perf/lib/
    lldb/branches/lldb-platform-work/tools/lldb-perf/lib/Gauge.cpp
      - copied unchanged from r182522, lldb/trunk/tools/lldb-perf/lib/Gauge.cpp
    lldb/branches/lldb-platform-work/tools/lldb-perf/lib/Gauge.h
      - copied unchanged from r182522, lldb/trunk/tools/lldb-perf/lib/Gauge.h
    lldb/branches/lldb-platform-work/tools/lldb-perf/lib/Measurement.h
      - copied unchanged from r182522, lldb/trunk/tools/lldb-perf/lib/Measurement.h
    lldb/branches/lldb-platform-work/tools/lldb-perf/lib/MemoryGauge.cpp
      - copied unchanged from r182522, lldb/trunk/tools/lldb-perf/lib/MemoryGauge.cpp
    lldb/branches/lldb-platform-work/tools/lldb-perf/lib/MemoryGauge.h
      - copied unchanged from r182522, lldb/trunk/tools/lldb-perf/lib/MemoryGauge.h
    lldb/branches/lldb-platform-work/tools/lldb-perf/lib/Metric.cpp
      - copied unchanged from r182522, lldb/trunk/tools/lldb-perf/lib/Metric.cpp
    lldb/branches/lldb-platform-work/tools/lldb-perf/lib/Metric.h
      - copied unchanged from r182522, lldb/trunk/tools/lldb-perf/lib/Metric.h
    lldb/branches/lldb-platform-work/tools/lldb-perf/lib/Results.cpp
      - copied unchanged from r182522, lldb/trunk/tools/lldb-perf/lib/Results.cpp
    lldb/branches/lldb-platform-work/tools/lldb-perf/lib/Results.h
      - copied unchanged from r182522, lldb/trunk/tools/lldb-perf/lib/Results.h
    lldb/branches/lldb-platform-work/tools/lldb-perf/lib/TestCase.cpp
      - copied unchanged from r182522, lldb/trunk/tools/lldb-perf/lib/TestCase.cpp
    lldb/branches/lldb-platform-work/tools/lldb-perf/lib/TestCase.h
      - copied unchanged from r182522, lldb/trunk/tools/lldb-perf/lib/TestCase.h
    lldb/branches/lldb-platform-work/tools/lldb-perf/lib/Timer.cpp
      - copied unchanged from r182522, lldb/trunk/tools/lldb-perf/lib/Timer.cpp
    lldb/branches/lldb-platform-work/tools/lldb-perf/lib/Timer.h
      - copied unchanged from r182522, lldb/trunk/tools/lldb-perf/lib/Timer.h
    lldb/branches/lldb-platform-work/tools/lldb-perf/lib/Xcode.cpp
      - copied unchanged from r182522, lldb/trunk/tools/lldb-perf/lib/Xcode.cpp
    lldb/branches/lldb-platform-work/tools/lldb-perf/lib/Xcode.h
      - copied unchanged from r182522, lldb/trunk/tools/lldb-perf/lib/Xcode.h
    lldb/branches/lldb-platform-work/tools/lldb-perf/lldbperf.xcodeproj/
      - copied from r182522, lldb/trunk/tools/lldb-perf/lldbperf.xcodeproj/
    lldb/branches/lldb-platform-work/tools/lldb-perf/lldbperf.xcodeproj/project.pbxproj
      - copied unchanged from r182522, lldb/trunk/tools/lldb-perf/lldbperf.xcodeproj/project.pbxproj
    lldb/branches/lldb-platform-work/tools/lldb-perf/lldbperf.xcodeproj/xcuserdata/
      - copied from r182522, lldb/trunk/tools/lldb-perf/lldbperf.xcodeproj/xcuserdata/
    lldb/branches/lldb-platform-work/utils/vim-lldb/
      - copied from r182522, lldb/trunk/utils/vim-lldb/
    lldb/branches/lldb-platform-work/utils/vim-lldb/README
      - copied unchanged from r182522, lldb/trunk/utils/vim-lldb/README
    lldb/branches/lldb-platform-work/utils/vim-lldb/doc/
      - copied from r182522, lldb/trunk/utils/vim-lldb/doc/
    lldb/branches/lldb-platform-work/utils/vim-lldb/doc/lldb.txt
      - copied, changed from r182522, lldb/trunk/utils/vim-lldb/doc/lldb.txt
    lldb/branches/lldb-platform-work/utils/vim-lldb/plugin/
      - copied from r182522, lldb/trunk/utils/vim-lldb/plugin/
    lldb/branches/lldb-platform-work/utils/vim-lldb/plugin/lldb.vim
      - copied, changed from r182522, lldb/trunk/utils/vim-lldb/plugin/lldb.vim
    lldb/branches/lldb-platform-work/utils/vim-lldb/python-vim-lldb/
      - copied from r182522, lldb/trunk/utils/vim-lldb/python-vim-lldb/
    lldb/branches/lldb-platform-work/utils/vim-lldb/python-vim-lldb/import_lldb.py
      - copied unchanged from r182522, lldb/trunk/utils/vim-lldb/python-vim-lldb/import_lldb.py
    lldb/branches/lldb-platform-work/utils/vim-lldb/python-vim-lldb/lldb_controller.py
      - copied, changed from r182522, lldb/trunk/utils/vim-lldb/python-vim-lldb/lldb_controller.py
    lldb/branches/lldb-platform-work/utils/vim-lldb/python-vim-lldb/plugin.py
      - copied unchanged from r182522, lldb/trunk/utils/vim-lldb/python-vim-lldb/plugin.py
    lldb/branches/lldb-platform-work/utils/vim-lldb/python-vim-lldb/vim_panes.py
      - copied unchanged from r182522, lldb/trunk/utils/vim-lldb/python-vim-lldb/vim_panes.py
    lldb/branches/lldb-platform-work/utils/vim-lldb/python-vim-lldb/vim_signs.py
      - copied unchanged from r182522, lldb/trunk/utils/vim-lldb/python-vim-lldb/vim_signs.py
    lldb/branches/lldb-platform-work/utils/vim-lldb/python-vim-lldb/vim_ui.py
      - copied unchanged from r182522, lldb/trunk/utils/vim-lldb/python-vim-lldb/vim_ui.py
    lldb/branches/lldb-platform-work/www/symbolication.html
      - copied unchanged from r182522, lldb/trunk/www/symbolication.html
    lldb/branches/lldb-platform-work/www/symbols.html
      - copied unchanged from r182522, lldb/trunk/www/symbols.html
Removed:
    lldb/branches/lldb-platform-work/include/lldb/Core/DataVisualization.h
    lldb/branches/lldb-platform-work/include/lldb/Core/FormatClasses.h
    lldb/branches/lldb-platform-work/include/lldb/Core/FormatManager.h
    lldb/branches/lldb-platform-work/include/lldb/Core/FormatNavigator.h
    lldb/branches/lldb-platform-work/include/lldb/Expression/ProcessDataAllocator.h
    lldb/branches/lldb-platform-work/include/lldb/Expression/RecordingMemoryManager.h
    lldb/branches/lldb-platform-work/include/lldb/Interpreter/CommandObjectCrossref.h
    lldb/branches/lldb-platform-work/include/lldb/Interpreter/NamedOptionValue.h
    lldb/branches/lldb-platform-work/llvm.zip
    lldb/branches/lldb-platform-work/scripts/clang.amalgamated.diff
    lldb/branches/lldb-platform-work/scripts/llvm.amalgamated.diff
    lldb/branches/lldb-platform-work/source/Commands/CommandObjectCrossref.cpp
    lldb/branches/lldb-platform-work/source/Core/DataVisualization.cpp
    lldb/branches/lldb-platform-work/source/Core/FormatClasses.cpp
    lldb/branches/lldb-platform-work/source/Core/FormatManager.cpp
    lldb/branches/lldb-platform-work/source/Expression/ProcessDataAllocator.cpp
    lldb/branches/lldb-platform-work/source/Expression/RecordingMemoryManager.cpp
    lldb/branches/lldb-platform-work/source/Interpreter/NamedOptionValue.cpp
    lldb/branches/lldb-platform-work/source/Plugins/Disassembler/llvm/DisassemblerLLVM.cpp
    lldb/branches/lldb-platform-work/source/Plugins/Disassembler/llvm/DisassemblerLLVM.h
    lldb/branches/lldb-platform-work/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCSymbolVendor.cpp
    lldb/branches/lldb-platform-work/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCSymbolVendor.h
    lldb/branches/lldb-platform-work/source/Plugins/OperatingSystem/Darwin-Kernel/
    lldb/branches/lldb-platform-work/test/warnings/uuid/TestUUIDMismatchWanring.py
    lldb/branches/lldb-platform-work/tools/debugserver/source/FunctionProfiler.cpp
    lldb/branches/lldb-platform-work/tools/debugserver/source/FunctionProfiler.h
    lldb/branches/lldb-platform-work/tools/debugserver/source/MacOSX/MachDYLD.cpp
    lldb/branches/lldb-platform-work/tools/debugserver/source/MacOSX/MachDYLD.h
    lldb/branches/lldb-platform-work/tools/debugserver/source/ProfileObjectiveC.cpp
    lldb/branches/lldb-platform-work/tools/debugserver/source/ProfileObjectiveC.h
Modified:
    lldb/branches/lldb-platform-work/   (props changed)
    lldb/branches/lldb-platform-work/INSTALL.txt
    lldb/branches/lldb-platform-work/Makefile
    lldb/branches/lldb-platform-work/docs/code-signing.txt
    lldb/branches/lldb-platform-work/docs/lldb-for-gdb-users.txt
    lldb/branches/lldb-platform-work/docs/lldb-gdb-remote.txt
    lldb/branches/lldb-platform-work/examples/darwin/heap_find/heap.py
    lldb/branches/lldb-platform-work/examples/darwin/heap_find/heap/Makefile
    lldb/branches/lldb-platform-work/examples/darwin/heap_find/heap/heap_find.cpp
    lldb/branches/lldb-platform-work/examples/python/cmdtemplate.py
    lldb/branches/lldb-platform-work/examples/python/crashlog.py
    lldb/branches/lldb-platform-work/examples/python/gdbremote.py
    lldb/branches/lldb-platform-work/examples/python/symbolication.py
    lldb/branches/lldb-platform-work/examples/summaries/cocoa/CFArray.py
    lldb/branches/lldb-platform-work/examples/summaries/cocoa/CFBag.py
    lldb/branches/lldb-platform-work/examples/summaries/cocoa/CFBinaryHeap.py
    lldb/branches/lldb-platform-work/examples/summaries/cocoa/CFDictionary.py
    lldb/branches/lldb-platform-work/examples/summaries/cocoa/CFString.py
    lldb/branches/lldb-platform-work/examples/summaries/cocoa/Logger.py
    lldb/branches/lldb-platform-work/examples/summaries/cocoa/NSBundle.py
    lldb/branches/lldb-platform-work/examples/summaries/cocoa/NSData.py
    lldb/branches/lldb-platform-work/examples/summaries/cocoa/NSDate.py
    lldb/branches/lldb-platform-work/examples/summaries/cocoa/NSIndexSet.py
    lldb/branches/lldb-platform-work/examples/summaries/cocoa/NSMachPort.py
    lldb/branches/lldb-platform-work/examples/summaries/cocoa/NSNotification.py
    lldb/branches/lldb-platform-work/examples/summaries/cocoa/NSNumber.py
    lldb/branches/lldb-platform-work/examples/summaries/cocoa/NSURL.py
    lldb/branches/lldb-platform-work/examples/summaries/cocoa/objc_runtime.py
    lldb/branches/lldb-platform-work/examples/synthetic/bitfield/example.py
    lldb/branches/lldb-platform-work/examples/synthetic/gnu_libstdcpp.py
    lldb/branches/lldb-platform-work/examples/synthetic/libcxx.py
    lldb/branches/lldb-platform-work/include/lldb/API/LLDB.h
    lldb/branches/lldb-platform-work/include/lldb/API/SBAddress.h
    lldb/branches/lldb-platform-work/include/lldb/API/SBBreakpoint.h
    lldb/branches/lldb-platform-work/include/lldb/API/SBCommandInterpreter.h
    lldb/branches/lldb-platform-work/include/lldb/API/SBCommandReturnObject.h
    lldb/branches/lldb-platform-work/include/lldb/API/SBData.h
    lldb/branches/lldb-platform-work/include/lldb/API/SBDebugger.h
    lldb/branches/lldb-platform-work/include/lldb/API/SBDefines.h
    lldb/branches/lldb-platform-work/include/lldb/API/SBError.h
    lldb/branches/lldb-platform-work/include/lldb/API/SBEvent.h
    lldb/branches/lldb-platform-work/include/lldb/API/SBFileSpec.h
    lldb/branches/lldb-platform-work/include/lldb/API/SBFileSpecList.h
    lldb/branches/lldb-platform-work/include/lldb/API/SBFrame.h
    lldb/branches/lldb-platform-work/include/lldb/API/SBFunction.h
    lldb/branches/lldb-platform-work/include/lldb/API/SBHostOS.h
    lldb/branches/lldb-platform-work/include/lldb/API/SBLineEntry.h
    lldb/branches/lldb-platform-work/include/lldb/API/SBModule.h
    lldb/branches/lldb-platform-work/include/lldb/API/SBProcess.h
    lldb/branches/lldb-platform-work/include/lldb/API/SBSourceManager.h
    lldb/branches/lldb-platform-work/include/lldb/API/SBStream.h
    lldb/branches/lldb-platform-work/include/lldb/API/SBStringList.h
    lldb/branches/lldb-platform-work/include/lldb/API/SBSymbol.h
    lldb/branches/lldb-platform-work/include/lldb/API/SBSymbolContext.h
    lldb/branches/lldb-platform-work/include/lldb/API/SBSymbolContextList.h
    lldb/branches/lldb-platform-work/include/lldb/API/SBTarget.h
    lldb/branches/lldb-platform-work/include/lldb/API/SBThread.h
    lldb/branches/lldb-platform-work/include/lldb/API/SBType.h
    lldb/branches/lldb-platform-work/include/lldb/API/SBTypeSynthetic.h
    lldb/branches/lldb-platform-work/include/lldb/API/SBValue.h
    lldb/branches/lldb-platform-work/include/lldb/API/SBValueList.h
    lldb/branches/lldb-platform-work/include/lldb/API/SBWatchpoint.h
    lldb/branches/lldb-platform-work/include/lldb/Breakpoint/Breakpoint.h
    lldb/branches/lldb-platform-work/include/lldb/Breakpoint/BreakpointIDList.h
    lldb/branches/lldb-platform-work/include/lldb/Breakpoint/BreakpointList.h
    lldb/branches/lldb-platform-work/include/lldb/Breakpoint/BreakpointLocation.h
    lldb/branches/lldb-platform-work/include/lldb/Breakpoint/BreakpointLocationCollection.h
    lldb/branches/lldb-platform-work/include/lldb/Breakpoint/BreakpointLocationList.h
    lldb/branches/lldb-platform-work/include/lldb/Breakpoint/BreakpointOptions.h
    lldb/branches/lldb-platform-work/include/lldb/Breakpoint/BreakpointResolver.h
    lldb/branches/lldb-platform-work/include/lldb/Breakpoint/BreakpointResolverName.h
    lldb/branches/lldb-platform-work/include/lldb/Breakpoint/BreakpointSite.h
    lldb/branches/lldb-platform-work/include/lldb/Breakpoint/Watchpoint.h
    lldb/branches/lldb-platform-work/include/lldb/Breakpoint/WatchpointList.h
    lldb/branches/lldb-platform-work/include/lldb/Breakpoint/WatchpointOptions.h
    lldb/branches/lldb-platform-work/include/lldb/Core/Address.h
    lldb/branches/lldb-platform-work/include/lldb/Core/ArchSpec.h
    lldb/branches/lldb-platform-work/include/lldb/Core/Broadcaster.h
    lldb/branches/lldb-platform-work/include/lldb/Core/ConstString.h
    lldb/branches/lldb-platform-work/include/lldb/Core/DataBuffer.h
    lldb/branches/lldb-platform-work/include/lldb/Core/DataBufferHeap.h
    lldb/branches/lldb-platform-work/include/lldb/Core/DataBufferMemoryMap.h
    lldb/branches/lldb-platform-work/include/lldb/Core/DataEncoder.h
    lldb/branches/lldb-platform-work/include/lldb/Core/DataExtractor.h
    lldb/branches/lldb-platform-work/include/lldb/Core/Debugger.h
    lldb/branches/lldb-platform-work/include/lldb/Core/Disassembler.h
    lldb/branches/lldb-platform-work/include/lldb/Core/EmulateInstruction.h
    lldb/branches/lldb-platform-work/include/lldb/Core/Event.h
    lldb/branches/lldb-platform-work/include/lldb/Core/FileLineResolver.h
    lldb/branches/lldb-platform-work/include/lldb/Core/FileSpecList.h
    lldb/branches/lldb-platform-work/include/lldb/Core/Language.h
    lldb/branches/lldb-platform-work/include/lldb/Core/Listener.h
    lldb/branches/lldb-platform-work/include/lldb/Core/Log.h
    lldb/branches/lldb-platform-work/include/lldb/Core/MappedHash.h
    lldb/branches/lldb-platform-work/include/lldb/Core/Module.h
    lldb/branches/lldb-platform-work/include/lldb/Core/ModuleList.h
    lldb/branches/lldb-platform-work/include/lldb/Core/PluginInterface.h
    lldb/branches/lldb-platform-work/include/lldb/Core/PluginManager.h
    lldb/branches/lldb-platform-work/include/lldb/Core/RangeMap.h
    lldb/branches/lldb-platform-work/include/lldb/Core/RegisterValue.h
    lldb/branches/lldb-platform-work/include/lldb/Core/RegularExpression.h
    lldb/branches/lldb-platform-work/include/lldb/Core/Scalar.h
    lldb/branches/lldb-platform-work/include/lldb/Core/SearchFilter.h
    lldb/branches/lldb-platform-work/include/lldb/Core/Section.h
    lldb/branches/lldb-platform-work/include/lldb/Core/SourceManager.h
    lldb/branches/lldb-platform-work/include/lldb/Core/Stream.h
    lldb/branches/lldb-platform-work/include/lldb/Core/StreamAsynchronousIO.h
    lldb/branches/lldb-platform-work/include/lldb/Core/StreamBuffer.h
    lldb/branches/lldb-platform-work/include/lldb/Core/StreamCallback.h
    lldb/branches/lldb-platform-work/include/lldb/Core/StreamFile.h
    lldb/branches/lldb-platform-work/include/lldb/Core/StreamString.h
    lldb/branches/lldb-platform-work/include/lldb/Core/StreamTee.h
    lldb/branches/lldb-platform-work/include/lldb/Core/StringList.h
    lldb/branches/lldb-platform-work/include/lldb/Core/Timer.h
    lldb/branches/lldb-platform-work/include/lldb/Core/UUID.h
    lldb/branches/lldb-platform-work/include/lldb/Core/UniqueCStringMap.h
    lldb/branches/lldb-platform-work/include/lldb/Core/UserSettingsController.h
    lldb/branches/lldb-platform-work/include/lldb/Core/VMRange.h
    lldb/branches/lldb-platform-work/include/lldb/Core/Value.h
    lldb/branches/lldb-platform-work/include/lldb/Core/ValueObject.h
    lldb/branches/lldb-platform-work/include/lldb/Core/ValueObjectChild.h
    lldb/branches/lldb-platform-work/include/lldb/Core/ValueObjectConstResult.h
    lldb/branches/lldb-platform-work/include/lldb/Core/ValueObjectConstResultChild.h
    lldb/branches/lldb-platform-work/include/lldb/Core/ValueObjectConstResultImpl.h
    lldb/branches/lldb-platform-work/include/lldb/Core/ValueObjectDynamicValue.h
    lldb/branches/lldb-platform-work/include/lldb/Core/ValueObjectList.h
    lldb/branches/lldb-platform-work/include/lldb/Core/ValueObjectMemory.h
    lldb/branches/lldb-platform-work/include/lldb/Core/ValueObjectRegister.h
    lldb/branches/lldb-platform-work/include/lldb/Core/ValueObjectSyntheticFilter.h
    lldb/branches/lldb-platform-work/include/lldb/Core/ValueObjectVariable.h
    lldb/branches/lldb-platform-work/include/lldb/Core/cxa_demangle.h
    lldb/branches/lldb-platform-work/include/lldb/Core/dwarf.h
    lldb/branches/lldb-platform-work/include/lldb/Expression/ASTDumper.h
    lldb/branches/lldb-platform-work/include/lldb/Expression/ClangASTSource.h
    lldb/branches/lldb-platform-work/include/lldb/Expression/ClangExpression.h
    lldb/branches/lldb-platform-work/include/lldb/Expression/ClangExpressionDeclMap.h
    lldb/branches/lldb-platform-work/include/lldb/Expression/ClangExpressionParser.h
    lldb/branches/lldb-platform-work/include/lldb/Expression/ClangExpressionVariable.h
    lldb/branches/lldb-platform-work/include/lldb/Expression/ClangFunction.h
    lldb/branches/lldb-platform-work/include/lldb/Expression/ClangUserExpression.h
    lldb/branches/lldb-platform-work/include/lldb/Expression/ClangUtilityFunction.h
    lldb/branches/lldb-platform-work/include/lldb/Expression/DWARFExpression.h
    lldb/branches/lldb-platform-work/include/lldb/Expression/ExpressionSourceCode.h
    lldb/branches/lldb-platform-work/include/lldb/Expression/IRDynamicChecks.h
    lldb/branches/lldb-platform-work/include/lldb/Expression/IRForTarget.h
    lldb/branches/lldb-platform-work/include/lldb/Expression/IRInterpreter.h
    lldb/branches/lldb-platform-work/include/lldb/Host/File.h
    lldb/branches/lldb-platform-work/include/lldb/Host/FileSpec.h
    lldb/branches/lldb-platform-work/include/lldb/Host/Host.h
    lldb/branches/lldb-platform-work/include/lldb/Host/Mutex.h
    lldb/branches/lldb-platform-work/include/lldb/Host/Predicate.h
    lldb/branches/lldb-platform-work/include/lldb/Host/ReadWriteLock.h
    lldb/branches/lldb-platform-work/include/lldb/Host/Symbols.h
    lldb/branches/lldb-platform-work/include/lldb/Host/Terminal.h
    lldb/branches/lldb-platform-work/include/lldb/Host/freebsd/Config.h
    lldb/branches/lldb-platform-work/include/lldb/Interpreter/Args.h
    lldb/branches/lldb-platform-work/include/lldb/Interpreter/CommandCompletions.h
    lldb/branches/lldb-platform-work/include/lldb/Interpreter/CommandInterpreter.h
    lldb/branches/lldb-platform-work/include/lldb/Interpreter/CommandObject.h
    lldb/branches/lldb-platform-work/include/lldb/Interpreter/CommandObjectMultiword.h
    lldb/branches/lldb-platform-work/include/lldb/Interpreter/CommandObjectRegexCommand.h
    lldb/branches/lldb-platform-work/include/lldb/Interpreter/CommandReturnObject.h
    lldb/branches/lldb-platform-work/include/lldb/Interpreter/OptionGroupBoolean.h
    lldb/branches/lldb-platform-work/include/lldb/Interpreter/OptionGroupFile.h
    lldb/branches/lldb-platform-work/include/lldb/Interpreter/OptionGroupFormat.h
    lldb/branches/lldb-platform-work/include/lldb/Interpreter/OptionGroupOutputFile.h
    lldb/branches/lldb-platform-work/include/lldb/Interpreter/OptionGroupUInt64.h
    lldb/branches/lldb-platform-work/include/lldb/Interpreter/OptionGroupUUID.h
    lldb/branches/lldb-platform-work/include/lldb/Interpreter/OptionGroupValueObjectDisplay.h
    lldb/branches/lldb-platform-work/include/lldb/Interpreter/OptionGroupVariable.h
    lldb/branches/lldb-platform-work/include/lldb/Interpreter/Options.h
    lldb/branches/lldb-platform-work/include/lldb/Interpreter/ScriptInterpreter.h
    lldb/branches/lldb-platform-work/include/lldb/Interpreter/ScriptInterpreterNone.h
    lldb/branches/lldb-platform-work/include/lldb/Interpreter/ScriptInterpreterPython.h
    lldb/branches/lldb-platform-work/include/lldb/Symbol/Block.h
    lldb/branches/lldb-platform-work/include/lldb/Symbol/ClangASTContext.h
    lldb/branches/lldb-platform-work/include/lldb/Symbol/ClangASTImporter.h
    lldb/branches/lldb-platform-work/include/lldb/Symbol/ClangASTType.h
    lldb/branches/lldb-platform-work/include/lldb/Symbol/ClangExternalASTSourceCallbacks.h
    lldb/branches/lldb-platform-work/include/lldb/Symbol/ClangExternalASTSourceCommon.h
    lldb/branches/lldb-platform-work/include/lldb/Symbol/CompileUnit.h
    lldb/branches/lldb-platform-work/include/lldb/Symbol/DWARFCallFrameInfo.h
    lldb/branches/lldb-platform-work/include/lldb/Symbol/FuncUnwinders.h
    lldb/branches/lldb-platform-work/include/lldb/Symbol/LineTable.h
    lldb/branches/lldb-platform-work/include/lldb/Symbol/ObjectContainer.h
    lldb/branches/lldb-platform-work/include/lldb/Symbol/ObjectFile.h
    lldb/branches/lldb-platform-work/include/lldb/Symbol/Symbol.h
    lldb/branches/lldb-platform-work/include/lldb/Symbol/SymbolContext.h
    lldb/branches/lldb-platform-work/include/lldb/Symbol/SymbolFile.h
    lldb/branches/lldb-platform-work/include/lldb/Symbol/SymbolVendor.h
    lldb/branches/lldb-platform-work/include/lldb/Symbol/Symtab.h
    lldb/branches/lldb-platform-work/include/lldb/Symbol/Type.h
    lldb/branches/lldb-platform-work/include/lldb/Symbol/TypeList.h
    lldb/branches/lldb-platform-work/include/lldb/Symbol/UnwindPlan.h
    lldb/branches/lldb-platform-work/include/lldb/Symbol/Variable.h
    lldb/branches/lldb-platform-work/include/lldb/Symbol/VariableList.h
    lldb/branches/lldb-platform-work/include/lldb/Target/ABI.h
    lldb/branches/lldb-platform-work/include/lldb/Target/CPPLanguageRuntime.h
    lldb/branches/lldb-platform-work/include/lldb/Target/DynamicLoader.h
    lldb/branches/lldb-platform-work/include/lldb/Target/ExecutionContext.h
    lldb/branches/lldb-platform-work/include/lldb/Target/LanguageRuntime.h
    lldb/branches/lldb-platform-work/include/lldb/Target/Memory.h
    lldb/branches/lldb-platform-work/include/lldb/Target/ObjCLanguageRuntime.h
    lldb/branches/lldb-platform-work/include/lldb/Target/OperatingSystem.h
    lldb/branches/lldb-platform-work/include/lldb/Target/PathMappingList.h
    lldb/branches/lldb-platform-work/include/lldb/Target/Platform.h
    lldb/branches/lldb-platform-work/include/lldb/Target/Process.h
    lldb/branches/lldb-platform-work/include/lldb/Target/RegisterContext.h
    lldb/branches/lldb-platform-work/include/lldb/Target/SectionLoadList.h
    lldb/branches/lldb-platform-work/include/lldb/Target/StackFrame.h
    lldb/branches/lldb-platform-work/include/lldb/Target/StackFrameList.h
    lldb/branches/lldb-platform-work/include/lldb/Target/StopInfo.h
    lldb/branches/lldb-platform-work/include/lldb/Target/Target.h
    lldb/branches/lldb-platform-work/include/lldb/Target/TargetList.h
    lldb/branches/lldb-platform-work/include/lldb/Target/Thread.h
    lldb/branches/lldb-platform-work/include/lldb/Target/ThreadList.h
    lldb/branches/lldb-platform-work/include/lldb/Target/ThreadPlan.h
    lldb/branches/lldb-platform-work/include/lldb/Target/ThreadPlanBase.h
    lldb/branches/lldb-platform-work/include/lldb/Target/ThreadPlanCallFunction.h
    lldb/branches/lldb-platform-work/include/lldb/Target/ThreadPlanCallUserExpression.h
    lldb/branches/lldb-platform-work/include/lldb/Target/ThreadPlanRunToAddress.h
    lldb/branches/lldb-platform-work/include/lldb/Target/ThreadPlanStepInRange.h
    lldb/branches/lldb-platform-work/include/lldb/Target/ThreadPlanStepInstruction.h
    lldb/branches/lldb-platform-work/include/lldb/Target/ThreadPlanStepOut.h
    lldb/branches/lldb-platform-work/include/lldb/Target/ThreadPlanStepOverBreakpoint.h
    lldb/branches/lldb-platform-work/include/lldb/Target/ThreadPlanStepOverRange.h
    lldb/branches/lldb-platform-work/include/lldb/Target/ThreadPlanStepRange.h
    lldb/branches/lldb-platform-work/include/lldb/Target/ThreadPlanStepThrough.h
    lldb/branches/lldb-platform-work/include/lldb/Target/ThreadPlanStepUntil.h
    lldb/branches/lldb-platform-work/include/lldb/Utility/AnsiTerminal.h
    lldb/branches/lldb-platform-work/include/lldb/Utility/PriorityPointerPair.h
    lldb/branches/lldb-platform-work/include/lldb/Utility/PythonPointer.h
    lldb/branches/lldb-platform-work/include/lldb/Utility/SharingPtr.h
    lldb/branches/lldb-platform-work/include/lldb/lldb-defines.h
    lldb/branches/lldb-platform-work/include/lldb/lldb-enumerations.h
    lldb/branches/lldb-platform-work/include/lldb/lldb-forward.h
    lldb/branches/lldb-platform-work/include/lldb/lldb-private-enumerations.h
    lldb/branches/lldb-platform-work/include/lldb/lldb-private-interfaces.h
    lldb/branches/lldb-platform-work/include/lldb/lldb-private-log.h
    lldb/branches/lldb-platform-work/include/lldb/lldb-private-types.h
    lldb/branches/lldb-platform-work/include/lldb/lldb-types.h
    lldb/branches/lldb-platform-work/lib/Makefile
    lldb/branches/lldb-platform-work/lldb.xcodeproj/project.pbxproj
    lldb/branches/lldb-platform-work/lldb.xcodeproj/xcshareddata/xcschemes/LLDB.xcscheme
    lldb/branches/lldb-platform-work/lldb.xcodeproj/xcshareddata/xcschemes/darwin-debug.xcscheme
    lldb/branches/lldb-platform-work/lldb.xcodeproj/xcshareddata/xcschemes/launcherRootXPCService.xcscheme
    lldb/branches/lldb-platform-work/lldb.xcodeproj/xcshareddata/xcschemes/launcherXPCService.xcscheme
    lldb/branches/lldb-platform-work/lldb.xcodeproj/xcshareddata/xcschemes/lldb-tool.xcscheme
    lldb/branches/lldb-platform-work/lldb.xcworkspace/contents.xcworkspacedata
    lldb/branches/lldb-platform-work/resources/LLDB-Info.plist
    lldb/branches/lldb-platform-work/scripts/Python/build-swig-Python.sh
    lldb/branches/lldb-platform-work/scripts/Python/finish-swig-Python-LLDB.sh
    lldb/branches/lldb-platform-work/scripts/Python/interface/SBBlock.i
    lldb/branches/lldb-platform-work/scripts/Python/interface/SBBreakpoint.i
    lldb/branches/lldb-platform-work/scripts/Python/interface/SBBroadcaster.i
    lldb/branches/lldb-platform-work/scripts/Python/interface/SBCommandInterpreter.i
    lldb/branches/lldb-platform-work/scripts/Python/interface/SBCommandReturnObject.i
    lldb/branches/lldb-platform-work/scripts/Python/interface/SBCompileUnit.i
    lldb/branches/lldb-platform-work/scripts/Python/interface/SBData.i
    lldb/branches/lldb-platform-work/scripts/Python/interface/SBDebugger.i
    lldb/branches/lldb-platform-work/scripts/Python/interface/SBFrame.i
    lldb/branches/lldb-platform-work/scripts/Python/interface/SBFunction.i
    lldb/branches/lldb-platform-work/scripts/Python/interface/SBLineEntry.i
    lldb/branches/lldb-platform-work/scripts/Python/interface/SBModule.i
    lldb/branches/lldb-platform-work/scripts/Python/interface/SBProcess.i
    lldb/branches/lldb-platform-work/scripts/Python/interface/SBSection.i
    lldb/branches/lldb-platform-work/scripts/Python/interface/SBStream.i
    lldb/branches/lldb-platform-work/scripts/Python/interface/SBSymbol.i
    lldb/branches/lldb-platform-work/scripts/Python/interface/SBTarget.i
    lldb/branches/lldb-platform-work/scripts/Python/interface/SBThread.i
    lldb/branches/lldb-platform-work/scripts/Python/interface/SBType.i
    lldb/branches/lldb-platform-work/scripts/Python/interface/SBTypeFilter.i
    lldb/branches/lldb-platform-work/scripts/Python/interface/SBTypeFormat.i
    lldb/branches/lldb-platform-work/scripts/Python/interface/SBTypeNameSpecifier.i
    lldb/branches/lldb-platform-work/scripts/Python/interface/SBTypeSummary.i
    lldb/branches/lldb-platform-work/scripts/Python/interface/SBTypeSynthetic.i
    lldb/branches/lldb-platform-work/scripts/Python/interface/SBValue.i
    lldb/branches/lldb-platform-work/scripts/Python/interface/SBWatchpoint.i
    lldb/branches/lldb-platform-work/scripts/Python/modify-python-lldb.py
    lldb/branches/lldb-platform-work/scripts/Python/python-extensions.swig
    lldb/branches/lldb-platform-work/scripts/Python/python-typemaps.swig
    lldb/branches/lldb-platform-work/scripts/Python/python-wrapper.swig
    lldb/branches/lldb-platform-work/scripts/build-llvm.pl
    lldb/branches/lldb-platform-work/scripts/build-swig-wrapper-classes.sh
    lldb/branches/lldb-platform-work/scripts/disasm-gdb-remote.pl
    lldb/branches/lldb-platform-work/scripts/finish-swig-wrapper-classes.sh
    lldb/branches/lldb-platform-work/scripts/generate-vers.pl
    lldb/branches/lldb-platform-work/scripts/lldb.swig
    lldb/branches/lldb-platform-work/source/API/SBAddress.cpp
    lldb/branches/lldb-platform-work/source/API/SBBlock.cpp
    lldb/branches/lldb-platform-work/source/API/SBBreakpoint.cpp
    lldb/branches/lldb-platform-work/source/API/SBBreakpointLocation.cpp
    lldb/branches/lldb-platform-work/source/API/SBBroadcaster.cpp
    lldb/branches/lldb-platform-work/source/API/SBCommandInterpreter.cpp
    lldb/branches/lldb-platform-work/source/API/SBCommandReturnObject.cpp
    lldb/branches/lldb-platform-work/source/API/SBCommunication.cpp
    lldb/branches/lldb-platform-work/source/API/SBCompileUnit.cpp
    lldb/branches/lldb-platform-work/source/API/SBData.cpp
    lldb/branches/lldb-platform-work/source/API/SBDebugger.cpp
    lldb/branches/lldb-platform-work/source/API/SBError.cpp
    lldb/branches/lldb-platform-work/source/API/SBEvent.cpp
    lldb/branches/lldb-platform-work/source/API/SBFileSpec.cpp
    lldb/branches/lldb-platform-work/source/API/SBFileSpecList.cpp
    lldb/branches/lldb-platform-work/source/API/SBFrame.cpp
    lldb/branches/lldb-platform-work/source/API/SBFunction.cpp
    lldb/branches/lldb-platform-work/source/API/SBHostOS.cpp
    lldb/branches/lldb-platform-work/source/API/SBInputReader.cpp
    lldb/branches/lldb-platform-work/source/API/SBInstruction.cpp
    lldb/branches/lldb-platform-work/source/API/SBLineEntry.cpp
    lldb/branches/lldb-platform-work/source/API/SBListener.cpp
    lldb/branches/lldb-platform-work/source/API/SBModule.cpp
    lldb/branches/lldb-platform-work/source/API/SBProcess.cpp
    lldb/branches/lldb-platform-work/source/API/SBSection.cpp
    lldb/branches/lldb-platform-work/source/API/SBSourceManager.cpp
    lldb/branches/lldb-platform-work/source/API/SBSymbol.cpp
    lldb/branches/lldb-platform-work/source/API/SBSymbolContext.cpp
    lldb/branches/lldb-platform-work/source/API/SBTarget.cpp
    lldb/branches/lldb-platform-work/source/API/SBThread.cpp
    lldb/branches/lldb-platform-work/source/API/SBType.cpp
    lldb/branches/lldb-platform-work/source/API/SBTypeCategory.cpp
    lldb/branches/lldb-platform-work/source/API/SBTypeFilter.cpp
    lldb/branches/lldb-platform-work/source/API/SBTypeFormat.cpp
    lldb/branches/lldb-platform-work/source/API/SBTypeNameSpecifier.cpp
    lldb/branches/lldb-platform-work/source/API/SBTypeSummary.cpp
    lldb/branches/lldb-platform-work/source/API/SBTypeSynthetic.cpp
    lldb/branches/lldb-platform-work/source/API/SBValue.cpp
    lldb/branches/lldb-platform-work/source/API/SBValueList.cpp
    lldb/branches/lldb-platform-work/source/API/SBWatchpoint.cpp
    lldb/branches/lldb-platform-work/source/Breakpoint/Breakpoint.cpp
    lldb/branches/lldb-platform-work/source/Breakpoint/BreakpointID.cpp
    lldb/branches/lldb-platform-work/source/Breakpoint/BreakpointIDList.cpp
    lldb/branches/lldb-platform-work/source/Breakpoint/BreakpointList.cpp
    lldb/branches/lldb-platform-work/source/Breakpoint/BreakpointLocation.cpp
    lldb/branches/lldb-platform-work/source/Breakpoint/BreakpointLocationCollection.cpp
    lldb/branches/lldb-platform-work/source/Breakpoint/BreakpointLocationList.cpp
    lldb/branches/lldb-platform-work/source/Breakpoint/BreakpointOptions.cpp
    lldb/branches/lldb-platform-work/source/Breakpoint/BreakpointResolverAddress.cpp
    lldb/branches/lldb-platform-work/source/Breakpoint/BreakpointResolverFileLine.cpp
    lldb/branches/lldb-platform-work/source/Breakpoint/BreakpointResolverFileRegex.cpp
    lldb/branches/lldb-platform-work/source/Breakpoint/BreakpointResolverName.cpp
    lldb/branches/lldb-platform-work/source/Breakpoint/BreakpointSite.cpp
    lldb/branches/lldb-platform-work/source/Breakpoint/BreakpointSiteList.cpp
    lldb/branches/lldb-platform-work/source/Breakpoint/Watchpoint.cpp
    lldb/branches/lldb-platform-work/source/Breakpoint/WatchpointList.cpp
    lldb/branches/lldb-platform-work/source/Breakpoint/WatchpointOptions.cpp
    lldb/branches/lldb-platform-work/source/Commands/CommandCompletions.cpp
    lldb/branches/lldb-platform-work/source/Commands/CommandObjectApropos.cpp
    lldb/branches/lldb-platform-work/source/Commands/CommandObjectArgs.cpp
    lldb/branches/lldb-platform-work/source/Commands/CommandObjectBreakpoint.cpp
    lldb/branches/lldb-platform-work/source/Commands/CommandObjectBreakpointCommand.cpp
    lldb/branches/lldb-platform-work/source/Commands/CommandObjectCommands.cpp
    lldb/branches/lldb-platform-work/source/Commands/CommandObjectDisassemble.cpp
    lldb/branches/lldb-platform-work/source/Commands/CommandObjectDisassemble.h
    lldb/branches/lldb-platform-work/source/Commands/CommandObjectExpression.cpp
    lldb/branches/lldb-platform-work/source/Commands/CommandObjectExpression.h
    lldb/branches/lldb-platform-work/source/Commands/CommandObjectFrame.cpp
    lldb/branches/lldb-platform-work/source/Commands/CommandObjectHelp.cpp
    lldb/branches/lldb-platform-work/source/Commands/CommandObjectHelp.h
    lldb/branches/lldb-platform-work/source/Commands/CommandObjectLog.cpp
    lldb/branches/lldb-platform-work/source/Commands/CommandObjectMemory.cpp
    lldb/branches/lldb-platform-work/source/Commands/CommandObjectMultiword.cpp
    lldb/branches/lldb-platform-work/source/Commands/CommandObjectPlatform.cpp
    lldb/branches/lldb-platform-work/source/Commands/CommandObjectProcess.cpp
    lldb/branches/lldb-platform-work/source/Commands/CommandObjectQuit.cpp
    lldb/branches/lldb-platform-work/source/Commands/CommandObjectQuit.h
    lldb/branches/lldb-platform-work/source/Commands/CommandObjectRegister.cpp
    lldb/branches/lldb-platform-work/source/Commands/CommandObjectSettings.cpp
    lldb/branches/lldb-platform-work/source/Commands/CommandObjectSource.cpp
    lldb/branches/lldb-platform-work/source/Commands/CommandObjectSyntax.cpp
    lldb/branches/lldb-platform-work/source/Commands/CommandObjectTarget.cpp
    lldb/branches/lldb-platform-work/source/Commands/CommandObjectThread.cpp
    lldb/branches/lldb-platform-work/source/Commands/CommandObjectType.cpp
    lldb/branches/lldb-platform-work/source/Commands/CommandObjectVersion.cpp
    lldb/branches/lldb-platform-work/source/Commands/CommandObjectWatchpoint.cpp
    lldb/branches/lldb-platform-work/source/Commands/CommandObjectWatchpointCommand.cpp
    lldb/branches/lldb-platform-work/source/Commands/Makefile
    lldb/branches/lldb-platform-work/source/Core/Address.cpp
    lldb/branches/lldb-platform-work/source/Core/AddressRange.cpp
    lldb/branches/lldb-platform-work/source/Core/AddressResolverFileLine.cpp
    lldb/branches/lldb-platform-work/source/Core/AddressResolverName.cpp
    lldb/branches/lldb-platform-work/source/Core/ArchSpec.cpp
    lldb/branches/lldb-platform-work/source/Core/Broadcaster.cpp
    lldb/branches/lldb-platform-work/source/Core/Communication.cpp
    lldb/branches/lldb-platform-work/source/Core/ConnectionFileDescriptor.cpp
    lldb/branches/lldb-platform-work/source/Core/ConstString.cpp
    lldb/branches/lldb-platform-work/source/Core/DataBufferHeap.cpp
    lldb/branches/lldb-platform-work/source/Core/DataBufferMemoryMap.cpp
    lldb/branches/lldb-platform-work/source/Core/DataEncoder.cpp
    lldb/branches/lldb-platform-work/source/Core/DataExtractor.cpp
    lldb/branches/lldb-platform-work/source/Core/Debugger.cpp
    lldb/branches/lldb-platform-work/source/Core/Disassembler.cpp
    lldb/branches/lldb-platform-work/source/Core/DynamicLoader.cpp
    lldb/branches/lldb-platform-work/source/Core/EmulateInstruction.cpp
    lldb/branches/lldb-platform-work/source/Core/Error.cpp
    lldb/branches/lldb-platform-work/source/Core/Event.cpp
    lldb/branches/lldb-platform-work/source/Core/FileLineResolver.cpp
    lldb/branches/lldb-platform-work/source/Core/FileSpecList.cpp
    lldb/branches/lldb-platform-work/source/Core/History.cpp
    lldb/branches/lldb-platform-work/source/Core/InputReader.cpp
    lldb/branches/lldb-platform-work/source/Core/Listener.cpp
    lldb/branches/lldb-platform-work/source/Core/Log.cpp
    lldb/branches/lldb-platform-work/source/Core/Makefile
    lldb/branches/lldb-platform-work/source/Core/Mangled.cpp
    lldb/branches/lldb-platform-work/source/Core/Module.cpp
    lldb/branches/lldb-platform-work/source/Core/ModuleList.cpp
    lldb/branches/lldb-platform-work/source/Core/Opcode.cpp
    lldb/branches/lldb-platform-work/source/Core/PluginManager.cpp
    lldb/branches/lldb-platform-work/source/Core/RegisterValue.cpp
    lldb/branches/lldb-platform-work/source/Core/RegularExpression.cpp
    lldb/branches/lldb-platform-work/source/Core/Scalar.cpp
    lldb/branches/lldb-platform-work/source/Core/SearchFilter.cpp
    lldb/branches/lldb-platform-work/source/Core/Section.cpp
    lldb/branches/lldb-platform-work/source/Core/SourceManager.cpp
    lldb/branches/lldb-platform-work/source/Core/State.cpp
    lldb/branches/lldb-platform-work/source/Core/Stream.cpp
    lldb/branches/lldb-platform-work/source/Core/StreamAsynchronousIO.cpp
    lldb/branches/lldb-platform-work/source/Core/StreamCallback.cpp
    lldb/branches/lldb-platform-work/source/Core/StreamFile.cpp
    lldb/branches/lldb-platform-work/source/Core/StreamString.cpp
    lldb/branches/lldb-platform-work/source/Core/StringList.cpp
    lldb/branches/lldb-platform-work/source/Core/Timer.cpp
    lldb/branches/lldb-platform-work/source/Core/UUID.cpp
    lldb/branches/lldb-platform-work/source/Core/UserID.cpp
    lldb/branches/lldb-platform-work/source/Core/UserSettingsController.cpp
    lldb/branches/lldb-platform-work/source/Core/VMRange.cpp
    lldb/branches/lldb-platform-work/source/Core/Value.cpp
    lldb/branches/lldb-platform-work/source/Core/ValueObject.cpp
    lldb/branches/lldb-platform-work/source/Core/ValueObjectChild.cpp
    lldb/branches/lldb-platform-work/source/Core/ValueObjectConstResult.cpp
    lldb/branches/lldb-platform-work/source/Core/ValueObjectConstResultChild.cpp
    lldb/branches/lldb-platform-work/source/Core/ValueObjectConstResultImpl.cpp
    lldb/branches/lldb-platform-work/source/Core/ValueObjectDynamicValue.cpp
    lldb/branches/lldb-platform-work/source/Core/ValueObjectList.cpp
    lldb/branches/lldb-platform-work/source/Core/ValueObjectMemory.cpp
    lldb/branches/lldb-platform-work/source/Core/ValueObjectRegister.cpp
    lldb/branches/lldb-platform-work/source/Core/ValueObjectSyntheticFilter.cpp
    lldb/branches/lldb-platform-work/source/Core/ValueObjectVariable.cpp
    lldb/branches/lldb-platform-work/source/Core/cxa_demangle.cpp
    lldb/branches/lldb-platform-work/source/Expression/ASTDumper.cpp
    lldb/branches/lldb-platform-work/source/Expression/ASTResultSynthesizer.cpp
    lldb/branches/lldb-platform-work/source/Expression/ASTStructExtractor.cpp
    lldb/branches/lldb-platform-work/source/Expression/ClangASTSource.cpp
    lldb/branches/lldb-platform-work/source/Expression/ClangExpressionDeclMap.cpp
    lldb/branches/lldb-platform-work/source/Expression/ClangExpressionParser.cpp
    lldb/branches/lldb-platform-work/source/Expression/ClangFunction.cpp
    lldb/branches/lldb-platform-work/source/Expression/ClangUserExpression.cpp
    lldb/branches/lldb-platform-work/source/Expression/ClangUtilityFunction.cpp
    lldb/branches/lldb-platform-work/source/Expression/DWARFExpression.cpp
    lldb/branches/lldb-platform-work/source/Expression/ExpressionSourceCode.cpp
    lldb/branches/lldb-platform-work/source/Expression/IRDynamicChecks.cpp
    lldb/branches/lldb-platform-work/source/Expression/IRForTarget.cpp
    lldb/branches/lldb-platform-work/source/Expression/IRInterpreter.cpp
    lldb/branches/lldb-platform-work/source/Host/common/File.cpp
    lldb/branches/lldb-platform-work/source/Host/common/FileSpec.cpp
    lldb/branches/lldb-platform-work/source/Host/common/Host.cpp
    lldb/branches/lldb-platform-work/source/Host/common/Mutex.cpp
    lldb/branches/lldb-platform-work/source/Host/common/Symbols.cpp
    lldb/branches/lldb-platform-work/source/Host/common/Terminal.cpp
    lldb/branches/lldb-platform-work/source/Host/freebsd/Host.cpp
    lldb/branches/lldb-platform-work/source/Host/linux/Host.cpp
    lldb/branches/lldb-platform-work/source/Host/macosx/Host.mm
    lldb/branches/lldb-platform-work/source/Host/macosx/Symbols.cpp
    lldb/branches/lldb-platform-work/source/Host/macosx/cfcpp/CFCMutableDictionary.cpp
    lldb/branches/lldb-platform-work/source/Host/macosx/cfcpp/CFCMutableDictionary.h
    lldb/branches/lldb-platform-work/source/Host/macosx/launcherXPCService/LauncherRootXPCService-Info.plist
    lldb/branches/lldb-platform-work/source/Host/macosx/launcherXPCService/LauncherXPCService-Info.plist
    lldb/branches/lldb-platform-work/source/Host/macosx/launcherXPCService/main.mm
    lldb/branches/lldb-platform-work/source/Interpreter/Args.cpp
    lldb/branches/lldb-platform-work/source/Interpreter/CommandInterpreter.cpp
    lldb/branches/lldb-platform-work/source/Interpreter/CommandObject.cpp
    lldb/branches/lldb-platform-work/source/Interpreter/CommandObjectRegexCommand.cpp
    lldb/branches/lldb-platform-work/source/Interpreter/CommandObjectScript.cpp
    lldb/branches/lldb-platform-work/source/Interpreter/CommandObjectScript.h
    lldb/branches/lldb-platform-work/source/Interpreter/CommandReturnObject.cpp
    lldb/branches/lldb-platform-work/source/Interpreter/Makefile
    lldb/branches/lldb-platform-work/source/Interpreter/OptionGroupArchitecture.cpp
    lldb/branches/lldb-platform-work/source/Interpreter/OptionGroupBoolean.cpp
    lldb/branches/lldb-platform-work/source/Interpreter/OptionGroupFile.cpp
    lldb/branches/lldb-platform-work/source/Interpreter/OptionGroupFormat.cpp
    lldb/branches/lldb-platform-work/source/Interpreter/OptionGroupOutputFile.cpp
    lldb/branches/lldb-platform-work/source/Interpreter/OptionGroupPlatform.cpp
    lldb/branches/lldb-platform-work/source/Interpreter/OptionGroupUInt64.cpp
    lldb/branches/lldb-platform-work/source/Interpreter/OptionGroupUUID.cpp
    lldb/branches/lldb-platform-work/source/Interpreter/OptionGroupValueObjectDisplay.cpp
    lldb/branches/lldb-platform-work/source/Interpreter/OptionGroupVariable.cpp
    lldb/branches/lldb-platform-work/source/Interpreter/OptionGroupWatchpoint.cpp
    lldb/branches/lldb-platform-work/source/Interpreter/Options.cpp
    lldb/branches/lldb-platform-work/source/Interpreter/ScriptInterpreter.cpp
    lldb/branches/lldb-platform-work/source/Interpreter/ScriptInterpreterNone.cpp
    lldb/branches/lldb-platform-work/source/Interpreter/ScriptInterpreterPython.cpp
    lldb/branches/lldb-platform-work/source/Makefile
    lldb/branches/lldb-platform-work/source/Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.cpp
    lldb/branches/lldb-platform-work/source/Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.h
    lldb/branches/lldb-platform-work/source/Plugins/ABI/MacOSX-i386/ABIMacOSX_i386.cpp
    lldb/branches/lldb-platform-work/source/Plugins/ABI/MacOSX-i386/ABIMacOSX_i386.h
    lldb/branches/lldb-platform-work/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.cpp
    lldb/branches/lldb-platform-work/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.h
    lldb/branches/lldb-platform-work/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp
    lldb/branches/lldb-platform-work/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.h
    lldb/branches/lldb-platform-work/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
    lldb/branches/lldb-platform-work/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.h
    lldb/branches/lldb-platform-work/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp
    lldb/branches/lldb-platform-work/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.h
    lldb/branches/lldb-platform-work/source/Plugins/DynamicLoader/POSIX-DYLD/AuxVector.cpp
    lldb/branches/lldb-platform-work/source/Plugins/DynamicLoader/POSIX-DYLD/AuxVector.h
    lldb/branches/lldb-platform-work/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.cpp
    lldb/branches/lldb-platform-work/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.h
    lldb/branches/lldb-platform-work/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp
    lldb/branches/lldb-platform-work/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.h
    lldb/branches/lldb-platform-work/source/Plugins/DynamicLoader/Static/DynamicLoaderStatic.cpp
    lldb/branches/lldb-platform-work/source/Plugins/DynamicLoader/Static/DynamicLoaderStatic.h
    lldb/branches/lldb-platform-work/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp
    lldb/branches/lldb-platform-work/source/Plugins/Instruction/ARM/EmulateInstructionARM.h
    lldb/branches/lldb-platform-work/source/Plugins/Instruction/ARM/EmulationStateARM.cpp
    lldb/branches/lldb-platform-work/source/Plugins/Instruction/ARM/EmulationStateARM.h
    lldb/branches/lldb-platform-work/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp
    lldb/branches/lldb-platform-work/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.h
    lldb/branches/lldb-platform-work/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp
    lldb/branches/lldb-platform-work/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.h
    lldb/branches/lldb-platform-work/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp
    lldb/branches/lldb-platform-work/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.h
    lldb/branches/lldb-platform-work/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
    lldb/branches/lldb-platform-work/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.h
    lldb/branches/lldb-platform-work/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.cpp
    lldb/branches/lldb-platform-work/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.h
    lldb/branches/lldb-platform-work/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleThreadPlanStepThroughObjCTrampoline.cpp
    lldb/branches/lldb-platform-work/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleThreadPlanStepThroughObjCTrampoline.h
    lldb/branches/lldb-platform-work/source/Plugins/Makefile
    lldb/branches/lldb-platform-work/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp
    lldb/branches/lldb-platform-work/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.h
    lldb/branches/lldb-platform-work/source/Plugins/ObjectContainer/Universal-Mach-O/ObjectContainerUniversalMachO.cpp
    lldb/branches/lldb-platform-work/source/Plugins/ObjectContainer/Universal-Mach-O/ObjectContainerUniversalMachO.h
    lldb/branches/lldb-platform-work/source/Plugins/ObjectFile/ELF/ELFHeader.cpp
    lldb/branches/lldb-platform-work/source/Plugins/ObjectFile/ELF/ELFHeader.h
    lldb/branches/lldb-platform-work/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
    lldb/branches/lldb-platform-work/source/Plugins/ObjectFile/ELF/ObjectFileELF.h
    lldb/branches/lldb-platform-work/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
    lldb/branches/lldb-platform-work/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.h
    lldb/branches/lldb-platform-work/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
    lldb/branches/lldb-platform-work/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.h
    lldb/branches/lldb-platform-work/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp
    lldb/branches/lldb-platform-work/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.h
    lldb/branches/lldb-platform-work/source/Plugins/Platform/Linux/PlatformLinux.cpp
    lldb/branches/lldb-platform-work/source/Plugins/Platform/Linux/PlatformLinux.h
    lldb/branches/lldb-platform-work/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
    lldb/branches/lldb-platform-work/source/Plugins/Platform/MacOSX/PlatformDarwin.h
    lldb/branches/lldb-platform-work/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp
    lldb/branches/lldb-platform-work/source/Plugins/Platform/MacOSX/PlatformMacOSX.h
    lldb/branches/lldb-platform-work/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp
    lldb/branches/lldb-platform-work/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.h
    lldb/branches/lldb-platform-work/source/Plugins/Platform/MacOSX/PlatformiOSSimulator.cpp
    lldb/branches/lldb-platform-work/source/Plugins/Platform/MacOSX/PlatformiOSSimulator.h
    lldb/branches/lldb-platform-work/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp
    lldb/branches/lldb-platform-work/source/Plugins/Platform/POSIX/PlatformPOSIX.h
    lldb/branches/lldb-platform-work/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp
    lldb/branches/lldb-platform-work/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.h
    lldb/branches/lldb-platform-work/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp
    lldb/branches/lldb-platform-work/source/Plugins/Process/FreeBSD/ProcessFreeBSD.h
    lldb/branches/lldb-platform-work/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp
    lldb/branches/lldb-platform-work/source/Plugins/Process/FreeBSD/ProcessMonitor.h
    lldb/branches/lldb-platform-work/source/Plugins/Process/FreeBSD/RegisterContextFreeBSD_x86_64.h
    lldb/branches/lldb-platform-work/source/Plugins/Process/Linux/ProcessLinux.cpp
    lldb/branches/lldb-platform-work/source/Plugins/Process/Linux/ProcessLinux.h
    lldb/branches/lldb-platform-work/source/Plugins/Process/Linux/ProcessMonitor.cpp
    lldb/branches/lldb-platform-work/source/Plugins/Process/Linux/ProcessMonitor.h
    lldb/branches/lldb-platform-work/source/Plugins/Process/Linux/RegisterContextLinux_x86_64.h
    lldb/branches/lldb-platform-work/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp
    lldb/branches/lldb-platform-work/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.h
    lldb/branches/lldb-platform-work/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
    lldb/branches/lldb-platform-work/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.h
    lldb/branches/lldb-platform-work/source/Plugins/Process/MacOSX-Kernel/ProcessKDPLog.cpp
    lldb/branches/lldb-platform-work/source/Plugins/Process/MacOSX-Kernel/ProcessKDPLog.h
    lldb/branches/lldb-platform-work/source/Plugins/Process/MacOSX-Kernel/RegisterContextKDP_arm.cpp
    lldb/branches/lldb-platform-work/source/Plugins/Process/MacOSX-Kernel/RegisterContextKDP_i386.cpp
    lldb/branches/lldb-platform-work/source/Plugins/Process/MacOSX-Kernel/RegisterContextKDP_x86_64.cpp
    lldb/branches/lldb-platform-work/source/Plugins/Process/MacOSX-Kernel/ThreadKDP.cpp
    lldb/branches/lldb-platform-work/source/Plugins/Process/MacOSX-Kernel/ThreadKDP.h
    lldb/branches/lldb-platform-work/source/Plugins/Process/POSIX/Makefile
    lldb/branches/lldb-platform-work/source/Plugins/Process/POSIX/POSIXStopInfo.cpp
    lldb/branches/lldb-platform-work/source/Plugins/Process/POSIX/POSIXStopInfo.h
    lldb/branches/lldb-platform-work/source/Plugins/Process/POSIX/POSIXThread.cpp
    lldb/branches/lldb-platform-work/source/Plugins/Process/POSIX/POSIXThread.h
    lldb/branches/lldb-platform-work/source/Plugins/Process/POSIX/ProcessMessage.cpp
    lldb/branches/lldb-platform-work/source/Plugins/Process/POSIX/ProcessMessage.h
    lldb/branches/lldb-platform-work/source/Plugins/Process/POSIX/ProcessPOSIX.cpp
    lldb/branches/lldb-platform-work/source/Plugins/Process/POSIX/ProcessPOSIX.h
    lldb/branches/lldb-platform-work/source/Plugins/Process/POSIX/ProcessPOSIXLog.cpp
    lldb/branches/lldb-platform-work/source/Plugins/Process/POSIX/ProcessPOSIXLog.h
    lldb/branches/lldb-platform-work/source/Plugins/Process/POSIX/RegisterContextPOSIX.h
    lldb/branches/lldb-platform-work/source/Plugins/Process/POSIX/RegisterContext_i386.cpp
    lldb/branches/lldb-platform-work/source/Plugins/Process/POSIX/RegisterContext_i386.h
    lldb/branches/lldb-platform-work/source/Plugins/Process/POSIX/RegisterContext_x86_64.cpp
    lldb/branches/lldb-platform-work/source/Plugins/Process/POSIX/RegisterContext_x86_64.h
    lldb/branches/lldb-platform-work/source/Plugins/Process/Utility/DynamicRegisterInfo.cpp
    lldb/branches/lldb-platform-work/source/Plugins/Process/Utility/DynamicRegisterInfo.h
    lldb/branches/lldb-platform-work/source/Plugins/Process/Utility/InferiorCallPOSIX.cpp
    lldb/branches/lldb-platform-work/source/Plugins/Process/Utility/InferiorCallPOSIX.h
    lldb/branches/lldb-platform-work/source/Plugins/Process/Utility/RegisterContextDarwin_arm.cpp
    lldb/branches/lldb-platform-work/source/Plugins/Process/Utility/RegisterContextDarwin_arm.h
    lldb/branches/lldb-platform-work/source/Plugins/Process/Utility/RegisterContextDarwin_i386.cpp
    lldb/branches/lldb-platform-work/source/Plugins/Process/Utility/RegisterContextDarwin_i386.h
    lldb/branches/lldb-platform-work/source/Plugins/Process/Utility/RegisterContextDarwin_x86_64.cpp
    lldb/branches/lldb-platform-work/source/Plugins/Process/Utility/RegisterContextDarwin_x86_64.h
    lldb/branches/lldb-platform-work/source/Plugins/Process/Utility/RegisterContextLLDB.cpp
    lldb/branches/lldb-platform-work/source/Plugins/Process/Utility/RegisterContextLLDB.h
    lldb/branches/lldb-platform-work/source/Plugins/Process/Utility/RegisterContextMacOSXFrameBackchain.cpp
    lldb/branches/lldb-platform-work/source/Plugins/Process/Utility/RegisterContextMacOSXFrameBackchain.h
    lldb/branches/lldb-platform-work/source/Plugins/Process/Utility/RegisterContextMemory.cpp
    lldb/branches/lldb-platform-work/source/Plugins/Process/Utility/RegisterContextMemory.h
    lldb/branches/lldb-platform-work/source/Plugins/Process/Utility/StopInfoMachException.cpp
    lldb/branches/lldb-platform-work/source/Plugins/Process/Utility/StopInfoMachException.h
    lldb/branches/lldb-platform-work/source/Plugins/Process/Utility/ThreadMemory.cpp
    lldb/branches/lldb-platform-work/source/Plugins/Process/Utility/ThreadMemory.h
    lldb/branches/lldb-platform-work/source/Plugins/Process/Utility/UnwindLLDB.cpp
    lldb/branches/lldb-platform-work/source/Plugins/Process/Utility/UnwindLLDB.h
    lldb/branches/lldb-platform-work/source/Plugins/Process/Utility/UnwindMacOSXFrameBackchain.cpp
    lldb/branches/lldb-platform-work/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
    lldb/branches/lldb-platform-work/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
    lldb/branches/lldb-platform-work/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h
    lldb/branches/lldb-platform-work/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp
    lldb/branches/lldb-platform-work/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.h
    lldb/branches/lldb-platform-work/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp
    lldb/branches/lldb-platform-work/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.h
    lldb/branches/lldb-platform-work/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
    lldb/branches/lldb-platform-work/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h
    lldb/branches/lldb-platform-work/source/Plugins/Process/gdb-remote/ProcessGDBRemoteLog.cpp
    lldb/branches/lldb-platform-work/source/Plugins/Process/gdb-remote/ProcessGDBRemoteLog.h
    lldb/branches/lldb-platform-work/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp
    lldb/branches/lldb-platform-work/source/Plugins/Process/gdb-remote/ThreadGDBRemote.h
    lldb/branches/lldb-platform-work/source/Plugins/Process/mach-core/ProcessMachCore.cpp
    lldb/branches/lldb-platform-work/source/Plugins/Process/mach-core/ProcessMachCore.h
    lldb/branches/lldb-platform-work/source/Plugins/Process/mach-core/ThreadMachCore.cpp
    lldb/branches/lldb-platform-work/source/Plugins/Process/mach-core/ThreadMachCore.h
    lldb/branches/lldb-platform-work/source/Plugins/SymbolFile/DWARF/DWARFAbbreviationDeclaration.cpp
    lldb/branches/lldb-platform-work/source/Plugins/SymbolFile/DWARF/DWARFAbbreviationDeclaration.h
    lldb/branches/lldb-platform-work/source/Plugins/SymbolFile/DWARF/DWARFAttribute.h
    lldb/branches/lldb-platform-work/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp
    lldb/branches/lldb-platform-work/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.h
    lldb/branches/lldb-platform-work/source/Plugins/SymbolFile/DWARF/DWARFDebugAbbrev.cpp
    lldb/branches/lldb-platform-work/source/Plugins/SymbolFile/DWARF/DWARFDebugAbbrev.h
    lldb/branches/lldb-platform-work/source/Plugins/SymbolFile/DWARF/DWARFDebugArangeSet.cpp
    lldb/branches/lldb-platform-work/source/Plugins/SymbolFile/DWARF/DWARFDebugArangeSet.h
    lldb/branches/lldb-platform-work/source/Plugins/SymbolFile/DWARF/DWARFDebugAranges.cpp
    lldb/branches/lldb-platform-work/source/Plugins/SymbolFile/DWARF/DWARFDebugAranges.h
    lldb/branches/lldb-platform-work/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp
    lldb/branches/lldb-platform-work/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.h
    lldb/branches/lldb-platform-work/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
    lldb/branches/lldb-platform-work/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.h
    lldb/branches/lldb-platform-work/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp
    lldb/branches/lldb-platform-work/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.h
    lldb/branches/lldb-platform-work/source/Plugins/SymbolFile/DWARF/DWARFDebugMacinfo.cpp
    lldb/branches/lldb-platform-work/source/Plugins/SymbolFile/DWARF/DWARFDebugMacinfo.h
    lldb/branches/lldb-platform-work/source/Plugins/SymbolFile/DWARF/DWARFDebugMacinfoEntry.cpp
    lldb/branches/lldb-platform-work/source/Plugins/SymbolFile/DWARF/DWARFDebugMacinfoEntry.h
    lldb/branches/lldb-platform-work/source/Plugins/SymbolFile/DWARF/DWARFDebugPubnames.cpp
    lldb/branches/lldb-platform-work/source/Plugins/SymbolFile/DWARF/DWARFDebugPubnamesSet.cpp
    lldb/branches/lldb-platform-work/source/Plugins/SymbolFile/DWARF/DWARFDebugPubnamesSet.h
    lldb/branches/lldb-platform-work/source/Plugins/SymbolFile/DWARF/DWARFDebugRanges.cpp
    lldb/branches/lldb-platform-work/source/Plugins/SymbolFile/DWARF/DWARFDebugRanges.h
    lldb/branches/lldb-platform-work/source/Plugins/SymbolFile/DWARF/DWARFDeclContext.cpp
    lldb/branches/lldb-platform-work/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp
    lldb/branches/lldb-platform-work/source/Plugins/SymbolFile/DWARF/DWARFFormValue.h
    lldb/branches/lldb-platform-work/source/Plugins/SymbolFile/DWARF/DWARFLocationDescription.cpp
    lldb/branches/lldb-platform-work/source/Plugins/SymbolFile/DWARF/DWARFLocationList.cpp
    lldb/branches/lldb-platform-work/source/Plugins/SymbolFile/DWARF/DWARFLocationList.h
    lldb/branches/lldb-platform-work/source/Plugins/SymbolFile/DWARF/HashedNameToDIE.h
    lldb/branches/lldb-platform-work/source/Plugins/SymbolFile/DWARF/LogChannelDWARF.cpp
    lldb/branches/lldb-platform-work/source/Plugins/SymbolFile/DWARF/LogChannelDWARF.h
    lldb/branches/lldb-platform-work/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
    lldb/branches/lldb-platform-work/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
    lldb/branches/lldb-platform-work/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
    lldb/branches/lldb-platform-work/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h
    lldb/branches/lldb-platform-work/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.cpp
    lldb/branches/lldb-platform-work/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.h
    lldb/branches/lldb-platform-work/source/Plugins/SymbolVendor/MacOSX/SymbolVendorMacOSX.cpp
    lldb/branches/lldb-platform-work/source/Plugins/SymbolVendor/MacOSX/SymbolVendorMacOSX.h
    lldb/branches/lldb-platform-work/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp
    lldb/branches/lldb-platform-work/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.h
    lldb/branches/lldb-platform-work/source/Plugins/UnwindAssembly/x86/UnwindAssembly-x86.cpp
    lldb/branches/lldb-platform-work/source/Plugins/UnwindAssembly/x86/UnwindAssembly-x86.h
    lldb/branches/lldb-platform-work/source/Symbol/Block.cpp
    lldb/branches/lldb-platform-work/source/Symbol/ClangASTContext.cpp
    lldb/branches/lldb-platform-work/source/Symbol/ClangASTImporter.cpp
    lldb/branches/lldb-platform-work/source/Symbol/ClangASTType.cpp
    lldb/branches/lldb-platform-work/source/Symbol/ClangExternalASTSourceCallbacks.cpp
    lldb/branches/lldb-platform-work/source/Symbol/ClangExternalASTSourceCommon.cpp
    lldb/branches/lldb-platform-work/source/Symbol/CompileUnit.cpp
    lldb/branches/lldb-platform-work/source/Symbol/DWARFCallFrameInfo.cpp
    lldb/branches/lldb-platform-work/source/Symbol/FuncUnwinders.cpp
    lldb/branches/lldb-platform-work/source/Symbol/Function.cpp
    lldb/branches/lldb-platform-work/source/Symbol/LineTable.cpp
    lldb/branches/lldb-platform-work/source/Symbol/ObjectFile.cpp
    lldb/branches/lldb-platform-work/source/Symbol/Symbol.cpp
    lldb/branches/lldb-platform-work/source/Symbol/SymbolContext.cpp
    lldb/branches/lldb-platform-work/source/Symbol/SymbolFile.cpp
    lldb/branches/lldb-platform-work/source/Symbol/SymbolVendor.cpp
    lldb/branches/lldb-platform-work/source/Symbol/Symtab.cpp
    lldb/branches/lldb-platform-work/source/Symbol/Type.cpp
    lldb/branches/lldb-platform-work/source/Symbol/TypeHierarchyNavigator.cpp
    lldb/branches/lldb-platform-work/source/Symbol/TypeList.cpp
    lldb/branches/lldb-platform-work/source/Symbol/UnwindPlan.cpp
    lldb/branches/lldb-platform-work/source/Symbol/UnwindTable.cpp
    lldb/branches/lldb-platform-work/source/Symbol/Variable.cpp
    lldb/branches/lldb-platform-work/source/Symbol/VariableList.cpp
    lldb/branches/lldb-platform-work/source/Target/ABI.cpp
    lldb/branches/lldb-platform-work/source/Target/CPPLanguageRuntime.cpp
    lldb/branches/lldb-platform-work/source/Target/ExecutionContext.cpp
    lldb/branches/lldb-platform-work/source/Target/LanguageRuntime.cpp
    lldb/branches/lldb-platform-work/source/Target/Memory.cpp
    lldb/branches/lldb-platform-work/source/Target/ObjCLanguageRuntime.cpp
    lldb/branches/lldb-platform-work/source/Target/OperatingSystem.cpp
    lldb/branches/lldb-platform-work/source/Target/PathMappingList.cpp
    lldb/branches/lldb-platform-work/source/Target/Platform.cpp
    lldb/branches/lldb-platform-work/source/Target/Process.cpp
    lldb/branches/lldb-platform-work/source/Target/RegisterContext.cpp
    lldb/branches/lldb-platform-work/source/Target/SectionLoadList.cpp
    lldb/branches/lldb-platform-work/source/Target/StackFrame.cpp
    lldb/branches/lldb-platform-work/source/Target/StackFrameList.cpp
    lldb/branches/lldb-platform-work/source/Target/StackID.cpp
    lldb/branches/lldb-platform-work/source/Target/StopInfo.cpp
    lldb/branches/lldb-platform-work/source/Target/Target.cpp
    lldb/branches/lldb-platform-work/source/Target/TargetList.cpp
    lldb/branches/lldb-platform-work/source/Target/Thread.cpp
    lldb/branches/lldb-platform-work/source/Target/ThreadList.cpp
    lldb/branches/lldb-platform-work/source/Target/ThreadPlan.cpp
    lldb/branches/lldb-platform-work/source/Target/ThreadPlanBase.cpp
    lldb/branches/lldb-platform-work/source/Target/ThreadPlanCallFunction.cpp
    lldb/branches/lldb-platform-work/source/Target/ThreadPlanCallUserExpression.cpp
    lldb/branches/lldb-platform-work/source/Target/ThreadPlanRunToAddress.cpp
    lldb/branches/lldb-platform-work/source/Target/ThreadPlanShouldStopHere.cpp
    lldb/branches/lldb-platform-work/source/Target/ThreadPlanStepInRange.cpp
    lldb/branches/lldb-platform-work/source/Target/ThreadPlanStepInstruction.cpp
    lldb/branches/lldb-platform-work/source/Target/ThreadPlanStepOut.cpp
    lldb/branches/lldb-platform-work/source/Target/ThreadPlanStepOverBreakpoint.cpp
    lldb/branches/lldb-platform-work/source/Target/ThreadPlanStepOverRange.cpp
    lldb/branches/lldb-platform-work/source/Target/ThreadPlanStepRange.cpp
    lldb/branches/lldb-platform-work/source/Target/ThreadPlanStepThrough.cpp
    lldb/branches/lldb-platform-work/source/Target/ThreadPlanStepUntil.cpp
    lldb/branches/lldb-platform-work/source/Target/ThreadPlanTracer.cpp
    lldb/branches/lldb-platform-work/source/Target/ThreadSpec.cpp
    lldb/branches/lldb-platform-work/source/Target/UnwindAssembly.cpp
    lldb/branches/lldb-platform-work/source/Utility/ARM_DWARF_Registers.cpp
    lldb/branches/lldb-platform-work/source/Utility/ARM_DWARF_Registers.h
    lldb/branches/lldb-platform-work/source/Utility/Makefile
    lldb/branches/lldb-platform-work/source/Utility/StringExtractor.cpp
    lldb/branches/lldb-platform-work/source/Utility/StringExtractor.h
    lldb/branches/lldb-platform-work/source/Utility/StringExtractorGDBRemote.cpp
    lldb/branches/lldb-platform-work/source/Utility/StringExtractorGDBRemote.h
    lldb/branches/lldb-platform-work/source/lldb-log.cpp
    lldb/branches/lldb-platform-work/source/lldb.cpp
    lldb/branches/lldb-platform-work/test/Makefile
    lldb/branches/lldb-platform-work/test/api/check_public_api_headers/Makefile
    lldb/branches/lldb-platform-work/test/api/check_public_api_headers/TestPublicAPIHeaders.py
    lldb/branches/lldb-platform-work/test/attic/tester.py
    lldb/branches/lldb-platform-work/test/dosep.ty
    lldb/branches/lldb-platform-work/test/dotest.py
    lldb/branches/lldb-platform-work/test/example/TestSequenceFunctions.py
    lldb/branches/lldb-platform-work/test/expression_command/call-function/TestCallStdStringFunction.py
    lldb/branches/lldb-platform-work/test/expression_command/call-function/main.cpp
    lldb/branches/lldb-platform-work/test/expression_command/formatters/TestFormatters.py
    lldb/branches/lldb-platform-work/test/expression_command/issue_11588/Test11588.py
    lldb/branches/lldb-platform-work/test/expression_command/issue_11588/main.cpp
    lldb/branches/lldb-platform-work/test/expression_command/persistent_variables/TestPersistentVariables.py
    lldb/branches/lldb-platform-work/test/expression_command/persistent_variables/main.c
    lldb/branches/lldb-platform-work/test/expression_command/radar_9531204/TestPrintfAfterUp.py
    lldb/branches/lldb-platform-work/test/expression_command/radar_9673664/TestExprHelpExamples.py
    lldb/branches/lldb-platform-work/test/expression_command/test/TestExprs.py
    lldb/branches/lldb-platform-work/test/expression_command/test/TestExprs2.py
    lldb/branches/lldb-platform-work/test/expression_command/test/main.cpp
    lldb/branches/lldb-platform-work/test/expression_command/two-files/TestObjCTypeQueryFromOtherCompileUnit.py
    lldb/branches/lldb-platform-work/test/functionalities/abbreviation/TestAbbreviations.py
    lldb/branches/lldb-platform-work/test/functionalities/abbreviation/TestCommonShortSpellings.py
    lldb/branches/lldb-platform-work/test/functionalities/abbreviation/change_prompt.lldb
    lldb/branches/lldb-platform-work/test/functionalities/alias/TestAliases.py
    lldb/branches/lldb-platform-work/test/functionalities/archives/TestBSDArchives.py
    lldb/branches/lldb-platform-work/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommand.py
    lldb/branches/lldb-platform-work/test/functionalities/breakpoint/breakpoint_conditions/TestBreakpointConditions.py
    lldb/branches/lldb-platform-work/test/functionalities/breakpoint/breakpoint_ids/TestBreakpointIDs.py
    lldb/branches/lldb-platform-work/test/functionalities/breakpoint/breakpoint_ignore_count/TestBreakpointIgnoreCount.py
    lldb/branches/lldb-platform-work/test/functionalities/breakpoint/breakpoint_locations/TestBreakpointLocations.py
    lldb/branches/lldb-platform-work/test/functionalities/breakpoint/inlined_breakpoints/TestInlinedBreakpoints.py
    lldb/branches/lldb-platform-work/test/functionalities/command_script/TestCommandScript.py
    lldb/branches/lldb-platform-work/test/functionalities/command_script/import/TestImport.py
    lldb/branches/lldb-platform-work/test/functionalities/command_script/import/bar/bar.py
    lldb/branches/lldb-platform-work/test/functionalities/command_script/import/foo/bar/foobar.py
    lldb/branches/lldb-platform-work/test/functionalities/command_script/import/foo/foo.py
    lldb/branches/lldb-platform-work/test/functionalities/command_script/import/foo/foo2.py
    lldb/branches/lldb-platform-work/test/functionalities/command_script/main.cpp
    lldb/branches/lldb-platform-work/test/functionalities/command_script/mysto.py
    lldb/branches/lldb-platform-work/test/functionalities/command_script/welcome.py
    lldb/branches/lldb-platform-work/test/functionalities/completion/TestCompletion.py
    lldb/branches/lldb-platform-work/test/functionalities/conditional_break/.lldb
    lldb/branches/lldb-platform-work/test/functionalities/conditional_break/TestConditionalBreak.py
    lldb/branches/lldb-platform-work/test/functionalities/conditional_break/conditional_break.py
    lldb/branches/lldb-platform-work/test/functionalities/connect_remote/TestConnectRemote.py
    lldb/branches/lldb-platform-work/test/functionalities/data-formatter/data-formatter-advanced/TestDataFormatterAdv.py
    lldb/branches/lldb-platform-work/test/functionalities/data-formatter/data-formatter-categories/TestDataFormatterCategories.py
    lldb/branches/lldb-platform-work/test/functionalities/data-formatter/data-formatter-cpp/TestDataFormatterCpp.py
    lldb/branches/lldb-platform-work/test/functionalities/data-formatter/data-formatter-disabling/TestDataFormatterDisabling.py
    lldb/branches/lldb-platform-work/test/functionalities/data-formatter/data-formatter-globals/TestDataFormatterGlobals.py
    lldb/branches/lldb-platform-work/test/functionalities/data-formatter/data-formatter-named-summaries/TestDataFormatterNamedSummaries.py
    lldb/branches/lldb-platform-work/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjC.py
    lldb/branches/lldb-platform-work/test/functionalities/data-formatter/data-formatter-objc/main.m
    lldb/branches/lldb-platform-work/test/functionalities/data-formatter/data-formatter-python-synth/TestDataFormatterPythonSynth.py
    lldb/branches/lldb-platform-work/test/functionalities/data-formatter/data-formatter-python-synth/main.cpp
    lldb/branches/lldb-platform-work/test/functionalities/data-formatter/data-formatter-script/TestDataFormatterScript.py
    lldb/branches/lldb-platform-work/test/functionalities/data-formatter/data-formatter-skip-summary/Makefile
    lldb/branches/lldb-platform-work/test/functionalities/data-formatter/data-formatter-skip-summary/TestDataFormatterSkipSummary.py
    lldb/branches/lldb-platform-work/test/functionalities/data-formatter/data-formatter-smart-array/TestDataFormatterSmartArray.py
    lldb/branches/lldb-platform-work/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/TestDataFormatterLibcxxList.py
    lldb/branches/lldb-platform-work/test/functionalities/data-formatter/data-formatter-stl/libcxx/map/TestDataFormatterLibccMap.py
    lldb/branches/lldb-platform-work/test/functionalities/data-formatter/data-formatter-stl/libcxx/map/main.cpp
    lldb/branches/lldb-platform-work/test/functionalities/data-formatter/data-formatter-stl/libcxx/vector/TestDataFormatterLibcxxVector.py
    lldb/branches/lldb-platform-work/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/list/Makefile
    lldb/branches/lldb-platform-work/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/list/TestDataFormatterStdList.py
    lldb/branches/lldb-platform-work/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/list/main.cpp
    lldb/branches/lldb-platform-work/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/map/Makefile
    lldb/branches/lldb-platform-work/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/map/TestDataFormatterStdMap.py
    lldb/branches/lldb-platform-work/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vector/Makefile
    lldb/branches/lldb-platform-work/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vector/TestDataFormatterStdVector.py
    lldb/branches/lldb-platform-work/test/functionalities/data-formatter/data-formatter-synth/TestDataFormatterSynth.py
    lldb/branches/lldb-platform-work/test/functionalities/data-formatter/rdar-10449092/Test-rdar-10449092.py
    lldb/branches/lldb-platform-work/test/functionalities/data-formatter/rdar-10642615/Test-rdar-10642615.py
    lldb/branches/lldb-platform-work/test/functionalities/data-formatter/rdar-10887661/TestRdar10887661.py
    lldb/branches/lldb-platform-work/test/functionalities/data-formatter/rdar-11628688/TestFormattersBoolRefPtr.py
    lldb/branches/lldb-platform-work/test/functionalities/data-formatter/rdar-11773899/TestFormattersBoolRefPtr.py
    lldb/branches/lldb-platform-work/test/functionalities/data-formatter/rdar-3534688/TestFormattersOneIsSingular.py
    lldb/branches/lldb-platform-work/test/functionalities/data-formatter/rdar-9973865/Makefile
    lldb/branches/lldb-platform-work/test/functionalities/data-formatter/rdar-9973865/Test-rdar-9973865.py
    lldb/branches/lldb-platform-work/test/functionalities/data-formatter/rdar-9973992/Test-rdar-9973992.py
    lldb/branches/lldb-platform-work/test/functionalities/data-formatter/rdar-9974002/Test-rdar-9974002.py
    lldb/branches/lldb-platform-work/test/functionalities/dead-strip/TestDeadStrip.py
    lldb/branches/lldb-platform-work/test/functionalities/embedded_interpreter/TestConvenienceVariables.py
    lldb/branches/lldb-platform-work/test/functionalities/expr-doesnt-deadlock/Makefile
    lldb/branches/lldb-platform-work/test/functionalities/expr-doesnt-deadlock/TestExprDoesntBlock.py
    lldb/branches/lldb-platform-work/test/functionalities/inferior-changed/TestInferiorChanged.py
    lldb/branches/lldb-platform-work/test/functionalities/inferior-crashing/TestInferiorCrashing.py
    lldb/branches/lldb-platform-work/test/functionalities/inferior-crashing/main.c
    lldb/branches/lldb-platform-work/test/functionalities/load_unload/Makefile
    lldb/branches/lldb-platform-work/test/functionalities/load_unload/TestLoadUnload.py
    lldb/branches/lldb-platform-work/test/functionalities/memory/read/TestMemoryRead.py
    lldb/branches/lldb-platform-work/test/functionalities/non-overlapping-index-variable-i/TestIndexVariable.py
    lldb/branches/lldb-platform-work/test/functionalities/process_launch/TestProcessLaunch.py
    lldb/branches/lldb-platform-work/test/functionalities/register/TestRegisters.py
    lldb/branches/lldb-platform-work/test/functionalities/return-value/TestReturnValue.py
    lldb/branches/lldb-platform-work/test/functionalities/return-value/call-func.c
    lldb/branches/lldb-platform-work/test/functionalities/signal/TestSendSignal.py
    lldb/branches/lldb-platform-work/test/functionalities/single-quote-in-filename-to-lldb/TestSingleQuoteInFilename.py
    lldb/branches/lldb-platform-work/test/functionalities/stop-hook/TestStopHookCmd.py
    lldb/branches/lldb-platform-work/test/functionalities/stop-hook/TestStopHookMechanism.py
    lldb/branches/lldb-platform-work/test/functionalities/stop-hook/multiple_threads/Makefile
    lldb/branches/lldb-platform-work/test/functionalities/stop-hook/multiple_threads/TestStopHookMultipleThreads.py
    lldb/branches/lldb-platform-work/test/functionalities/target_command/TestTargetCommand.py
    lldb/branches/lldb-platform-work/test/functionalities/type_completion/TestTypeCompletion.py
    lldb/branches/lldb-platform-work/test/functionalities/watchpoint/hello_watchlocation/Makefile
    lldb/branches/lldb-platform-work/test/functionalities/watchpoint/hello_watchlocation/TestWatchLocation.py
    lldb/branches/lldb-platform-work/test/functionalities/watchpoint/hello_watchpoint/TestMyFirstWatchpoint.py
    lldb/branches/lldb-platform-work/test/functionalities/watchpoint/multiple_threads/Makefile
    lldb/branches/lldb-platform-work/test/functionalities/watchpoint/multiple_threads/TestWatchpointMultipleThreads.py
    lldb/branches/lldb-platform-work/test/functionalities/watchpoint/watchpoint_commands/TestWatchpointCommands.py
    lldb/branches/lldb-platform-work/test/functionalities/watchpoint/watchpoint_commands/command/TestWatchpointCommandLLDB.py
    lldb/branches/lldb-platform-work/test/functionalities/watchpoint/watchpoint_commands/command/TestWatchpointCommandPython.py
    lldb/branches/lldb-platform-work/test/functionalities/watchpoint/watchpoint_commands/condition/TestWatchpointConditionCmd.py
    lldb/branches/lldb-platform-work/test/functionalities/watchpoint/watchpoint_set_command/Makefile
    lldb/branches/lldb-platform-work/test/functionalities/watchpoint/watchpoint_set_command/TestWatchLocationWithWatchSet.py
    lldb/branches/lldb-platform-work/test/functionalities/watchpoint/watchpoint_set_command/TestWatchpointSetErrorCases.py
    lldb/branches/lldb-platform-work/test/help/TestHelp.py
    lldb/branches/lldb-platform-work/test/lang/c/anonymous/TestAnonymous.py
    lldb/branches/lldb-platform-work/test/lang/c/anonymous/main.c
    lldb/branches/lldb-platform-work/test/lang/c/array_types/TestArrayTypes.py
    lldb/branches/lldb-platform-work/test/lang/c/bitfields/TestBitfields.py
    lldb/branches/lldb-platform-work/test/lang/c/bitfields/main.c
    lldb/branches/lldb-platform-work/test/lang/c/blocks/Makefile
    lldb/branches/lldb-platform-work/test/lang/c/blocks/TestBlocks.py
    lldb/branches/lldb-platform-work/test/lang/c/enum_types/TestEnumTypes.py
    lldb/branches/lldb-platform-work/test/lang/c/enum_types/main.c
    lldb/branches/lldb-platform-work/test/lang/c/forward/TestForwardDeclaration.py
    lldb/branches/lldb-platform-work/test/lang/c/function_types/TestFunctionTypes.py
    lldb/branches/lldb-platform-work/test/lang/c/global_variables/TestGlobalVariables.py
    lldb/branches/lldb-platform-work/test/lang/c/set_values/TestSetValues.py
    lldb/branches/lldb-platform-work/test/lang/c/shared_lib/Makefile
    lldb/branches/lldb-platform-work/test/lang/c/shared_lib/TestSharedLib.py
    lldb/branches/lldb-platform-work/test/lang/c/shared_lib/main.c
    lldb/branches/lldb-platform-work/test/lang/c/stepping/TestStepAndBreakpoints.py
    lldb/branches/lldb-platform-work/test/lang/c/stepping/TestThreadStepping.py
    lldb/branches/lldb-platform-work/test/lang/c/stepping/main.c
    lldb/branches/lldb-platform-work/test/lang/c/strings/TestCStrings.py
    lldb/branches/lldb-platform-work/test/lang/c/struct_types/TestStructTypes.py
    lldb/branches/lldb-platform-work/test/lang/c/struct_types/main.c
    lldb/branches/lldb-platform-work/test/lang/cpp/class_static/TestStaticVariables.py
    lldb/branches/lldb-platform-work/test/lang/cpp/class_types/TestClassTypes.py
    lldb/branches/lldb-platform-work/test/lang/cpp/class_types/TestClassTypesDisassembly.py
    lldb/branches/lldb-platform-work/test/lang/cpp/dynamic-value/TestDynamicValue.py
    lldb/branches/lldb-platform-work/test/lang/cpp/dynamic-value/pass-to-base.cpp
    lldb/branches/lldb-platform-work/test/lang/cpp/namespace/TestNamespace.py
    lldb/branches/lldb-platform-work/test/lang/cpp/namespace/main.cpp
    lldb/branches/lldb-platform-work/test/lang/cpp/rvalue-references/Makefile
    lldb/branches/lldb-platform-work/test/lang/cpp/rvalue-references/TestRvalueReferences.py
    lldb/branches/lldb-platform-work/test/lang/cpp/signed_types/TestSignedTypes.py
    lldb/branches/lldb-platform-work/test/lang/cpp/static_methods/TestCPPStaticMethods.py
    lldb/branches/lldb-platform-work/test/lang/cpp/stl/Makefile
    lldb/branches/lldb-platform-work/test/lang/cpp/stl/TestSTL.py
    lldb/branches/lldb-platform-work/test/lang/cpp/stl/TestStdCXXDisassembly.py
    lldb/branches/lldb-platform-work/test/lang/cpp/stl/main.cpp
    lldb/branches/lldb-platform-work/test/lang/cpp/this/TestCPPThis.py
    lldb/branches/lldb-platform-work/test/lang/cpp/this/main.cpp
    lldb/branches/lldb-platform-work/test/lang/cpp/unique-types/TestUniqueTypes.py
    lldb/branches/lldb-platform-work/test/lang/cpp/unsigned_types/TestUnsignedTypes.py
    lldb/branches/lldb-platform-work/test/lang/cpp/virtual/TestVirtual.py
    lldb/branches/lldb-platform-work/test/lang/objc/forward-decl/Makefile
    lldb/branches/lldb-platform-work/test/lang/objc/forward-decl/TestForwardDecl.py
    lldb/branches/lldb-platform-work/test/lang/objc/foundation/TestConstStrings.py
    lldb/branches/lldb-platform-work/test/lang/objc/foundation/TestFoundationDisassembly.py
    lldb/branches/lldb-platform-work/test/lang/objc/foundation/TestObjCMethods.py
    lldb/branches/lldb-platform-work/test/lang/objc/foundation/TestObjCMethods2.py
    lldb/branches/lldb-platform-work/test/lang/objc/foundation/TestObjectDescriptionAPI.py
    lldb/branches/lldb-platform-work/test/lang/objc/foundation/main.m
    lldb/branches/lldb-platform-work/test/lang/objc/hidden-ivars/InternalDefiner.h
    lldb/branches/lldb-platform-work/test/lang/objc/hidden-ivars/InternalDefiner.m
    lldb/branches/lldb-platform-work/test/lang/objc/hidden-ivars/Makefile
    lldb/branches/lldb-platform-work/test/lang/objc/hidden-ivars/TestHiddenIvars.py
    lldb/branches/lldb-platform-work/test/lang/objc/hidden-ivars/main.m
    lldb/branches/lldb-platform-work/test/lang/objc/objc++/TestObjCXX.py
    lldb/branches/lldb-platform-work/test/lang/objc/objc-builtin-types/TestObjCBuiltinTypes.py
    lldb/branches/lldb-platform-work/test/lang/objc/objc-checker/TestObjCCheckers.py
    lldb/branches/lldb-platform-work/test/lang/objc/objc-class-method/TestObjCClassMethod.py
    lldb/branches/lldb-platform-work/test/lang/objc/objc-dynamic-value/TestObjCDynamicValue.py
    lldb/branches/lldb-platform-work/test/lang/objc/objc-ivar-offsets/TestObjCIvarOffsets.py
    lldb/branches/lldb-platform-work/test/lang/objc/objc-new-syntax/TestObjCNewSyntax.py
    lldb/branches/lldb-platform-work/test/lang/objc/objc-optimized/Makefile
    lldb/branches/lldb-platform-work/test/lang/objc/objc-optimized/TestObjcOptimized.py
    lldb/branches/lldb-platform-work/test/lang/objc/objc-property/TestObjCProperty.py
    lldb/branches/lldb-platform-work/test/lang/objc/objc-property/main.m
    lldb/branches/lldb-platform-work/test/lang/objc/objc-static-method/TestObjCStaticMethod.py
    lldb/branches/lldb-platform-work/test/lang/objc/objc-stepping/TestObjCStepping.py
    lldb/branches/lldb-platform-work/test/lang/objc/radar-9691614/TestObjCMethodReturningBOOL.py
    lldb/branches/lldb-platform-work/test/lang/objc/rdar-10967107/TestRdar10967107.py
    lldb/branches/lldb-platform-work/test/lang/objc/rdar-10967107/main.m
    lldb/branches/lldb-platform-work/test/lang/objc/rdar-11355592/TestRdar11355592.py
    lldb/branches/lldb-platform-work/test/lang/objc/rdar-11355592/main.m
    lldb/branches/lldb-platform-work/test/lang/objc/real-definition/TestRealDefinition.py
    lldb/branches/lldb-platform-work/test/lang/objc/self/TestObjCSelf.py
    lldb/branches/lldb-platform-work/test/lldbtest.py
    lldb/branches/lldb-platform-work/test/lldbutil.py
    lldb/branches/lldb-platform-work/test/logging/TestLogging.py
    lldb/branches/lldb-platform-work/test/macosx/universal/TestUniversal.py
    lldb/branches/lldb-platform-work/test/make/Makefile.rules
    lldb/branches/lldb-platform-work/test/plugins/builder_base.py
    lldb/branches/lldb-platform-work/test/python_api/debugger/TestDebuggerAPI.py
    lldb/branches/lldb-platform-work/test/python_api/default-constructor/sb_debugger.py
    lldb/branches/lldb-platform-work/test/python_api/default-constructor/sb_inputreader.py
    lldb/branches/lldb-platform-work/test/python_api/formatters/TestFormattersSBAPI.py
    lldb/branches/lldb-platform-work/test/python_api/function_symbol/TestDisasmAPI.py
    lldb/branches/lldb-platform-work/test/python_api/function_symbol/TestSymbolAPI.py
    lldb/branches/lldb-platform-work/test/python_api/hello_world/TestHelloWorld.py
    lldb/branches/lldb-platform-work/test/python_api/lldbutil/iter/Makefile
    lldb/branches/lldb-platform-work/test/python_api/lldbutil/iter/TestRegistersIterator.py
    lldb/branches/lldb-platform-work/test/python_api/lldbutil/process/Makefile
    lldb/branches/lldb-platform-work/test/python_api/lldbutil/process/TestPrintStackTraces.py
    lldb/branches/lldb-platform-work/test/python_api/module_section/Makefile
    lldb/branches/lldb-platform-work/test/python_api/process/TestProcessAPI.py
    lldb/branches/lldb-platform-work/test/python_api/process/io/TestProcessIO.py
    lldb/branches/lldb-platform-work/test/python_api/sbdata/TestSBData.py
    lldb/branches/lldb-platform-work/test/python_api/symbol-context/TestSymbolContext.py
    lldb/branches/lldb-platform-work/test/python_api/target/TestTargetAPI.py
    lldb/branches/lldb-platform-work/test/python_api/thread/TestThreadAPI.py
    lldb/branches/lldb-platform-work/test/python_api/type/TestTypeList.py
    lldb/branches/lldb-platform-work/test/python_api/value/TestValueAPI.py
    lldb/branches/lldb-platform-work/test/python_api/value/change_values/TestChangeValueAPI.py
    lldb/branches/lldb-platform-work/test/python_api/value/change_values/main.c
    lldb/branches/lldb-platform-work/test/python_api/value/linked_list/TestValueAPILinkedList.py
    lldb/branches/lldb-platform-work/test/python_api/watchpoint/watchlocation/Makefile
    lldb/branches/lldb-platform-work/test/python_api/watchpoint/watchlocation/TestSetWatchlocation.py
    lldb/branches/lldb-platform-work/test/python_api/watchpoint/watchlocation/TestTargetWatchAddress.py
    lldb/branches/lldb-platform-work/test/redo.py
    lldb/branches/lldb-platform-work/test/settings/TestSettings.py
    lldb/branches/lldb-platform-work/test/source-manager/TestSourceManager.py
    lldb/branches/lldb-platform-work/test/types/AbstractBase.py
    lldb/branches/lldb-platform-work/test/types/TestFloatTypes.py
    lldb/branches/lldb-platform-work/test/types/TestFloatTypesExpr.py
    lldb/branches/lldb-platform-work/test/types/TestIntegerTypes.py
    lldb/branches/lldb-platform-work/test/types/TestIntegerTypesExpr.py
    lldb/branches/lldb-platform-work/test/unittest2/case.py
    lldb/branches/lldb-platform-work/test/unittest2/result.py
    lldb/branches/lldb-platform-work/test/unittest2/runner.py
    lldb/branches/lldb-platform-work/tools/darwin-debug/darwin-debug.cpp
    lldb/branches/lldb-platform-work/tools/darwin-threads/examine-threads.c
    lldb/branches/lldb-platform-work/tools/debugserver/debugserver.xcodeproj/project.pbxproj
    lldb/branches/lldb-platform-work/tools/debugserver/debugserver.xcodeproj/xcshareddata/xcschemes/debugserver.xcscheme
    lldb/branches/lldb-platform-work/tools/debugserver/source/ARM_DWARF_Registers.h
    lldb/branches/lldb-platform-work/tools/debugserver/source/ARM_GCC_Registers.h
    lldb/branches/lldb-platform-work/tools/debugserver/source/DNB.cpp
    lldb/branches/lldb-platform-work/tools/debugserver/source/DNB.h
    lldb/branches/lldb-platform-work/tools/debugserver/source/DNBBreakpoint.cpp
    lldb/branches/lldb-platform-work/tools/debugserver/source/DNBBreakpoint.h
    lldb/branches/lldb-platform-work/tools/debugserver/source/DNBDataRef.cpp
    lldb/branches/lldb-platform-work/tools/debugserver/source/DNBDataRef.h
    lldb/branches/lldb-platform-work/tools/debugserver/source/DNBDefs.h
    lldb/branches/lldb-platform-work/tools/debugserver/source/DNBLog.cpp
    lldb/branches/lldb-platform-work/tools/debugserver/source/DNBLog.h
    lldb/branches/lldb-platform-work/tools/debugserver/source/DNBTimer.h
    lldb/branches/lldb-platform-work/tools/debugserver/source/MacOSX/CFBundle.cpp
    lldb/branches/lldb-platform-work/tools/debugserver/source/MacOSX/CFBundle.h
    lldb/branches/lldb-platform-work/tools/debugserver/source/MacOSX/MachException.cpp
    lldb/branches/lldb-platform-work/tools/debugserver/source/MacOSX/MachProcess.cpp
    lldb/branches/lldb-platform-work/tools/debugserver/source/MacOSX/MachProcess.h
    lldb/branches/lldb-platform-work/tools/debugserver/source/MacOSX/MachTask.cpp
    lldb/branches/lldb-platform-work/tools/debugserver/source/MacOSX/MachTask.h
    lldb/branches/lldb-platform-work/tools/debugserver/source/MacOSX/MachThread.cpp
    lldb/branches/lldb-platform-work/tools/debugserver/source/MacOSX/MachThread.h
    lldb/branches/lldb-platform-work/tools/debugserver/source/MacOSX/MachThreadList.cpp
    lldb/branches/lldb-platform-work/tools/debugserver/source/MacOSX/MachThreadList.h
    lldb/branches/lldb-platform-work/tools/debugserver/source/MacOSX/MachVMMemory.cpp
    lldb/branches/lldb-platform-work/tools/debugserver/source/MacOSX/MachVMMemory.h
    lldb/branches/lldb-platform-work/tools/debugserver/source/MacOSX/arm/DNBArchImpl.cpp
    lldb/branches/lldb-platform-work/tools/debugserver/source/MacOSX/arm/DNBArchImpl.h
    lldb/branches/lldb-platform-work/tools/debugserver/source/MacOSX/i386/DNBArchImplI386.cpp
    lldb/branches/lldb-platform-work/tools/debugserver/source/MacOSX/ppc/DNBArchImpl.cpp
    lldb/branches/lldb-platform-work/tools/debugserver/source/MacOSX/x86_64/DNBArchImplX86_64.cpp
    lldb/branches/lldb-platform-work/tools/debugserver/source/RNBContext.cpp
    lldb/branches/lldb-platform-work/tools/debugserver/source/RNBContext.h
    lldb/branches/lldb-platform-work/tools/debugserver/source/RNBDefs.h
    lldb/branches/lldb-platform-work/tools/debugserver/source/RNBRemote.cpp
    lldb/branches/lldb-platform-work/tools/debugserver/source/RNBRemote.h
    lldb/branches/lldb-platform-work/tools/debugserver/source/RNBServices.cpp
    lldb/branches/lldb-platform-work/tools/debugserver/source/RNBSocket.cpp
    lldb/branches/lldb-platform-work/tools/debugserver/source/RNBSocket.h
    lldb/branches/lldb-platform-work/tools/debugserver/source/debugserver.cpp
    lldb/branches/lldb-platform-work/tools/driver/Driver.cpp
    lldb/branches/lldb-platform-work/tools/driver/Driver.h
    lldb/branches/lldb-platform-work/tools/driver/IOChannel.cpp
    lldb/branches/lldb-platform-work/tools/driver/IOChannel.h
    lldb/branches/lldb-platform-work/tools/driver/Makefile
    lldb/branches/lldb-platform-work/tools/install-headers/Makefile
    lldb/branches/lldb-platform-work/tools/lldb-platform/lldb-platform.cpp
    lldb/branches/lldb-platform-work/www/architecture.html
    lldb/branches/lldb-platform-work/www/build.html
    lldb/branches/lldb-platform-work/www/index.html
    lldb/branches/lldb-platform-work/www/lldb-gdb.html
    lldb/branches/lldb-platform-work/www/python-reference.html
    lldb/branches/lldb-platform-work/www/sidebar.incl
    lldb/branches/lldb-platform-work/www/status.html
    lldb/branches/lldb-platform-work/www/tutorial.html
    lldb/branches/lldb-platform-work/www/varformats.html

Propchange: lldb/branches/lldb-platform-work/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Jun  6 19:06:43 2013
@@ -1 +1,2 @@
-/lldb/trunk:154223-161795
+/lldb/branches/apple/python-GIL:156467-162159
+/lldb/trunk:154223-183457

Copied: lldb/branches/lldb-platform-work/CMakeLists.txt (from r182522, lldb/trunk/CMakeLists.txt)
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/CMakeLists.txt?p2=lldb/branches/lldb-platform-work/CMakeLists.txt&p1=lldb/trunk/CMakeLists.txt&r1=182522&r2=183468&rev=183468&view=diff
==============================================================================
--- lldb/trunk/CMakeLists.txt (original)
+++ lldb/branches/lldb-platform-work/CMakeLists.txt Thu Jun  6 19:06:43 2013
@@ -175,7 +175,7 @@ macro(add_lldb_library name)
   #endif()
 
   if(LLDB_USED_LIBS)
-    if (CMAKE_SYSTEM_NAME MATCHES "Linux")
+    if (CMAKE_SYSTEM_NAME MATCHES "Linux" OR CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
       target_link_libraries(${name} -Wl,--start-group ${LLDB_USED_LIBS} -Wl,--end-group)
     else()
       target_link_libraries(${name} ${LLDB_USED_LIBS})
@@ -246,7 +246,13 @@ if (CMAKE_SYSTEM_NAME MATCHES "Darwin")
   ${DEBUG_SYMBOLS_LIBRARY})
 endif()
 
+# On FreeBSD, link libexecinfo because libc is missing  backtrace()
+if (CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
+  list(APPEND system_libs execinfo)
+endif()
+
 #add_subdirectory(include)
+add_subdirectory(docs)
 add_subdirectory(scripts)
 add_subdirectory(source)
 add_subdirectory(test)

Modified: lldb/branches/lldb-platform-work/INSTALL.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/INSTALL.txt?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/INSTALL.txt (original)
+++ lldb/branches/lldb-platform-work/INSTALL.txt Thu Jun  6 19:06:43 2013
@@ -1,9 +1,13 @@
 LLDB Installation Instructions
 ==============================
 
-Note that LLDB currently only builds out of the box on Mac OS X with Xcode, but
-patches to improve portability are definitely welcome.
+LLDB builds on Mac OS X (with Xcode) and Linux (with GCC or Clang).
 
-In addition to using Xcode you'll need to enable code signing on your system
-to either build lldb or debug using lldb.  Please see the code signing
-documentation in docs/code-signing.txt for more detailed directions.
+On Mac OS X, in addition to using Xcode you'll need to enable code signing
+on your system to either build lldb or debug using lldb.  Please see the code
+signing documentation in docs/code-signing.txt for more detailed directions.
+
+For instructions to build LLDB on Linux, or more details about supported
+compiler versions, other dependencies, and build flags, see:
+
+    http://lldb.llvm.org/build.html

Modified: lldb/branches/lldb-platform-work/Makefile
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/Makefile?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/Makefile (original)
+++ lldb/branches/lldb-platform-work/Makefile Thu Jun  6 19:06:43 2013
@@ -42,11 +42,17 @@ CPP.Flags += -I$(PROJ_SRC_DIR)/$(LLDB_LE
 CPP.Flags += -I$(PROJ_SRC_DIR)/$(LLDB_LEVEL)/source/Plugins/Process/POSIX
 ifeq ($(HOST_OS),Darwin)
 CPP.Flags += -F/System/Library/Frameworks -F/System/Library/PrivateFrameworks
+CPP.Flags += -I/usr/include/libxml2
 endif
 ifdef LLDB_VENDOR
 CPP.Flags += -DLLDB_VENDOR='"$(LLDB_VENDOR) "'
 endif
 
+# If building on a 32-bit system, make sure off_t can store offsets > 2GB
+ifneq "$(HOST_ARCH)" "x86_64"
+CPP.Flags += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
+endif
+
 # Disable -fstrict-aliasing. Darwin disables it by default (and LLVM doesn't
 # work with it enabled with GCC), Clang/llvm-gc don't support it yet, and newer
 # GCC's have false positive warnings with it on Linux (which prove a pain to

Modified: lldb/branches/lldb-platform-work/docs/code-signing.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/docs/code-signing.txt?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/docs/code-signing.txt (original)
+++ lldb/branches/lldb-platform-work/docs/code-signing.txt Thu Jun  6 19:06:43 2013
@@ -1,6 +1,13 @@
-On MacOSX lldb needs to be code signed. The Debug and Release builds 
-are set to code sign using a code signing certificate named 
-lldb_codesign. 
+On MacOSX lldb needs to be code signed. The Debug, DebugClang and Release 
+builds  are set to code sign using a code signing certificate named 
+"lldb_codesign". 
+
+If you have re-installed a new OS, please delete all old lldb_codesign items
+from your keychain. There will be 3: a code signing certification and a public
+and private key. Reboot after deleting them. You will also need to delete and
+build folders that contained old signed items. The darwin kernel will cache 
+code sigining using the executable's file system node, so you will need to 
+delete the file so the kernel clears its cache.
 
 If you don't have one yet you will need to:
 - Launch /Applications/Utilities/Keychain Access.app
@@ -23,31 +30,32 @@ If you don't have one yet you will need
 - Click Done
 - Click on the "My Certificates"
 - Double click on your new lldb_codesign certificate
-- Turn down the "Trust" disclosure triangle
-
-	Change:
-		When using this certificate: Always Trust
-
-- Enter your login password to confirm and make it trusted
-
-The next steps are necessary on SnowLeopard, but are probably because of a bug
-how Keychain Access makes certificates.
-[Note: These also apply for Lion.]
-
-- Option-drag the new lldb_codesign certificate from the login keychain to
-  the System keychain in the Keychains pane of the main Keychain Access window
-  to make a copy of this certificate in the System keychain.  You'll have to
-  authorize a few more times, set it to be "Always trusted" when asked.
-- Switch to the System keychain, and drag the copy of lldb_codesign you just
-  made there onto the desktop.
+- Turn down the "Trust" disclosure triangle, scroll to the "Code Signing" trust
+  pulldown menu and select "Always Trust" and authenticate as needed using your
+  username and password.
+- Drag the new "lldb_codesign" code signing certificate (not the public or private
+  keys of the same name) from the "login" keychain to the "System" keychain in the 
+  Keychains pane on the left hand side of the main Keychain Access window. This will
+  move this certificate to the "System" keychain. You'll have to authorize a few
+  more times, set it to be "Always trusted" when asked.
+- Remove "~/Desktop/lldb_codesign.cer" file on your desktop if there is one.
+- In the Keychain Access GUI, click and drag "lldb_codesign" in the "System" keychain
+  onto the desktop. The drag will create a "~/Desktop/lldb_codesign.cer" file used in
+  the next step.
 - Switch to Terminal, and run the following:
 
 sudo security add-trust -d -r trustRoot -p basic -p codeSign -k /Library/Keychains/System.keychain ~/Desktop/lldb_codesign.cer
+rm -f ~/Desktop/lldb_codesign.cer
 
-- Right click on the "lldb_codesign" certificate in the "System" keychain (NOT
-  "login", but the one in "System"), and select "Delete" to delete it from
-  the "System" keychain.
+- Drag the "lldb_codesign" certificate from the "System" keychain back into the
+  "login" keychain
+- Quit Keychain Access
 - Reboot
-- Clean and rebuild lldb and you should be able to debug.
+- Clean by removing all previously creating code signed binaries and rebuild
+  lldb and you should be able to debug.
 
-That should do it.
+When you build your LLDB for the first time, the Xcode GUI will prompt you for permission
+to use the "lldb_codesign" keychain. Be sure to click "Always Allow" on your first
+build. From here on out, the "lldb_codesign" will be trusted and you can build from the
+command line without having to authorize. Also the first time you debug using a LLDB that
+was built with this code signing certificate, you will need to authenticate once.

Modified: lldb/branches/lldb-platform-work/docs/lldb-for-gdb-users.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/docs/lldb-for-gdb-users.txt?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/docs/lldb-for-gdb-users.txt (original)
+++ lldb/branches/lldb-platform-work/docs/lldb-for-gdb-users.txt Thu Jun  6 19:06:43 2013
@@ -204,7 +204,7 @@ Enter your debugger command(s).  Type 'D
 > DONE
 
 The "-c" option specifies that the breakpoint command is a set of lldb
-commmand interpreter commands.  Use "-s" if you want to implement your
+command interpreter commands.  Use "-s" if you want to implement your
 breakpoint command using the Python interface instead.
 
 
@@ -434,7 +434,7 @@ $4 = (SKTGraphicView *) 0x00000001001354
 
 f) Customization:
 
-You can use the embedded Python interprter to add the following 'pwd' and 'cd' commands
+You can use the embedded Python interpreter to add the following 'pwd' and 'cd' commands
 for your lldb session:
 
 (lldb) script import os

Modified: lldb/branches/lldb-platform-work/docs/lldb-gdb-remote.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/docs/lldb-gdb-remote.txt?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/docs/lldb-gdb-remote.txt (original)
+++ lldb/branches/lldb-platform-work/docs/lldb-gdb-remote.txt Thu Jun  6 19:06:43 2013
@@ -27,7 +27,7 @@ added above and beyond the standard GDB
 //  the performance of the connection.
 //----------------------------------------------------------------------
 Having to send an ACK/NACK after every packet slows things down a bit, so we
-have a way to disable ACK packets to mimize the traffic for reliable
+have a way to disable ACK packets to minimize the traffic for reliable
 communication interfaces (like sockets). Below GDB or LLDB will send this
 packet to try and disable ACKs. All lines that start with "send packet: " are
 from GDB/LLDB, and all lines that start with "read packet: " are from the GDB
@@ -336,17 +336,21 @@ format      The preferred format for dis
                 vector-float32
                 vector-uint128
 
-set         The regiter set name as a string that this register belongs to.
+set         The register set name as a string that this register belongs to.
 
 gcc         The GCC compiler registers number for this register (used for
             EH frame and other compiler information that is encoded in the
-            executable files). 
+            executable files). The supplied number will be decoded like a
+            string passed to strtoul() with a base of zero, so the number
+            can be decimal, or hex if it is prefixed with "0x".
 
             NOTE: If the compiler doesn't have a register number for this 
             register, this key/value pair should be omitted.
 
 dwarf       The DWARF register number for this register that is used for this
-            register in the debug information. 
+            register in the debug information. The supplied number will be decoded
+            like a string passed to strtoul() with a base of zero, so the number
+            can be decimal, or hex if it is prefixed with "0x".
 
             NOTE: If the compiler doesn't have a register number for this 
             register, this key/value pair should be omitted.
@@ -370,6 +374,52 @@ generic     If the register is a generic
              arg1 - arg8 (specified for registers that contain function 
                       arguments when the argument fits into a register)
 
+container-regs
+            The value for this key is a comma separated list of raw hex (optional 
+            leading "0x") register numbers.
+
+            This specifies that this register is contained in other concrete
+            register values. For example "eax" is in the lower 32 bits of the
+            "rax" register value for x86_64, so "eax" could specify that it is
+            contained in "rax" by specifying the register number for "rax" (whose
+            register number is 0x00)
+            
+            "container-regs:00;"
+            
+            If a register is comprised of one or more registers, like "d0" is ARM
+            which is a 64 bit register, it might be made up of "s0" and "s1". If
+            the register number for "s0" is 0x20, and the register number of "s1"
+            is "0x21", the "container-regs" key/value pair would be:
+            
+            "container-regs:20,21;"
+            
+            This is handy for defining what GDB used to call "pseudo" registers.
+            These registers are never requested by LLDB via the register read
+            or write packets, the container registers will be requested on behalf
+            of this register.
+            
+invalidate-regs
+            The value for this key is a comma separated list of raw hex (optional 
+            leading "0x") register numbers.
+            
+            This specifies which register values should be invalidated when this
+            register is modified. For example if modifying "eax" would cause "rax",
+            "eax", "ax", "ah", and "al" to be modified where rax is 0x0, eax is 0x15,
+            ax is 0x25, ah is 0x35, and al is 0x39, the "invalidate-regs" key/value
+            pair would be:
+
+            "invalidate-regs:0,15,25,35,39;"
+            
+            If there is a single register that gets invalidated, then omit the comma
+            and just list a single register:
+            
+            "invalidate-regs:0;"
+            
+            This is handy when modifying a specific register can cause other
+            register values to change. For example, when debugging an ARM target,
+            modifying the CPSR register can cause the r8 - r14 and cpsr value to
+            change depending on if the mode has changed. 
+
 //----------------------------------------------------------------------
 // "qHostInfo"
 //
@@ -392,12 +442,56 @@ Key value pairs are one of:
 
 cputype: is a number that is the mach-o CPU type that is being debugged
 cpusubtype: is a number that is the mach-o CPU subtype type that is being debugged
-ostype: is a string the represents the OS being debugged (darwin, lunix, freebsd)
+ostype: is a string the represents the OS being debugged (darwin, linux, freebsd)
 vendor: is a string that represents the vendor (apple)
 endian: is one of "little", "big", or "pdp"
 ptrsize: is a number that represents how big pointers are in bytes on the debug target
 
 //----------------------------------------------------------------------
+// "qProcessInfo"
+//
+// BRIEF
+//  Get information about the process we are currently debugging.
+//
+// PRIORITY TO IMPLEMENT
+//  Medium.  On systems which can launch multiple different architecture processes,
+//  the qHostInfo may not disambiguate sufficiently to know what kind of 
+//  process is being debugged.
+//  e.g. on a 64-bit x86 Mac system both 32-bit and 64-bit user processes are possible,
+//  and with Mach-O universal files, the executable file may contain both 32- and 
+//  64-bit slices so it may be impossible to know until you're attached to a real
+//  process to know what you're working with.
+//
+//  All numeric fields return base-16 numbers without any "0x" prefix.
+//----------------------------------------------------------------------
+
+An i386 process:
+
+send packet: $qProcessInfo#00
+read packet: $pid:42a8;parent-pid:42bf;real-uid:ecf;real-gid:b;effective-uid:ecf;effective-gid:b;cputype:7;cpusubtype:3;ostype:macosx;vendor:apple;endian:little;ptrsize:4;#00
+
+An x86_64 process:
+
+send packet: $qProcessInfo#00
+read packet: $pid:d22c;parent-pid:d34d;real-uid:ecf;real-gid:b;effective-uid:ecf;effective-gid:b;cputype:1000007;cpusubtype:3;ostype:macosx;vendor:apple;endian:little;ptrsize:8;#00
+
+Key value pairs include:
+
+pid: the process id
+parent-pid: the process of the parent process (often debugserver will become the parent when attaching)
+real-uid: the real user id of the process
+real-gid: the real group id of the process
+effective-uid: the effective user id of the process
+effective-gid: the effective group id of the process
+cputype: the Mach-O CPU type of the process
+cpusubtype: the Mach-O CPU subtype of the process
+ostype: is a string the represents the OS being debugged (darwin, linux, freebsd)
+vendor: is a string that represents the vendor (apple)
+endian: is one of "little", "big", or "pdp"
+ptrsize: is a number that represents how big pointers are in bytes
+
+
+//----------------------------------------------------------------------
 // "qShlibInfoAddr"
 //
 // BRIEF
@@ -417,8 +511,8 @@ ptrsize: is a number that represents how
 
 LLDB and GDB both support the "qShlibInfoAddr" packet which is a hint to each
 debugger as to where to find the dynamic loader information. For darwin
-binaires that run in user land this is the address of the "all_image_infos"
-stucture in the "/usr/lib/dyld" executable, or the result of a TASK_DYLD_INFO
+binaries that run in user land this is the address of the "all_image_infos"
+structure in the "/usr/lib/dyld" executable, or the result of a TASK_DYLD_INFO
 call. The result is returned as big endian hex bytes that are the address
 value:
 
@@ -469,7 +563,7 @@ to implement better multi-threaded debug
 //----------------------------------------------------------------------
 
 When reading thread registers, you currently need to set the current
-thread,then read the registers. This is kind of cumbersome, so we added the
+thread, then read the registers. This is kind of cumbersome, so we added the
 ability to query if the remote GDB server supports adding a "thread:<tid>;"
 suffix to all packets that request information for a thread. To test if the
 remote GDB server supports this feature:
@@ -630,7 +724,7 @@ for this region.
 //        the hex value of the register in debuggee endian byte order.
 //      - If key == "thread", then the value is the big endian hex
 //        thread-id of the stopped thread.
-//      - If key == "core", then value is a hex nujber of the core on
+//      - If key == "core", then value is a hex number of the core on
 //        which the stop was detected.
 //      - If key == "watch" or key == "rwatch" or key == "awatch", then
 //        value is the data address in big endian hex
@@ -700,7 +794,7 @@ for this region.
 //
 // BEST PRACTICES:
 //  Since register values can be supplied with this packet, it is often useful
-//  to return the PC, SP, FP, LR (if any), and FLAGS regsiters so that separate
+//  to return the PC, SP, FP, LR (if any), and FLAGS registers so that separate
 //  packets don't need to be sent to read each of these registers from each
 //  thread.
 //
@@ -709,7 +803,7 @@ for this region.
 //  "T" packet with "00" as the signal number and fill in as many key values 
 //  and registers as possible.
 //
-//  LLDB likes to know why a thread stopped since many thread contol 
+//  LLDB likes to know why a thread stopped since many thread control 
 //  operations like stepping over a source line, actually are implemented
 //  by running the process multiple times. If a breakpoint is hit while
 //  trying to step over a source line and LLDB finds out that a breakpoint
@@ -719,14 +813,14 @@ for this region.
 //  at the current PC and do an instruction single step, knowing that
 //  we stopped due to a "trace" helps us know that we can continue
 //  running versus stopping due to a "breakpoint" (if we have two 
-//  breakpoint instruction on consucutive instructions). So the more info
+//  breakpoint instruction on consecutive instructions). So the more info
 //  we can get about the reason a thread stops, the better job LLDB can
 //  do when controlling your process. A typical GDB server behavior is 
 //  to send a SIGTRAP for breakpoints _and_ also when instruction single
 //  stepping, in this case the debugger doesn't really know why we 
 //  stopped and it can make it hard for the debugger to control your
 //  program correctly. What if a real SIGTRAP was delivered to a thread
-//  while we were trying to single step? We woudn't know the difference
+//  while we were trying to single step? We wouldn't know the difference
 //  with a standard GDB remote server and we could do the wrong thing.
 //
 // PRIORITY TO IMPLEMENT

Modified: lldb/branches/lldb-platform-work/examples/darwin/heap_find/heap.py
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/examples/darwin/heap_find/heap.py?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/examples/darwin/heap_find/heap.py (original)
+++ lldb/branches/lldb-platform-work/examples/darwin/heap_find/heap.py Thu Jun  6 19:06:43 2013
@@ -21,63 +21,158 @@ import lldb.utils.symbolication
 
 g_libheap_dylib_dir = None
 g_libheap_dylib_dict = dict()
-g_verbose = False
 
-def load_dylib():
-    if lldb.target:
-        global g_libheap_dylib_dir
-        global g_libheap_dylib_dict
-        triple = lldb.target.triple
-        if triple in g_libheap_dylib_dict:
-            libheap_dylib_path = g_libheap_dylib_dict[triple]
-        else:
-            if not g_libheap_dylib_dir:
-                g_libheap_dylib_dir = tempfile.gettempdir() + '/lldb-dylibs'
-            triple_dir = g_libheap_dylib_dir + '/' + triple + '/' + __name__
-            if not os.path.exists(triple_dir):
-                os.makedirs(triple_dir)
-            libheap_dylib_path = triple_dir + '/libheap.dylib'
-            g_libheap_dylib_dict[triple] = libheap_dylib_path
-        heap_code_directory = os.path.dirname(__file__) + '/heap'
-        heap_source_file = heap_code_directory + '/heap_find.cpp'
-        # Check if the dylib doesn't exist, or if "heap_find.cpp" is newer than the dylib
-        if not os.path.exists(libheap_dylib_path) or os.stat(heap_source_file).st_mtime > os.stat(libheap_dylib_path).st_mtime:
-            # Remake the dylib
-            make_command = '(cd "%s" ; make EXE="%s" ARCH=%s)' % (heap_code_directory, libheap_dylib_path, string.split(triple, '-')[0])
-            # print make_command
-            (make_exit_status, make_output) = commands.getstatusoutput(make_command)
-            if make_exit_status != 0:
-                print make_output
-        if os.path.exists(libheap_dylib_path):
-            libheap_dylib_spec = lldb.SBFileSpec(libheap_dylib_path)
-            if lldb.target.FindModule(libheap_dylib_spec):
-                return None # success, 'libheap.dylib' already loaded
-            if lldb.process:
-                state = lldb.process.state
-                if state == lldb.eStateStopped:
-                    (libheap_dylib_path)
-                    error = lldb.SBError()
-                    image_idx = lldb.process.LoadImage(libheap_dylib_spec, error)
-                    if error.Success():
-                        return None
-                    else:
-                        if error:
-                            return 'error: %s' % error
-                        else:
-                            return 'error: "process load \'%s\'" failed' % libheap_dylib_spec
-                else:
-                    return 'error: process is not stopped'
-            else:
-                return 'error: invalid process'
-        else:
-            return 'error: file does not exist "%s"' % libheap_dylib_path
+def get_iterate_memory_expr(options, process, user_init_code, user_return_code):
+    expr = '''
+typedef unsigned natural_t;
+typedef uintptr_t vm_size_t;
+typedef uintptr_t vm_address_t;
+typedef natural_t task_t;
+typedef int kern_return_t;
+#define KERN_SUCCESS 0
+typedef void (*range_callback_t)(task_t task, void *baton, unsigned type, uintptr_t ptr_addr, uintptr_t ptr_size);
+''';
+    if options.search_vm_regions:
+        expr += '''
+typedef int vm_prot_t;
+typedef unsigned int vm_inherit_t;
+typedef unsigned long long	memory_object_offset_t;
+typedef unsigned int boolean_t;
+typedef int vm_behavior_t;
+typedef uint32_t vm32_object_id_t;
+typedef natural_t mach_msg_type_number_t;
+typedef uint64_t mach_vm_address_t;
+typedef uint64_t mach_vm_offset_t;
+typedef uint64_t mach_vm_size_t;
+typedef uint64_t vm_map_offset_t;
+typedef uint64_t vm_map_address_t;
+typedef uint64_t vm_map_size_t;
+#define	VM_PROT_NONE ((vm_prot_t) 0x00)
+#define VM_PROT_READ ((vm_prot_t) 0x01)
+#define VM_PROT_WRITE ((vm_prot_t) 0x02)
+#define VM_PROT_EXECUTE ((vm_prot_t) 0x04)
+typedef struct vm_region_submap_short_info_data_64_t {
+    vm_prot_t protection;
+    vm_prot_t max_protection;
+    vm_inherit_t inheritance;
+    memory_object_offset_t offset;		// offset into object/map
+    unsigned int user_tag;	// user tag on map entry
+    unsigned int ref_count;	 // obj/map mappers, etc
+    unsigned short shadow_depth; 	// only for obj
+    unsigned char external_pager;  // only for obj
+    unsigned char share_mode;	// see enumeration
+    boolean_t is_submap;	// submap vs obj
+    vm_behavior_t behavior;	// access behavior hint
+    vm32_object_id_t object_id;	// obj/map name, not a handle
+    unsigned short user_wired_count; 
+} vm_region_submap_short_info_data_64_t;
+#define VM_REGION_SUBMAP_SHORT_INFO_COUNT_64 ((mach_msg_type_number_t)(sizeof(vm_region_submap_short_info_data_64_t)/sizeof(int)))''';
+        if user_init_code:
+            expr += user_init_code;
+        expr += '''
+task_t task = (task_t)mach_task_self();
+mach_vm_address_t vm_region_base_addr;
+mach_vm_size_t vm_region_size;
+natural_t vm_region_depth;
+vm_region_submap_short_info_data_64_t vm_region_info;
+kern_return_t err;
+for (vm_region_base_addr = 0, vm_region_size = 1; vm_region_size != 0; vm_region_base_addr += vm_region_size)
+{
+    mach_msg_type_number_t vm_region_info_size = VM_REGION_SUBMAP_SHORT_INFO_COUNT_64;
+    err = (kern_return_t)mach_vm_region_recurse (task,
+                                                 &vm_region_base_addr,
+                                                 &vm_region_size,
+                                                 &vm_region_depth,
+                                                 &vm_region_info,
+                                                 &vm_region_info_size);
+    if (err)
+        break;
+    // Check all read + write regions. This will cover the thread stacks 
+    // and any regions of memory like __DATA segments, that might contain
+    // data we are looking for
+    if (vm_region_info.protection & VM_PROT_WRITE && 
+        vm_region_info.protection & VM_PROT_READ)
+    {
+        baton.callback (task, 
+                        &baton, 
+                        64, 
+                        vm_region_base_addr, 
+                        vm_region_size);
+    }
+}'''
     else:
-        return 'error: invalid target'
-        
-    debugger.HandleCommand('process load "%s"' % libheap_dylib_path)
-    if lldb.target.FindModule(libheap_dylib_spec):
-        return None # success, 'libheap.dylib' already loaded
-    return 'error: failed to load "%s"' % libheap_dylib_path
+        if options.search_stack:
+            expr += get_thread_stack_ranges_struct (process)
+        if options.search_segments:
+            expr += get_sections_ranges_struct (process)
+        if user_init_code:
+            expr += user_init_code
+        if options.search_heap:
+            expr += '''
+#define MALLOC_PTR_IN_USE_RANGE_TYPE 1
+typedef struct vm_range_t {
+    vm_address_t	address;
+    vm_size_t		size;
+} vm_range_t;
+typedef kern_return_t (*memory_reader_t)(task_t task, vm_address_t remote_address, vm_size_t size, void **local_memory);
+typedef void (*vm_range_recorder_t)(task_t task, void *baton, unsigned type, vm_range_t *range, unsigned size);
+typedef struct malloc_introspection_t {
+    kern_return_t (*enumerator)(task_t task, void *, unsigned type_mask, vm_address_t zone_address, memory_reader_t reader, vm_range_recorder_t recorder); /* enumerates all the malloc pointers in use */
+} malloc_introspection_t;
+typedef struct malloc_zone_t {
+    void *reserved1[12];
+    struct malloc_introspection_t	*introspect;
+} malloc_zone_t;
+memory_reader_t task_peek = [](task_t task, vm_address_t remote_address, vm_size_t size, void **local_memory) -> kern_return_t {
+    *local_memory = (void*) remote_address;
+    return KERN_SUCCESS;
+};
+vm_address_t *zones = 0;
+unsigned int num_zones = 0;task_t task = 0;
+kern_return_t err = (kern_return_t)malloc_get_all_zones (task, task_peek, &zones, &num_zones);
+if (KERN_SUCCESS == err)
+{
+    for (unsigned int i=0; i<num_zones; ++i)
+    {
+        const malloc_zone_t *zone = (const malloc_zone_t *)zones[i];
+        if (zone && zone->introspect)
+            zone->introspect->enumerator (task, 
+                                          &baton, 
+                                          MALLOC_PTR_IN_USE_RANGE_TYPE, 
+                                          (vm_address_t)zone, 
+                                          task_peek, 
+                                          [] (task_t task, void *baton, unsigned type, vm_range_t *ranges, unsigned size) -> void
+                                          {
+                                              range_callback_t callback = ((callback_baton_t *)baton)->callback;
+                                              for (unsigned i=0; i<size; ++i)
+                                              {
+                                                  callback (task, baton, type, ranges[i].address, ranges[i].size);
+                                              }
+                                          });    
+    }
+}'''
+
+        if options.search_stack:
+            expr += '''
+// Call the callback for the thread stack ranges
+for (uint32_t i=0; i<NUM_STACKS; ++i) {
+    range_callback(task, &baton, 8, stacks[i].base, stacks[i].size);
+    if (STACK_RED_ZONE_SIZE > 0) {
+        range_callback(task, &baton, 16, stacks[i].base - STACK_RED_ZONE_SIZE, STACK_RED_ZONE_SIZE);
+    }
+}
+    '''
+    
+        if options.search_segments:
+            expr += '''
+// Call the callback for all segments
+for (uint32_t i=0; i<NUM_SEGMENTS; ++i)
+    range_callback(task, &baton, 32, segments[i].base, segments[i].size);'''
+
+    if user_return_code:
+        expr += "\n%s" % (user_return_code,)
+    
+    return expr
 
 def get_member_types_for_offset(value_type, offset, member_list):
     member = value_type.GetFieldAtIndex(0)
@@ -125,33 +220,75 @@ def add_common_options(parser):
     parser.add_option('-v', '--verbose', action='store_true', dest='verbose', help='display verbose debug info', default=False)
     parser.add_option('-t', '--type', action='store_true', dest='print_type', help='print the full value of the type for each matching malloc block', default=False)
     parser.add_option('-o', '--po', action='store_true', dest='print_object_description', help='print the object descriptions for any matches', default=False)
+    parser.add_option('-z', '--size', action='store_true', dest='show_size', help='print the allocation size in bytes', default=False)
+    parser.add_option('-r', '--range', action='store_true', dest='show_range', help='print the allocation address range instead of just the allocation base address', default=False)
     parser.add_option('-m', '--memory', action='store_true', dest='memory', help='dump the memory for each matching block', default=False)
     parser.add_option('-f', '--format', type='string', dest='format', help='the format to use when dumping memory if --memory is specified', default=None)
     parser.add_option('-I', '--omit-ivar-regex', type='string', action='callback', callback=append_regex_callback, dest='ivar_regex_blacklist', default=[], help='specify one or more regular expressions used to backlist any matches that are in ivars')
     parser.add_option('-s', '--stack', action='store_true', dest='stack', help='gets the stack that allocated each malloc block if MallocStackLogging is enabled', default=False)
     parser.add_option('-S', '--stack-history', action='store_true', dest='stack_history', help='gets the stack history for all allocations whose start address matches each malloc block if MallocStackLogging is enabled', default=False)
-    parser.add_option('-M', '--max-matches', type='int', dest='max_matches', help='the maximum number of matches to print', default=256)
+    parser.add_option('-F', '--max-frames', type='int', dest='max_frames', help='the maximum number of stack frames to print when using the --stack or --stack-history options (default=128)', default=128)
+    parser.add_option('-H', '--max-history', type='int', dest='max_history', help='the maximum number of stack history backtraces to print for each allocation when using the --stack-history option (default=16)', default=16)
+    parser.add_option('-M', '--max-matches', type='int', dest='max_matches', help='the maximum number of matches to print', default=32)
     parser.add_option('-O', '--offset', type='int', dest='offset', help='the matching data must be at this offset', default=-1)
+    parser.add_option('--ignore-stack', action='store_false', dest='search_stack', help="Don't search the stack when enumerating memory", default=True)
+    parser.add_option('--ignore-heap', action='store_false', dest='search_heap', help="Don't search the heap allocations when enumerating memory", default=True)
+    parser.add_option('--ignore-segments', action='store_false', dest='search_segments', help="Don't search readable executable segments enumerating memory", default=True)
+    parser.add_option('-V', '--vm-regions', action='store_true', dest='search_vm_regions', help='Check all VM regions instead of searching the heap, stack and segments', default=False)
+
+def type_flags_to_string(type_flags):
+    if type_flags == 0:
+        type_str = 'free'
+    elif type_flags & 2:
+        type_str = 'malloc'
+    elif type_flags & 4:
+        type_str = 'free'
+    elif type_flags & 1:
+        type_str = 'generic'
+    elif type_flags & 8:
+        type_str = 'stack'
+    elif type_flags & 16:
+        type_str = 'stack (red zone)'
+    elif type_flags & 32:
+        type_str = 'segment'
+    elif type_flags & 64:
+        type_str = 'vm_region'
+    else:
+        type_str = hex(type_flags)
+    return type_str
 
-def dump_stack_history_entry(stack_history_entry, idx):
+def type_flags_to_description(type_flags, ptr_addr, ptr_size, offset):
+    show_offset = False
+    if type_flags == 0 or type_flags & 4:
+        type_str = 'free(%#x)' % (ptr_addr,)
+    elif type_flags & 2 or type_flags & 1:
+        type_str = 'malloc(%6u) -> %#x' % (ptr_size, ptr_addr)
+        show_offset = True
+    elif type_flags & 8:
+        type_str = 'stack'
+    elif type_flags & 16:
+        type_str = 'stack (red zone)'
+    elif type_flags & 32:
+        sb_addr = lldb.debugger.GetSelectedTarget().ResolveLoadAddress(ptr_addr + offset)
+        type_str = 'segment [%#x - %#x), %s + %u, %s' % (ptr_addr, ptr_addr + ptr_size, sb_addr.section.name, sb_addr.offset, sb_addr)
+    elif type_flags & 64:
+        sb_addr = lldb.debugger.GetSelectedTarget().ResolveLoadAddress(ptr_addr + offset)
+        type_str = 'vm_region [%#x - %#x), %s + %u, %s' % (ptr_addr, ptr_addr + ptr_size, sb_addr.section.name, sb_addr.offset, sb_addr)
+    else:
+        type_str = '%#x' % (ptr_addr,)
+        show_offset = True
+    if show_offset and offset != 0:
+        type_str += ' + %-6u' % (offset,)
+    return type_str
+    
+def dump_stack_history_entry(options, result, stack_history_entry, idx):
     address = int(stack_history_entry.address)
     if address:
         type_flags = int(stack_history_entry.type_flags)
         symbolicator = lldb.utils.symbolication.Symbolicator()
-        symbolicator.target = lldb.target
-        type_str = ''
-        if type_flags == 0:
-            type_str = 'free'
-        else:
-            if type_flags & 2:
-                type_str = 'alloc'
-            elif type_flags & 4:
-                type_str = 'free'
-            elif type_flags & 1:
-                type_str = 'generic'
-            else:
-                type_str = hex(type_flags)
-        print 'stack[%u]: addr = 0x%x, type=%s, frames:' % (idx, address, type_str)
+        symbolicator.target = lldb.debugger.GetSelectedTarget()
+        type_str = type_flags_to_string(type_flags)
+        result.AppendMessage('stack[%u]: addr = 0x%x, type=%s, frames:' % (idx, address, type_str))
         frame_idx = 0
         idx = 0
         pc = int(stack_history_entry.frames[idx])
@@ -160,35 +297,155 @@ def dump_stack_history_entry(stack_histo
                 frames = symbolicator.symbolicate(pc)
                 if frames:
                     for frame in frames:
-                        print '     [%u] %s' % (frame_idx, frame)
+                        result.AppendMessage('     [%u] %s' % (frame_idx, frame))
                         frame_idx += 1
                 else:
-                    print '     [%u] 0x%x' % (frame_idx, pc)
+                    result.AppendMessage('     [%u] 0x%x' % (frame_idx, pc))
                     frame_idx += 1
                 idx = idx + 1
                 pc = int(stack_history_entry.frames[idx])
             else:
                 pc = 0
-        print
+        if idx >= options.max_frames:
+            result.AppendMessage('warning: the max number of stack frames (%u) was reached, use the "--max-frames=<COUNT>" option to see more frames' % (options.max_frames))
+            
+        result.AppendMessage('')
             
-def dump_stack_history_entries(addr, history):
+def dump_stack_history_entries(options, result, addr, history):
     # malloc_stack_entry *get_stack_history_for_address (const void * addr)
-    expr = 'get_stack_history_for_address((void *)0x%x, %u)' % (addr, history)
-    expr_sbvalue = lldb.frame.EvaluateExpression (expr)
+    single_expr = '''
+typedef int kern_return_t;
+#define MAX_FRAMES %u
+typedef struct $malloc_stack_entry {
+    uint64_t address;
+    uint64_t argument;
+    uint32_t type_flags;
+    uint32_t num_frames;
+    uint64_t frames[512];
+    kern_return_t err;
+} $malloc_stack_entry;
+typedef unsigned task_t;
+$malloc_stack_entry stack;
+stack.address = 0x%x;
+stack.type_flags = 2;
+stack.num_frames = 0;
+stack.frames[0] = 0;
+uint32_t max_stack_frames = MAX_FRAMES;
+stack.err = (kern_return_t)__mach_stack_logging_get_frames (
+    (task_t)mach_task_self(), 
+    stack.address, 
+    &stack.frames[0], 
+    max_stack_frames, 
+    &stack.num_frames);
+if (stack.num_frames < MAX_FRAMES)
+    stack.frames[stack.num_frames] = 0;
+else
+    stack.frames[MAX_FRAMES-1] = 0;
+stack''' % (options.max_frames, addr);
+
+    history_expr = '''
+typedef int kern_return_t;
+typedef unsigned task_t;
+#define MAX_FRAMES %u
+#define MAX_HISTORY %u
+typedef struct mach_stack_logging_record_t {
+	uint32_t type_flags;
+	uint64_t stack_identifier;
+	uint64_t argument;
+	uint64_t address;
+} mach_stack_logging_record_t;
+typedef void (*enumerate_callback_t)(mach_stack_logging_record_t, void *);
+typedef struct malloc_stack_entry {
+    uint64_t address;
+    uint64_t argument;
+    uint32_t type_flags;
+    uint32_t num_frames;
+    uint64_t frames[MAX_FRAMES];
+    kern_return_t frames_err;    
+} malloc_stack_entry;
+typedef struct $malloc_stack_history {
+    task_t task;
+    unsigned idx;
+    malloc_stack_entry entries[MAX_HISTORY];
+} $malloc_stack_history;
+$malloc_stack_history info = { (task_t)mach_task_self(), 0 };
+uint32_t max_stack_frames = MAX_FRAMES;
+enumerate_callback_t callback = [] (mach_stack_logging_record_t stack_record, void *baton) -> void {
+    $malloc_stack_history *info = ($malloc_stack_history *)baton;
+    if (info->idx < MAX_HISTORY) {
+        malloc_stack_entry *stack_entry = &(info->entries[info->idx]);
+        stack_entry->address = stack_record.address;
+        stack_entry->type_flags = stack_record.type_flags;
+        stack_entry->argument = stack_record.argument;
+        stack_entry->num_frames = 0;
+        stack_entry->frames[0] = 0;
+        stack_entry->frames_err = (kern_return_t)__mach_stack_logging_frames_for_uniqued_stack (
+            info->task, 
+            stack_record.stack_identifier,
+            stack_entry->frames,
+            (uint32_t)MAX_FRAMES,
+            &stack_entry->num_frames);
+        // Terminate the frames with zero if there is room
+        if (stack_entry->num_frames < MAX_FRAMES)
+            stack_entry->frames[stack_entry->num_frames] = 0; 
+    }
+    ++info->idx;
+};
+(kern_return_t)__mach_stack_logging_enumerate_records (info.task, (uint64_t)0x%x, callback, &info);
+info''' % (options.max_frames, options.max_history, addr);
+
+    frame = lldb.debugger.GetSelectedTarget().GetProcess().GetSelectedThread().GetSelectedFrame()
+    if history:
+        expr = history_expr
+    else:
+        expr = single_expr
+    expr_options = lldb.SBExpressionOptions()
+    expr_options.SetIgnoreBreakpoints(True);
+    expr_options.SetTimeoutInMicroSeconds (5*1000*1000) # 5 second timeout
+    expr_options.SetTryAllThreads (True)
+    expr_sbvalue = frame.EvaluateExpression (expr, expr_options)
+    if options.verbose:
+        print "expression:"
+        print expr
+        print "expression result:"
+        print expr_sbvalue
     if expr_sbvalue.error.Success():
-        if expr_sbvalue.unsigned:
-            expr_value = lldb.value(expr_sbvalue)  
-            idx = 0;
-            stack_history_entry = expr_value[idx]
-            while int(stack_history_entry.address) != 0:
-                dump_stack_history_entry(stack_history_entry, idx)
-                idx = idx + 1
-                stack_history_entry = expr_value[idx]
+        if history:
+            malloc_stack_history = lldb.value(expr_sbvalue)
+            num_stacks = int(malloc_stack_history.idx)
+            if num_stacks <= options.max_history:
+                i_max = num_stacks
+            else:
+                i_max = options.max_history
+            for i in range(i_max):
+                stack_history_entry = malloc_stack_history.entries[i]
+                dump_stack_history_entry(options, result, stack_history_entry, i)
+            if num_stacks > options.max_history:
+                result.AppendMessage('warning: the max number of stacks (%u) was reached, use the "--max-history=%u" option to see all of the stacks' % (options.max_history, num_stacks))
+        else:
+            stack_history_entry = lldb.value(expr_sbvalue)
+            dump_stack_history_entry(options, result, stack_history_entry, 0)
+            
     else:
-        print 'error: expression failed "%s" => %s' % (expr, expr_sbvalue.error)
-    
+        result.AppendMessage('error: expression failed "%s" => %s' % (expr, expr_sbvalue.error))
+
 
-def display_match_results (options, arg_str_description, expr_sbvalue, print_no_matches = True):
+def display_match_results (result, options, arg_str_description, expr, print_no_matches = True):
+    frame = lldb.debugger.GetSelectedTarget().GetProcess().GetSelectedThread().GetSelectedFrame()
+    if not frame:
+        result.AppendMessage('error: invalid frame')
+        return 0
+    expr_options = lldb.SBExpressionOptions()
+    expr_options.SetIgnoreBreakpoints(True);
+    expr_options.SetFetchDynamicValue(lldb.eNoDynamicValues);
+    expr_options.SetTimeoutInMicroSeconds (30*1000*1000) # 30 second timeout
+    expr_options.SetTryAllThreads (False)
+    expr_sbvalue = frame.EvaluateExpression (expr, expr_options)
+    if options.verbose:
+        print "expression:"
+        print expr
+        print "expression result:"
+        print expr_sbvalue
     if expr_sbvalue.error.Success():
         if expr_sbvalue.unsigned:
             match_value = lldb.value(expr_sbvalue)  
@@ -197,8 +454,8 @@ def display_match_results (options, arg_
             while 1:
                 print_entry = True
                 match_entry = match_value[i]; i += 1
-                if i >= options.max_matches:
-                    print 'error: the max number of matches (%u) was reached, use the --max-matches option to get more results' % (options.max_matches)
+                if i > options.max_matches:
+                    result.AppendMessage('warning: the max number of matches (%u) was reached, use the --max-matches option to get more results' % (options.max_matches))
                     break
                 malloc_addr = match_entry.addr.sbvalue.unsigned
                 if malloc_addr == 0:
@@ -210,192 +467,443 @@ def display_match_results (options, arg_
                     print_entry = False
                 else:                    
                     match_addr = malloc_addr + offset
-                    dynamic_value = match_entry.addr.sbvalue.GetDynamicValue(lldb.eDynamicCanRunTarget)
-                    description = '[%u] %s: addr = 0x%x' % (match_idx, arg_str_description, malloc_addr)
-                    if offset != 0:
-                        description += ' + %u' % (offset)
-                    description += ', size = %u' % (malloc_size)
-                    derefed_dynamic_value = None
-                    if dynamic_value.type.name == 'void *':
-                        if options.type == 'pointer' and malloc_size == 4096:
-                            error = lldb.SBError()
-                            data = bytearray(lldb.process.ReadMemory(malloc_addr, 16, error))
-                            if data == '\xa1\xa1\xa1\xa1AUTORELEASE!':
-                                description += ', type = (AUTORELEASE!)'
-                    else:
-                        derefed_dynamic_value = dynamic_value.deref
-                        if derefed_dynamic_value:                        
-                            derefed_dynamic_type = derefed_dynamic_value.type
-                            derefed_dynamic_type_size = derefed_dynamic_type.size
-                            derefed_dynamic_type_name = derefed_dynamic_type.name
-                            description += ', type = %s <%u>' % (derefed_dynamic_type_name, derefed_dynamic_type_size)
-                            if offset < derefed_dynamic_type_size:
-                                member_list = list();
-                                get_member_types_for_offset (derefed_dynamic_type, offset, member_list)
-                                if member_list:
-                                    member_path = ''
-                                    for member in member_list:
-                                        member_name = member.name
-                                        if member_name: 
-                                            if member_path:
-                                                member_path += '.'
-                                            member_path += member_name
-                                    if member_path:
-                                        if options.ivar_regex_blacklist:
-                                            for ivar_regex in options.ivar_regex_blacklist:
-                                                if ivar_regex.match(member_path):
-                                                    print_entry = False
-                                        description += ', ivar = %s' % (member_path)
+                    type_flags = int(match_entry.type)
+                    #result.AppendMessage (hex(malloc_addr + offset))
+                    if type_flags == 64:
+                        search_stack_old = options.search_stack
+                        search_segments_old = options.search_segments
+                        search_heap_old = options.search_heap
+                        search_vm_regions = options.search_vm_regions
+                        options.search_stack = True
+                        options.search_segments = True
+                        options.search_heap = True
+                        options.search_vm_regions = False
+                        if malloc_info_impl (lldb.debugger, result, options, [hex(malloc_addr + offset)]):
+                            print_entry = False
+                        options.search_stack = search_stack_old
+                        options.search_segments = search_segments_old
+                        options.search_heap = search_heap_old
+                        options.search_vm_regions = search_vm_regions
+                    if print_entry:
+                        description = '%#16.16x: %s' % (match_addr, type_flags_to_description(type_flags, malloc_addr, malloc_size, offset))
+                        if options.show_size:
+                            description += ' <%5u>' % (malloc_size)
+                        if options.show_range:
+                            description += ' [%#x - %#x)' % (malloc_addr, malloc_addr + malloc_size)
+                        derefed_dynamic_value = None
+                        dynamic_value = match_entry.addr.sbvalue.GetDynamicValue(lldb.eDynamicCanRunTarget)
+                        if dynamic_value.type.name == 'void *':
+                            if options.type == 'pointer' and malloc_size == 4096:
+                                error = lldb.SBError()
+                                process = expr_sbvalue.GetProcess()
+                                target = expr_sbvalue.GetTarget()
+                                data = bytearray(process.ReadMemory(malloc_addr, 16, error))
+                                if data == '\xa1\xa1\xa1\xa1AUTORELEASE!':
+                                    ptr_size = target.addr_size
+                                    thread = process.ReadUnsignedFromMemory (malloc_addr + 16 + ptr_size, ptr_size, error)
+                                    #   4 bytes  0xa1a1a1a1
+                                    #  12 bytes  'AUTORELEASE!'
+                                    # ptr bytes  autorelease insertion point
+                                    # ptr bytes  pthread_t
+                                    # ptr bytes  next colder page
+                                    # ptr bytes  next hotter page
+                                    #   4 bytes  this page's depth in the list
+                                    #   4 bytes  high-water mark
+                                    description += ' AUTORELEASE! for pthread_t %#x' % (thread)
+                            #     else:
+                            #         description += 'malloc(%u)' % (malloc_size)
+                            # else:
+                            #     description += 'malloc(%u)' % (malloc_size)
+                        else:
+                            derefed_dynamic_value = dynamic_value.deref
+                            if derefed_dynamic_value:                        
+                                derefed_dynamic_type = derefed_dynamic_value.type
+                                derefed_dynamic_type_size = derefed_dynamic_type.size
+                                derefed_dynamic_type_name = derefed_dynamic_type.name
+                                description += ' '
+                                description += derefed_dynamic_type_name
+                                if offset < derefed_dynamic_type_size:
+                                    member_list = list();
+                                    get_member_types_for_offset (derefed_dynamic_type, offset, member_list)
+                                    if member_list:
+                                        member_path = ''
+                                        for member in member_list:
+                                            member_name = member.name
+                                            if member_name: 
+                                                if member_path:
+                                                    member_path += '.'
+                                                member_path += member_name
+                                        if member_path:
+                                            if options.ivar_regex_blacklist:
+                                                for ivar_regex in options.ivar_regex_blacklist:
+                                                    if ivar_regex.match(member_path):
+                                                        print_entry = False
+                                            description += '.%s' % (member_path)
+                                else:
+                                    description += '%u bytes after %s' % (offset - derefed_dynamic_type_size, derefed_dynamic_type_name)
+                            else:
+                                # strip the "*" from the end of the name since we were unable to dereference this
+                                description += dynamic_value.type.name[0:-1]
                 if print_entry:
                     match_idx += 1
+                    result_output = ''
                     if description:
-                        print description
+                        result_output += description
                         if options.print_type and derefed_dynamic_value:
-                            print derefed_dynamic_value
+                            result_output += ' %s' % (derefed_dynamic_value)
                         if options.print_object_description and dynamic_value:
                             desc = dynamic_value.GetObjectDescription()
                             if desc:
-                                print ', po=%s\n' % (desc)
+                                result_output += '\n%s' % (desc)
+                    if result_output:
+                        result.AppendMessage(result_output)
                     if options.memory:
                         cmd_result = lldb.SBCommandReturnObject()
-                        memory_command = "memory read -f %s 0x%x 0x%x" % (options.format, malloc_addr, malloc_addr + malloc_size)
+                        if options.format == None:
+                            memory_command = "memory read --force 0x%x 0x%x" % (malloc_addr, malloc_addr + malloc_size)
+                        else:
+                            memory_command = "memory read --force -f %s 0x%x 0x%x" % (options.format, malloc_addr, malloc_addr + malloc_size)
+                        if options.verbose:
+                            result.AppendMessage(memory_command)
                         lldb.debugger.GetCommandInterpreter().HandleCommand(memory_command, cmd_result)
-                        print cmd_result.GetOutput()
+                        result.AppendMessage(cmd_result.GetOutput())
                     if options.stack_history:
-                        dump_stack_history_entries(malloc_addr, 1)
+                        dump_stack_history_entries(options, result, malloc_addr, 1)
                     elif options.stack:
-                        dump_stack_history_entries(malloc_addr, 0)
+                        dump_stack_history_entries(options, result, malloc_addr, 0)
             return i
         elif print_no_matches:
-            print 'no matches found for %s' % (arg_str_description)
+            result.AppendMessage('no matches found for %s' % (arg_str_description))
     else:
-        print expr_sbvalue.error
+        result.AppendMessage(str(expr_sbvalue.error))
     return 0
     
-def heap_search(options, arg_str):
-    dylid_load_err = load_dylib()
-    if dylid_load_err:
-        print dylid_load_err
-        return
-    expr = None
-    arg_str_description = arg_str
-    if options.format == None: 
-        options.format = "Y" # 'Y' is "bytes with ASCII" format
-    if options.type == 'pointer':
-        expr = 'find_pointer_in_heap((void *)%s)' % (arg_str)
-        arg_str_description = 'malloc block containing pointer %s' % arg_str
-        if options.format == None: 
-            options.format = "A" # 'A' is "address" format
-    elif options.type == 'isa':
-        expr = 'find_pointer_in_heap((void *)%s)' % (arg_str)
-        arg_str_description = 'objective C classes with isa %s' % arg_str
-        options.offset = 0
-        if options.format == None: 
-            options.format = "A" # 'A' is "address" format
-    elif options.type == 'cstr':
-        expr = 'find_cstring_in_heap("%s")' % arg_str
-        arg_str_description = 'malloc block containing "%s"' % arg_str
-    elif options.type == 'addr':
-        expr = 'find_block_for_address((void *)%s)' % arg_str
-        arg_str_description = 'malloc block for %s' % arg_str
-    else:
-        print 'error: invalid type "%s"\nvalid values are "pointer", "cstr"' % options.type
-        return
-    
-    display_match_results (options, arg_str_description, lldb.frame.EvaluateExpression (expr))
-    
-def ptr_refs(debugger, command, result, dict):
-    command_args = shlex.split(command)
+def get_ptr_refs_options ():
     usage = "usage: %prog [options] <EXPR> [EXPR ...]"
-    description='''Searches the heap for pointer references on darwin user space programs. 
-    
-    Any matches that were found will dump the malloc blocks that contain the pointers 
-    and might be able to print what kind of objects the pointers are contained in using 
-    dynamic type information in the program.'''
+    description='''Searches all allocations on the heap for pointer values on 
+darwin user space programs. Any matches that were found will dump the malloc 
+blocks that contain the pointers and might be able to print what kind of 
+objects the pointers are contained in using dynamic type information in the
+program.'''
     parser = optparse.OptionParser(description=description, prog='ptr_refs',usage=usage)
     add_common_options(parser)
+    return parser
+    
+def ptr_refs(debugger, command, result, dict):
+    command_args = shlex.split(command)
+    parser = get_ptr_refs_options()
     try:
         (options, args) = parser.parse_args(command_args)
     except:
         return
 
+    process = lldb.debugger.GetSelectedTarget().GetProcess()
+    if not process:
+        result.AppendMessage('error: invalid process')
+        return
+    frame = process.GetSelectedThread().GetSelectedFrame()
+    if not frame:
+        result.AppendMessage('error: invalid frame')
+        return
+
     options.type = 'pointer'
-    
+    if options.format == None: 
+        options.format = "A" # 'A' is "address" format
+
     if args:
-        
-        for data in args:
-            heap_search (options, data)
+        # When we initialize the expression, we must define any types that
+        # we will need when looking at every allocation. We must also define
+        # a type named callback_baton_t and make an instance named "baton" 
+        # and initialize it how ever we want to. The address of "baton" will
+        # be passed into our range callback. callback_baton_t must contain
+        # a member named "callback" whose type is "range_callback_t". This
+        # will be used by our zone callbacks to call the range callback for
+        # each malloc range.
+        user_init_code_format = '''
+#define MAX_MATCHES %u
+struct $malloc_match {
+    void *addr;
+    uintptr_t size;
+    uintptr_t offset;
+    uintptr_t type;
+};
+typedef struct callback_baton_t {
+    range_callback_t callback;
+    unsigned num_matches;
+    $malloc_match matches[MAX_MATCHES];
+    void *ptr;
+} callback_baton_t;
+range_callback_t range_callback = [](task_t task, void *baton, unsigned type, uintptr_t ptr_addr, uintptr_t ptr_size) -> void {
+    callback_baton_t *info = (callback_baton_t *)baton;
+    typedef void* T;
+    const unsigned size = sizeof(T);
+    T *array = (T*)ptr_addr;
+    for (unsigned idx = 0; ((idx + 1) * sizeof(T)) <= ptr_size; ++idx) {  
+        if (array[idx] == info->ptr) {
+            if (info->num_matches < MAX_MATCHES) {
+                info->matches[info->num_matches].addr = (void*)ptr_addr;
+                info->matches[info->num_matches].size = ptr_size;
+                info->matches[info->num_matches].offset = idx*sizeof(T);
+                info->matches[info->num_matches].type = type;
+                ++info->num_matches;
+            }
+        }
+    }
+};
+callback_baton_t baton = { range_callback, 0, {0}, (void *)%s };
+'''
+        # We must also define a snippet of code to be run that returns
+        # the result of the expression we run.
+        # Here we return NULL if our pointer was not found in any malloc blocks,
+        # and we return the address of the matches array so we can then access
+        # the matching results
+        user_return_code = '''if (baton.num_matches < MAX_MATCHES)
+    baton.matches[baton.num_matches].addr = 0; // Terminate the matches array
+baton.matches'''
+        # Iterate through all of our pointer expressions and display the results
+        for ptr_expr in args:
+            user_init_code = user_init_code_format % (options.max_matches, ptr_expr)
+            expr = get_iterate_memory_expr(options, process, user_init_code, user_return_code)          
+            arg_str_description = 'malloc block containing pointer %s' % ptr_expr
+            display_match_results (result, options, arg_str_description, expr)
     else:
-        print 'error: no pointer arguments were given'
+        result.AppendMessage('error: no pointer arguments were given')
 
-def cstr_refs(debugger, command, result, dict):
-    command_args = shlex.split(command)
+def get_cstr_refs_options():
     usage = "usage: %prog [options] <CSTR> [CSTR ...]"
-    description='''Searches the heap for C string references on darwin user space programs. 
-    
-    Any matches that were found will dump the malloc blocks that contain the C strings 
-    and might be able to print what kind of objects the pointers are contained in using 
-    dynamic type information in the program.'''
+    description='''Searches all allocations on the heap for C string values on
+darwin user space programs. Any matches that were found will dump the malloc
+blocks that contain the C strings and might be able to print what kind of
+objects the pointers are contained in using dynamic type information in the
+program.'''
     parser = optparse.OptionParser(description=description, prog='cstr_refs',usage=usage)
     add_common_options(parser)
+    return parser
+
+def cstr_refs(debugger, command, result, dict):
+    command_args = shlex.split(command)
+    parser = get_cstr_refs_options();
     try:
         (options, args) = parser.parse_args(command_args)
     except:
         return
 
+    process = lldb.debugger.GetSelectedTarget().GetProcess()
+    if not process:
+        result.AppendMessage('error: invalid process')
+        return
+    frame = process.GetSelectedThread().GetSelectedFrame()
+    if not frame:
+        result.AppendMessage('error: invalid frame')
+        return
+
+
     options.type = 'cstr'
+    if options.format == None: 
+        options.format = "Y" # 'Y' is "bytes with ASCII" format
 
     if args:
-
-        for data in args:
-            heap_search (options, data)
+        # When we initialize the expression, we must define any types that
+        # we will need when looking at every allocation. We must also define
+        # a type named callback_baton_t and make an instance named "baton" 
+        # and initialize it how ever we want to. The address of "baton" will
+        # be passed into our range callback. callback_baton_t must contain
+        # a member named "callback" whose type is "range_callback_t". This
+        # will be used by our zone callbacks to call the range callback for
+        # each malloc range.
+        user_init_code_format = '''
+#define MAX_MATCHES %u
+struct $malloc_match {
+    void *addr;
+    uintptr_t size;
+    uintptr_t offset;
+    uintptr_t type;
+};
+typedef struct callback_baton_t {
+    range_callback_t callback;
+    unsigned num_matches;
+    $malloc_match matches[MAX_MATCHES];
+    const char *cstr;
+    unsigned cstr_len;
+} callback_baton_t;
+range_callback_t range_callback = [](task_t task, void *baton, unsigned type, uintptr_t ptr_addr, uintptr_t ptr_size) -> void {
+    callback_baton_t *info = (callback_baton_t *)baton;
+    if (info->cstr_len < ptr_size) {
+        const char *begin = (const char *)ptr_addr;
+        const char *end = begin + ptr_size - info->cstr_len;
+        for (const char *s = begin; s < end; ++s) {
+            if ((int)memcmp(s, info->cstr, info->cstr_len) == 0) {
+                if (info->num_matches < MAX_MATCHES) {
+                    info->matches[info->num_matches].addr = (void*)ptr_addr;
+                    info->matches[info->num_matches].size = ptr_size;
+                    info->matches[info->num_matches].offset = s - begin;
+                    info->matches[info->num_matches].type = type;
+                    ++info->num_matches;
+                }
+            }
+        }
+    }
+};
+const char *cstr = "%s";
+callback_baton_t baton = { range_callback, 0, {0}, cstr, (unsigned)strlen(cstr) };'''
+        # We must also define a snippet of code to be run that returns
+        # the result of the expression we run.
+        # Here we return NULL if our pointer was not found in any malloc blocks,
+        # and we return the address of the matches array so we can then access
+        # the matching results
+        user_return_code = '''if (baton.num_matches < MAX_MATCHES)
+    baton.matches[baton.num_matches].addr = 0; // Terminate the matches array
+baton.matches'''
+        # Iterate through all of our pointer expressions and display the results
+        for cstr in args:
+            user_init_code = user_init_code_format % (options.max_matches, cstr)
+            expr = get_iterate_memory_expr(options, process, user_init_code, user_return_code)          
+            arg_str_description = 'malloc block containing "%s"' % cstr            
+            display_match_results (result, options, arg_str_description, expr)
     else:
-        print 'error: no c string arguments were given to search for'
+        result.AppendMessage('error: command takes one or more C string arguments')
 
-def malloc_info(debugger, command, result, dict):
-    command_args = shlex.split(command)
-    usage = "usage: %prog [options] <EXPR> [EXPR ...]"
-    description='''Searches the heap a malloc block that contains the addresses specified as arguments. 
 
-    Any matches that were found will dump the malloc blocks that match or contain
-    the specified address. The matching blocks might be able to show what kind 
-    of objects they are using dynamic type information in the program.'''
-    parser = optparse.OptionParser(description=description, prog='cstr_refs',usage=usage)
+def get_malloc_info_options():
+    usage = "usage: %prog [options] <EXPR> [EXPR ...]"
+    description='''Searches the heap a malloc block that contains the addresses
+specified as one or more address expressions. Any matches that were found will
+dump the malloc blocks that match or contain the specified address. The matching
+blocks might be able to show what kind of objects they are using dynamic type
+information in the program.'''
+    parser = optparse.OptionParser(description=description, prog='malloc_info',usage=usage)
     add_common_options(parser)
+    return parser
+
+def malloc_info(debugger, command, result, dict):
+    command_args = shlex.split(command)
+    parser = get_malloc_info_options()
     try:
         (options, args) = parser.parse_args(command_args)
     except:
         return
-    options.type = 'addr'
+    malloc_info_impl (debugger, result, options, args)
+
+def malloc_info_impl (debugger, result, options, args):
+    # We are specifically looking for something on the heap only
+    options.type = 'malloc_info'
+
+    process = lldb.debugger.GetSelectedTarget().GetProcess()
+    if not process:
+        result.AppendMessage('error: invalid process')
+        return
+    frame = process.GetSelectedThread().GetSelectedFrame()
+    if not frame:
+        result.AppendMessage('error: invalid frame')
+        return
+    
+    user_init_code_format = '''
+struct $malloc_match {
+    void *addr;
+    uintptr_t size;
+    uintptr_t offset;
+    uintptr_t type;
+};
+typedef struct callback_baton_t {
+    range_callback_t callback;
+    unsigned num_matches;
+    $malloc_match matches[2]; // Two items so they can be NULL terminated
+    void *ptr;
+} callback_baton_t;
+range_callback_t range_callback = [](task_t task, void *baton, unsigned type, uintptr_t ptr_addr, uintptr_t ptr_size) -> void {
+    callback_baton_t *info = (callback_baton_t *)baton;
+    if (info->num_matches == 0) {
+        uint8_t *p = (uint8_t *)info->ptr;
+        uint8_t *lo = (uint8_t *)ptr_addr;
+        uint8_t *hi = lo + ptr_size;
+        if (lo <= p && p < hi) {
+            info->matches[info->num_matches].addr = (void*)ptr_addr;
+            info->matches[info->num_matches].size = ptr_size;
+            info->matches[info->num_matches].offset = p - lo;
+            info->matches[info->num_matches].type = type;
+            info->num_matches = 1;
+        }
+    }
+};
+callback_baton_t baton = { range_callback, 0, {0}, (void *)%s };
+baton.matches[0].addr = 0;
+baton.matches[1].addr = 0;'''
     if args:
-        for data in args:
-            heap_search (options, data)
+        total_matches = 0
+        for ptr_expr in args:
+            user_init_code = user_init_code_format % (ptr_expr)
+            expr = get_iterate_memory_expr(options, process, user_init_code, 'baton.matches')          
+            arg_str_description = 'malloc block that contains %s' % ptr_expr
+            total_matches += display_match_results (result, options, arg_str_description, expr)
+        return total_matches
     else:
-        print 'error: no c string arguments were given to search for'
-
-def malloc_history(debugger, command, result, dict):
-    command_args = shlex.split(command)
-    usage = "usage: %prog [options] <EXPR> [EXPR ...]"
-    description='''Gets the allocation history for an expression whose result is an address.
+        result.AppendMessage('error: command takes one or more pointer expressions')
+        return 0
 
-    Programs should set the MallocStackLoggingNoCompact=1 in the environment to enable stack history. This can be done
-    with "process launch -v MallocStackLoggingNoCompact=1 -- [arg1 ...]"'''
+def get_thread_stack_ranges_struct (process):
+    '''Create code that defines a structure that represents threads stack bounds
+    for all  threads. It returns a static sized array initialized with all of
+    the tid, base, size structs for all the threads.'''
+    stack_dicts = list()
+    if process:
+        i = 0;
+        for thread in process:
+            min_sp = thread.frame[0].sp
+            max_sp = min_sp
+            for frame in thread.frames:
+                sp = frame.sp
+                if sp < min_sp: min_sp = sp
+                if sp > max_sp: max_sp = sp
+            if min_sp < max_sp:
+                stack_dicts.append ({ 'tid' : thread.GetThreadID(), 'base' : min_sp  , 'size' : max_sp-min_sp, 'index' : i })
+                i += 1
+    stack_dicts_len = len(stack_dicts)
+    if stack_dicts_len > 0:
+        result = '''
+#define NUM_STACKS %u
+#define STACK_RED_ZONE_SIZE %u
+typedef struct thread_stack_t { uint64_t tid, base, size; } thread_stack_t;
+thread_stack_t stacks[NUM_STACKS];''' % (stack_dicts_len, process.target.GetStackRedZoneSize())
+        for stack_dict in stack_dicts:
+            result += '''
+stacks[%(index)u].tid  = 0x%(tid)x;
+stacks[%(index)u].base = 0x%(base)x;
+stacks[%(index)u].size = 0x%(size)x;''' % stack_dict
+        return result
+    else:
+        return None
 
-    dylid_load_err = load_dylib()
-    if dylid_load_err:
-        print dylid_load_err
-    else:
-        if command_args:
-            for addr_expr_str in command_args:
-                expr_sbvalue = lldb.frame.EvaluateExpression (addr_expr_str)
-                if expr_sbvalue.error.Success():
-                    addr = expr_sbvalue.unsigned
-                    if addr != 0:
-                        dump_stack_history_entries (addr, 1)
-                else:
-                    print 'error: expression error for "%s": %s' % (addr_expr_str, expr_sbvalue.error)
-        else:
-            print 'error: no address expressions were specified'
+def get_sections_ranges_struct (process):
+    '''Create code that defines a structure that represents all segments that
+    can contain data for all images in "target". It returns a static sized 
+    array initialized with all of base, size structs for all the threads.'''
+    target = process.target
+    segment_dicts = list()
+    for (module_idx, module) in enumerate(target.modules):
+        for sect_idx in range(module.GetNumSections()):
+            section = module.GetSectionAtIndex(sect_idx)
+            if not section:
+                break
+            name = section.name
+            if name != '__TEXT' and name != '__LINKEDIT' and name != '__PAGEZERO':
+                base = section.GetLoadAddress(target)
+                size = section.GetByteSize()
+                if base != lldb.LLDB_INVALID_ADDRESS and size > 0:
+                    segment_dicts.append ({ 'base' : base, 'size' : size })
+    segment_dicts_len = len(segment_dicts)
+    if segment_dicts_len > 0:
+        result = '''
+#define NUM_SEGMENTS %u
+typedef struct segment_range_t { uint64_t base; uint32_t size; } segment_range_t;
+segment_range_t segments[NUM_SEGMENTS];''' % (segment_dicts_len,)
+        for (idx, segment_dict) in enumerate(segment_dicts):
+            segment_dict['index'] = idx
+            result += '''
+segments[%(index)u].base = 0x%(base)x;
+segments[%(index)u].size = 0x%(size)x;''' % segment_dict
+        return result
+    else:
+        return None
 
 def section_ptr_refs(debugger, command, result, dict):
     command_args = shlex.split(command)
@@ -410,14 +918,15 @@ def section_ptr_refs(debugger, command,
         return
 
     options.type = 'pointer'
-    
+
     sections = list()
     section_modules = list()
     if not options.section_names:
-        print 'error: at least one section must be specified with the --section option'
+        result.AppendMessage('error: at least one section must be specified with the --section option')
         return
 
-    for module in lldb.target.modules:
+    target = lldb.debugger.GetSelectedTarget()
+    for module in target.modules:
         for section_name in options.section_names:
             section = module.section[section_name]
             if section:
@@ -426,13 +935,14 @@ def section_ptr_refs(debugger, command,
     if sections:
         dylid_load_err = load_dylib()
         if dylid_load_err:
-            print dylid_load_err
+            result.AppendMessage(dylid_load_err)
             return
+        frame = target.GetProcess().GetSelectedThread().GetSelectedFrame()
         for expr_str in args:
             for (idx, section) in enumerate(sections):
                 expr = 'find_pointer_in_memory(0x%xllu, %ullu, (void *)%s)' % (section.addr.load_addr, section.size, expr_str)
                 arg_str_description = 'section %s.%s containing "%s"' % (section_modules[idx].file.fullpath, section.name, expr_str)
-                num_matches = display_match_results (options, arg_str_description, lldb.frame.EvaluateExpression (expr), False)
+                num_matches = display_match_results (result, options, arg_str_description, expr, False)
                 if num_matches:
                     if num_matches < options.max_matches:
                         options.max_matches = options.max_matches - num_matches
@@ -441,51 +951,182 @@ def section_ptr_refs(debugger, command,
                 if options.max_matches == 0:
                     return
     else:
-        print 'error: no sections were found that match any of %s' % (', '.join(options.section_names))
+        result.AppendMessage('error: no sections were found that match any of %s' % (', '.join(options.section_names)))
+
+def get_objc_refs_options():
+    usage = "usage: %prog [options] <CLASS> [CLASS ...]"
+    description='''Searches all allocations on the heap for instances of 
+objective C classes, or any classes that inherit from the specified classes
+in darwin user space programs. Any matches that were found will dump the malloc
+blocks that contain the C strings and might be able to print what kind of
+objects the pointers are contained in using dynamic type information in the
+program.'''
+    parser = optparse.OptionParser(description=description, prog='objc_refs',usage=usage)
+    add_common_options(parser)
+    return parser
 
 def objc_refs(debugger, command, result, dict):
     command_args = shlex.split(command)
-    usage = "usage: %prog [options] <EXPR> [EXPR ...]"
-    description='''Find all heap allocations given one or more objective C class names.'''
-    parser = optparse.OptionParser(description=description, prog='object_refs',usage=usage)
-    add_common_options(parser)
+    parser = get_objc_refs_options()
     try:
         (options, args) = parser.parse_args(command_args)
     except:
         return
 
-    dylid_load_err = load_dylib()
-    if dylid_load_err:
-        print dylid_load_err
-    else:
-        if args:
-            for class_name in args:
-                addr_expr_str = "(void *)[%s class]" % class_name
-                expr_sbvalue = lldb.frame.EvaluateExpression (addr_expr_str)
-                if expr_sbvalue.error.Success():
-                    isa = expr_sbvalue.unsigned
-                    if isa:
-                        options.type = 'isa'
-                        heap_search (options, '0x%x' % isa)
-                    else:
-                        print 'error: Can\'t find isa for an ObjC class named "%s"' % (class_name)
+    process = lldb.debugger.GetSelectedTarget().GetProcess()
+    if not process:
+        result.AppendMessage('error: invalid process')
+        return
+    frame = process.GetSelectedThread().GetSelectedFrame()
+    if not frame:
+        result.AppendMessage('error: invalid frame')
+        return
+
+    options.type = 'isa'
+    if options.format == None: 
+        options.format = "A" # 'A' is "address" format
+
+    expr_options = lldb.SBExpressionOptions()
+    expr_options.SetIgnoreBreakpoints(True);
+    expr_options.SetTimeoutInMicroSeconds (3*1000*1000) # 3 second infinite timeout
+    expr_options.SetTryAllThreads (True)
+    num_objc_classes_value = frame.EvaluateExpression("(int)objc_getClassList((void *)0, (int)0)", expr_options)
+    if not num_objc_classes_value.error.Success():
+        result.AppendMessage('error: %s' % num_objc_classes_value.error.GetCString())
+        return
+    
+    num_objc_classes = num_objc_classes_value.GetValueAsUnsigned()
+    if num_objc_classes == 0:
+        result.AppendMessage('error: no objective C classes in program')
+        return
+        
+    if args:
+        # When we initialize the expression, we must define any types that
+        # we will need when looking at every allocation. We must also define
+        # a type named callback_baton_t and make an instance named "baton" 
+        # and initialize it how ever we want to. The address of "baton" will
+        # be passed into our range callback. callback_baton_t must contain
+        # a member named "callback" whose type is "range_callback_t". This
+        # will be used by our zone callbacks to call the range callback for
+        # each malloc range.
+        user_init_code_format = '''
+#define MAX_MATCHES %u
+struct $malloc_match {
+    void *addr;
+    uintptr_t size;
+    uintptr_t offset;
+    uintptr_t type;
+};
+typedef int (*compare_callback_t)(const void *a, const void *b);
+typedef struct callback_baton_t {
+    range_callback_t callback;
+    compare_callback_t compare_callback;
+    unsigned num_matches;
+    $malloc_match matches[MAX_MATCHES];
+    void *isa;
+    Class classes[%u];
+} callback_baton_t;
+compare_callback_t compare_callback = [](const void *a, const void *b) -> int {
+     Class a_ptr = *(Class *)a;
+     Class b_ptr = *(Class *)b;
+     if (a_ptr < b_ptr) return -1;
+     if (a_ptr > b_ptr) return +1;
+     return 0;
+};
+range_callback_t range_callback = [](task_t task, void *baton, unsigned type, uintptr_t ptr_addr, uintptr_t ptr_size) -> void {
+    callback_baton_t *info = (callback_baton_t *)baton;
+    if (sizeof(Class) <= ptr_size) {
+        Class *curr_class_ptr = (Class *)ptr_addr;
+        Class *matching_class_ptr = (Class *)bsearch (curr_class_ptr, 
+                                                      (const void *)info->classes, 
+                                                      sizeof(info->classes)/sizeof(Class), 
+                                                      sizeof(Class), 
+                                                      info->compare_callback);
+        if (matching_class_ptr) {
+            bool match = false;
+            if (info->isa) {
+                Class isa = *curr_class_ptr;
+                if (info->isa == isa)
+                    match = true;
+                else { // if (info->objc.match_superclasses) {
+                    Class super = (Class)class_getSuperclass(isa);
+                    while (super) {
+                        if (super == info->isa) {
+                            match = true;
+                            break;
+                        }
+                        super = (Class)class_getSuperclass(super);
+                    }
+                }
+            }
+            else
+                match = true;
+            if (match) {
+                if (info->num_matches < MAX_MATCHES) {
+                    info->matches[info->num_matches].addr = (void*)ptr_addr;
+                    info->matches[info->num_matches].size = ptr_size;
+                    info->matches[info->num_matches].offset = 0;
+                    info->matches[info->num_matches].type = type;
+                    ++info->num_matches;
+                }
+            }
+        }
+    }
+};
+callback_baton_t baton = { range_callback, compare_callback, 0, {0}, (void *)0x%x, {0} };
+int nc = (int)objc_getClassList(baton.classes, sizeof(baton.classes)/sizeof(Class));
+(void)qsort (baton.classes, sizeof(baton.classes)/sizeof(Class), sizeof(Class), compare_callback);'''
+        # We must also define a snippet of code to be run that returns
+        # the result of the expression we run.
+        # Here we return NULL if our pointer was not found in any malloc blocks,
+        # and we return the address of the matches array so we can then access
+        # the matching results
+        user_return_code = '''if (baton.num_matches < MAX_MATCHES)
+    baton.matches[baton.num_matches].addr = 0; // Terminate the matches array
+        baton.matches'''
+        # Iterate through all of our ObjC class name arguments
+        for class_name in args:
+            addr_expr_str = "(void *)[%s class]" % class_name
+            expr_options = lldb.SBExpressionOptions()
+            expr_options.SetIgnoreBreakpoints(True);
+            expr_options.SetTimeoutInMicroSeconds (1*1000*1000) # 1 second timeout
+            expr_options.SetTryAllThreads (True)
+            expr_sbvalue = frame.EvaluateExpression (addr_expr_str, expr_options)
+            if expr_sbvalue.error.Success():
+                isa = expr_sbvalue.unsigned
+                if isa:
+                    options.type = 'isa'
+                    result.AppendMessage('Searching for all instances of classes or subclasses of "%s" (isa=0x%x)' % (class_name, isa))
+                    user_init_code = user_init_code_format % (options.max_matches, num_objc_classes, isa)
+                    expr = get_iterate_memory_expr(options, process, user_init_code, user_return_code)          
+                    arg_str_description = 'objective C classes with isa 0x%x' % isa
+                    display_match_results (result, options, arg_str_description, expr)
                 else:
-                    print 'error: expression error for "%s": %s' % (addr_expr_str, expr_sbvalue.error)
-        else:
-            print 'error: no address expressions were specified'
+                    result.AppendMessage('error: Can\'t find isa for an ObjC class named "%s"' % (class_name))
+            else:
+                result.AppendMessage('error: expression error for "%s": %s' % (addr_expr_str, expr_sbvalue.error))
+    else:
+        result.AppendMessage('error: command takes one or more C string arguments');
 
 if __name__ == '__main__':
     lldb.debugger = lldb.SBDebugger.Create()
 
-# This initializer is being run from LLDB in the embedded command interpreter
-# Add any commands contained in this module to LLDB
-lldb.debugger.HandleCommand('command script add -f lldb.macosx.heap.ptr_refs ptr_refs')
-lldb.debugger.HandleCommand('command script add -f lldb.macosx.heap.cstr_refs cstr_refs')
-lldb.debugger.HandleCommand('command script add -f lldb.macosx.heap.malloc_info malloc_info')
-lldb.debugger.HandleCommand('command script add -f lldb.macosx.heap.malloc_history malloc_history')
-lldb.debugger.HandleCommand('command script add -f lldb.macosx.heap.section_ptr_refs section_ptr_refs')
-lldb.debugger.HandleCommand('command script add -f lldb.macosx.heap.objc_refs objc_refs')
-print '"ptr_refs", "cstr_refs", "malloc_info", "malloc_history" and "section_ptr_refs" commands have been installed, use the "--help" options on these commands for detailed help.'
+# Make the options so we can generate the help text for the new LLDB 
+# command line command prior to registering it with LLDB below. This way
+# if clients in LLDB type "help malloc_info", they will see the exact same
+# output as typing "malloc_info --help".
+ptr_refs.__doc__ = get_ptr_refs_options().format_help()
+cstr_refs.__doc__ = get_cstr_refs_options().format_help()
+malloc_info.__doc__ = get_malloc_info_options().format_help()
+objc_refs.__doc__ = get_objc_refs_options().format_help()
+lldb.debugger.HandleCommand('command script add -f %s.ptr_refs ptr_refs' % __name__)
+lldb.debugger.HandleCommand('command script add -f %s.cstr_refs cstr_refs' % __name__)
+lldb.debugger.HandleCommand('command script add -f %s.malloc_info malloc_info' % __name__)
+# lldb.debugger.HandleCommand('command script add -f %s.heap heap' % package_name)
+# lldb.debugger.HandleCommand('command script add -f %s.section_ptr_refs section_ptr_refs' % package_name)
+# lldb.debugger.HandleCommand('command script add -f %s.stack_ptr_refs stack_ptr_refs' % package_name)
+lldb.debugger.HandleCommand('command script add -f %s.objc_refs objc_refs' % __name__)
+print '"malloc_info", "ptr_refs", "cstr_refs", and "objc_refs" commands have been installed, use the "--help" options on these commands for detailed help.'
 
 
 

Modified: lldb/branches/lldb-platform-work/examples/darwin/heap_find/heap/Makefile
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/examples/darwin/heap_find/heap/Makefile?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/examples/darwin/heap_find/heap/Makefile (original)
+++ lldb/branches/lldb-platform-work/examples/darwin/heap_find/heap/Makefile Thu Jun  6 19:06:43 2013
@@ -18,7 +18,7 @@ DSYM ?= $(EXE).dSYM
 # dsym file.
 #----------------------------------------------------------------------
 $(EXE) : heap_find.cpp
-	$(CXX) $(CFLAGS) -install_name "@executable_path/libheap.dylib" -dynamiclib heap_find.cpp -o "$(EXE)"
+	$(CXX) $(CFLAGS) -install_name "@executable_path/libheap.dylib" -dynamiclib -lobjc heap_find.cpp -o "$(EXE)"
 
 #----------------------------------------------------------------------
 # Include all of the makefiles for each source file so we don't have

Modified: lldb/branches/lldb-platform-work/examples/darwin/heap_find/heap/heap_find.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/examples/darwin/heap_find/heap/heap_find.cpp?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/examples/darwin/heap_find/heap/heap_find.cpp (original)
+++ lldb/branches/lldb-platform-work/examples/darwin/heap_find/heap/heap_find.cpp Thu Jun  6 19:06:43 2013
@@ -63,13 +63,19 @@
 //
 // This is a clue that the 0x104008000 is a "lldb_private::Process *".
 //===----------------------------------------------------------------------===//
-
+// C includes
 #include <assert.h>
 #include <ctype.h>
+#include <dlfcn.h>
 #include <mach/mach.h>
+#include <mach/mach_vm.h>
 #include <malloc/malloc.h>
+#include <objc/objc-runtime.h>
 #include <stdio.h>
 #include <stdlib.h>
+#include <unistd.h>
+
+// C++ includes
 #include <vector>
 
 //----------------------------------------------------------------------
@@ -89,6 +95,8 @@ typedef struct {
 #define stack_logging_type_generic	1
 #define stack_logging_type_alloc	2
 #define stack_logging_type_dealloc	4
+// This bit is made up by this code
+#define stack_logging_type_vm_region 8 
 
 //----------------------------------------------------------------------
 // Redefine private function prototypes from 
@@ -126,13 +134,21 @@ __mach_stack_logging_frames_for_uniqued_
     uint32_t *count
 );
 
+extern "C" void *gdb_class_getClass (void *objc_class);
+
+static void
+range_info_callback (task_t task, 
+                     void *baton, 
+                     unsigned type, 
+                     uint64_t ptr_addr, 
+                     uint64_t ptr_size);
+
 //----------------------------------------------------------------------
 // Redefine private gloval variables prototypes from 
 // "/usr/local/include/stack_logging.h"
 //----------------------------------------------------------------------
 
 extern "C" int stack_logging_enable_logging;
-extern "C" int stack_logging_dontcompact;
 
 //----------------------------------------------------------------------
 // Local defines
@@ -144,18 +160,21 @@ extern "C" int stack_logging_dontcompact
 //----------------------------------------------------------------------
 typedef void range_callback_t (task_t task, void *baton, unsigned type, uint64_t ptr_addr, uint64_t ptr_size);
 typedef void zone_callback_t (void *info, const malloc_zone_t *zone);
-
+typedef int (*comare_function_t)(const void *, const void *);
 struct range_callback_info_t
 {
     zone_callback_t *zone_callback;
     range_callback_t *range_callback;
     void *baton;
+    int check_vm_regions;
 };
 
 enum data_type_t
 {
     eDataTypeAddress,
-    eDataTypeContainsData
+    eDataTypeContainsData,
+    eDataTypeObjC,
+    eDataTypeHeapInfo
 };
 
 struct aligned_data_t
@@ -165,6 +184,12 @@ struct aligned_data_t
     uint32_t align;
 };
 
+struct objc_data_t
+{
+    void *match_isa; // Set to NULL for all objective C objects
+    bool match_superclasses;
+};
+
 struct range_contains_data_callback_info_t
 {
     data_type_t type;
@@ -173,9 +198,11 @@ struct range_contains_data_callback_info
     {
         uintptr_t addr;
         aligned_data_t data;
+        objc_data_t objc;
     };
     uint32_t match_count;
     bool done;
+    bool unique;    
 };
 
 struct malloc_match
@@ -183,6 +210,7 @@ struct malloc_match
     void *addr;
     intptr_t size;
     intptr_t offset;
+    uintptr_t type;
 };
 
 struct malloc_stack_entry
@@ -190,17 +218,365 @@ struct malloc_stack_entry
     const void *address;
     uint64_t argument;
     uint32_t type_flags;
-    std::vector<uintptr_t> frames;
+    uint32_t num_frames;
+    mach_vm_address_t frames[MAX_FRAMES];
 };
 
+struct malloc_block_contents
+{
+    union {
+        Class isa;
+        void *pointers[2];
+    };
+};
+
+static int 
+compare_void_ptr (const void *a, const void *b)
+{
+    Class a_ptr = *(Class *)a;
+    Class b_ptr = *(Class *)b;
+    if (a_ptr < b_ptr) return -1;
+    if (a_ptr > b_ptr) return +1;
+    return 0;
+}
+
+class MatchResults
+{
+    enum { 
+        k_max_entries = 8 * 1024
+    };
+public:
+    MatchResults () :
+        m_size(0)
+    {
+    }
+    
+    void
+    clear()
+    {
+        m_size = 0;
+        bzero (&m_entries, sizeof(m_entries));
+    }
+    
+    bool
+    empty() const
+    {
+        return m_size == 0;
+    }
+
+    void
+    push_back (const malloc_match& m, bool unique = false)
+    {
+        if (unique)
+        {
+            // Don't add the entry if there is already a match for this address
+            for (uint32_t i=0; i<m_size; ++i)
+            {
+                if (((uint8_t *)m_entries[i].addr + m_entries[i].offset) == ((uint8_t *)m.addr + m.offset))
+                    return; // Duplicate entry
+            }
+        }
+        if (m_size < k_max_entries - 1)
+        {
+            m_entries[m_size] = m;
+            m_size++;
+        }
+    }
+
+    malloc_match *
+    data ()
+    {
+        // If empty, return NULL
+        if (empty())
+            return NULL;
+        // In not empty, terminate and return the result
+        malloc_match terminator_entry = { NULL, 0, 0, 0 };
+        // We always leave room for an empty entry at the end
+        m_entries[m_size] = terminator_entry;
+        return m_entries;
+    }
+
+protected:
+    malloc_match m_entries[k_max_entries];
+    uint32_t m_size;
+};
+
+class MallocStackLoggingEntries
+{
+    enum {  k_max_entries = 128 };
+public:
+    MallocStackLoggingEntries () :
+        m_size(0)
+    {
+    }
+
+    void
+    clear()
+    {
+        m_size = 0;
+    }
+
+    bool
+    empty() const
+    {
+        return m_size == 0;
+    }
+
+
+    malloc_stack_entry *
+    next ()
+    {
+        if (m_size < k_max_entries - 1)
+        {
+            malloc_stack_entry * result = m_entries + m_size;
+            ++m_size;
+            return result;
+        }
+        return NULL; // Out of entries...
+    }
+
+    malloc_stack_entry *
+    data ()
+    {
+        // If empty, return NULL
+        if (empty())
+            return NULL;
+        // In not empty, terminate and return the result
+        m_entries[m_size].address = NULL;
+        m_entries[m_size].argument = 0;
+        m_entries[m_size].type_flags = 0;
+        m_entries[m_size].num_frames = 0;
+        return m_entries;
+    }
+
+protected:  
+    malloc_stack_entry m_entries[k_max_entries];
+    uint32_t m_size;
+};
+
+//----------------------------------------------------------------------
+// A safe way to allocate memory and keep it from interfering with the
+// malloc enumerators.
+//----------------------------------------------------------------------
+void *
+safe_malloc(size_t n_bytes)
+{
+    if (n_bytes > 0)
+    {
+        const int k_page_size = getpagesize();
+        const mach_vm_size_t vm_size = ((n_bytes + k_page_size - 1)/k_page_size) * k_page_size;
+        vm_address_t address = 0;
+        kern_return_t kerr = vm_allocate (mach_task_self(), &address, vm_size, true);
+        if (kerr == KERN_SUCCESS)
+            return (void *)address;
+    }
+    return NULL;
+}
+
+
+//----------------------------------------------------------------------
+// ObjCClasses
+//----------------------------------------------------------------------
+class ObjCClasses
+{
+public:
+    ObjCClasses() :
+        m_objc_class_ptrs (NULL),
+        m_size (0)
+    {
+    }
+
+    bool
+    Update()
+    {
+        // TODO: find out if class list has changed and update if needed
+        if (m_objc_class_ptrs == NULL)
+        {
+            m_size = objc_getClassList(NULL, 0);
+            if (m_size > 0)
+            {
+                // Allocate the class pointers
+                m_objc_class_ptrs = (Class *)safe_malloc (m_size * sizeof(Class));
+                m_size = objc_getClassList(m_objc_class_ptrs, m_size);
+                // Sort Class pointers for quick lookup
+                ::qsort (m_objc_class_ptrs, m_size, sizeof(Class), compare_void_ptr);
+            }
+            else
+                return false;
+        }
+        return true;
+    }
+    
+    uint32_t
+    FindClassIndex (Class isa)
+    {
+        Class *matching_class = (Class *)bsearch (&isa, 
+                                                  m_objc_class_ptrs, 
+                                                  m_size, 
+                                                  sizeof(Class), 
+                                                  compare_void_ptr);
+        if (matching_class)
+        {
+            uint32_t idx = matching_class - m_objc_class_ptrs;
+            return idx;
+        }        
+        return UINT32_MAX;
+    }
+    
+    Class
+    GetClassAtIndex (uint32_t idx) const
+    {
+        if (idx < m_size)
+            return m_objc_class_ptrs[idx];
+        return NULL;
+    }
+    uint32_t
+    GetSize() const
+    {
+        return m_size;
+    }
+private:
+    Class *m_objc_class_ptrs;
+    uint32_t m_size;    
+};
+
+
+
 //----------------------------------------------------------------------
 // Local global variables
 //----------------------------------------------------------------------
-std::vector<malloc_match> g_matches;
-const void *g_lookup_addr = 0;
-std::vector<malloc_stack_entry> g_malloc_stack_history;
-mach_vm_address_t g_stack_frames[MAX_FRAMES];
-char g_error_string[PATH_MAX];
+MatchResults g_matches;
+MallocStackLoggingEntries g_malloc_stack_history;
+ObjCClasses g_objc_classes;
+
+//----------------------------------------------------------------------
+// ObjCClassInfo
+//----------------------------------------------------------------------
+
+enum HeapInfoSortType
+{
+    eSortTypeNone,
+    eSortTypeBytes,
+    eSortTypeCount
+};
+
+class ObjCClassInfo
+{
+public:
+    ObjCClassInfo() :
+        m_entries (NULL),
+        m_size (0),
+        m_sort_type (eSortTypeNone)
+    {
+    }
+    
+    void
+    Update (const ObjCClasses &objc_classes)
+    {
+        m_size = objc_classes.GetSize();
+        m_entries = (Entry *)safe_malloc (m_size * sizeof(Entry));
+        m_sort_type = eSortTypeNone;
+        Reset ();
+    }
+    
+    bool
+    AddInstance (uint32_t idx, uint64_t ptr_size)
+    {
+        if (m_size == 0)
+            Update (g_objc_classes);
+        // Update the totals for the classes
+        if (idx < m_size)
+        {
+            m_entries[idx].bytes += ptr_size;
+            ++m_entries[idx].count;
+            return true;
+        }
+        return false;
+    }
+    
+    void
+    Reset ()
+    {
+        m_sort_type = eSortTypeNone;
+        for (uint32_t i=0; i<m_size; ++i)
+        {
+             // In case we sort the entries after gathering the data, we will
+             // want to know the index into the m_objc_class_ptrs[] array.
+            m_entries[i].idx = i;
+            m_entries[i].bytes = 0;
+            m_entries[i].count = 0;
+        }
+    }
+    void
+    SortByTotalBytes (const ObjCClasses &objc_classes, bool print)
+    {
+        if (m_sort_type != eSortTypeBytes && m_size > 0)
+        {
+            ::qsort (m_entries, m_size, sizeof(Entry), (comare_function_t)compare_bytes);            
+            m_sort_type = eSortTypeBytes;
+        }
+        if (print && m_size > 0)
+        {
+            puts("Objective C objects by total bytes:");
+            puts("Total Bytes Class Name");
+            puts("----------- -----------------------------------------------------------------");
+            for (uint32_t i=0; i<m_size && m_entries[i].bytes > 0; ++i)
+            {
+                printf ("%11llu %s\n", m_entries[i].bytes, class_getName (objc_classes.GetClassAtIndex(m_entries[i].idx)));
+            }            
+        }
+    }
+    void
+    SortByTotalCount (const ObjCClasses &objc_classes, bool print)
+    {
+        if (m_sort_type != eSortTypeCount && m_size > 0)
+        {
+            ::qsort (m_entries, m_size, sizeof(Entry), (comare_function_t)compare_count);            
+            m_sort_type = eSortTypeCount;
+        }
+        if (print && m_size > 0)
+        {
+            puts("Objective C objects by total count:");
+            puts("Count    Class Name");
+            puts("-------- -----------------------------------------------------------------");
+            for (uint32_t i=0; i<m_size && m_entries[i].count > 0; ++i)
+            {
+                printf ("%8u %s\n", m_entries[i].count, class_getName (objc_classes.GetClassAtIndex(m_entries[i].idx)));
+            }            
+        }
+    }
+private:
+    struct Entry
+    {
+        uint32_t idx;   // Index into the m_objc_class_ptrs[] array
+        uint32_t count; // Number of object instances that were found
+        uint64_t bytes; // Total number of bytes for each objc class
+    };
+    
+    static int
+    compare_bytes (const Entry *a, const Entry *b)
+    {
+        // Reverse the comparisong to most bytes entries end up at top of list
+        if (a->bytes > b->bytes) return -1;
+        if (a->bytes < b->bytes) return +1;
+        return 0;
+    }
+
+    static int
+    compare_count (const Entry *a, const Entry *b)
+    {
+        // Reverse the comparisong to most count entries end up at top of list
+        if (a->count > b->count) return -1;
+        if (a->count < b->count) return +1;
+        return 0;
+    }
+
+    Entry *m_entries;
+    uint32_t m_size;    
+    HeapInfoSortType m_sort_type;
+};
+
+ObjCClassInfo g_objc_class_snapshot;
 
 //----------------------------------------------------------------------
 // task_peek
@@ -234,6 +610,49 @@ foreach_zone_in_this_process (range_call
             info->zone_callback (info, (const malloc_zone_t *)zones[i]);
         }
     }
+    
+    if (info->check_vm_regions)
+    {
+#if defined (VM_REGION_SUBMAP_SHORT_INFO_COUNT_64)
+        typedef vm_region_submap_short_info_data_64_t RegionInfo;
+        enum { kRegionInfoSize = VM_REGION_SUBMAP_SHORT_INFO_COUNT_64 };
+#else
+        typedef vm_region_submap_info_data_64_t RegionInfo;
+        enum { kRegionInfoSize = VM_REGION_SUBMAP_INFO_COUNT_64 };
+#endif
+        task_t task = mach_task_self();
+    	mach_vm_address_t vm_region_base_addr;
+    	mach_vm_size_t vm_region_size;
+    	natural_t vm_region_depth;
+    	RegionInfo vm_region_info;
+
+        ((range_contains_data_callback_info_t *)info->baton)->unique = true;
+
+        for (vm_region_base_addr = 0, vm_region_size = 1; vm_region_size != 0; vm_region_base_addr += vm_region_size)
+        {
+            mach_msg_type_number_t vm_region_info_size = kRegionInfoSize;
+            const kern_return_t err = mach_vm_region_recurse (task,
+                                                              &vm_region_base_addr,
+                                                              &vm_region_size,
+                                                              &vm_region_depth,
+                                                              (vm_region_recurse_info_t)&vm_region_info,
+                                                              &vm_region_info_size);
+            if (err)
+                break;
+            // Check all read + write regions. This will cover the thread stacks 
+            // and any regions of memory that aren't covered by the heap
+            if (vm_region_info.protection & VM_PROT_WRITE && 
+                vm_region_info.protection & VM_PROT_READ)
+            {
+                //printf ("checking vm_region: [0x%16.16llx - 0x%16.16llx)\n", (uint64_t)vm_region_base_addr, (uint64_t)vm_region_base_addr + vm_region_size);
+                range_info_callback (task, 
+                                     info->baton, 
+                                     stack_logging_type_vm_region, 
+                                     vm_region_base_addr, 
+                                     vm_region_size);
+            }
+        }
+    }
 }
 
 //----------------------------------------------------------------------
@@ -281,15 +700,17 @@ range_info_callback (task_t task, void *
     switch (info->type)
     {
     case eDataTypeAddress:
+        // Check if the current malloc block contains an address specified by "info->addr"
         if (ptr_addr <= info->addr && info->addr < end_addr)
         {
             ++info->match_count;
-            malloc_match match = { (void *)ptr_addr, ptr_size, info->addr - ptr_addr };
-            g_matches.push_back(match);            
+            malloc_match match = { (void *)ptr_addr, ptr_size, info->addr - ptr_addr, type };
+            g_matches.push_back(match, info->unique);
         }
         break;
     
     case eDataTypeContainsData:
+        // Check if the current malloc block contains data specified in "info->data"
         {
             const uint32_t size = info->data.size;
             if (size < ptr_size) // Make sure this block can contain this data
@@ -307,8 +728,8 @@ range_info_callback (task_t task, void *
                         if (memcmp (buffer, ptr_data, size) == 0)
                         {
                             ++info->match_count;
-                            malloc_match match = { (void *)ptr_addr, ptr_size, addr - ptr_addr };
-                            g_matches.push_back(match);
+                            malloc_match match = { (void *)ptr_addr, ptr_size, addr - ptr_addr, type };
+                            g_matches.push_back(match, info->unique);
                         }
                     }
                 }
@@ -319,40 +740,122 @@ range_info_callback (task_t task, void *
             }
         }
         break;
+    
+    case eDataTypeObjC:
+        // Check if the current malloc block contains an objective C object
+        // of any sort where the first pointer in the object is an OBJC class
+        // pointer (an isa)
+        {
+            malloc_block_contents *block_contents = NULL;
+            if (task_peek (task, ptr_addr, sizeof(void *), (void **)&block_contents) == KERN_SUCCESS)
+            {
+                // We assume that g_objc_classes is up to date
+                // that the class list was verified to have some classes in it
+                // before calling this function
+                const uint32_t objc_class_idx = g_objc_classes.FindClassIndex (block_contents->isa);
+                if (objc_class_idx != UINT32_MAX)
+                {
+                    bool match = false;
+                    if (info->objc.match_isa == 0)
+                    {
+                        // Match any objective C object
+                        match = true;
+                    }
+                    else 
+                    {
+                        // Only match exact isa values in the current class or
+                        // optionally in the super classes
+                        if (info->objc.match_isa == block_contents->isa)
+                            match = true;
+                        else if (info->objc.match_superclasses)
+                        {
+                            Class super = class_getSuperclass(block_contents->isa);
+                            while (super)
+                            {
+                                match = super == info->objc.match_isa;
+                                if (match)
+                                    break;
+                                super = class_getSuperclass(super);
+                            }
+                        }
+                    }
+                    if (match)
+                    {
+                        //printf (" success\n");
+                        ++info->match_count;
+                        malloc_match match = { (void *)ptr_addr, ptr_size, 0, type };
+                        g_matches.push_back(match, info->unique);
+                    }
+                    else
+                    {
+                        //printf (" error: wrong class: %s\n", dl_info.dli_sname);                        
+                    }
+                }
+                else
+                {
+                    //printf ("\terror: symbol not objc class: %s\n", dl_info.dli_sname);
+                    return;
+                }
+            }
+        }
+        break;
+
+    case eDataTypeHeapInfo:
+        // Check if the current malloc block contains an objective C object
+        // of any sort where the first pointer in the object is an OBJC class
+        // pointer (an isa)
+        {
+            malloc_block_contents *block_contents = NULL;
+            if (task_peek (task, ptr_addr, sizeof(void *), (void **)&block_contents) == KERN_SUCCESS)
+            {
+                // We assume that g_objc_classes is up to date
+                // that the class list was verified to have some classes in it
+                // before calling this function
+                const uint32_t objc_class_idx = g_objc_classes.FindClassIndex (block_contents->isa);
+                if (objc_class_idx != UINT32_MAX)
+                {
+                    // This is an objective C object
+                    g_objc_class_snapshot.AddInstance (objc_class_idx, ptr_size);
+                }
+                else
+                {
+                    // Classify other heap info
+                }
+            }
+        }
+        break;
+
     }
 }
 
 static void 
 get_stack_for_address_enumerator(mach_stack_logging_record_t stack_record, void *task_ptr)
 {
-    uint32_t num_frames = 0;
-    kern_return_t err = __mach_stack_logging_frames_for_uniqued_stack (*(task_t *)task_ptr, 
-                                                                       stack_record.stack_identifier,
-                                                                       g_stack_frames,
-                                                                       MAX_FRAMES,
-                                                                       &num_frames);    
-    g_malloc_stack_history.resize(g_malloc_stack_history.size() + 1);
-    g_malloc_stack_history.back().address = (void *)stack_record.address;
-    g_malloc_stack_history.back().type_flags = stack_record.type_flags;
-    g_malloc_stack_history.back().argument = stack_record.argument;
-    if (num_frames > 0)
-        g_malloc_stack_history.back().frames.assign(g_stack_frames, g_stack_frames + num_frames);
-    g_malloc_stack_history.back().frames.push_back(0); // Terminate the frames with zero
+    malloc_stack_entry *stack_entry = g_malloc_stack_history.next();
+    if (stack_entry)
+    {
+        stack_entry->address = (void *)stack_record.address;
+        stack_entry->type_flags = stack_record.type_flags;
+        stack_entry->argument = stack_record.argument;
+        stack_entry->num_frames = 0;
+        stack_entry->frames[0] = 0;
+        kern_return_t err = __mach_stack_logging_frames_for_uniqued_stack (*(task_t *)task_ptr, 
+                                                                           stack_record.stack_identifier,
+                                                                           stack_entry->frames,
+                                                                           MAX_FRAMES,
+                                                                           &stack_entry->num_frames);    
+        // Terminate the frames with zero if there is room
+        if (stack_entry->num_frames < MAX_FRAMES)
+            stack_entry->frames[stack_entry->num_frames] = 0; 
+    }
 }
 
 malloc_stack_entry *
 get_stack_history_for_address (const void * addr, int history)
 {
-    std::vector<malloc_stack_entry> empty;
-    g_malloc_stack_history.swap(empty);
-    if (!stack_logging_enable_logging || (history && !stack_logging_dontcompact))
-    {
-        if (history)
-            strncpy(g_error_string, "error: stack history logging is not enabled, set MallocStackLoggingNoCompact=1 in the environment when launching to enable stack history logging.", sizeof(g_error_string));
-        else
-            strncpy(g_error_string, "error: stack logging is not enabled, set MallocStackLogging=1 in the environment when launching to enable stack logging.", sizeof(g_error_string));
+    if (!stack_logging_enable_logging)
         return NULL;
-    }
+    g_malloc_stack_history.clear();
     kern_return_t err;
     task_t task = mach_task_self();
     if (history)
@@ -364,26 +867,28 @@ get_stack_history_for_address (const voi
     }
     else
     {
-        uint32_t num_frames = 0;
-        err = __mach_stack_logging_get_frames(task, (mach_vm_address_t)addr, g_stack_frames, MAX_FRAMES, &num_frames);
-        if (err == 0 && num_frames > 0)
-        {
-            g_malloc_stack_history.resize(1);
-            g_malloc_stack_history.back().address = addr;
-            g_malloc_stack_history.back().type_flags = stack_logging_type_alloc;
-            g_malloc_stack_history.back().argument = 0;
-            if (num_frames > 0)
-                g_malloc_stack_history.back().frames.assign(g_stack_frames, g_stack_frames + num_frames);
-            g_malloc_stack_history.back().frames.push_back(0); // Terminate the frames with zero
+        malloc_stack_entry *stack_entry = g_malloc_stack_history.next();
+        if (stack_entry)
+        {
+            stack_entry->address = addr;
+            stack_entry->type_flags = stack_logging_type_alloc;
+            stack_entry->argument = 0;
+            stack_entry->num_frames = 0;
+            stack_entry->frames[0] = 0;
+            err = __mach_stack_logging_get_frames(task, (mach_vm_address_t)addr, stack_entry->frames, MAX_FRAMES, &stack_entry->num_frames);
+            if (err == 0 && stack_entry->num_frames > 0)
+            {
+                // Terminate the frames with zero if there is room
+                if (stack_entry->num_frames < MAX_FRAMES)
+                    stack_entry->frames[stack_entry->num_frames] = 0;
+            }
+            else
+            {
+                g_malloc_stack_history.clear();                
+            }
         }
     }
-    // Append an empty entry
-    if (g_malloc_stack_history.empty())
-        return NULL;
-    g_malloc_stack_history.resize(g_malloc_stack_history.size() + 1);
-    g_malloc_stack_history.back().address = 0;
-    g_malloc_stack_history.back().type_flags = 0;
-    g_malloc_stack_history.back().argument = 0;
+    // Return data if there is any
     return g_malloc_stack_history.data();
 }
 
@@ -394,7 +899,7 @@ get_stack_history_for_address (const voi
 // blocks.
 //----------------------------------------------------------------------
 malloc_match *
-find_pointer_in_heap (const void * addr)
+find_pointer_in_heap (const void * addr, int check_vm_regions)
 {
     g_matches.clear();
     // Setup "info" to look for a malloc block that contains data
@@ -403,19 +908,17 @@ find_pointer_in_heap (const void * addr)
     {
         range_contains_data_callback_info_t data_info;
         data_info.type = eDataTypeContainsData;      // Check each block for data
-        g_lookup_addr = addr;
         data_info.data.buffer = (uint8_t *)&addr;    // What data? The pointer value passed in
         data_info.data.size = sizeof(addr);          // How many bytes? The byte size of a pointer
         data_info.data.align = sizeof(addr);         // Align to a pointer byte size
         data_info.match_count = 0;                   // Initialize the match count to zero
         data_info.done = false;                      // Set done to false so searching doesn't stop
-        range_callback_info_t info = { enumerate_range_in_zone, range_info_callback, &data_info };
+        data_info.unique = false;                    // Set to true when iterating on the vm_regions
+        range_callback_info_t info = { enumerate_range_in_zone, range_info_callback, &data_info, check_vm_regions };
         foreach_zone_in_this_process (&info);
+        
+        
     }
-    if (g_matches.empty())
-        return NULL;
-    malloc_match match = { NULL, 0, 0 };
-    g_matches.push_back(match);
     return g_matches.data();
 }
 
@@ -433,27 +936,96 @@ find_pointer_in_memory (uint64_t memory_
     // that is the a pointer 
     range_contains_data_callback_info_t data_info;
     data_info.type = eDataTypeContainsData;      // Check each block for data
-    g_lookup_addr = addr;
     data_info.data.buffer = (uint8_t *)&addr;    // What data? The pointer value passed in
     data_info.data.size = sizeof(addr);          // How many bytes? The byte size of a pointer
     data_info.data.align = sizeof(addr);         // Align to a pointer byte size
     data_info.match_count = 0;                   // Initialize the match count to zero
     data_info.done = false;                      // Set done to false so searching doesn't stop
+    data_info.unique = false;                    // Set to true when iterating on the vm_regions
     range_info_callback (mach_task_self(), &data_info, stack_logging_type_generic, memory_addr, memory_size);
-    if (g_matches.empty())
-        return NULL;
-    malloc_match match = { NULL, 0, 0 };
-    g_matches.push_back(match);
     return g_matches.data();
 }
 
 //----------------------------------------------------------------------
+// find_objc_objects_in_memory
+//
+// Find all instances of ObjC classes 'c', or all ObjC classes if 'c' is
+// NULL. If 'c' is non NULL, then also check objects to see if they 
+// inherit from 'c'
+//----------------------------------------------------------------------
+malloc_match *
+find_objc_objects_in_memory (void *isa, int check_vm_regions)
+{
+    g_matches.clear();
+    if (g_objc_classes.Update())
+    {
+        // Setup "info" to look for a malloc block that contains data
+        // that is the a pointer 
+        range_contains_data_callback_info_t data_info;
+        data_info.type = eDataTypeObjC;      // Check each block for data
+        data_info.objc.match_isa = isa;
+        data_info.objc.match_superclasses = true;
+        data_info.match_count = 0;                   // Initialize the match count to zero
+        data_info.done = false;                      // Set done to false so searching doesn't stop
+        data_info.unique = false;                    // Set to true when iterating on the vm_regions
+        range_callback_info_t info = { enumerate_range_in_zone, range_info_callback, &data_info, check_vm_regions };
+        foreach_zone_in_this_process (&info);
+    }
+    return g_matches.data();
+}
+
+//----------------------------------------------------------------------
+// get_heap_info
+//
+// Gather information for all allocations on the heap and report 
+// statistics.
+//----------------------------------------------------------------------
+
+void
+get_heap_info (int sort_type)
+{
+    if (g_objc_classes.Update())
+    {
+        // Reset all stats
+        g_objc_class_snapshot.Reset ();
+        // Setup "info" to look for a malloc block that contains data
+        // that is the a pointer 
+        range_contains_data_callback_info_t data_info;
+        data_info.type = eDataTypeHeapInfo; // Check each block for data
+        data_info.match_count = 0;          // Initialize the match count to zero
+        data_info.done = false;             // Set done to false so searching doesn't stop
+        data_info.unique = false;           // Set to true when iterating on the vm_regions
+        const int check_vm_regions = false;
+        range_callback_info_t info = { enumerate_range_in_zone, range_info_callback, &data_info, check_vm_regions };
+        foreach_zone_in_this_process (&info);
+        
+        // Sort and print byte total bytes
+        switch (sort_type)
+        {
+        case eSortTypeNone:
+        default:
+        case eSortTypeBytes:
+            g_objc_class_snapshot.SortByTotalBytes(g_objc_classes, true);
+            break;
+            
+        case eSortTypeCount:
+            g_objc_class_snapshot.SortByTotalCount(g_objc_classes, true);
+            break;
+        }
+    }
+    else
+    {
+        printf ("error: no objective C classes\n");
+    }
+}
+
+//----------------------------------------------------------------------
 // find_cstring_in_heap
 //
 // Finds a C string inside one or more currently valid malloc blocks.
 //----------------------------------------------------------------------
 malloc_match *
-find_cstring_in_heap (const char *s)
+find_cstring_in_heap (const char *s, int check_vm_regions)
 {
     g_matches.clear();
     if (s == NULL || s[0] == '\0')
@@ -465,18 +1037,14 @@ find_cstring_in_heap (const char *s)
     // that is the C string passed in aligned on a 1 byte boundary
     range_contains_data_callback_info_t data_info;
     data_info.type = eDataTypeContainsData;  // Check each block for data
-    g_lookup_addr = s;               // If an expression was used, then fill in the resolved address we are looking up
     data_info.data.buffer = (uint8_t *)s;    // What data? The C string passed in
     data_info.data.size = strlen(s);         // How many bytes? The length of the C string
     data_info.data.align = 1;                // Data doesn't need to be aligned, so set the alignment to 1
     data_info.match_count = 0;               // Initialize the match count to zero
     data_info.done = false;                  // Set done to false so searching doesn't stop
-    range_callback_info_t info = { enumerate_range_in_zone, range_info_callback, &data_info };
+    data_info.unique = false;                // Set to true when iterating on the vm_regions
+    range_callback_info_t info = { enumerate_range_in_zone, range_info_callback, &data_info, check_vm_regions };
     foreach_zone_in_this_process (&info);
-    if (g_matches.empty())
-        return NULL;
-    malloc_match match = { NULL, 0, 0 };
-    g_matches.push_back(match);
     return g_matches.data();
 }
 
@@ -486,22 +1054,18 @@ find_cstring_in_heap (const char *s)
 // Find the malloc block that whose address range contains "addr".
 //----------------------------------------------------------------------
 malloc_match *
-find_block_for_address (const void *addr)
+find_block_for_address (const void *addr, int check_vm_regions)
 {
     g_matches.clear();
     // Setup "info" to look for a malloc block that contains data
     // that is the C string passed in aligned on a 1 byte boundary
     range_contains_data_callback_info_t data_info;
-    g_lookup_addr = addr;               // If an expression was used, then fill in the resolved address we are looking up
     data_info.type = eDataTypeAddress;  // Check each block to see if the block contains the address passed in
     data_info.addr = (uintptr_t)addr;   // What data? The C string passed in
     data_info.match_count = 0;          // Initialize the match count to zero
     data_info.done = false;             // Set done to false so searching doesn't stop
-    range_callback_info_t info = { enumerate_range_in_zone, range_info_callback, &data_info };
+    data_info.unique = false;           // Set to true when iterating on the vm_regions
+    range_callback_info_t info = { enumerate_range_in_zone, range_info_callback, &data_info, check_vm_regions };
     foreach_zone_in_this_process (&info);
-    if (g_matches.empty())
-        return NULL;
-    malloc_match match = { NULL, 0, 0 };
-    g_matches.push_back(match);
     return g_matches.data();
 }

Modified: lldb/branches/lldb-platform-work/examples/python/cmdtemplate.py
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/examples/python/cmdtemplate.py?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/examples/python/cmdtemplate.py (original)
+++ lldb/branches/lldb-platform-work/examples/python/cmdtemplate.py Thu Jun  6 19:06:43 2013
@@ -7,12 +7,6 @@
 # import it with the full path using the "command script import" 
 # command
 #   (lldb) command script import /path/to/cmdtemplate.py
-#
-# For the shells csh, tcsh:
-#   ( setenv PYTHONPATH /path/to/LLDB.framework/Resources/Python ; ./cmdtemplate.py )
-#
-# For the shells sh, bash:
-#   PYTHONPATH=/path/to/LLDB.framework/Resources/Python ./cmdtemplate.py 
 #----------------------------------------------------------------------
 
 import lldb
@@ -20,31 +14,63 @@ import commands
 import optparse
 import shlex
 
-def ls(debugger, command, result, dict):
+def create_framestats_options():
+    usage = "usage: %prog [options]"
+    description='''This command is meant to be an example of how to make an LLDB command that
+does something useful, follows best practices, and exploits the SB API.
+Specifically, this command computes the aggregate and average size of the variables in the current frame
+and allows you to tweak exactly which variables are to be accounted in the computation.
+'''
+    parser = optparse.OptionParser(description=description, prog='framestats',usage=usage)
+    parser.add_option('-i', '--in-scope', action='store_true', dest='inscope', help='in_scope_only = True', default=False)
+    parser.add_option('-a', '--arguments', action='store_true', dest='arguments', help='arguments = True', default=False)
+    parser.add_option('-l', '--locals', action='store_true', dest='locals', help='locals = True', default=False)
+    parser.add_option('-s', '--statics', action='store_true', dest='statics', help='statics = True', default=False)
+    return parser
+
+def the_framestats_command(debugger, command, result, dict):
+    # Use the Shell Lexer to properly parse up command options just like a 
+    # shell would
     command_args = shlex.split(command)
-    usage = "usage: %prog [options] <PATH> [PATH ...]"
-    description='''This command lets you run the /bin/ls command from within lldb as a quick and easy example.'''
-    parser = optparse.OptionParser(description=description, prog='ls',usage=usage)
-    parser.add_option('-v', '--verbose', action='store_true', dest='verbose', help='display verbose debug info', default=False)
+    parser = create_framestats_options()
     try:
         (options, args) = parser.parse_args(command_args)
     except:
-        return
+        # if you don't handle exceptions, passing an incorrect argument to the OptionParser will cause LLDB to exit
+        # (courtesy of OptParse dealing with argument errors by throwing SystemExit)
+        result.SetStatus (lldb.eReturnStatusFailed)
+        return "option parsing failed" # returning a string is the same as returning an error whose description is the string
     
-    for arg in args:
-        if options.verbose:
-            result.PutCString(commands.getoutput('/bin/ls "%s"' % arg))
-        else:
-            result.PutCString(commands.getoutput('/bin/ls -lAF "%s"' % arg))
-
-if __name__ == '__main__':
-    # This script is being run from the command line, create a debugger in case we are
-    # going to use any debugger functions in our function.
-    lldb.debugger = lldb.SBDebugger.Create()
-    ls (sys.argv)
+    # in a command - the lldb.* convenience variables are not to be used
+    # and their values (if any) are undefined
+    # this is the best practice to access those objects from within a command
+    target = debugger.GetSelectedTarget()
+    process = target.GetProcess()
+    thread = process.GetSelectedThread()
+    frame = thread.GetSelectedFrame()
+    if not frame.IsValid():
+        return "no frame here"
+    # from now on, replace lldb.<thing>.whatever with <thing>.whatever
+    variables_list = frame.GetVariables(options.arguments, options.locals, options.statics, options.inscope)
+    variables_count = variables_list.GetSize()
+    if variables_count == 0:
+        result.PutCString("no variables here")
+        return
+    total_size = 0
+    for i in range(0,variables_count):
+        variable = variables_list.GetValueAtIndex(i)
+        variable_type = variable.GetType()
+        total_size = total_size + variable_type.GetByteSize()
+    average_size = float(total_size) / variables_count
+    result.PutCString("Your frame has %d variables. Their total size is %d bytes. The average size is %f bytes" % (variables_count,total_size,average_size))
+    # not returning anything is askin to returning success
 
 def __lldb_init_module (debugger, dict):
-    # This initializer is being run from LLDB in the embedded command interpreter
+    # This initializer is being run from LLDB in the embedded command interpreter    
+    # Make the options so we can generate the help text for the new LLDB 
+    # command line command prior to registering it with LLDB below
+    parser = create_framestats_options()
+    the_framestats_command.__doc__ = parser.format_help()
     # Add any commands contained in this module to LLDB
-    debugger.HandleCommand('command script add -f cmdtemplate.ls ls')
-    print '"ls" command installed, type "ls --help" for detailed help'
+    debugger.HandleCommand('command script add -f cmdtemplate.the_framestats_command framestats')
+    print 'The "framestats" command has been installed, type "help framestats" or "framestats --help" for detailed help.'

Modified: lldb/branches/lldb-platform-work/examples/python/crashlog.py
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/examples/python/crashlog.py?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/examples/python/crashlog.py (original)
+++ lldb/branches/lldb-platform-work/examples/python/crashlog.py Thu Jun  6 19:06:43 2013
@@ -26,7 +26,6 @@
 #   PYTHONPATH=/path/to/LLDB.framework/Resources/Python ./crashlog.py ~/Library/Logs/DiagnosticReports/a.crash
 #----------------------------------------------------------------------
 
-import lldb
 import commands
 import cmd
 import datetime
@@ -42,6 +41,38 @@ import string
 import sys
 import time
 import uuid
+
+try: 
+    # Just try for LLDB in case PYTHONPATH is already correctly setup
+    import lldb
+except ImportError:
+    lldb_python_dirs = list()
+    # lldb is not in the PYTHONPATH, try some defaults for the current platform
+    platform_system = platform.system()
+    if platform_system == 'Darwin':
+        # On Darwin, try the currently selected Xcode directory
+        xcode_dir = commands.getoutput("xcode-select --print-path")
+        if xcode_dir:
+            lldb_python_dirs.append(os.path.realpath(xcode_dir + '/../SharedFrameworks/LLDB.framework/Resources/Python'))
+            lldb_python_dirs.append(xcode_dir + '/Library/PrivateFrameworks/LLDB.framework/Resources/Python')
+        lldb_python_dirs.append('/System/Library/PrivateFrameworks/LLDB.framework/Resources/Python')
+    success = False
+    for lldb_python_dir in lldb_python_dirs:
+        if os.path.exists(lldb_python_dir):
+            if not (sys.path.__contains__(lldb_python_dir)):
+                sys.path.append(lldb_python_dir)
+                try: 
+                    import lldb
+                except ImportError:
+                    pass
+                else:
+                    print 'imported lldb from: "%s"' % (lldb_python_dir)
+                    success = True
+                    break
+    if not success:
+        print "error: couldn't locate the 'lldb' module, please set PYTHONPATH correctly"
+        sys.exit(1)
+
 from lldb.utils import symbolication
 
 PARSE_MODE_NORMAL = 0
@@ -52,9 +83,10 @@ PARSE_MODE_SYSTEM = 4
 
 class CrashLog(symbolication.Symbolicator):
     """Class that does parses darwin crash logs"""
+    parent_process_regex = re.compile('^Parent Process:\s*(.*)\[(\d+)\]');
     thread_state_regex = re.compile('^Thread ([0-9]+) crashed with')
     thread_regex = re.compile('^Thread ([0-9]+)([^:]*):(.*)')
-    frame_regex = re.compile('^([0-9]+) +([^ ]+) *\t(0x[0-9a-fA-F]+) +(.*)')
+    frame_regex = re.compile('^([0-9]+) +([^ ]+) *\t?(0x[0-9a-fA-F]+) +(.*)')
     image_regex_uuid = re.compile('(0x[0-9a-fA-F]+)[- ]+(0x[0-9a-fA-F]+) +[+]?([^ ]+) +([^<]+)<([-0-9a-fA-F]+)> (.*)');
     image_regex_no_uuid = re.compile('(0x[0-9a-fA-F]+)[- ]+(0x[0-9a-fA-F]+) +[+]?([^ ]+) +([^/]+)/(.*)');
     empty_line_regex = re.compile('^$')
@@ -234,9 +266,10 @@ class CrashLog(symbolication.Symbolicato
                     else:
                         self.process = version_string
                         self.process_compatability_version = version_string
-                elif line.startswith ('Parent Process:'):
-                    (self.parent_process_name, pid_with_brackets) = line[15:].strip().split()
-                    self.parent_process_id = pid_with_brackets.strip('[]') 
+                elif self.parent_process_regex.search(line):
+                    parent_process_match = self.parent_process_regex.search(line)
+                    self.parent_process_name = parent_process_match.group(1)
+                    self.parent_process_id = parent_process_match.group(2)
                 elif line.startswith ('Exception Type:'):
                     self.thread_exception = line[15:].strip()
                     continue
@@ -316,7 +349,8 @@ class CrashLog(symbolication.Symbolicato
 
             elif parse_mode == PARSE_MODE_THREGS:
                 stripped_line = line.strip()
-                reg_values = re.split('  +', stripped_line);
+                # "r12: 0x00007fff6b5939c8  r13: 0x0000000007000006  r14: 0x0000000000002a03  r15: 0x0000000000000c00"
+                reg_values = re.findall ('([a-zA-Z0-9]+: 0[Xx][0-9a-fA-F]+) *', stripped_line);
                 for reg_value in reg_values:
                     #print 'reg_value = "%s"' % reg_value
                     (reg, value) = reg_value.split(': ')
@@ -586,6 +620,14 @@ def SymbolicateCrashLog(crash_log, optio
         print 'error: no images in crash log'
         return
 
+    if options.dump_image_list:
+        print "Binary Images:"
+        for image in crash_log.images:
+            if options.verbose:
+                print image.debug_dump()
+            else:
+                print image
+
     target = crash_log.create_target ()
     if not target:
         return
@@ -638,10 +680,10 @@ def SymbolicateCrashLog(crash_log, optio
         for frame_idx, frame in enumerate(thread.frames):
             disassemble = (this_thread_crashed or options.disassemble_all_threads) and frame_idx < options.disassemble_depth;
             if frame_idx == 0:
-                symbolicated_frame_addresses = crash_log.symbolicate (frame.pc, options.verbose)
+                symbolicated_frame_addresses = crash_log.symbolicate (frame.pc & crash_log.addr_mask, options.verbose)
             else:
                 # Any frame above frame zero and we have to subtract one to get the previous line entry
-                symbolicated_frame_addresses = crash_log.symbolicate (frame.pc - 1, options.verbose)
+                symbolicated_frame_addresses = crash_log.symbolicate ((frame.pc & crash_log.addr_mask) - 1, options.verbose)
             
             if symbolicated_frame_addresses:
                 symbolicated_frame_address_idx = 0
@@ -677,11 +719,6 @@ def SymbolicateCrashLog(crash_log, optio
                 print frame
         print                
 
-    if options.dump_image_list:
-        print "Binary Images:"
-        for image in crash_log.images:
-            print image
-
 def CreateSymbolicateCrashLogOptions(command_name, description, add_interactive_options):
     usage = "usage: %prog [options] <FILE> [FILE ...]"
     option_parser = optparse.OptionParser(description=description, prog='crashlog',usage=usage)
@@ -736,7 +773,6 @@ be disassembled and lookups can be perfo
                 SymbolicateCrashLog (crash_log, options)
 if __name__ == '__main__':
     # Create a new debugger instance
-    print 'main'
     lldb.debugger = lldb.SBDebugger.Create()
     SymbolicateCrashLogs (sys.argv[1:])
 elif getattr(lldb, 'debugger', None):

Copied: lldb/branches/lldb-platform-work/examples/python/diagnose_unwind.py (from r182522, lldb/trunk/examples/python/diagnose_unwind.py)
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/examples/python/diagnose_unwind.py?p2=lldb/branches/lldb-platform-work/examples/python/diagnose_unwind.py&p1=lldb/trunk/examples/python/diagnose_unwind.py&r1=182522&r2=183468&rev=183468&view=diff
==============================================================================
--- lldb/trunk/examples/python/diagnose_unwind.py (original)
+++ lldb/branches/lldb-platform-work/examples/python/diagnose_unwind.py Thu Jun  6 19:06:43 2013
@@ -1,8 +1,10 @@
-# This implements the "diagnose-unwind" command, usually installed in the debug session like
-#   script import lldb.macosx
-# it is used when lldb's backtrace fails -- it collects and prints information about the stack frames,
-# and tries an alternate unwind algorithm, that will help to understand why lldb's unwind algorithm did
-# not succeed.
+# This implements the "diagnose-unwind" command, usually installed
+# in the debug session like
+#   command script import lldb.diagnose
+# it is used when lldb's backtrace fails -- it collects and prints
+# information about the stack frames, and tries an alternate unwind
+# algorithm, that will help to understand why lldb's unwind algorithm
+# did not succeed.
 
 import optparse
 import lldb
@@ -88,8 +90,14 @@ def simple_backtrace(debugger):
   backtrace_print_frame (target, frame_num, cur_pc, cur_fp)
 
 def diagnose_unwind(debugger, command, result, dict):
-  # Use the Shell Lexer to properly parse up command options just like a
-  # shell would
+  """
+Gather diagnostic information to help debug incorrect unwind (backtrace) 
+behavior in lldb.  When there is a backtrace that doesn't look
+correct, run this command with the correct thread selected and a
+large amount of diagnostic information will be printed, it is likely
+to be helpful when reporting the problem.
+  """
+
   command_args = shlex.split(command)
   parser = create_diagnose_unwind_options()
   try:
@@ -110,6 +118,7 @@ def diagnose_unwind(debugger, command, r
         if len(lldb_versions_match.groups()) >= 5 and lldb_versions_match.groups()[4]:
           lldb_minor = int(lldb_versions_match.groups()[4])
 
+        print 'LLDB version %s' % debugger.GetVersionString()
         print 'Unwind diagnostics for thread %d' % thread.GetIndexID()
         print ""
         print "lldb's unwind algorithm:"

Modified: lldb/branches/lldb-platform-work/examples/python/gdbremote.py
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/examples/python/gdbremote.py?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/examples/python/gdbremote.py (original)
+++ lldb/branches/lldb-platform-work/examples/python/gdbremote.py Thu Jun  6 19:06:43 2013
@@ -835,6 +835,7 @@ gdb_remote_commands = {
     'QStartNoAckMode'         : { 'cmd' : cmd_query_packet  , 'rsp' : rsp_ok_means_supported  , 'name' : "query if no ack mode is supported"},
     'QThreadSuffixSupported'  : { 'cmd' : cmd_query_packet  , 'rsp' : rsp_ok_means_supported  , 'name' : "query if thread suffix is supported" },
     'QListThreadsInStopReply' : { 'cmd' : cmd_query_packet  , 'rsp' : rsp_ok_means_supported  , 'name' : "query if threads in stop reply packets are supported" },
+    'qVAttachOrWaitSupported' : { 'cmd' : cmd_query_packet  , 'rsp' : rsp_ok_means_supported  , 'name' : "query if threads attach with optional wait is supported" },
     'qHostInfo'               : { 'cmd' : cmd_query_packet  , 'rsp' : rsp_dump_key_value_pairs, 'name' : "get host information" },
     'vCont'                   : { 'cmd' : cmd_vCont         , 'rsp' : rsp_vCont               , 'name' : "extended continue command" },
     'vAttach'                 : { 'cmd' : cmd_vAttach       , 'rsp' : rsp_stop_reply          , 'name' : "attach to process" },

Modified: lldb/branches/lldb-platform-work/examples/python/symbolication.py
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/examples/python/symbolication.py?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/examples/python/symbolication.py (original)
+++ lldb/branches/lldb-platform-work/examples/python/symbolication.py Thu Jun  6 19:06:43 2013
@@ -211,10 +211,25 @@ class Image:
         self.module = None
         self.symfile = None
         self.slide = None
+        
     
     def dump(self, prefix):
         print "%s%s" % (prefix, self)
-    
+
+    def debug_dump(self):
+        print 'path = "%s"' % (self.path)
+        print 'resolved_path = "%s"' % (self.resolved_path)
+        print 'resolved = %i' % (self.resolved)
+        print 'unavailable = %i' % (self.unavailable)
+        print 'uuid = %s' % (self.uuid)
+        print 'section_infos = %s' % (self.section_infos)
+        print 'identifier = "%s"' % (self.identifier)
+        print 'version = %s' % (self.version)
+        print 'arch = %s' % (self.arch)
+        print 'module = %s' % (self.module)
+        print 'symfile = "%s"' % (self.symfile)
+        print 'slide = %i (0x%x)' % (self.slide, self.slide)
+        
     def __str__(self):
         s = "%s %s %s" % (self.get_uuid(), self.version, self.get_resolved_path())
         for section_info in self.section_infos:
@@ -363,7 +378,7 @@ class Symbolicator:
         """A class the represents the information needed to symbolicate addresses in a program"""
         self.target = None
         self.images = list() # a list of images to be used when symbolicating
-
+        self.addr_mask = 0xffffffffffffffff
     
     def __str__(self):
         s = "Symbolicator:\n"
@@ -398,6 +413,12 @@ class Symbolicator:
             for image in self.images:
                 self.target = image.create_target ()
                 if self.target:
+                    if self.target.GetAddressByteSize() == 4:
+                        triple = self.target.triple
+                        if triple:
+                            arch = triple.split('-')[0]
+                            if "arm" in arch:
+                                self.addr_mask = 0xfffffffffffffffe
                     return self.target
         return None
     
@@ -405,9 +426,19 @@ class Symbolicator:
         if not self.target:
             self.create_target()
         if self.target:
-            image = self.find_image_containing_load_addr (load_addr)
-            if image:
-                image.add_module (self.target)
+            live_process = False
+            process = self.target.process
+            if process:
+                state = process.state
+                if state > lldb.eStateUnloaded and state < lldb.eStateDetached:
+                    live_process = True
+            # If we don't have a live process, we can attempt to find the image
+            # that a load address belongs to and lazily load its module in the
+            # target, but we shouldn't do any of this if we have a live process
+            if not live_process:
+                image = self.find_image_containing_load_addr (load_addr)
+                if image:
+                    image.add_module (self.target)
             symbolicated_address = Address(self.target, load_addr)
             if symbolicated_address.symbolicate (verbose):
                 if symbolicated_address.so_addr:

Modified: lldb/branches/lldb-platform-work/examples/summaries/cocoa/CFArray.py
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/examples/summaries/cocoa/CFArray.py?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/examples/summaries/cocoa/CFArray.py (original)
+++ lldb/branches/lldb-platform-work/examples/summaries/cocoa/CFArray.py Thu Jun  6 19:06:43 2013
@@ -5,7 +5,8 @@ part of The LLVM Compiler Infrastructure
 This file is distributed under the University of Illinois Open Source
 License. See LICENSE.TXT for details.
 """
-# synthetic children provider for NSArray
+# example summary provider for NSArray
+# the real summary is now C++ code built into LLDB
 import lldb
 import ctypes
 import lldb.runtime.objc.objc_runtime

Modified: lldb/branches/lldb-platform-work/examples/summaries/cocoa/CFBag.py
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/examples/summaries/cocoa/CFBag.py?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/examples/summaries/cocoa/CFBag.py (original)
+++ lldb/branches/lldb-platform-work/examples/summaries/cocoa/CFBag.py Thu Jun  6 19:06:43 2013
@@ -5,7 +5,8 @@ part of The LLVM Compiler Infrastructure
 This file is distributed under the University of Illinois Open Source
 License. See LICENSE.TXT for details.
 """
-# summary provider for CFBag
+# example summary provider for CFBag
+# the real summary is now C++ code built into LLDB
 import lldb
 import ctypes
 import lldb.runtime.objc.objc_runtime

Modified: lldb/branches/lldb-platform-work/examples/summaries/cocoa/CFBinaryHeap.py
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/examples/summaries/cocoa/CFBinaryHeap.py?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/examples/summaries/cocoa/CFBinaryHeap.py (original)
+++ lldb/branches/lldb-platform-work/examples/summaries/cocoa/CFBinaryHeap.py Thu Jun  6 19:06:43 2013
@@ -5,7 +5,8 @@ part of The LLVM Compiler Infrastructure
 This file is distributed under the University of Illinois Open Source
 License. See LICENSE.TXT for details.
 """
-# summary provider for CFBinaryHeap
+# example summary provider for CFBinaryHeap
+# the real summary is now C++ code built into LLDB
 import lldb
 import ctypes
 import lldb.runtime.objc.objc_runtime

Modified: lldb/branches/lldb-platform-work/examples/summaries/cocoa/CFDictionary.py
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/examples/summaries/cocoa/CFDictionary.py?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/examples/summaries/cocoa/CFDictionary.py (original)
+++ lldb/branches/lldb-platform-work/examples/summaries/cocoa/CFDictionary.py Thu Jun  6 19:06:43 2013
@@ -5,7 +5,8 @@ part of The LLVM Compiler Infrastructure
 This file is distributed under the University of Illinois Open Source
 License. See LICENSE.TXT for details.
 """
-# summary provider for NSDictionary
+# example summary provider for NSDictionary
+# the real summary is now C++ code built into LLDB
 import lldb
 import ctypes
 import lldb.runtime.objc.objc_runtime

Modified: lldb/branches/lldb-platform-work/examples/summaries/cocoa/CFString.py
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/examples/summaries/cocoa/CFString.py?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/examples/summaries/cocoa/CFString.py (original)
+++ lldb/branches/lldb-platform-work/examples/summaries/cocoa/CFString.py Thu Jun  6 19:06:43 2013
@@ -5,8 +5,8 @@ part of The LLVM Compiler Infrastructure
 This file is distributed under the University of Illinois Open Source
 License. See LICENSE.TXT for details.
 """
-# synthetic children and summary provider for CFString
-# (and related NSString class)
+# example synthetic children and summary provider for CFString (and related NSString class)
+# the real code is part of the LLDB core
 import lldb
 import lldb.runtime.objc.objc_runtime
 import lldb.formatters.Logger

Modified: lldb/branches/lldb-platform-work/examples/summaries/cocoa/Logger.py
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/examples/summaries/cocoa/Logger.py?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/examples/summaries/cocoa/Logger.py (original)
+++ lldb/branches/lldb-platform-work/examples/summaries/cocoa/Logger.py Thu Jun  6 19:06:43 2013
@@ -58,10 +58,10 @@ class FileLogger:
 			self.file = None
 
 # to enable logging:
-# define Logger._lldb_formatters_debug_level to any number greater than 0
+# define lldb.formatters.Logger._lldb_formatters_debug_level to any number greater than 0
 # if you define it to any value greater than 1, the log will be automatically flushed after each write (slower but should make sure most of the stuff makes it to the log even if we crash)
 # if you define it to any value greater than 2, the calling function's details will automatically be logged (even slower, but provides additional details)
-# if you need the log to go to a file instead of on screen, define Logger._lldb_formatters_debug_filename to a valid filename
+# if you need the log to go to a file instead of on screen, define lldb.formatters.Logger._lldb_formatters_debug_filename to a valid filename
 class Logger:
 	def __init__(self,autoflush=False,logcaller=False):
 		global _lldb_formatters_debug_level

Modified: lldb/branches/lldb-platform-work/examples/summaries/cocoa/NSBundle.py
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/examples/summaries/cocoa/NSBundle.py?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/examples/summaries/cocoa/NSBundle.py (original)
+++ lldb/branches/lldb-platform-work/examples/summaries/cocoa/NSBundle.py Thu Jun  6 19:06:43 2013
@@ -5,7 +5,8 @@ part of The LLVM Compiler Infrastructure
 This file is distributed under the University of Illinois Open Source
 License. See LICENSE.TXT for details.
 """
-# summary provider for NSBundle
+# example summary provider for NSBundle
+# the real summary is now C++ code built into LLDB
 import lldb
 import ctypes
 import lldb.runtime.objc.objc_runtime

Modified: lldb/branches/lldb-platform-work/examples/summaries/cocoa/NSData.py
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/examples/summaries/cocoa/NSData.py?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/examples/summaries/cocoa/NSData.py (original)
+++ lldb/branches/lldb-platform-work/examples/summaries/cocoa/NSData.py Thu Jun  6 19:06:43 2013
@@ -5,7 +5,8 @@ part of The LLVM Compiler Infrastructure
 This file is distributed under the University of Illinois Open Source
 License. See LICENSE.TXT for details.
 """
-# summary provider for NSData
+# example summary provider for NSData
+# the real summary is now C++ code built into LLDB
 import lldb
 import ctypes
 import lldb.runtime.objc.objc_runtime

Modified: lldb/branches/lldb-platform-work/examples/summaries/cocoa/NSDate.py
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/examples/summaries/cocoa/NSDate.py?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/examples/summaries/cocoa/NSDate.py (original)
+++ lldb/branches/lldb-platform-work/examples/summaries/cocoa/NSDate.py Thu Jun  6 19:06:43 2013
@@ -5,7 +5,8 @@ part of The LLVM Compiler Infrastructure
 This file is distributed under the University of Illinois Open Source
 License. See LICENSE.TXT for details.
 """
-# summary provider for NSDate
+# example summary provider for NSDate
+# the real summary is now C++ code built into LLDB
 import lldb
 import ctypes
 import lldb.runtime.objc.objc_runtime
@@ -78,6 +79,8 @@ class NSTaggedDate_SummaryProvider:
 		# while all Python knows about is the "epoch", which is a platform-dependent
 		# year (1970 of *nix) whose Jan 1 at midnight is taken as reference
 		value_double = struct.unpack('d', struct.pack('Q', self.data))[0]
+		if value_double == -63114076800.0:
+			return '0001-12-30 00:00:00 +0000'
 		return xcode_format_count(osx_to_python_time(value_double))
 
 
@@ -106,7 +109,9 @@ class NSUntaggedDate_SummaryProvider:
 		value = self.valobj.CreateChildAtOffset("value",
 							self.offset(),
 							self.sys_params.types_cache.double)
-		value_double = struct.unpack('d', struct.pack('Q', value.GetValueAsUnsigned(0)))[0]
+		value_double = struct.unpack('d', struct.pack('Q', value.GetData().uint64[0]))[0]
+		if value_double == -63114076800.0:
+			return '0001-12-30 00:00:00 +0000'
 		return xcode_format_count(osx_to_python_time(value_double))
 
 class NSCalendarDate_SummaryProvider:
@@ -134,7 +139,7 @@ class NSCalendarDate_SummaryProvider:
 		value = self.valobj.CreateChildAtOffset("value",
 							self.offset(),
 							self.sys_params.types_cache.double)
-		value_double = struct.unpack('d', struct.pack('Q', value.GetValueAsUnsigned(0)))[0]
+		value_double = struct.unpack('d', struct.pack('Q', value.GetData().uint64[0]))[0]
 		return xcode_format_count(osx_to_python_time(value_double))
 
 class NSTimeZoneClass_SummaryProvider:
@@ -251,7 +256,7 @@ def NSTimeZone_SummaryProvider (valobj,d
 def CFAbsoluteTime_SummaryProvider (valobj,dict):
 	logger = lldb.formatters.Logger.Logger()
 	try:
-		value_double = struct.unpack('d', struct.pack('Q', valobj.GetValueAsUnsigned(0)))[0]
+		value_double = struct.unpack('d', struct.pack('Q', valobj.GetData().uint64[0]))[0]
 		return xcode_format_count(osx_to_python_time(value_double))
 	except:
 		return 'Summary Unavailable'

Modified: lldb/branches/lldb-platform-work/examples/summaries/cocoa/NSIndexSet.py
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/examples/summaries/cocoa/NSIndexSet.py?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/examples/summaries/cocoa/NSIndexSet.py (original)
+++ lldb/branches/lldb-platform-work/examples/summaries/cocoa/NSIndexSet.py Thu Jun  6 19:06:43 2013
@@ -5,7 +5,8 @@ part of The LLVM Compiler Infrastructure
 This file is distributed under the University of Illinois Open Source
 License. See LICENSE.TXT for details.
 """
-# summary provider for NS(Mutable)IndexSet
+# example summary provider for NS(Mutable)IndexSet
+# the real summary is now C++ code built into LLDB
 import lldb
 import ctypes
 import lldb.runtime.objc.objc_runtime
@@ -32,8 +33,12 @@ class NSIndexSetClass_SummaryProvider:
 		if not(self.sys_params.types_cache.NSUInteger):
 			if self.sys_params.is_64_bit:
 				self.sys_params.types_cache.NSUInteger = self.valobj.GetType().GetBasicType(lldb.eBasicTypeUnsignedLong)
+				self.sys_params.types_cache.uint32 = self.valobj.GetType().GetBasicType(lldb.eBasicTypeUnsignedInt)
 			else:
 				self.sys_params.types_cache.NSUInteger = self.valobj.GetType().GetBasicType(lldb.eBasicTypeUnsignedInt)
+				self.sys_params.types_cache.uint32 = self.valobj.GetType().GetBasicType(lldb.eBasicTypeUnsignedInt)
+		if not(self.sys_params.types_cache.uint32):
+			self.sys_params.types_cache.uint32 = self.valobj.GetType().GetBasicType(lldb.eBasicTypeUnsignedInt)
 		self.update();
 
 	def update(self):
@@ -44,21 +49,22 @@ class NSIndexSetClass_SummaryProvider:
 	# the count is stored in the set itself, 3 pointers into it
 	# otherwise, it will store a pointer to an additional data structure (2 pointers into itself) and this
 	# additional structure will contain the count two pointers deep
-	# to distinguish the two modes, one reads two pointers deep into the object data: if only the MSB
-	# is set, then we are in mode 1, using that area to store flags, otherwise, the read pointer is the
-	# location to go look for count in mode 2
+	# a bunch of flags allow us to detect an empty set, vs. a one-range set, vs. a multi-range set
 	def count(self):
 		logger = lldb.formatters.Logger.Logger()
 		mode_chooser_vo = self.valobj.CreateChildAtOffset("mode_chooser",
-							2*self.sys_params.pointer_size,
-							self.sys_params.types_cache.NSUInteger)
+							self.sys_params.pointer_size,
+							self.sys_params.types_cache.uint32)
 		mode_chooser =  mode_chooser_vo.GetValueAsUnsigned(0)
 		if self.sys_params.is_64_bit:
-			mode_chooser = mode_chooser & 0xFFFFFFFFFFFFFF00
-		else:
-			mode_chooser = mode_chooser & 0xFFFFFF00
-		if mode_chooser == 0:
+			mode_chooser = mode_chooser & 0x00000000FFFFFFFF
+		# empty set
+		if mode_chooser & 0x01 == 1:
+			return 0
+		# single range
+		if mode_chooser & 0x02 == 2:
 			mode = 1
+		# multi range
 		else:
 			mode = 2
 		if mode == 1:
@@ -66,9 +72,11 @@ class NSIndexSetClass_SummaryProvider:
 								3*self.sys_params.pointer_size,
 								self.sys_params.types_cache.NSUInteger)
 		else:
-			count_ptr = mode_chooser_vo.GetValueAsUnsigned(0)
+			count_ptr = self.valobj.CreateChildAtOffset("count_ptr",
+								2*self.sys_params.pointer_size,
+								self.sys_params.types_cache.NSUInteger)
 			count_vo = self.valobj.CreateValueFromAddress("count",
-								count_ptr+2*self.sys_params.pointer_size,
+								count_ptr.GetValueAsUnsigned()+2*self.sys_params.pointer_size,
 								self.sys_params.types_cache.NSUInteger)
 		return count_vo.GetValueAsUnsigned(0)
 
@@ -133,7 +141,7 @@ def NSIndexSet_SummaryProvider (valobj,d
 		if isinstance(summary, basestring):
 			return summary
 		else:
-			summary = str(summary) + (' objects' if summary != 1 else ' object')
+			summary = str(summary) + (' indexes' if summary != 1 else ' index')
 		return summary
 	return 'Summary Unavailable'
 

Modified: lldb/branches/lldb-platform-work/examples/summaries/cocoa/NSMachPort.py
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/examples/summaries/cocoa/NSMachPort.py?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/examples/summaries/cocoa/NSMachPort.py (original)
+++ lldb/branches/lldb-platform-work/examples/summaries/cocoa/NSMachPort.py Thu Jun  6 19:06:43 2013
@@ -5,7 +5,8 @@ part of The LLVM Compiler Infrastructure
 This file is distributed under the University of Illinois Open Source
 License. See LICENSE.TXT for details.
 """
-# summary provider for NSData
+# example summary provider for NSMachPort
+# the real summary is now C++ code built into LLDB
 import lldb
 import ctypes
 import lldb.runtime.objc.objc_runtime

Modified: lldb/branches/lldb-platform-work/examples/summaries/cocoa/NSNotification.py
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/examples/summaries/cocoa/NSNotification.py?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/examples/summaries/cocoa/NSNotification.py (original)
+++ lldb/branches/lldb-platform-work/examples/summaries/cocoa/NSNotification.py Thu Jun  6 19:06:43 2013
@@ -5,7 +5,8 @@ part of The LLVM Compiler Infrastructure
 This file is distributed under the University of Illinois Open Source
 License. See LICENSE.TXT for details.
 """
-# summary provider for class NSNotification
+# example summary provider for NSNotification
+# the real summary is now C++ code built into LLDB
 import lldb.runtime.objc.objc_runtime
 import lldb.formatters.metrics
 import CFString

Modified: lldb/branches/lldb-platform-work/examples/summaries/cocoa/NSNumber.py
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/examples/summaries/cocoa/NSNumber.py?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/examples/summaries/cocoa/NSNumber.py (original)
+++ lldb/branches/lldb-platform-work/examples/summaries/cocoa/NSNumber.py Thu Jun  6 19:06:43 2013
@@ -5,7 +5,8 @@ part of The LLVM Compiler Infrastructure
 This file is distributed under the University of Illinois Open Source
 License. See LICENSE.TXT for details.
 """
-# summary provider for NSNumber
+# example summary provider for NSNumber
+# the real summary is now C++ code built into LLDB
 import lldb
 import ctypes
 import lldb.runtime.objc.objc_runtime
@@ -53,7 +54,7 @@ class NSTaggedNumber_SummaryProvider:
 		if self.info_bits == 12:
 			return '(long)' + str(ctypes.c_long(self.data).value)
 		else:
-			return 'absurd value:(info=' + str(self.info_bits) + ", value = " + str(self.data) + ')'
+			return 'unexpected value:(info=' + str(self.info_bits) + ", value = " + str(self.data) + ')'
 
 
 class NSUntaggedNumber_SummaryProvider:
@@ -157,7 +158,7 @@ class NSUntaggedNumber_SummaryProvider:
 			statistics.metric_hit('code_notrun',self.valobj)
 			return '(double)' + str(data_double)
 		statistics.metric_hit('unknown_class',str(valobj.GetName()) + " had unknown data_type " + str(data_type))
-		return 'absurd: dt = ' + str(data_type)
+		return 'unexpected: dt = ' + str(data_type)
 
 
 class NSUnknownNumber_SummaryProvider:

Modified: lldb/branches/lldb-platform-work/examples/summaries/cocoa/NSURL.py
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/examples/summaries/cocoa/NSURL.py?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/examples/summaries/cocoa/NSURL.py (original)
+++ lldb/branches/lldb-platform-work/examples/summaries/cocoa/NSURL.py Thu Jun  6 19:06:43 2013
@@ -43,7 +43,10 @@ class NSURLKnown_SummaryProvider:
 	# one pointer is the ISA
 	# then there is one more pointer and 8 bytes of plain data
 	# (which are also present on a 32-bit system)
-	# plus another pointer, and then the real data
+	# then there is a pointer to an NSString which is the url text
+	# optionally, the next pointer is another NSURL which is the "base"
+	# of this one when doing NSURLs composition (incidentally, NSURLs can
+	# recurse the base+text mechanism to any desired depth)
 	def offset_text(self):
 		logger = lldb.formatters.Logger.Logger()
 		return 24 if self.sys_params.is_64_bit else 16

Modified: lldb/branches/lldb-platform-work/examples/summaries/cocoa/objc_runtime.py
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/examples/summaries/cocoa/objc_runtime.py?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/examples/summaries/cocoa/objc_runtime.py (original)
+++ lldb/branches/lldb-platform-work/examples/summaries/cocoa/objc_runtime.py Thu Jun  6 19:06:43 2013
@@ -75,7 +75,10 @@ class Utilities:
 		logger = lldb.formatters.Logger.Logger()
 		# assume the only thing that has a Foundation.framework is a Mac
 		# assume anything < Lion does not even exist
-		mod = target.module['Foundation']
+		try:
+			mod = target.module['Foundation']
+		except:
+			mod = None
 		if mod is None or mod.IsValid() == 0:
 			return None
 		ver = mod.GetVersion()
@@ -101,9 +104,8 @@ class Utilities:
 			return class_data,wrapper
 		if class_data.is_kvo():
 			class_data = class_data.get_superclass()
-		if class_data.is_valid() == 0:
-			statistics.metric_hit('invalid_isa',valobj)
-			wrapper = InvalidISA_Description()
+		if class_data.class_name() == '_NSZombie_OriginalClass':
+			wrapper = ThisIsZombie_Description()
 			return class_data,wrapper
 		return class_data,None
 
@@ -240,17 +242,6 @@ class Class_Data_V2:
 			logger >> "Marking as invalid - cachePointer is not allowed"
 			self.valid = 0
 			return
-
-		self.vtablePointer = Utilities.read_child_of(self.valobj,3*self.sys_params.pointer_size,self.sys_params.types_cache.addr_ptr_type)
-		if not(Utilities.is_valid_pointer(self.vtablePointer,self.sys_params.pointer_size,allow_tagged=0)):
-			logger >> "Marking as invalid - vtablePointer is invalid"
-			self.valid = 0
-			return
-		if not(Utilities.is_allowed_pointer(self.vtablePointer)):
-			logger >> "Marking as invalid - vtablePointer is not allowed"
-			self.valid = 0
-			return
-
 		self.dataPointer = Utilities.read_child_of(self.valobj,4*self.sys_params.pointer_size,self.sys_params.types_cache.addr_ptr_type)
 		if not(Utilities.is_valid_pointer(self.dataPointer,self.sys_params.pointer_size,allow_tagged=0)):
 			logger >> "Marking as invalid - dataPointer is invalid"
@@ -319,7 +310,6 @@ class Class_Data_V2:
 		return 'isaPointer = ' + hex(self.isaPointer) + "\n" + \
 		 "superclassIsaPointer = " + hex(self.superclassIsaPointer) + "\n" + \
 		 "cachePointer = " + hex(self.cachePointer) + "\n" + \
-		 "vtablePointer = " + hex(self.vtablePointer) + "\n" + \
 		 "data = " + hex(self.dataPointer)
 
 	def is_tagged(self):
@@ -592,7 +582,7 @@ class SystemParameters:
 		global isa_caches
 
 		process = valobj.GetTarget().GetProcess()
-		self.pid = process.GetProcessID()
+		self.pid = process.GetUniqueID() # using the unique ID for added guarantees (see svn revision 172628 for further details)
 
 		if runtime_version.look_for_key(self.pid):
 			self.runtime_version = runtime_version.get_value(self.pid)
@@ -786,3 +776,6 @@ class InvalidISA_Description(SpecialSitu
 	def message(self):
 		return '<not an Objective-C object>'
 
+class ThisIsZombie_Description(SpecialSituation_Description):
+	def message(self):
+		return '<freed object>'
\ No newline at end of file

Modified: lldb/branches/lldb-platform-work/examples/synthetic/bitfield/example.py
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/examples/synthetic/bitfield/example.py?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/examples/synthetic/bitfield/example.py (original)
+++ lldb/branches/lldb-platform-work/examples/synthetic/bitfield/example.py Thu Jun  6 19:06:43 2013
@@ -13,6 +13,12 @@ class MaskedData_SyntheticChildrenProvid
 		# answer questions about N children
 		return 4
 
+	def has_children(self):
+		# we simply say True here because we know we have 4 children
+		# in general, you want to make this calculation as simple as possible
+		# and return True if in doubt (you can always return num_children == 0 later)
+		return True
+
 	def get_child_index(self,name): 
 		# given a name, return its index
 		# you can return None if you don't know the answer for a given name

Modified: lldb/branches/lldb-platform-work/examples/synthetic/gnu_libstdcpp.py
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/examples/synthetic/gnu_libstdcpp.py?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/examples/synthetic/gnu_libstdcpp.py (original)
+++ lldb/branches/lldb-platform-work/examples/synthetic/gnu_libstdcpp.py Thu Jun  6 19:06:43 2013
@@ -3,7 +3,7 @@ import lldb.formatters.Logger
 
 # C++ STL formatters for LLDB
 # These formatters are based upon the version of the GNU libstdc++
-# as it ships with Mac OS X 10.6.8 thru 10.7.3
+# as it ships with Mac OS X 10.6.8 thru 10.8.0
 # You are encouraged to look at the STL implementation for your platform
 # before relying on these formatters to do the right thing for your setup
 
@@ -132,6 +132,9 @@ class StdListSynthProvider:
 		except:
 			pass
 
+	def has_children(self):
+		return True
+
 class StdVectorSynthProvider:
 
 	def __init__(self, valobj, dict):
@@ -225,6 +228,10 @@ class StdVectorSynthProvider:
 				self.count = 0
 		except:
 			pass
+			
+
+	def has_children(self):
+		return True
 
 
 class StdMapSynthProvider:
@@ -408,6 +415,8 @@ class StdMapSynthProvider:
 				x = y;
 			return x;
 
+	def has_children(self):
+		return True
 
 _map_capping_size = 255
 _list_capping_size = 255

Modified: lldb/branches/lldb-platform-work/examples/synthetic/libcxx.py
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/examples/synthetic/libcxx.py?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/examples/synthetic/libcxx.py (original)
+++ lldb/branches/lldb-platform-work/examples/synthetic/libcxx.py Thu Jun  6 19:06:43 2013
@@ -6,6 +6,9 @@ import lldb.formatters.Logger
 # ships with current releases of OS X - They will not work for other implementations
 # of the standard C++ library - and they are bound to use the libc++-specific namespace
 
+# the std::string summary is just an example for your convenience
+# the actual summary that LLDB uses is C++ code inside the debugger's own core
+
 # this could probably be made more efficient but since it only reads a handful of bytes at a time
 # we probably don't need to worry too much about this for the time being
 def make_string(F,L):
@@ -44,9 +47,12 @@ def stdstring_SummaryProvider(valobj,dic
 		data_ptr = l.GetChildAtIndex(2)
 		size_vo = l.GetChildAtIndex(1)
 		size = size_vo.GetValueAsUnsigned(0)+1 # the NULL terminator must be accounted for
-		if size <= 1: # should never be the case
+		if size <= 1 or size == None: # should never be the case
+			return '""'
+		try:
+			data = data_ptr.GetPointeeData(0,size)
+		except:
 			return '""'
-		data = data_ptr.GetPointeeData(0,size)
 		error = lldb.SBError()
 		strval = data.GetString(error,0)
 		if error.Fail():
@@ -121,6 +127,9 @@ class stdvector_SynthProvider:
 		except:
 			pass
 
+	def has_children(self):
+		return True
+
 # Just an example: the actual summary is produced by a summary string: size=${svar%#}
 def stdvector_SummaryProvider(valobj,dict):
 	prov = stdvector_SynthProvider(valobj,None)
@@ -200,6 +209,7 @@ class stdlist_SynthProvider:
 	def __init__(self, valobj, dict):
 		logger = lldb.formatters.Logger.Logger()
 		self.valobj = valobj
+		self.count = None
 
 	def next_node(self,node):
 		logger = lldb.formatters.Logger.Logger()
@@ -313,6 +323,10 @@ class stdlist_SynthProvider:
 		except:
 			pass
 
+	def has_children(self):
+		return True
+
+
 # Just an example: the actual summary is produced by a summary string: size=${svar%#}
 def stdlist_SummaryProvider(valobj,dict):
 	prov = stdlist_SynthProvider(valobj,None)
@@ -438,6 +452,7 @@ class stdmap_SynthProvider:
 		logger = lldb.formatters.Logger.Logger()
 		self.valobj = valobj;
 		self.pointer_size = self.valobj.GetProcess().GetAddressByteSize()
+		self.count = None
 
 	def update(self):
 		logger = lldb.formatters.Logger.Logger()
@@ -472,6 +487,9 @@ class stdmap_SynthProvider:
 		except:
 			return 0;
 
+	def has_children(self):
+		return True
+
 	def get_data_type(self):
 		logger = lldb.formatters.Logger.Logger()
 		if self.data_type == None or self.data_size == None:
@@ -543,8 +561,12 @@ class stdmap_SynthProvider:
 				else:
 					# FIXME we need to have accessed item 0 before accessing any other item!
 					if self.skip_size == None:
-						logger >> "You asked for item > 0 before asking for item == 0, too bad - I have no clue"
-						return None
+						logger >> "You asked for item > 0 before asking for item == 0, I will fetch 0 now then retry"
+						if self.get_child_at_index(0):
+							return self.get_child_at_index(index)
+						else:
+							logger >> "item == 0 could not be found. sorry, nothing can be done here."
+							return None
 					return current.CreateChildAtOffset('[' + str(index) + ']',self.skip_size,self.data_type)
 			else:
 				logger >> "Unable to infer data-type - returning None (should mark tree as garbage here?)"
@@ -558,6 +580,189 @@ def stdmap_SummaryProvider(valobj,dict):
 	prov = stdmap_SynthProvider(valobj,None)
 	return 'size=' + str(prov.num_children())
 
+class stddeque_SynthProvider:
+    def __init__(self, valobj, d):
+        logger = lldb.formatters.Logger.Logger()
+        logger.write("init")
+        self.valobj = valobj
+        self.pointer_size = self.valobj.GetProcess().GetAddressByteSize()
+        self.count = None
+        try:
+            self.find_block_size()
+        except:
+            self.block_size = -1
+            self.element_size = -1
+        logger.write("block_size=%d, element_size=%d" % (self.block_size, self.element_size))
+
+    def find_block_size(self):
+        # in order to use the deque we must have the block size, or else
+        # it's impossible to know what memory addresses are valid
+        self.element_type = self.valobj.GetType().GetTemplateArgumentType(0)
+        self.element_size = self.element_type.GetByteSize()
+        # The code says this, but there must be a better way:
+        # template <class _Tp, class _Allocator>
+        # class __deque_base {
+        #    static const difference_type __block_size = sizeof(value_type) < 256 ? 4096 / sizeof(value_type) : 16;
+        # }
+        if self.element_size < 256:
+            self.block_size =  4096 / self.element_size
+        else:
+            self.block_size = 16
+
+    def num_children(self):
+        global _deque_capping_size
+        logger = lldb.formatters.Logger.Logger()
+        if self.count is None:
+            return 0
+        return min(self.count, _deque_capping_size)
+
+    def has_children(self):
+        return True
+
+    def get_child_index(self,name):
+        logger = lldb.formatters.Logger.Logger()
+        try:
+            return int(name.lstrip('[').rstrip(']'))
+        except:
+            return -1
+
+    def get_child_at_index(self,index):
+        logger = lldb.formatters.Logger.Logger()
+        logger.write("Fetching child " + str(index))
+        if index < 0 or self.count is None:
+                return None;
+        if index >= self.num_children():
+                return None;
+        try:
+            i, j = divmod(self.start+index, self.block_size)
+            return self.first.CreateValueFromExpression('[' + str(index) + ']',
+                                                        '*(*(%s + %d) + %d)' % (self.first.get_expr_path(), i, j))
+        except:
+            return None
+
+    def update(self):
+        logger = lldb.formatters.Logger.Logger()
+        try:
+            # A deque is effectively a two-dim array, with fixed width.
+            # 'map' contains pointers to the rows of this array. The
+            # full memory area allocated by the deque is delimited
+            # by 'first' and 'end_cap'. However, only a subset of this
+            # memory contains valid data since a deque may have some slack
+            # at the front and back in order to have O(1) insertion at
+            # both ends. The rows in active use are delimited by
+            # 'begin' and 'end'.
+            #
+            # To find the elements that are actually constructed, the 'start'
+            # variable tells which element in this NxM array is the 0th
+            # one, and the 'size' element gives the number of elements
+            # in the deque.
+            count = self.valobj.GetChildMemberWithName('__size_').GetChildMemberWithName('__first_').GetValueAsUnsigned(0)
+            # give up now if we cant access memory reliably
+            if self.block_size < 0:
+                logger.write("block_size < 0")
+                return
+            map_ = self.valobj.GetChildMemberWithName('__map_')
+            start = self.valobj.GetChildMemberWithName('__start_').GetValueAsUnsigned(0)
+            first = map_.GetChildMemberWithName('__first_')
+            map_first = first.GetValueAsUnsigned(0)
+            map_begin = map_.GetChildMemberWithName('__begin_').GetValueAsUnsigned(0)
+            map_end   = map_.GetChildMemberWithName('__end_').GetValueAsUnsigned(0)
+            map_endcap= map_.GetChildMemberWithName('__end_cap_').GetChildMemberWithName('__first_').GetValueAsUnsigned(0)
+            # check consistency
+            if not map_first <= map_begin <= map_end <= map_endcap:
+                logger.write("map pointers are not monotonic")
+                return
+            total_rows, junk = divmod(map_endcap - map_first, self.pointer_size)
+            if junk:
+                logger.write("endcap-first doesnt align correctly")
+                return
+            active_rows, junk = divmod(map_end - map_begin, self.pointer_size)
+            if junk:
+                logger.write("end-begin doesnt align correctly")
+                return
+            start_row, junk = divmod(map_begin - map_first, self.pointer_size)
+            if junk:
+                logger.write("begin-first doesnt align correctly")
+                return
+            if not start_row*self.block_size <= start < (start_row+1)*self.block_size:
+                logger.write("0th element must be in the 'begin' row")
+                return
+            end_row = start_row + active_rows
+            if not count:
+                if active_rows:
+                    logger.write("empty deque but begin!=end")
+                    return                            
+            elif not (end_row-1)*self.block_size <= start+count < end_row*self.block_size:
+                logger.write("nth element must be before the 'end' row")
+                return
+            logger.write("update success: count=%r, start=%r, first=%r" % (count,start,first))
+            # if consistent, save all we really need:
+            self.count = count
+            self.start = start
+            self.first = first
+        except:
+            self.count = None
+            self.start = None
+            self.map_first = None
+            self.map_begin = None
+
+class stdsharedptr_SynthProvider:
+    def __init__(self, valobj, d):
+        logger = lldb.formatters.Logger.Logger()
+        logger.write("init")
+        self.valobj = valobj
+        #self.element_ptr_type = self.valobj.GetType().GetTemplateArgumentType(0).GetPointerType()
+        self.ptr = None
+        self.cntrl = None
+        process = valobj.GetProcess()
+        self.endianness = process.GetByteOrder()
+        self.pointer_size = process.GetAddressByteSize()
+        self.count_type = valobj.GetType().GetBasicType(lldb.eBasicTypeUnsignedLong)
+
+    def num_children(self):
+        return 1
+
+    def has_children(self):
+        return True
+
+    def get_child_index(self,name):
+        if name=="__ptr_":
+            return 0
+        if name=="count":
+            return 1
+        if name=="weak_count":
+            return 2
+        return -1
+
+    def get_child_at_index(self,index):
+        if index == 0:
+            return self.ptr
+        if index == 1:
+            if self.cntrl == None:
+                count = 0
+            else:
+                count = 1 + self.cntrl.GetChildMemberWithName('__shared_owners_').GetValueAsSigned()
+            return self.valobj.CreateValueFromData("count",
+                                                   lldb.SBData.CreateDataFromUInt64Array(self.endianness, self.pointer_size, [count]),
+                                                   self.count_type)
+        if index == 2:
+            if self.cntrl == None:
+                count = 0
+            else:
+                count = 1 + self.cntrl.GetChildMemberWithName('__shared_weak_owners_').GetValueAsSigned()
+            return self.valobj.CreateValueFromData("weak_count",
+                                                   lldb.SBData.CreateDataFromUInt64Array(self.endianness, self.pointer_size, [count]),
+                                                   self.count_type)
+        return None
+
+    def update(self):
+        logger = lldb.formatters.Logger.Logger()
+        self.ptr = self.valobj.GetChildMemberWithName('__ptr_')#.Cast(self.element_ptr_type)
+        cntrl = self.valobj.GetChildMemberWithName('__cntrl_')
+        if cntrl.GetValueAsUnsigned(0):
+            self.cntrl = cntrl.Dereference()
+        else:
+            self.cntrl = None
 
 # we can use two different categories for old and new formatters - type names are different enough that we should make no confusion
 # talking with libc++ developer: "std::__1::class_name is set in stone until we decide to change the ABI. That shouldn't happen within a 5 year time frame"
@@ -571,7 +776,12 @@ def __lldb_init_module(debugger,dict):
 	debugger.HandleCommand('type synthetic add -l libcxx.stdmap_SynthProvider -x "^(std::__1::)map<.+> >$" -w libcxx')
 	debugger.HandleCommand('type summary add -F libcxx.stdmap_SummaryProvider -e -x "^(std::__1::)map<.+> >$" -w libcxx')
 	debugger.HandleCommand("type category enable libcxx")
+	debugger.HandleCommand('type synthetic add -l libcxx.stddeque_SynthProvider -x "^(std::__1::)deque<.+>$" -w libcxx')
+	debugger.HandleCommand('type synthetic add -l libcxx.stdsharedptr_SynthProvider -x "^(std::__1::)shared_ptr<.+>$" -w libcxx')
+	# turns out the structs look the same, so weak_ptr can be handled the same!
+	debugger.HandleCommand('type synthetic add -l libcxx.stdsharedptr_SynthProvider -x "^(std::__1::)weak_ptr<.+>$" -w libcxx')
 
 _map_capping_size = 255
 _list_capping_size = 255
 _list_uses_loop_detector = True
+_deque_capping_size = 255

Modified: lldb/branches/lldb-platform-work/include/lldb/API/LLDB.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/API/LLDB.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/API/LLDB.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/API/LLDB.h Thu Jun  6 19:06:43 2013
@@ -26,6 +26,7 @@
 #include "lldb/API/SBCompileUnit.h"
 #include "lldb/API/SBData.h"
 #include "lldb/API/SBDebugger.h"
+#include "lldb/API/SBDeclaration.h"
 #include "lldb/API/SBError.h"
 #include "lldb/API/SBEvent.h"
 #include "lldb/API/SBFileSpec.h"
@@ -40,6 +41,7 @@
 #include "lldb/API/SBModule.h"
 #include "lldb/API/SBProcess.h"
 #include "lldb/API/SBSourceManager.h"
+#include "lldb/API/SBStream.h"
 #include "lldb/API/SBStringList.h"
 #include "lldb/API/SBSymbol.h"
 #include "lldb/API/SBSymbolContext.h"

Modified: lldb/branches/lldb-platform-work/include/lldb/API/SBAddress.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/API/SBAddress.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/API/SBAddress.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/API/SBAddress.h Thu Jun  6 19:06:43 2013
@@ -141,7 +141,7 @@ protected:
 
 private:
 
-    std::auto_ptr<lldb_private::Address> m_opaque_ap;
+    std::unique_ptr<lldb_private::Address> m_opaque_ap;
 };
 
 

Modified: lldb/branches/lldb-platform-work/include/lldb/API/SBBreakpoint.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/API/SBBreakpoint.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/API/SBBreakpoint.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/API/SBBreakpoint.h Thu Jun  6 19:06:43 2013
@@ -37,6 +37,9 @@ public:
     bool
     operator == (const lldb::SBBreakpoint& rhs);
 
+    bool
+    operator != (const lldb::SBBreakpoint& rhs);
+    
     break_id_t
     GetID () const;
 
@@ -63,6 +66,15 @@ public:
 
     bool
     IsEnabled ();
+    
+    void
+    SetOneShot (bool one_shot);
+
+    bool
+    IsOneShot () const;
+    
+    bool
+    IsInternal ();
 
     uint32_t
     GetHitCount () const;

Modified: lldb/branches/lldb-platform-work/include/lldb/API/SBCommandInterpreter.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/API/SBCommandInterpreter.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/API/SBCommandInterpreter.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/API/SBCommandInterpreter.h Thu Jun  6 19:06:43 2013
@@ -11,6 +11,7 @@
 #define LLDB_SBCommandInterpreter_h_
 
 #include "lldb/API/SBDefines.h"
+#include "lldb/API/SBDebugger.h"
 
 namespace lldb {
 
@@ -65,6 +66,15 @@ public:
 
     lldb::SBProcess
     GetProcess ();
+    
+    lldb::SBDebugger
+    GetDebugger ();
+    
+    lldb::SBCommand
+    AddMultiwordCommand (const char* name, const char* help);
+    
+    lldb::SBCommand
+    AddCommand (const char* name, lldb::SBCommandPluginInterface *impl, const char* help);
 
     void
     SourceInitFileInHomeDirectory (lldb::SBCommandReturnObject &result);
@@ -75,8 +85,18 @@ public:
     lldb::ReturnStatus
     HandleCommand (const char *command_line, lldb::SBCommandReturnObject &result, bool add_to_history = false);
 
-    // This interface is not useful in SWIG, since the cursor & last_char arguments are string pointers INTO current_line
-    // and you can't do that in a scripting language interface in general... 
+    // The pointer based interface is not useful in SWIG, since the cursor & last_char arguments are string pointers INTO current_line
+    // and you can't do that in a scripting language interface in general...
+    
+    // In either case, the way this works is that the you give it a line and cursor position in the line.  The function
+    // will return the number of completions.  The matches list will contain number_of_completions + 1 elements.  The first
+    // element is the common substring after the cursor position for all the matches.  The rest of the elements are the
+    // matches.  The first element is useful if you are emulating the common shell behavior where the tab completes
+    // to the string that is common among all the matches, then you should first check if the first element is non-empty,
+    // and if so just insert it and move the cursor to the end of the insertion.  The next tab will return an empty
+    // common substring, and a list of choices (if any), at which point you should display the choices and let the user
+    // type further to disambiguate.
+    
     int
     HandleCompletion (const char *current_line,
                       const char *cursor,
@@ -99,6 +119,9 @@ public:
     SetCommandOverrideCallback (const char *command_name,
                                 lldb::CommandOverrideCallback callback,
                                 void *baton);
+    
+    SBCommandInterpreter (lldb_private::CommandInterpreter *interpreter_ptr = NULL);   // Access using SBDebugger::GetCommandInterpreter();
+    
 protected:
 
     lldb_private::CommandInterpreter &
@@ -112,14 +135,58 @@ protected:
 private:
     friend class SBDebugger;
 
-    SBCommandInterpreter (lldb_private::CommandInterpreter *interpreter_ptr = NULL);   // Access using SBDebugger::GetCommandInterpreter();
-
     static void
     InitializeSWIG ();
 
     lldb_private::CommandInterpreter *m_opaque_ptr;
 };
 
+class SBCommandPluginInterface
+{
+public:
+    virtual bool
+    DoExecute (lldb::SBDebugger debugger,
+               char** command,
+               lldb::SBCommandReturnObject &result)
+    {
+        return false;
+    }
+    
+    virtual
+    ~SBCommandPluginInterface ()
+    {}
+};
+    
+class SBCommand
+{
+public:
+    
+    SBCommand ();
+    
+    bool
+    IsValid ();
+    
+    const char*
+    GetName ();
+    
+    const char*
+    GetHelp ();
+    
+    lldb::SBCommand
+    AddMultiwordCommand (const char* name, const char* help = NULL);
+    
+    lldb::SBCommand
+    AddCommand (const char* name, lldb::SBCommandPluginInterface* impl, const char* help = NULL);
+    
+private:
+    
+    friend class SBDebugger;
+    friend class SBCommandInterpreter;
+    
+    SBCommand (lldb::CommandObjectSP cmd_sp);
+    
+    lldb::CommandObjectSP m_opaque_sp;
+};
 
 } // namespace lldb
 

Modified: lldb/branches/lldb-platform-work/include/lldb/API/SBCommandReturnObject.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/API/SBCommandReturnObject.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/API/SBCommandReturnObject.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/API/SBCommandReturnObject.h Thu Jun  6 19:06:43 2013
@@ -74,6 +74,9 @@ public:
     void
     AppendMessage (const char *message);
 
+    void
+    AppendWarning (const char *message);
+    
     bool
     GetDescription (lldb::SBStream &description);
     
@@ -89,6 +92,12 @@ public:
     size_t
     Printf(const char* format, ...)  __attribute__ ((format (printf, 2, 3)));
     
+    const char *
+    GetOutput (bool only_if_no_immediate);
+    
+    const char *
+    GetError (bool only_if_no_immediate);
+    
 protected:
     friend class SBCommandInterpreter;
     friend class SBOptions;
@@ -109,7 +118,7 @@ protected:
     SetLLDBObjectPtr (lldb_private::CommandReturnObject *ptr);
 
  private:
-    std::auto_ptr<lldb_private::CommandReturnObject> m_opaque_ap;
+    std::unique_ptr<lldb_private::CommandReturnObject> m_opaque_ap;
 };
 
 } // namespace lldb

Modified: lldb/branches/lldb-platform-work/include/lldb/API/SBData.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/API/SBData.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/API/SBData.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/API/SBData.h Thu Jun  6 19:06:43 2013
@@ -49,47 +49,47 @@ public:
     SetByteOrder (lldb::ByteOrder endian);
     
     float
-    GetFloat (lldb::SBError& error, uint32_t offset);
+    GetFloat (lldb::SBError& error, lldb::offset_t offset);
     
     double
-    GetDouble (lldb::SBError& error, uint32_t offset);
+    GetDouble (lldb::SBError& error, lldb::offset_t offset);
 
     long double
-    GetLongDouble (lldb::SBError& error, uint32_t offset);
+    GetLongDouble (lldb::SBError& error, lldb::offset_t offset);
     
     lldb::addr_t
-    GetAddress (lldb::SBError& error, uint32_t offset);
+    GetAddress (lldb::SBError& error, lldb::offset_t offset);
     
     uint8_t
-    GetUnsignedInt8 (lldb::SBError& error, uint32_t offset);
+    GetUnsignedInt8 (lldb::SBError& error, lldb::offset_t offset);
 
     uint16_t
-    GetUnsignedInt16 (lldb::SBError& error, uint32_t offset);
+    GetUnsignedInt16 (lldb::SBError& error, lldb::offset_t offset);
 
     uint32_t
-    GetUnsignedInt32 (lldb::SBError& error, uint32_t offset);
+    GetUnsignedInt32 (lldb::SBError& error, lldb::offset_t offset);
 
     uint64_t
-    GetUnsignedInt64 (lldb::SBError& error, uint32_t offset);
+    GetUnsignedInt64 (lldb::SBError& error, lldb::offset_t offset);
     
     int8_t
-    GetSignedInt8 (lldb::SBError& error, uint32_t offset);
+    GetSignedInt8 (lldb::SBError& error, lldb::offset_t offset);
     
     int16_t
-    GetSignedInt16 (lldb::SBError& error, uint32_t offset);
+    GetSignedInt16 (lldb::SBError& error, lldb::offset_t offset);
     
     int32_t
-    GetSignedInt32 (lldb::SBError& error, uint32_t offset);
+    GetSignedInt32 (lldb::SBError& error, lldb::offset_t offset);
     
     int64_t
-    GetSignedInt64 (lldb::SBError& error, uint32_t offset);
+    GetSignedInt64 (lldb::SBError& error, lldb::offset_t offset);
     
     const char*
-    GetString (lldb::SBError& error, uint32_t offset);
+    GetString (lldb::SBError& error, lldb::offset_t offset);
     
     size_t
     ReadRawData (lldb::SBError& error,
-                 uint32_t offset,
+                 lldb::offset_t offset,
                  void *buf,
                  size_t size);
     

Modified: lldb/branches/lldb-platform-work/include/lldb/API/SBDebugger.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/API/SBDebugger.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/API/SBDebugger.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/API/SBDebugger.h Thu Jun  6 19:06:43 2013
@@ -33,7 +33,7 @@ public:
     Create(bool source_init_files);
 
     static lldb::SBDebugger
-    Create(bool source_init_files, lldb::LogOutputCallback callback, void *baton);
+    Create(bool source_init_files, lldb::LogOutputCallback log_callback, void *baton);
 
     static void
     Destroy (lldb::SBDebugger &debugger);
@@ -78,7 +78,7 @@ public:
 
     void
     SetErrorFileHandle (FILE *f, bool transfer_ownership);
-
+    
     FILE *
     GetInputFileHandle ();
 
@@ -88,6 +88,12 @@ public:
     FILE *
     GetErrorFileHandle ();
 
+    void
+    SaveInputTerminalState();
+    
+    void
+    RestoreInputTerminalState();
+
     lldb::SBCommandInterpreter
     GetCommandInterpreter ();
 
@@ -166,6 +172,12 @@ public:
     bool 
     GetUseExternalEditor ();
 
+    bool
+    SetUseColor (bool use_color);
+
+    bool
+    GetUseColor () const;
+
     static bool
     GetDefaultArchitecture (char *arch_name, size_t arch_name_len);
 
@@ -193,8 +205,14 @@ public:
     void
     SetLoggingCallback (lldb::LogOutputCallback log_callback, void *baton);
     
+    // DEPRECATED
     void
-    DispatchInput (void *baton, const void *data, size_t data_len);
+    DispatchInput (void* baton,
+                   const void* data,
+                   size_t data_len);
+    
+    void
+    DispatchInput (const void *data, size_t data_len);
 
     void
     DispatchInputInterrupt ();
@@ -289,11 +307,12 @@ public:
 
 private:
 
+    friend class SBCommandInterpreter;
     friend class SBInputReader;
+    friend class SBListener;
     friend class SBProcess;
     friend class SBSourceManager;
     friend class SBTarget;
-    friend class SBListener;
     
     lldb::SBTarget
     FindTargetWithLLDBProcess (const lldb::ProcessSP &processSP);

Modified: lldb/branches/lldb-platform-work/include/lldb/API/SBDefines.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/API/SBDefines.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/API/SBDefines.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/API/SBDefines.h Thu Jun  6 19:06:43 2013
@@ -19,6 +19,7 @@
 #include "lldb/lldb-enumerations.h"
 #include "lldb/lldb-forward.h"
 #include "lldb/lldb-types.h"
+#include "lldb/lldb-versioning.h"
 
 // Forward Declarations
 
@@ -29,15 +30,19 @@ class SBBlock;
 class SBBreakpoint;
 class SBBreakpointLocation;
 class SBBroadcaster;
+class SBCommand;
 class SBCommandInterpreter;
+class SBCommandPluginInterface;
 class SBCommandReturnObject;
 class SBCommunication;
 class SBCompileUnit;
 class SBData;
 class SBDebugger;
+class SBDeclaration;
 class SBError;
 class SBEvent;
 class SBEventList;
+class SBExpressionOptions;
 class SBFileSpec;
 class SBFileSpecList;
 class SBFrame;

Modified: lldb/branches/lldb-platform-work/include/lldb/API/SBError.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/API/SBError.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/API/SBError.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/API/SBError.h Thu Jun  6 19:06:43 2013
@@ -66,7 +66,6 @@ public:
 
 protected:
 
-    friend class SBArguments;
     friend class SBData;
     friend class SBDebugger;
     friend class SBCommunication;
@@ -94,7 +93,7 @@ protected:
     SetError (const lldb_private::Error &lldb_error);
 
 private:
-    std::auto_ptr<lldb_private::Error> m_opaque_ap;
+    std::unique_ptr<lldb_private::Error> m_opaque_ap;
 
     void
     CreateIfNeeded ();

Modified: lldb/branches/lldb-platform-work/include/lldb/API/SBEvent.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/API/SBEvent.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/API/SBEvent.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/API/SBEvent.h Thu Jun  6 19:06:43 2013
@@ -74,6 +74,8 @@ protected:
     friend class SBBreakpoint;
     friend class SBDebugger;
     friend class SBProcess;
+    friend class SBThread;
+    friend class SBWatchpoint;
 
     SBEvent (lldb::EventSP &event_sp);
 

Modified: lldb/branches/lldb-platform-work/include/lldb/API/SBFileSpec.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/API/SBFileSpec.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/API/SBFileSpec.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/API/SBFileSpec.h Thu Jun  6 19:06:43 2013
@@ -58,6 +58,7 @@ private:
     friend class SBAttachInfo;
     friend class SBBlock;
     friend class SBCompileUnit;
+    friend class SBDeclaration;
     friend class SBFileSpecList;
     friend class SBHostOS;
     friend class SBLaunchInfo;
@@ -83,7 +84,7 @@ private:
     const lldb_private::FileSpec &
     ref() const;
 
-    std::auto_ptr <lldb_private::FileSpec> m_opaque_ap;
+    std::unique_ptr<lldb_private::FileSpec> m_opaque_ap;
 };
 
 

Modified: lldb/branches/lldb-platform-work/include/lldb/API/SBFileSpecList.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/API/SBFileSpecList.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/API/SBFileSpecList.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/API/SBFileSpecList.h Thu Jun  6 19:06:43 2013
@@ -63,7 +63,7 @@ friend class SBTarget;
     const lldb_private::FileSpecList &
     ref() const;
 
-    std::auto_ptr <lldb_private::FileSpecList> m_opaque_ap;
+    std::unique_ptr<lldb_private::FileSpecList> m_opaque_ap;
 };
 
 

Modified: lldb/branches/lldb-platform-work/include/lldb/API/SBFrame.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/API/SBFrame.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/API/SBFrame.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/API/SBFrame.h Thu Jun  6 19:06:43 2013
@@ -12,7 +12,6 @@
 
 #include "lldb/API/SBDefines.h"
 #include "lldb/API/SBValueList.h"
-#include "lldb/API/SBWatchpoint.h"
 
 namespace lldb {
 
@@ -105,6 +104,9 @@ public:
 
     lldb::SBValue
     EvaluateExpression (const char *expr, lldb::DynamicValueType use_dynamic, bool unwind_on_error);
+    
+    lldb::SBValue
+    EvaluateExpression (const char *expr, const SBExpressionOptions &options);
 
     /// Gets the lexical block that defines the stack frame. Another way to think
     /// of this is it will return the block that contains all of the variables
@@ -182,6 +184,9 @@ public:
     /// Find variables, register sets, registers, or persistent variables using
     /// the frame as the scope.
     ///
+    /// NB. This function does not look up ivars in the function object pointer.
+    /// To do that use GetValueForVariablePath.
+    ///
     /// The version that doesn't supply a 'use_dynamic' value will use the
     /// target's default.
     lldb::SBValue

Modified: lldb/branches/lldb-platform-work/include/lldb/API/SBFunction.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/API/SBFunction.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/API/SBFunction.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/API/SBFunction.h Thu Jun  6 19:06:43 2013
@@ -41,6 +41,9 @@ public:
     lldb::SBInstructionList
     GetInstructions (lldb::SBTarget target);
 
+    lldb::SBInstructionList
+    GetInstructions (lldb::SBTarget target, const char *flavor);
+
     lldb::SBAddress
     GetStartAddress ();
 

Modified: lldb/branches/lldb-platform-work/include/lldb/API/SBHostOS.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/API/SBHostOS.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/API/SBHostOS.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/API/SBHostOS.h Thu Jun  6 19:06:43 2013
@@ -21,6 +21,9 @@ public:
 
     static lldb::SBFileSpec
     GetProgramFileSpec ();
+    
+    static lldb::SBFileSpec
+    GetLLDBPythonPath ();
 
     static void
     ThreadCreated (const char *name);

Modified: lldb/branches/lldb-platform-work/include/lldb/API/SBLineEntry.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/API/SBLineEntry.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/API/SBLineEntry.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/API/SBLineEntry.h Thu Jun  6 19:06:43 2013
@@ -90,7 +90,7 @@ private:
     void
     SetLineEntry (const lldb_private::LineEntry &lldb_object_ref);
 
-    std::auto_ptr<lldb_private::LineEntry> m_opaque_ap;
+    std::unique_ptr<lldb_private::LineEntry> m_opaque_ap;
 };
 
 

Modified: lldb/branches/lldb-platform-work/include/lldb/API/SBModule.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/API/SBModule.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/API/SBModule.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/API/SBModule.h Thu Jun  6 19:06:43 2013
@@ -120,6 +120,14 @@ public:
     lldb::SBSymbol
     GetSymbolAtIndex (size_t idx);
 
+    lldb::SBSymbol
+    FindSymbol (const char *name,
+                lldb::SymbolType type = eSymbolTypeAny);
+
+    lldb::SBSymbolContextList
+    FindSymbols (const char *name,
+                 lldb::SymbolType type = eSymbolTypeAny);
+
     size_t
     GetNumSections ();
     
@@ -167,12 +175,30 @@ public:
                          const char *name, 
                          uint32_t max_matches);
     
+    //------------------------------------------------------------------
+    /// Find the first global (or static) variable by name.
+    ///
+    /// @param[in] target
+    ///     A valid SBTarget instance representing the debuggee.
+    ///
+    /// @param[in] name
+    ///     The name of the global or static variable we are looking
+    ///     for.
+    ///
+    /// @return
+    ///     An SBValue that gets filled in with the found variable (if any).
+    //------------------------------------------------------------------
+    lldb::SBValue
+    FindFirstGlobalVariable (lldb::SBTarget &target, const char *name);
+    
     lldb::SBType
     FindFirstType (const char* name);
     
     lldb::SBTypeList
     FindTypes (const char* type);
     
+    lldb::SBType
+    GetBasicType(lldb::BasicType type);
     
     //------------------------------------------------------------------
     /// Get the module version numbers.

Modified: lldb/branches/lldb-platform-work/include/lldb/API/SBProcess.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/API/SBProcess.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/API/SBProcess.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/API/SBProcess.h Thu Jun  6 19:06:43 2013
@@ -30,7 +30,8 @@ public:
         eBroadcastBitStateChanged   = (1 << 0),
         eBroadcastBitInterrupt      = (1 << 1),
         eBroadcastBitSTDOUT         = (1 << 2),
-        eBroadcastBitSTDERR         = (1 << 3)
+        eBroadcastBitSTDERR         = (1 << 3),
+        eBroadcastBitProfileData    = (1 << 4)
     };
 
     SBProcess ();
@@ -40,11 +41,20 @@ public:
     const lldb::SBProcess&
     operator = (const lldb::SBProcess& rhs);
 
+    SBProcess (const lldb::ProcessSP &process_sp);
+    
     ~SBProcess();
 
     static const char *
     GetBroadcasterClassName ();
     
+    const char *
+    GetPluginName ();
+    
+    // DEPRECATED: use GetPluginName()
+    const char *
+    GetShortPluginName ();
+    
     void
     Clear ();
 
@@ -66,6 +76,9 @@ public:
     size_t
     GetSTDERR (char *dst, size_t dst_len) const;
 
+    size_t
+    GetAsyncProfileData(char *dst, size_t dst_len) const;
+    
     void
     ReportEventState (const lldb::SBEvent &event, FILE *out) const;
 
@@ -110,11 +123,20 @@ public:
     lldb::SBThread
     GetSelectedThread () const;
 
+    //------------------------------------------------------------------
+    // Function for lazily creating a thread using the current OS
+    // plug-in. This function will be removed in the future when there
+    // are APIs to create SBThread objects through the interface and add
+    // them to the process through the SBProcess API.
+    //------------------------------------------------------------------
+    lldb::SBThread
+    CreateOSPluginThread (lldb::tid_t tid, lldb::addr_t context);
+
     bool
     SetSelectedThread (const lldb::SBThread &thread);
 
     bool
-    SetSelectedThreadByID (uint32_t tid);
+    SetSelectedThreadByID (lldb::tid_t tid);
     
     bool
     SetSelectedThreadByIndexID (uint32_t index_id);
@@ -132,9 +154,39 @@ public:
     const char *
     GetExitDescription ();
 
+    //------------------------------------------------------------------
+    /// Gets the process ID
+    ///
+    /// Returns the process identifier for the process as it is known
+    /// on the system on which the process is running. For unix systems
+    /// this is typically the same as if you called "getpid()" in the
+    /// process.
+    ///
+    /// @return
+    ///     Returns LLDB_INVALID_PROCESS_ID if this object does not
+    ///     contain a valid process object, or if the process has not
+    ///     been launched. Returns a valid process ID if the process is
+    ///     valid.
+    //------------------------------------------------------------------
     lldb::pid_t
     GetProcessID ();
 
+    //------------------------------------------------------------------
+    /// Gets the unique ID associated with this process object
+    ///
+    /// Unique IDs start at 1 and increment up with each new process
+    /// instance. Since starting a process on a system might always
+    /// create a process with the same process ID, there needs to be a
+    /// way to tell two process instances apart.
+    ///
+    /// @return
+    ///     Returns a non-zero integer ID if this object contains a
+    ///     valid process object, zero if this object does not contain
+    ///     a valid process object.
+    //------------------------------------------------------------------
+    uint32_t
+    GetUniqueID();
+
     uint32_t
     GetAddressByteSize() const;
 
@@ -154,11 +206,17 @@ public:
     Detach ();
 
     lldb::SBError
+    Detach (bool keep_stopped);
+
+    lldb::SBError
     Signal (int signal);
 
     void
     SendAsyncInterrupt();
     
+    uint32_t
+    GetStopID(bool include_expression_stops = false);
+    
     size_t
     ReadMemory (addr_t addr, void *buf, size_t size, lldb::SBError &error);
 
@@ -180,6 +238,12 @@ public:
 
     static bool
     GetRestartedFromEvent (const lldb::SBEvent &event);
+    
+    static size_t
+    GetNumRestartedReasonsFromEvent (const lldb::SBEvent &event);
+    
+    static const char *
+    GetRestartedReasonAtIndexFromEvent (const lldb::SBEvent &event, size_t idx);
 
     static lldb::SBProcess
     GetProcessFromEvent (const lldb::SBEvent &event);
@@ -217,8 +281,6 @@ protected:
     friend class SBThread;
     friend class SBValue;
 
-    SBProcess (const lldb::ProcessSP &process_sp);
-
     lldb::ProcessSP
     GetSP() const;
     

Modified: lldb/branches/lldb-platform-work/include/lldb/API/SBSourceManager.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/API/SBSourceManager.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/API/SBSourceManager.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/API/SBSourceManager.h Thu Jun  6 19:06:43 2013
@@ -45,7 +45,7 @@ protected:
 
 private:
 
-    std::auto_ptr<lldb_private::SourceManagerImpl> m_opaque_ap;
+    std::unique_ptr<lldb_private::SourceManagerImpl> m_opaque_ap;
 };
 
 } // namespace lldb

Modified: lldb/branches/lldb-platform-work/include/lldb/API/SBStream.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/API/SBStream.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/API/SBStream.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/API/SBStream.h Thu Jun  6 19:06:43 2013
@@ -65,6 +65,7 @@ protected:
     friend class SBCompileUnit;
     friend class SBData;
     friend class SBDebugger;
+    friend class SBDeclaration;
     friend class SBEvent;
     friend class SBFileSpec;
     friend class SBFileSpecList;
@@ -99,7 +100,7 @@ protected:
 private:
 
     DISALLOW_COPY_AND_ASSIGN (SBStream);
-    std::auto_ptr<lldb_private::Stream> m_opaque_ap;
+    std::unique_ptr<lldb_private::Stream> m_opaque_ap;
     bool m_is_file;
 };
 

Modified: lldb/branches/lldb-platform-work/include/lldb/API/SBStringList.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/API/SBStringList.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/API/SBStringList.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/API/SBStringList.h Thu Jun  6 19:06:43 2013
@@ -50,6 +50,7 @@ public:
 
 protected:
     friend class SBCommandInterpreter;
+    friend class SBDebugger;
 
     SBStringList (const lldb_private::StringList *lldb_strings);
 
@@ -61,7 +62,7 @@ protected:
 
 private:
 
-    std::auto_ptr<lldb_private::StringList> m_opaque_ap;
+    std::unique_ptr<lldb_private::StringList> m_opaque_ap;
 
 };
 

Modified: lldb/branches/lldb-platform-work/include/lldb/API/SBSymbol.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/API/SBSymbol.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/API/SBSymbol.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/API/SBSymbol.h Thu Jun  6 19:06:43 2013
@@ -43,6 +43,9 @@ public:
     lldb::SBInstructionList
     GetInstructions (lldb::SBTarget target);
 
+    lldb::SBInstructionList
+    GetInstructions (lldb::SBTarget target, const char *flavor_string);
+
     SBAddress
     GetStartAddress ();
     

Modified: lldb/branches/lldb-platform-work/include/lldb/API/SBSymbolContext.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/API/SBSymbolContext.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/API/SBSymbolContext.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/API/SBSymbolContext.h Thu Jun  6 19:06:43 2013
@@ -85,7 +85,7 @@ protected:
     SetSymbolContext (const lldb_private::SymbolContext *sc_ptr);
 
 private:
-    std::auto_ptr<lldb_private::SymbolContext> m_opaque_ap;
+    std::unique_ptr<lldb_private::SymbolContext> m_opaque_ap;
 };
 
 

Modified: lldb/branches/lldb-platform-work/include/lldb/API/SBSymbolContextList.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/API/SBSymbolContextList.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/API/SBSymbolContextList.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/API/SBSymbolContextList.h Thu Jun  6 19:06:43 2013
@@ -60,7 +60,7 @@ protected:
     operator*() const;
 
 private:
-    std::auto_ptr<lldb_private::SymbolContextList> m_opaque_ap;
+    std::unique_ptr<lldb_private::SymbolContextList> m_opaque_ap;
 };
 
 

Modified: lldb/branches/lldb-platform-work/include/lldb/API/SBTarget.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/API/SBTarget.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/API/SBTarget.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/API/SBTarget.h Thu Jun  6 19:06:43 2013
@@ -17,6 +17,7 @@
 #include "lldb/API/SBFileSpecList.h"
 #include "lldb/API/SBSymbolContextList.h"
 #include "lldb/API/SBType.h"
+#include "lldb/API/SBValue.h"
 #include "lldb/API/SBWatchpoint.h"
 
 namespace lldb {
@@ -235,7 +236,9 @@ public:
     {
         eBroadcastBitBreakpointChanged  = (1 << 0),
         eBroadcastBitModulesLoaded      = (1 << 1),
-        eBroadcastBitModulesUnloaded    = (1 << 2)
+        eBroadcastBitModulesUnloaded    = (1 << 2),
+        eBroadcastBitWatchpointChanged  = (1 << 3),
+        eBroadcastBitSymbolsLoaded      = (1 << 4)
     };
 
     //------------------------------------------------------------------
@@ -364,6 +367,9 @@ public:
     
     SBProcess
     Launch (SBLaunchInfo &launch_info, SBError& error);
+    
+    SBProcess
+    LoadCore (const char *core_file);
 
     SBProcess
     Attach (SBAttachInfo &attach_info, SBError& error);
@@ -601,6 +607,19 @@ public:
     FindGlobalVariables (const char *name, 
                          uint32_t max_matches);
 
+    //------------------------------------------------------------------
+    /// Find the first global (or static) variable by name.
+    ///
+    /// @param[in] name
+    ///     The name of the global or static variable we are looking
+    ///     for.
+    ///
+    /// @return
+    ///     An SBValue that gets filled in with the found variable (if any).
+    //------------------------------------------------------------------
+    lldb::SBValue
+    FindFirstGlobalVariable (const char* name);
+    
     void
     Clear ();
 
@@ -719,6 +738,9 @@ public:
     lldb::SBTypeList
     FindTypes (const char* type);
     
+    lldb::SBType
+    GetBasicType(lldb::BasicType type);
+    
     SBSourceManager
     GetSourceManager();
     
@@ -726,11 +748,27 @@ public:
     ReadInstructions (lldb::SBAddress base_addr, uint32_t count);
 
     lldb::SBInstructionList
+    ReadInstructions (lldb::SBAddress base_addr, uint32_t count, const char *flavor_string);
+
+    lldb::SBInstructionList
     GetInstructions (lldb::SBAddress base_addr, const void *buf, size_t size);
     
+    // The "WithFlavor" is necessary to keep SWIG from getting confused about overloaded arguments when
+    // using the buf + size -> Python Object magic.
+    
+    lldb::SBInstructionList
+    GetInstructionsWithFlavor (lldb::SBAddress base_addr,  const char *flavor_string, const void *buf, size_t size);
+    
     lldb::SBInstructionList
     GetInstructions (lldb::addr_t base_addr, const void *buf, size_t size);
 
+    lldb::SBInstructionList
+    GetInstructionsWithFlavor (lldb::addr_t base_addr, const char *flavor_string, const void *buf, size_t size);
+
+    lldb::SBSymbolContextList
+    FindSymbols (const char *name,
+                 lldb::SymbolType type = eSymbolTypeAny);
+
     bool
     operator == (const lldb::SBTarget &rhs) const;
 
@@ -740,6 +778,12 @@ public:
     bool
     GetDescription (lldb::SBStream &description, lldb::DescriptionLevel description_level);
 
+    lldb::SBValue
+    EvaluateExpression (const char *expr, const SBExpressionOptions &options);
+
+    lldb::addr_t
+    GetStackRedZoneSize();
+    
 protected:
     friend class SBAddress;
     friend class SBBlock;

Modified: lldb/branches/lldb-platform-work/include/lldb/API/SBThread.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/API/SBThread.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/API/SBThread.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/API/SBThread.h Thu Jun  6 19:06:43 2013
@@ -21,6 +21,18 @@ class SBFrame;
 class SBThread
 {
 public:
+    enum
+    {
+        eBroadcastBitStackChanged           = (1 << 0),
+        eBroadcastBitThreadSuspended        = (1 << 1),
+        eBroadcastBitThreadResumed          = (1 << 2),
+        eBroadcastBitSelectedFrameChanged   = (1 << 3),
+        eBroadcastBitThreadSelected         = (1 << 4)
+    };
+
+    static const char *
+    GetBroadcasterClassName ();
+    
     SBThread ();
 
     SBThread (const lldb::SBThread &thread);
@@ -56,6 +68,7 @@ public:
     /// eStopReasonWatchpoint    1     watchpoint id
     /// eStopReasonSignal        1     unix signal number
     /// eStopReasonException     N     exception data
+    /// eStopReasonExec          0
     /// eStopReasonPlanComplete  0
     //--------------------------------------------------------------------------
     uint64_t
@@ -86,6 +99,9 @@ public:
     StepInto (lldb::RunMode stop_other_threads = lldb::eOnlyDuringStepping);
 
     void
+    StepInto (const char *target_name, lldb::RunMode stop_other_threads = lldb::eOnlyDuringStepping);
+    
+    void
     StepOut ();
 
     void
@@ -101,6 +117,9 @@ public:
 
     void
     RunToAddress (lldb::addr_t addr);
+    
+    SBError
+    ReturnFromFrame (SBFrame &frame, SBValue &return_value);
 
     //--------------------------------------------------------------------------
     /// LLDB currently supports process centric debugging which means when any
@@ -110,7 +129,7 @@ public:
     /// SBProcess::Continue() is called, any threads that aren't suspended will
     /// be allowed to run. If any of the SBThread functions for stepping are 
     /// called (StepOver, StepInto, StepOut, StepInstruction, RunToAddres), the
-    /// thread will now be allowed to run and these funtions will simply return.
+    /// thread will not be allowed to run and these funtions will simply return.
     ///
     /// Eventually we plan to add support for thread centric debugging where
     /// each thread is controlled individually and each thread would broadcast
@@ -132,6 +151,9 @@ public:
     bool
     IsSuspended();
 
+    bool
+    IsStopped();
+
     uint32_t
     GetNumFrames ();
 
@@ -143,6 +165,15 @@ public:
 
     lldb::SBFrame
     SetSelectedFrame (uint32_t frame_idx);
+    
+    static bool
+    EventIsThreadEvent (const SBEvent &event);
+    
+    static SBFrame
+    GetStackFrameFromEvent (const SBEvent &event);
+    
+    static SBThread
+    GetThreadFromEvent (const SBEvent &event);
 
     lldb::SBProcess
     GetProcess ();
@@ -158,6 +189,9 @@ public:
 
     bool
     GetDescription (lldb::SBStream &description) const;
+    
+    bool
+    GetStatus (lldb::SBStream &status) const;
 
 protected:
     friend class SBBreakpoint;

Modified: lldb/branches/lldb-platform-work/include/lldb/API/SBType.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/API/SBType.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/API/SBType.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/API/SBType.h Thu Jun  6 19:06:43 2013
@@ -65,7 +65,7 @@ protected:
     const lldb_private::TypeMemberImpl &
     ref () const;
 
-    std::auto_ptr<lldb_private::TypeMemberImpl> m_opaque_ap;
+    std::unique_ptr<lldb_private::TypeMemberImpl> m_opaque_ap;
 };
 
 class SBType
@@ -81,7 +81,7 @@ public:
     bool
     IsValid() const;
     
-    size_t
+    uint64_t
     GetByteSize();
 
     bool
@@ -90,6 +90,9 @@ public:
     bool
     IsReferenceType();
     
+    bool
+    IsFunctionType ();
+    
     lldb::SBType
     GetPointerType();
     
@@ -106,6 +109,14 @@ public:
     GetUnqualifiedType();
 
     lldb::SBType
+    GetCanonicalType();
+    // Get the "lldb::BasicType" enumeration for a type. If a type is not a basic
+    // type eBasicTypeInvalid will be returned
+    lldb::BasicType
+    GetBasicType();
+
+    // The call below confusing and should really be renamed to "CreateBasicType"
+    lldb::SBType
     GetBasicType(lldb::BasicType type);
     
     uint32_t
@@ -135,6 +146,12 @@ public:
     lldb::TemplateArgumentKind
     GetTemplateArgumentKind (uint32_t idx);
 
+    lldb::SBType
+    GetFunctionReturnType ();
+
+    lldb::SBTypeList
+    GetFunctionArgumentTypes ();
+
     const char*
     GetName();
     
@@ -217,7 +234,7 @@ public:
     
     
 private:
-    std::auto_ptr<lldb_private::TypeListImpl> m_opaque_ap;
+    std::unique_ptr<lldb_private::TypeListImpl> m_opaque_ap;
 };
     
 

Modified: lldb/branches/lldb-platform-work/include/lldb/API/SBTypeSynthetic.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/API/SBTypeSynthetic.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/API/SBTypeSynthetic.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/API/SBTypeSynthetic.h Thu Jun  6 19:06:43 2013
@@ -79,15 +79,15 @@ namespace lldb {
         friend class SBTypeCategory;
         friend class SBValue;
         
-        lldb::TypeSyntheticImplSP
+        lldb::ScriptedSyntheticChildrenSP
         GetSP ();
         
         void
-        SetSP (const lldb::TypeSyntheticImplSP &typefilter_impl_sp);    
+        SetSP (const lldb::ScriptedSyntheticChildrenSP &typefilter_impl_sp);    
         
-        lldb::TypeSyntheticImplSP m_opaque_sp;
+        lldb::ScriptedSyntheticChildrenSP m_opaque_sp;
         
-        SBTypeSynthetic (const lldb::TypeSyntheticImplSP &);
+        SBTypeSynthetic (const lldb::ScriptedSyntheticChildrenSP &);
         
         bool
         CopyOnWrite_Impl();

Modified: lldb/branches/lldb-platform-work/include/lldb/API/SBValue.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/API/SBValue.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/API/SBValue.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/API/SBValue.h Thu Jun  6 19:06:43 2013
@@ -14,11 +14,15 @@
 #include "lldb/API/SBDefines.h"
 #include "lldb/API/SBType.h"
 
+class ValueImpl;
+class ValueLocker;
 
 namespace lldb {
 
 class SBValue
 {
+friend class ValueLocker;
+
 public:
     SBValue ();
 
@@ -95,8 +99,23 @@ public:
     lldb::SBValue
     GetNonSyntheticValue ();
     
+    lldb::DynamicValueType
+    GetPreferDynamicValue ();
+    
+    void
+    SetPreferDynamicValue (lldb::DynamicValueType use_dynamic);
+    
+    bool
+    GetPreferSyntheticValue ();
+    
+    void
+    SetPreferSyntheticValue (bool use_synthetic);
+    
+    bool
+    IsDynamic ();
+    
     bool
-    IsDynamic();
+    IsSynthetic ();
 
     const char *
     GetLocation ();
@@ -137,6 +156,9 @@ public:
     CreateValueFromExpression (const char *name, const char* expression);
     
     lldb::SBValue
+    CreateValueFromExpression (const char *name, const char* expression, SBExpressionOptions &options);
+    
+    lldb::SBValue
     CreateValueFromAddress (const char* name, 
                             lldb::addr_t address, 
                             lldb::SBType type);
@@ -269,6 +291,31 @@ public:
     lldb::SBData
     GetData ();
     
+    bool
+    SetData (lldb::SBData &data, lldb::SBError& error);
+    
+    lldb::SBDeclaration
+    GetDeclaration ();
+    
+    //------------------------------------------------------------------
+    /// Find out if a SBValue might have children.
+    ///
+    /// This call is much more efficient than GetNumChildren() as it
+    /// doesn't need to complete the underlying type. This is designed
+    /// to be used in a UI environment in order to detect if the
+    /// disclosure triangle should be displayed or not.
+    ///
+    /// This function returns true for class, union, structure,
+    /// pointers, references, arrays and more. Again, it does so without
+    /// doing any expensive type completion.
+    ///
+    /// @return
+    ///     Returns \b true if the SBValue might have children, or \b
+    ///     false otherwise.
+    //------------------------------------------------------------------
+    bool
+    MightHaveChildren ();
+
     uint32_t
     GetNumChildren ();
 
@@ -370,32 +417,70 @@ public:
     lldb::SBWatchpoint
     WatchPointee (bool resolve_location, bool read, bool write, SBError &error);
 
-    // this must be defined in the .h file because synthetic children as implemented in the core
-    // currently rely on being able to extract the SharedPointer out of an SBValue. if the implementation
-    // is deferred to the .cpp file instead of being inlined here, the platform will fail to link
-    // correctly. however, this is temporary till a better general solution is found. FIXME
-    lldb::ValueObjectSP&
-    get_sp()
-    {
-        return m_opaque_sp;
-    }
+    //------------------------------------------------------------------
+    /// Same as the protected version of GetSP that takes a locker, except that we make the
+    /// locker locally in the function.  Since the Target API mutex is recursive, and the
+    /// StopLocker is a read lock, you can call this function even if you are already
+    /// holding the two above-mentioned locks.
+    ///
+    /// @return
+    ///     A ValueObjectSP of the best kind (static, dynamic or synthetic) we
+    ///     can cons up, in accordance with the SBValue's settings.
+    //------------------------------------------------------------------
+    lldb::ValueObjectSP
+    GetSP () const;
 
 protected:
-    friend class SBValueList;
+    friend class SBBlock;
     friend class SBFrame;
+    friend class SBTarget;
+    friend class SBThread;
+    friend class SBValueList;
 
+    //------------------------------------------------------------------
+    /// Get the appropriate ValueObjectSP from this SBValue, consulting the
+    /// use_dynamic and use_synthetic options passed in to SetSP when the
+    /// SBValue's contents were set.  Since this often requires examining memory,
+    /// and maybe even running code, it needs to acquire the Target API and Process StopLock.
+    /// Those are held in an opaque class ValueLocker which is currently local to SBValue.cpp.
+    /// So you don't have to get these yourself just default construct a ValueLocker, and pass it into this.
+    /// If we need to make a ValueLocker and use it in some other .cpp file, we'll have to move it to
+    /// ValueObject.h/cpp or somewhere else convenient.  We haven't needed to so far.
+    ///
+    /// @param[in] value_locker
+    ///     An object that will hold the Target API, and Process RunLocks, and
+    ///     auto-destroy them when it goes out of scope.  Currently this is only useful in
+    ///     SBValue.cpp.
+    ///
+    /// @return
+    ///     A ValueObjectSP of the best kind (static, dynamic or synthetic) we
+    ///     can cons up, in accordance with the SBValue's settings.
+    //------------------------------------------------------------------
     lldb::ValueObjectSP
-    GetSP () const;
+    GetSP (ValueLocker &value_locker) const;
     
-    // anyone who needs to set the value of the SP on this SBValue should rely on SetSP() exclusively
-    // since this function contains logic to "do the right thing" with regard to providing to the user
-    // a synthetic value when possible - in the future the same should automatically occur with
-    // dynamic values
+    // these calls do the right thing WRT adjusting their settings according to the target's preferences
     void
     SetSP (const lldb::ValueObjectSP &sp);
+
+    void
+    SetSP (const lldb::ValueObjectSP &sp, bool use_synthetic);
+    
+    void
+    SetSP (const lldb::ValueObjectSP &sp, lldb::DynamicValueType use_dynamic);
+
+    void
+    SetSP (const lldb::ValueObjectSP &sp, lldb::DynamicValueType use_dynamic, bool use_synthetic);
+    
+    void
+    SetSP (const lldb::ValueObjectSP &sp, lldb::DynamicValueType use_dynamic, bool use_synthetic, const char *name);
     
 private:
-    lldb::ValueObjectSP m_opaque_sp;
+    typedef std::shared_ptr<ValueImpl> ValueImplSP;
+    ValueImplSP m_opaque_sp;
+    
+    void
+    SetSP (ValueImplSP impl_sp);
 };
 
 } // namespace lldb

Modified: lldb/branches/lldb-platform-work/include/lldb/API/SBValueList.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/API/SBValueList.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/API/SBValueList.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/API/SBValueList.h Thu Jun  6 19:06:43 2013
@@ -12,6 +12,8 @@
 
 #include "lldb/API/SBDefines.h"
 
+class ValueListImpl;
+
 namespace lldb {
 
 class SBValueList
@@ -48,28 +50,17 @@ public:
     const lldb::SBValueList &
     operator = (const lldb::SBValueList &rhs);
 
-    lldb_private::ValueObjectList *
-    operator -> ();
-
-    lldb_private::ValueObjectList &
-    operator* ();
-
-    const lldb_private::ValueObjectList *
-    operator -> () const;
-
-    const lldb_private::ValueObjectList &
-    operator* () const;
+protected:
     
-    lldb_private::ValueObjectList *
-    get ();
-
-    lldb_private::ValueObjectList &
-    ref ();
+    // only useful for visualizing the pointer or comparing two SBValueLists
+    // to see if they are backed by the same underlying Impl.
+    void *
+    opaque_ptr ();
 
 private:
     friend class SBFrame;
-
-    SBValueList (const lldb_private::ValueObjectList *lldb_object_ptr);
+    
+    SBValueList (const ValueListImpl *lldb_object_ptr);
 
     void
     Append (lldb::ValueObjectSP& val_obj_sp);
@@ -77,7 +68,23 @@ private:
     void
     CreateIfNeeded ();
 
-    std::auto_ptr<lldb_private::ValueObjectList> m_opaque_ap;
+    ValueListImpl *
+    operator -> ();
+    
+    ValueListImpl &
+    operator* ();
+    
+    const ValueListImpl *
+    operator -> () const;
+    
+    const ValueListImpl &
+    operator* () const;
+    
+    
+    ValueListImpl &
+    ref ();
+    
+    std::unique_ptr<ValueListImpl> m_opaque_ap;
 };
 
 

Modified: lldb/branches/lldb-platform-work/include/lldb/API/SBWatchpoint.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/API/SBWatchpoint.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/API/SBWatchpoint.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/API/SBWatchpoint.h Thu Jun  6 19:06:43 2013
@@ -81,6 +81,15 @@ public:
     void
     SetSP (const lldb::WatchpointSP &sp);
 
+    static bool
+    EventIsWatchpointEvent (const lldb::SBEvent &event);
+    
+    static lldb::WatchpointEventType
+    GetWatchpointEventTypeFromEvent (const lldb::SBEvent& event);
+
+    static lldb::SBWatchpoint
+    GetWatchpointFromEvent (const lldb::SBEvent& event);
+
 private:
     friend class SBTarget;
     friend class SBValue;

Modified: lldb/branches/lldb-platform-work/include/lldb/Breakpoint/Breakpoint.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Breakpoint/Breakpoint.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Breakpoint/Breakpoint.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Breakpoint/Breakpoint.h Thu Jun  6 19:06:43 2013
@@ -74,7 +74,7 @@ namespace lldb_private {
 /// not by the breakpoint.
 //----------------------------------------------------------------------
 class Breakpoint:
-    public STD_ENABLE_SHARED_FROM_THIS(Breakpoint),
+    public std::enable_shared_from_this<Breakpoint>,
     public Stoppoint
 {
 public:
@@ -136,7 +136,7 @@ public:
         static lldb::BreakpointLocationSP
         GetBreakpointLocationAtIndexFromEvent (const lldb::EventSP &event_sp, uint32_t loc_idx);
         
-        static uint32_t
+        static size_t
         GetNumBreakpointLocationsFromEvent (const lldb::EventSP &event_sp);
 
         static const BreakpointEventData *
@@ -310,7 +310,7 @@ public:
     ///     greater than then number of actual locations.
     //------------------------------------------------------------------
     lldb::BreakpointLocationSP
-    GetLocationAtIndex (uint32_t index);
+    GetLocationAtIndex (size_t index);
 
     //------------------------------------------------------------------
     // The next section deals with various breakpoint options.
@@ -356,6 +356,20 @@ public:
 
 
     //------------------------------------------------------------------
+    /// If \a one_shot is \b true, breakpoint will be deleted on first hit.
+    //------------------------------------------------------------------
+    void
+    SetOneShot (bool one_shot);
+
+    //------------------------------------------------------------------
+    /// Check the OneShot state.
+    /// @return
+    ///     \b true if the breakpoint is one shot, \b false otherwise.
+    //------------------------------------------------------------------
+    bool
+    IsOneShot () const;
+
+    //------------------------------------------------------------------
     /// Set the valid thread to be checked when the breakpoint is hit.
     /// @param[in] thread_id
     ///    If this thread hits the breakpoint, we stop, otherwise not.
@@ -475,6 +489,32 @@ public:
     GetDescription (Stream *s, lldb::DescriptionLevel level, bool show_locations = false);
 
     //------------------------------------------------------------------
+    /// Set the "kind" description for a breakpoint.  If the breakpoint is hit
+    /// the stop info will show this "kind" description instead of the breakpoint
+    /// number.  Mostly useful for internal breakpoints, where the breakpoint number
+    /// doesn't have meaning to the user.
+    ///
+    /// @param[in] kind
+    ///     New "kind" description.
+    //------------------------------------------------------------------
+    void
+    SetBreakpointKind (const char *kind)
+    {
+        m_kind_description.assign (kind);
+    }
+    
+    //------------------------------------------------------------------
+    /// Return the "kind" description for a breakpoint.
+    ///
+    /// @return
+    ///     The breakpoint kind, or NULL if none is set.
+    //------------------------------------------------------------------
+    const char *GetBreakpointKind () const
+    {
+        return m_kind_description.c_str();
+    }
+
+    //------------------------------------------------------------------
     /// Accessor for the breakpoint Target.
     /// @return
     ///     This breakpoint's Target.
@@ -574,6 +614,7 @@ private:
     lldb::BreakpointResolverSP m_resolver_sp; // The resolver that defines this breakpoint.
     BreakpointOptions m_options;              // Settable breakpoint options
     BreakpointLocationList m_locations;       // The list of locations currently found for this breakpoint.
+    std::string            m_kind_description;
     
     void
     SendBreakpointChangedEvent (lldb::BreakpointEventType eventKind);

Modified: lldb/branches/lldb-platform-work/include/lldb/Breakpoint/BreakpointIDList.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Breakpoint/BreakpointIDList.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Breakpoint/BreakpointIDList.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Breakpoint/BreakpointIDList.h Thu Jun  6 19:06:43 2013
@@ -41,10 +41,10 @@ public:
     GetSize();
 
     BreakpointID &
-    GetBreakpointIDAtIndex (uint32_t index);
+    GetBreakpointIDAtIndex (size_t index);
 
     bool
-    RemoveBreakpointIDAtIndex (uint32_t index);
+    RemoveBreakpointIDAtIndex (size_t index);
 
     void
     Clear();
@@ -56,16 +56,16 @@ public:
     AddBreakpointID (const char *bp_id);
 
     bool
-    FindBreakpointID (BreakpointID &bp_id, uint32_t *position);
+    FindBreakpointID (BreakpointID &bp_id, size_t *position);
 
     bool
-    FindBreakpointID (const char *bp_id, uint32_t *position);
+    FindBreakpointID (const char *bp_id, size_t *position);
 
     void
-    InsertStringArray (const char **string_array, uint32_t array_size, CommandReturnObject &result);
+    InsertStringArray (const char **string_array, size_t array_size, CommandReturnObject &result);
 
     static bool
-    StringContainsIDRangeExpression (const char *in_string, uint32_t *range_start_len, uint32_t *range_end_pos);
+    StringContainsIDRangeExpression (const char *in_string, size_t *range_start_len, size_t *range_end_pos);
 
     static void
     FindAndReplaceIDRanges (Args &old_args, Target *target, CommandReturnObject &result, Args &new_args);

Modified: lldb/branches/lldb-platform-work/include/lldb/Breakpoint/BreakpointList.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Breakpoint/BreakpointList.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Breakpoint/BreakpointList.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Breakpoint/BreakpointList.h Thu Jun  6 19:06:43 2013
@@ -92,7 +92,7 @@ public:
     ///   breakpoint doesn't exist.
     //------------------------------------------------------------------
     lldb::BreakpointSP
-    GetBreakpointAtIndex (uint32_t i);
+    GetBreakpointAtIndex (size_t i);
 
     //------------------------------------------------------------------
     /// Returns a shared pointer to the breakpoint with index \a i, const version
@@ -105,7 +105,7 @@ public:
     ///   breakpoint doesn't exist.
     //------------------------------------------------------------------
     const lldb::BreakpointSP
-    GetBreakpointAtIndex (uint32_t i) const;
+    GetBreakpointAtIndex (size_t i) const;
 
     //------------------------------------------------------------------
     /// Returns the number of elements in this breakpoint list.

Modified: lldb/branches/lldb-platform-work/include/lldb/Breakpoint/BreakpointLocation.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Breakpoint/BreakpointLocation.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Breakpoint/BreakpointLocation.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Breakpoint/BreakpointLocation.h Thu Jun  6 19:06:43 2013
@@ -14,17 +14,18 @@
 
 // C++ Includes
 #include <list>
-#include <memory>
 
 // Other libraries and framework includes
 
 // Project includes
 #include "lldb/lldb-private.h"
 #include "lldb/Breakpoint/StoppointLocation.h"
-#include "lldb/Core/UserID.h"
 #include "lldb/Core/Address.h"
-#include "lldb/Target/Process.h"
 #include "lldb/Core/StringList.h"
+#include "lldb/Core/UserID.h"
+#include "lldb/Host/Mutex.h"
+#include "lldb/Target/Process.h"
+#include "lldb/Expression/ClangUserExpression.h"
 
 namespace lldb_private {
 
@@ -47,7 +48,7 @@ namespace lldb_private {
 //----------------------------------------------------------------------
 
 class BreakpointLocation : 
-    public STD_ENABLE_SHARED_FROM_THIS(BreakpointLocation),
+    public std::enable_shared_from_this<BreakpointLocation>,
     public StoppointLocation
 {
 public:
@@ -176,7 +177,10 @@ public:
     //     condition has been set.
     //------------------------------------------------------------------
     const char *
-    GetConditionText () const;
+    GetConditionText (size_t *hash = NULL) const;
+    
+    bool
+    ConditionSaysStop (ExecutionContext &exe_ctx, Error &error);
 
 
     //------------------------------------------------------------------
@@ -380,8 +384,11 @@ private:
     bool m_being_created;
     Address m_address; ///< The address defining this location.
     Breakpoint &m_owner; ///< The breakpoint that produced this object.
-    std::auto_ptr<BreakpointOptions> m_options_ap; ///< Breakpoint options pointer, NULL if we're using our breakpoint's options.
+    std::unique_ptr<BreakpointOptions> m_options_ap; ///< Breakpoint options pointer, NULL if we're using our breakpoint's options.
     lldb::BreakpointSiteSP m_bp_site_sp; ///< Our breakpoint site (it may be shared by more than one location.)
+    ClangUserExpression::ClangUserExpressionSP m_user_expression_sp; ///< The compiled expression to use in testing our condition.
+    Mutex m_condition_mutex; ///< Guards parsing and evaluation of the condition, which could be evaluated by multiple processes.
+    size_t m_condition_hash; ///< For testing whether the condition source code changed.
 
     void
     SendBreakpointLocationChangedEvent (lldb::BreakpointEventType eventKind);

Modified: lldb/branches/lldb-platform-work/include/lldb/Breakpoint/BreakpointLocationCollection.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Breakpoint/BreakpointLocationCollection.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Breakpoint/BreakpointLocationCollection.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Breakpoint/BreakpointLocationCollection.h Thu Jun  6 19:06:43 2013
@@ -101,7 +101,7 @@ public:
     ///     pointer if the breakpoint doesn't exist.
     //------------------------------------------------------------------
     lldb::BreakpointLocationSP
-    GetByIndex (uint32_t i);
+    GetByIndex (size_t i);
 
     //------------------------------------------------------------------
     /// Returns a shared pointer to the breakpoint location with index
@@ -115,7 +115,7 @@ public:
     ///     pointer if the breakpoint doesn't exist.
     //------------------------------------------------------------------
     const lldb::BreakpointLocationSP
-    GetByIndex (uint32_t i) const;
+    GetByIndex (size_t i) const;
 
     //------------------------------------------------------------------
     /// Returns the number of elements in this breakpoint location list.
@@ -171,6 +171,14 @@ public:
     //------------------------------------------------------------------
     bool ValidForThisThread (Thread *thread);
 
+    //------------------------------------------------------------------
+    /// Tell whether ALL the breakpoints in the location collection are internal.
+    ///
+    /// @result
+    ///     \b true if all breakpoint locations are owned by internal breakpoints,
+    ///     \b false otherwise.
+    //------------------------------------------------------------------
+    bool IsInternal() const;
 
 
 protected:

Modified: lldb/branches/lldb-platform-work/include/lldb/Breakpoint/BreakpointLocationList.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Breakpoint/BreakpointLocationList.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Breakpoint/BreakpointLocationList.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Breakpoint/BreakpointLocationList.h Thu Jun  6 19:06:43 2013
@@ -119,7 +119,7 @@ public:
     ///     pointer if the breakpoint doesn't exist.
     //------------------------------------------------------------------
     lldb::BreakpointLocationSP
-    GetByIndex (uint32_t i);
+    GetByIndex (size_t i);
 
     //------------------------------------------------------------------
     /// Returns a shared pointer to the breakpoint location with index
@@ -133,7 +133,7 @@ public:
     ///     pointer if the breakpoint doesn't exist.
     //------------------------------------------------------------------
     const lldb::BreakpointLocationSP
-    GetByIndex (uint32_t i) const;
+    GetByIndex (size_t i) const;
 
     //------------------------------------------------------------------
     /// Removes all the locations in this list from their breakpoint site

Modified: lldb/branches/lldb-platform-work/include/lldb/Breakpoint/BreakpointOptions.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Breakpoint/BreakpointOptions.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Breakpoint/BreakpointOptions.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Breakpoint/BreakpointOptions.h Thu Jun  6 19:06:43 2013
@@ -12,7 +12,6 @@
 
 // C Includes
 // C++ Includes
-#include <memory>
 // Other libraries and framework includes
 // Project includes
 #include "lldb/lldb-private.h"
@@ -67,7 +66,8 @@ public:
                       void *baton,
                       bool enabled = true,
                       int32_t ignore = 0,
-                      lldb::tid_t thread_id = LLDB_INVALID_THREAD_ID);
+                      lldb::tid_t thread_id = LLDB_INVALID_THREAD_ID,
+                      bool one_shot = false);
 
     virtual ~BreakpointOptions();
 
@@ -183,7 +183,7 @@ public:
     ///    A pointer to the condition expression text, or NULL if no
     //     condition has been set.
     //------------------------------------------------------------------
-    const char *GetConditionText () const;
+    const char *GetConditionText (size_t *hash = NULL) const;
     
     //------------------------------------------------------------------
     // Enabled/Ignore Count
@@ -195,13 +195,39 @@ public:
     ///     \b true if the breakpoint is enabled, \b false if disabled.
     //------------------------------------------------------------------
     bool         
-    IsEnabled () const;
+    IsEnabled () const
+    {
+        return m_enabled;
+    }
 
     //------------------------------------------------------------------
     /// If \a enable is \b true, enable the breakpoint, if \b false disable it.
     //------------------------------------------------------------------
     void
-    SetEnabled (bool enabled);
+    SetEnabled (bool enabled)
+    {
+        m_enabled = enabled;
+    }
+
+    //------------------------------------------------------------------
+    /// Check the One-shot state.
+    /// @return
+    ///     \b true if the breakpoint is one-shot, \b false otherwise.
+    //------------------------------------------------------------------
+    bool         
+    IsOneShot () const
+    {
+        return m_one_shot;
+    }
+
+    //------------------------------------------------------------------
+    /// If \a enable is \b true, enable the breakpoint, if \b false disable it.
+    //------------------------------------------------------------------
+    void
+    SetOneShot (bool one_shot)
+    {
+        m_one_shot = one_shot;
+    }
 
     //------------------------------------------------------------------
     /// Set the breakpoint to ignore the next \a count breakpoint hits.
@@ -210,7 +236,10 @@ public:
     //------------------------------------------------------------------
 
     void
-    SetIgnoreCount (uint32_t n);
+    SetIgnoreCount (uint32_t n)
+    {
+        m_ignore_count = n;
+    }
 
     //------------------------------------------------------------------
     /// Return the current Ignore Count.
@@ -218,7 +247,10 @@ public:
     ///     The number of breakpoint hits to be ignored.
     //------------------------------------------------------------------
     uint32_t
-    GetIgnoreCount () const;
+    GetIgnoreCount () const
+    {
+        return m_ignore_count;
+    }
 
     //------------------------------------------------------------------
     /// Return the current thread spec for this option.  This will return NULL if the no thread
@@ -314,10 +346,11 @@ private:
     lldb::BatonSP m_callback_baton_sp; // This is the client data for the callback
     bool m_callback_is_synchronous;
     bool m_enabled;
+    bool m_one_shot;
     uint32_t m_ignore_count; // Number of times to ignore this breakpoint
-    std::auto_ptr<ThreadSpec> m_thread_spec_ap; // Thread for which this breakpoint will take
-    std::auto_ptr<ClangUserExpression> m_condition_ap;  // The condition to test.
-
+    std::unique_ptr<ThreadSpec> m_thread_spec_ap; // Thread for which this breakpoint will take
+    std::string m_condition_text;  // The condition to test.
+    size_t m_condition_text_hash; // Its hash, so that locations know when the condition is updated.
 };
 
 } // namespace lldb_private

Modified: lldb/branches/lldb-platform-work/include/lldb/Breakpoint/BreakpointResolver.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Breakpoint/BreakpointResolver.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Breakpoint/BreakpointResolver.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Breakpoint/BreakpointResolver.h Thu Jun  6 19:06:43 2013
@@ -134,7 +134,6 @@ public:
     }
 
 protected:
-    Target *m_target;          // Every resolver has a target.
     Breakpoint *m_breakpoint;  // This is the breakpoint we add locations to.
 
 private:

Modified: lldb/branches/lldb-platform-work/include/lldb/Breakpoint/BreakpointResolverName.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Breakpoint/BreakpointResolverName.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Breakpoint/BreakpointResolverName.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Breakpoint/BreakpointResolverName.h Thu Jun  6 19:06:43 2013
@@ -86,13 +86,33 @@ public:
     }
 
 protected:
-    std::vector<ConstString> m_func_names;
-    uint32_t m_func_name_type_mask;  // See FunctionNameType
-    ConstString m_class_name;  // FIXME: Not used yet.  The idea would be to stop on methods of this class.
+    struct LookupInfo
+    {
+        ConstString name;
+        ConstString lookup_name;
+        uint32_t name_type_mask; // See FunctionNameType
+        bool match_name_after_lookup;
+        
+        LookupInfo () :
+            name(),
+            lookup_name(),
+            name_type_mask (0),
+            match_name_after_lookup (false)
+        {
+        }
+        
+        void
+        Prune (SymbolContextList &sc_list,
+               size_t start_idx) const;
+    };
+    std::vector<LookupInfo> m_lookups;
+    ConstString m_class_name;
     RegularExpression m_regex;
     Breakpoint::MatchType m_match_type;
     bool m_skip_prologue;
 
+    void
+    AddNameLookup (const ConstString &name, uint32_t name_type_mask);
 private:
     DISALLOW_COPY_AND_ASSIGN(BreakpointResolverName);
 };

Modified: lldb/branches/lldb-platform-work/include/lldb/Breakpoint/BreakpointSite.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Breakpoint/BreakpointSite.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Breakpoint/BreakpointSite.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Breakpoint/BreakpointSite.h Thu Jun  6 19:06:43 2013
@@ -39,7 +39,7 @@ namespace lldb_private {
 //----------------------------------------------------------------------
 
 class BreakpointSite : 
-    public STD_ENABLE_SHARED_FROM_THIS(BreakpointSite),
+    public std::enable_shared_from_this<BreakpointSite>,
     public StoppointLocation
 {
 public:
@@ -83,7 +83,7 @@ public:
     //------------------------------------------------------------------
     bool
     SetTrapOpcode (const uint8_t *trap_opcode,
-                   size_t trap_opcode_size);
+                   uint32_t trap_opcode_size);
 
     //------------------------------------------------------------------
     /// Gets the original instruction bytes that were overwritten by the trap
@@ -168,7 +168,7 @@ public:
     /// @return
     ///    The number of owners.
     //------------------------------------------------------------------
-    uint32_t
+    size_t
     GetNumberOfOwners ();
 
     //------------------------------------------------------------------
@@ -183,7 +183,7 @@ public:
     ///    A shared pointer to the breakpoint location at that index.
     //------------------------------------------------------------------
     lldb::BreakpointLocationSP
-    GetOwnerAtIndex (uint32_t index);
+    GetOwnerAtIndex (size_t idx);
     
     //------------------------------------------------------------------
     /// Check whether the owners of this breakpoint site have any
@@ -220,9 +220,29 @@ public:
     GetDescription (Stream *s,
                     lldb::DescriptionLevel level);
 
+    //------------------------------------------------------------------
+    /// Tell whether a breakpoint has a location at this site.
+    ///
+    /// @param[in] bp_id
+    ///     The breakpoint id to query.
+    ///
+    /// @result
+    ///     \b true if bp_id has a location that is at this site,
+    ///     \b false otherwise.
+    //------------------------------------------------------------------
     bool
     IsBreakpointAtThisSite (lldb::break_id_t bp_id);
 
+    //------------------------------------------------------------------
+    /// Tell whether ALL the breakpoints in the location collection are internal.
+    ///
+    /// @result
+    ///     \b true if all breakpoint locations are owned by internal breakpoints,
+    ///     \b false otherwise.
+    //------------------------------------------------------------------
+    bool
+    IsInternal () const;
+    
     BreakpointSite::Type
     GetType () const
     {
@@ -244,7 +264,7 @@ private:
     /// @param[in] context
     ///    \a break_loc_id is the Breakpoint Location to remove.
     //------------------------------------------------------------------
-    uint32_t
+    size_t
     RemoveOwner (lldb::break_id_t break_id,
                  lldb::break_id_t break_loc_id);
 
@@ -265,7 +285,6 @@ private:
     BreakpointSite (BreakpointSiteList *list,
                     const lldb::BreakpointLocationSP& owner,
                     lldb::addr_t m_addr,
-                    lldb::tid_t tid,
                     bool use_hardware);
 
     DISALLOW_COPY_AND_ASSIGN(BreakpointSite);

Modified: lldb/branches/lldb-platform-work/include/lldb/Breakpoint/Watchpoint.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Breakpoint/Watchpoint.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Breakpoint/Watchpoint.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Breakpoint/Watchpoint.h Thu Jun  6 19:06:43 2013
@@ -28,19 +28,65 @@
 namespace lldb_private {
 
 class Watchpoint :
+    public std::enable_shared_from_this<Watchpoint>,
     public StoppointLocation
 {
 public:
 
-    Watchpoint (lldb::addr_t addr, size_t size, bool hardware = true);
+    class WatchpointEventData :
+        public EventData
+    {
+    public:
 
+        static const ConstString &
+        GetFlavorString ();
+
+        virtual const ConstString &
+        GetFlavor () const;
+
+        WatchpointEventData (lldb::WatchpointEventType sub_type,
+                             const lldb::WatchpointSP &new_watchpoint_sp);
+
+        virtual
+        ~WatchpointEventData();
+
+        lldb::WatchpointEventType
+        GetWatchpointEventType () const;
+
+        lldb::WatchpointSP &
+        GetWatchpoint ();
+        
+        virtual void
+        Dump (Stream *s) const;
+
+        static lldb::WatchpointEventType
+        GetWatchpointEventTypeFromEvent (const lldb::EventSP &event_sp);
+
+        static lldb::WatchpointSP
+        GetWatchpointFromEvent (const lldb::EventSP &event_sp);
+
+        static const WatchpointEventData *
+        GetEventDataFromEvent (const Event *event_sp);
+
+    private:
+
+        lldb::WatchpointEventType m_watchpoint_event;
+        lldb::WatchpointSP m_new_watchpoint_sp;
+
+        DISALLOW_COPY_AND_ASSIGN (WatchpointEventData);
+    };
+
+    Watchpoint (Target& target, lldb::addr_t addr, uint32_t size, const ClangASTType *type, bool hardware = true);
     ~Watchpoint ();
 
+    void
+    IncrementFalseAlarmsAndReviseHitCount();
+
     bool
     IsEnabled () const;
 
     void
-    SetEnabled (bool enabled);
+    SetEnabled (bool enabled, bool notify = true);
 
     virtual bool
     IsHardware () const;
@@ -52,7 +98,7 @@ public:
     bool        WatchpointWrite () const;
     uint32_t    GetIgnoreCount () const;
     void        SetIgnoreCount (uint32_t n);
-    void        SetWatchpointType (uint32_t type);
+    void        SetWatchpointType (uint32_t type, bool notify = true);
     void        SetDeclInfo (const std::string &str);
     std::string GetWatchSpec();
     void        SetWatchSpec (const std::string &str);
@@ -60,20 +106,13 @@ public:
     // Snapshot management interface.
     bool        IsWatchVariable() const;
     void        SetWatchVariable(bool val);
-    std::string GetOldSnapshot() const;
-    void        SetOldSnapshot (const std::string &str);
-    std::string GetNewSnapshot() const;
-    void        SetNewSnapshot (const std::string &str);
-    uint64_t    GetOldSnapshotVal() const;
-    void        SetOldSnapshotVal (uint64_t val);
-    uint64_t    GetNewSnapshotVal() const;
-    void        SetNewSnapshotVal (uint64_t val);
+    bool        CaptureWatchedValue (const ExecutionContext &exe_ctx);
 
     void        GetDescription (Stream *s, lldb::DescriptionLevel level);
     void        Dump (Stream *s) const;
-    void        DumpSnapshots (const char * prefix, Stream *s) const;
+    void        DumpSnapshots (Stream *s, const char * prefix = NULL) const;
     void        DumpWithLevel (Stream *s, lldb::DescriptionLevel description_level) const;
-    Target      &GetTarget() { return *m_target; }
+    Target      &GetTarget() { return m_target; }
     const Error &GetError() { return m_error; }
 
     //------------------------------------------------------------------
@@ -146,35 +185,64 @@ public:
     //------------------------------------------------------------------
     const char *GetConditionText () const;
 
+    void
+    TurnOnEphemeralMode();
+
+    void
+    TurnOffEphemeralMode();
+
+    bool
+    IsDisabledDuringEphemeralMode();
+    
+    const ClangASTType &
+    GetClangASTType()
+    {
+        return m_type;
+    }
+
+
 private:
     friend class Target;
     friend class WatchpointList;
 
-    void        SetTarget(Target *target_ptr) { m_target = target_ptr; }
     void        ResetHitCount() { m_hit_count = 0; }
 
-    Target      *m_target;
+    Target      &m_target;
     bool        m_enabled;             // Is this watchpoint enabled
     bool        m_is_hardware;         // Is this a hardware watchpoint
     bool        m_is_watch_variable;   // True if set via 'watchpoint set variable'.
+    bool        m_is_ephemeral;        // True if the watchpoint is in the ephemeral mode, meaning that it is
+                                       // undergoing a pair of temporary disable/enable actions to avoid recursively
+                                       // triggering further watchpoint events.
+    uint32_t    m_disabled_count;      // Keep track of the count that the watchpoint is disabled while in ephemeral mode.
+                                       // At the end of the ephemeral mode when the watchpoint is to be enabled agian,
+                                       // we check the count, if it is more than 1, it means the user-supplied actions
+                                       // actually want the watchpoint to be disabled!
     uint32_t    m_watch_read:1,        // 1 if we stop when the watched data is read from
                 m_watch_write:1,       // 1 if we stop when the watched data is written to
                 m_watch_was_read:1,    // Set to 1 when watchpoint is hit for a read access
                 m_watch_was_written:1; // Set to 1 when watchpoint is hit for a write access
-    uint32_t    m_ignore_count;        // Number of times to ignore this breakpoint
+    uint32_t    m_ignore_count;        // Number of times to ignore this watchpoint
+    uint32_t    m_false_alarms;        // Number of false alarms.
     std::string m_decl_str;            // Declaration information, if any.
     std::string m_watch_spec_str;      // Spec for the watchpoint.
-    std::string m_snapshot_old_str;    // Old snapshot for the watchpoint value as by ValueObject::DumpValueObject().
-    std::string m_snapshot_new_str;    // New Snapshot for the watchpoint value as by ValueObject::DumpValueObject().
-    uint64_t    m_snapshot_old_val;    // Old snapshot for the watchpoint bytes.
-    uint64_t    m_snapshot_new_val;    // New Snapshot for the watchpoint bytes.
+    lldb::ValueObjectSP m_old_value_sp;
+    lldb::ValueObjectSP m_new_value_sp;
+    ClangASTType m_type;
     Error       m_error;               // An error object describing errors associated with this watchpoint.
     WatchpointOptions m_options;       // Settable watchpoint options, which is a delegate to handle
                                        // the callback machinery.
+    bool        m_being_created;
 
-    std::auto_ptr<ClangUserExpression> m_condition_ap;  // The condition to test.
+    std::unique_ptr<ClangUserExpression> m_condition_ap;  // The condition to test.
 
     void SetID(lldb::watch_id_t id) { m_loc_id = id; }
+    
+    void
+    SendWatchpointChangedEvent (lldb::WatchpointEventType eventKind);
+
+    void
+    SendWatchpointChangedEvent (WatchpointEventData *data);
 
     DISALLOW_COPY_AND_ASSIGN (Watchpoint);
 };

Modified: lldb/branches/lldb-platform-work/include/lldb/Breakpoint/WatchpointList.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Breakpoint/WatchpointList.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Breakpoint/WatchpointList.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Breakpoint/WatchpointList.h Thu Jun  6 19:06:43 2013
@@ -58,7 +58,7 @@ public:
     ///    The ID of the Watchpoint in the list.
     //------------------------------------------------------------------
     lldb::watch_id_t
-    Add (const lldb::WatchpointSP& wp_sp);
+    Add (const lldb::WatchpointSP& wp_sp, bool notify);
 
     //------------------------------------------------------------------
     /// Standard "Dump" method.
@@ -180,7 +180,7 @@ public:
     ///   \b true if the watchpoint \a watchID was in the list.
     //------------------------------------------------------------------
     bool
-    Remove (lldb::watch_id_t watchID);
+    Remove (lldb::watch_id_t watchID, bool notify);
 
     //------------------------------------------------------------------
     /// Returns the number hit count of all watchpoints in this list.
@@ -241,7 +241,7 @@ public:
     SetEnabledAll (bool enabled);
 
     void
-    RemoveAll ();
+    RemoveAll (bool notify);
     
     //------------------------------------------------------------------
     /// Sets the passed in Locker to hold the Watchpoint List mutex.

Modified: lldb/branches/lldb-platform-work/include/lldb/Breakpoint/WatchpointOptions.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Breakpoint/WatchpointOptions.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Breakpoint/WatchpointOptions.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Breakpoint/WatchpointOptions.h Thu Jun  6 19:06:43 2013
@@ -12,7 +12,6 @@
 
 // C Includes
 // C++ Includes
-#include <memory>
 // Other libraries and framework includes
 // Project includes
 #include "lldb/lldb-private.h"
@@ -248,7 +247,7 @@ private:
     WatchpointHitCallback m_callback; // This is the callback function pointer
     lldb::BatonSP m_callback_baton_sp; // This is the client data for the callback
     bool m_callback_is_synchronous;
-    std::auto_ptr<ThreadSpec> m_thread_spec_ap; // Thread for which this watchpoint will take
+    std::unique_ptr<ThreadSpec> m_thread_spec_ap; // Thread for which this watchpoint will take
 };
 
 } // namespace lldb_private

Modified: lldb/branches/lldb-platform-work/include/lldb/Core/Address.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Core/Address.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Core/Address.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Core/Address.h Thu Jun  6 19:06:43 2013
@@ -12,6 +12,7 @@
 
 // C Includes
 // C++ Includes
+#include <atomic>
 // Other libraries and framework includes
 // Project includes
 #include "lldb/lldb-private.h"
@@ -115,7 +116,7 @@ public:
     //------------------------------------------------------------------
     Address (const Address& rhs) :
         m_section_wp (rhs.m_section_wp),
-        m_offset (rhs.m_offset)
+        m_offset(rhs.m_offset.load())
     {
     }
 
@@ -302,7 +303,7 @@ public:
     ///     the address is currently not loaded.
     //------------------------------------------------------------------
     lldb::addr_t
-    GetCallableLoadAddress (Target *target) const;
+    GetCallableLoadAddress (Target *target, bool is_indirect = false) const;
 
     //------------------------------------------------------------------
     /// Get the load address as an opcode load address.
@@ -393,12 +394,6 @@ public:
     bool
     ResolveAddressUsingFileSections (lldb::addr_t addr, const SectionList *sections);
 
-    bool
-    IsLinkedAddress () const;
-
-    void
-    ResolveLinkedAddress ();
-
     //------------------------------------------------------------------
     /// Set the address to represent \a load_addr.
     ///
@@ -544,7 +539,7 @@ protected:
     // Member variables.
     //------------------------------------------------------------------
     lldb::SectionWP m_section_wp;   ///< The section for the address, can be NULL.
-    lldb::addr_t m_offset;      ///< Offset into section if \a m_section_wp is valid...
+    std::atomic<lldb::addr_t> m_offset;      ///< Offset into section if \a m_section_wp is valid...
 };
 
 

Modified: lldb/branches/lldb-platform-work/include/lldb/Core/ArchSpec.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Core/ArchSpec.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Core/ArchSpec.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Core/ArchSpec.h Thu Jun  6 19:06:43 2013
@@ -43,8 +43,10 @@ public:
         eCore_arm_armv6,
         eCore_arm_armv7,
         eCore_arm_armv7f,
-        eCore_arm_armv7k,
         eCore_arm_armv7s,
+        eCore_arm_armv7k,
+        eCore_arm_armv7m,
+        eCore_arm_armv7em,
         eCore_arm_xscale,  
         eCore_thumb,
         eCore_thumbv4t,
@@ -53,8 +55,10 @@ public:
         eCore_thumbv6,
         eCore_thumbv7,
         eCore_thumbv7f,
-        eCore_thumbv7k,
         eCore_thumbv7s,
+        eCore_thumbv7k,
+        eCore_thumbv7m,
+        eCore_thumbv7em,
         
         eCore_ppc_generic,
         eCore_ppc_ppc601,
@@ -82,6 +86,8 @@ public:
         eCore_x86_32_i486sx,
         
         eCore_x86_64_x86_64,
+        eCore_uknownMach32,
+        eCore_uknownMach64,
         kNumCores,
 
         kCore_invalid,
@@ -96,7 +102,7 @@ public:
         kCore_arm_last      = eCore_arm_xscale,
 
         kCore_thumb_first   = eCore_thumb,
-        kCore_thumb_last    = eCore_thumbv7s,
+        kCore_thumb_last    = eCore_thumbv7em,
 
         kCore_ppc_first     = eCore_ppc_generic,
         kCore_ppc_last      = eCore_ppc_ppc970,
@@ -157,7 +163,7 @@ public:
     const ArchSpec&
     operator= (const ArchSpec& rhs);
 
-    static uint32_t
+    static size_t
     AutoComplete (const char *name, 
                   StringList &matches);
 
@@ -365,7 +371,30 @@ public:
     lldb::ByteOrder
     GetDefaultEndian () const;
 
+    //------------------------------------------------------------------
+    /// Compare an ArchSpec to another ArchSpec, requiring an exact cpu 
+    /// type match between them.  
+    /// e.g. armv7s is not an exact match with armv7 - this would return false
+    ///
+    /// @return true if the two ArchSpecs match.
+    //------------------------------------------------------------------
+    bool
+    IsExactMatch (const ArchSpec& rhs) const;
+
+    //------------------------------------------------------------------
+    /// Compare an ArchSpec to another ArchSpec, requiring a compatible
+    /// cpu type match between them.  
+    /// e.g. armv7s is compatible with armv7 - this method would return true
+    ///
+    /// @return true if the two ArchSpecs are compatible
+    //------------------------------------------------------------------
+    bool
+    IsCompatibleMatch (const ArchSpec& rhs) const;
+
 protected:
+    bool
+    IsEqualTo (const ArchSpec& rhs, bool exact_match) const;
+
     llvm::Triple m_triple;
     Core m_core;
     lldb::ByteOrder m_byte_order;
@@ -376,33 +405,6 @@ protected:
     CoreUpdated (bool update_triple);
 };
 
-
-//------------------------------------------------------------------
-/// @fn bool operator== (const ArchSpec& lhs, const ArchSpec& rhs)
-/// @brief Equal to operator.
-///
-/// Tests two ArchSpec objects to see if they are equal.
-///
-/// @param[in] lhs The Left Hand Side ArchSpec object to compare.
-/// @param[in] rhs The Left Hand Side ArchSpec object to compare.
-///
-/// @return true if \a lhs is equal to \a rhs
-//------------------------------------------------------------------
-bool operator==(const ArchSpec& lhs, const ArchSpec& rhs);
-
-//------------------------------------------------------------------
-/// @fn bool operator!= (const ArchSpec& lhs, const ArchSpec& rhs)
-/// @brief Not equal to operator.
-///
-/// Tests two ArchSpec objects to see if they are not equal.
-///
-/// @param[in] lhs The Left Hand Side ArchSpec object to compare.
-/// @param[in] rhs The Left Hand Side ArchSpec object to compare.
-///
-/// @return true if \a lhs is not equal to \a rhs
-//------------------------------------------------------------------
-bool operator!=(const ArchSpec& lhs, const ArchSpec& rhs);
-
 //------------------------------------------------------------------
 /// @fn bool operator< (const ArchSpec& lhs, const ArchSpec& rhs)
 /// @brief Less than operator.

Modified: lldb/branches/lldb-platform-work/include/lldb/Core/Broadcaster.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Core/Broadcaster.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Core/Broadcaster.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Core/Broadcaster.h Thu Jun  6 19:06:43 2013
@@ -85,6 +85,8 @@ private:
 class BroadcasterManager
 {
 public:
+    friend class Listener;
+
     BroadcasterManager ();
 
     ~BroadcasterManager () {}
@@ -233,7 +235,8 @@ private:
 ///             eBroadcastBitStateChanged   = (1 << 0),
 ///             eBroadcastBitInterrupt      = (1 << 1),
 ///             eBroadcastBitSTDOUT         = (1 << 2),
-///             eBroadcastBitSTDERR         = (1 << 3)
+///             eBroadcastBitSTDERR         = (1 << 3),
+///             eBroadcastBitProfileData    = (1 << 4)
 ///         };
 ///     \endcode
 //----------------------------------------------------------------------
@@ -430,6 +433,10 @@ public:
     void
     RestoreBroadcaster ();
     
+    // This needs to be filled in if you are going to register the broadcaster with the broadcaster
+    // manager and do broadcaster class matching.
+    // FIXME: Probably should make a ManagedBroadcaster subclass with all the bits needed to work
+    // with the BroadcasterManager, so that it is clearer how to add one.
     virtual ConstString &GetBroadcasterClass() const;
     
     BroadcasterManager *GetManager();

Modified: lldb/branches/lldb-platform-work/include/lldb/Core/ConstString.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Core/ConstString.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Core/ConstString.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Core/ConstString.h Thu Jun  6 19:06:43 2013
@@ -60,6 +60,8 @@ public:
     {
     }
 
+    explicit ConstString (const llvm::StringRef &s);
+
     //------------------------------------------------------------------
     /// Construct with C String value
     ///
@@ -375,6 +377,9 @@ public:
     void
     SetCString (const char *cstr);
 
+    void
+    SetString (const llvm::StringRef &s);
+
     //------------------------------------------------------------------
     /// Set the C string value and its mangled counterpart.
     ///

Modified: lldb/branches/lldb-platform-work/include/lldb/Core/DataBuffer.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Core/DataBuffer.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Core/DataBuffer.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Core/DataBuffer.h Thu Jun  6 19:06:43 2013
@@ -84,7 +84,7 @@ public:
     /// @return
     ///     The number of bytes this object currently contains.
     //------------------------------------------------------------------
-    virtual size_t
+    virtual lldb::offset_t
     GetByteSize() const = 0;
 };
 

Modified: lldb/branches/lldb-platform-work/include/lldb/Core/DataBufferHeap.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Core/DataBufferHeap.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Core/DataBufferHeap.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Core/DataBufferHeap.h Thu Jun  6 19:06:43 2013
@@ -50,7 +50,7 @@ public:
     /// @param[in] ch
     ///     The character to use when filling the buffer initially.
     //------------------------------------------------------------------
-    DataBufferHeap (size_t n, uint8_t ch);
+    DataBufferHeap (lldb::offset_t n, uint8_t ch);
 
     //------------------------------------------------------------------
     /// Construct by making a copy of \a src_len bytes from \a src.
@@ -61,7 +61,7 @@ public:
     /// @param[in] src_len
     ///     The number of bytes in \a src to copy.
     //------------------------------------------------------------------
-    DataBufferHeap (const void *src, size_t src_len);
+    DataBufferHeap (const void *src, lldb::offset_t src_len);
 
     //------------------------------------------------------------------
     /// Destructor.
@@ -87,7 +87,7 @@ public:
     //------------------------------------------------------------------
     /// @copydoc DataBuffer::GetByteSize() const
     //------------------------------------------------------------------
-    virtual size_t
+    virtual lldb::offset_t
     GetByteSize () const;
 
     //------------------------------------------------------------------
@@ -104,8 +104,8 @@ public:
     ///     The size in bytes after that this heap buffer was
     ///     successfully resized to.
     //------------------------------------------------------------------
-    size_t
-    SetByteSize (size_t byte_size);
+    lldb::offset_t
+    SetByteSize (lldb::offset_t byte_size);
 
     //------------------------------------------------------------------
     /// Makes a copy of the \a src_len bytes in \a src.
@@ -119,7 +119,7 @@ public:
     ///     The number of bytes in \a src to copy.
     //------------------------------------------------------------------
     void
-    CopyData (const void *src, size_t src_len);
+    CopyData (const void *src, lldb::offset_t src_len);
 
 private:
     //------------------------------------------------------------------

Modified: lldb/branches/lldb-platform-work/include/lldb/Core/DataBufferMemoryMap.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Core/DataBufferMemoryMap.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Core/DataBufferMemoryMap.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Core/DataBufferMemoryMap.h Thu Jun  6 19:06:43 2013
@@ -70,7 +70,7 @@ public:
     //------------------------------------------------------------------
     /// @copydoc DataBuffer::GetByteSize() const
     //------------------------------------------------------------------
-    virtual size_t
+    virtual lldb::offset_t
     GetByteSize () const;
 
     //------------------------------------------------------------------
@@ -107,8 +107,8 @@ public:
     //------------------------------------------------------------------
     size_t
     MemoryMapFromFileSpec (const FileSpec* file,
-                           off_t offset = 0,
-                           size_t length = SIZE_MAX,
+                           lldb::offset_t offset = 0,
+                           lldb::offset_t length = SIZE_MAX,
                            bool writeable = false);
 
     //------------------------------------------------------------------
@@ -136,8 +136,8 @@ public:
     //------------------------------------------------------------------
     size_t
     MemoryMapFromFileDescriptor (int fd, 
-                                 off_t offset,
-                                 size_t length,
+                                 lldb::offset_t offset,
+                                 lldb::offset_t length,
                                  bool write,
                                  bool fd_is_file);
 
@@ -148,7 +148,7 @@ protected:
     uint8_t * m_mmap_addr;  ///< The actual pointer that was returned from \c mmap()
     size_t m_mmap_size;     ///< The actual number of bytes that were mapped when \c mmap() was called
     uint8_t *m_data;        ///< The data the user requested somewhere within the memory mapped data.
-    size_t m_size;          ///< The size of the data the user got when data was requested
+    lldb::offset_t m_size;  ///< The size of the data the user got when data was requested
 
 private:
     DISALLOW_COPY_AND_ASSIGN (DataBufferMemoryMap);

Modified: lldb/branches/lldb-platform-work/include/lldb/Core/DataEncoder.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Core/DataEncoder.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Core/DataEncoder.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Core/DataEncoder.h Thu Jun  6 19:06:43 2013
@@ -424,7 +424,19 @@ public:
     ///     length bytes available at that offset, \b false otherwise.
     //------------------------------------------------------------------
     bool
-    ValidOffsetForDataOfSize (uint32_t offset, uint32_t length) const;
+    ValidOffsetForDataOfSize (uint32_t offset, uint32_t length) const
+    {
+        return length <= BytesLeft (offset);
+    }
+
+    uint32_t
+    BytesLeft (uint32_t offset) const
+    {
+        const uint32_t size = GetByteSize();
+        if (size > offset)
+            return size - offset;
+        return 0;
+    }
 
 protected:
     //------------------------------------------------------------------

Modified: lldb/branches/lldb-platform-work/include/lldb/Core/DataExtractor.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Core/DataExtractor.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Core/DataExtractor.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Core/DataExtractor.h Thu Jun  6 19:06:43 2013
@@ -86,7 +86,7 @@ public:
     /// @param[in] addr_size
     ///     A new address byte size value.
     //------------------------------------------------------------------
-    DataExtractor (const void* data, uint32_t data_length, lldb::ByteOrder byte_order, uint8_t addr_size);
+    DataExtractor (const void* data, lldb::offset_t data_length, lldb::ByteOrder byte_order, uint32_t addr_size);
 
     //------------------------------------------------------------------
     /// Construct with shared data.
@@ -105,7 +105,7 @@ public:
     /// @param[in] addr_size
     ///     A new address byte size value.
     //------------------------------------------------------------------
-    DataExtractor (const lldb::DataBufferSP& data_sp, lldb::ByteOrder byte_order, uint8_t addr_size);
+    DataExtractor (const lldb::DataBufferSP& data_sp, lldb::ByteOrder byte_order, uint32_t addr_size);
 
     //------------------------------------------------------------------
     /// Construct with a subset of \a data.
@@ -130,7 +130,7 @@ public:
     /// @param[in] length
     ///     The length in bytes of the subset of data.
     //------------------------------------------------------------------
-    DataExtractor (const DataExtractor& data, uint32_t offset, uint32_t length);
+    DataExtractor (const DataExtractor& data, lldb::offset_t offset, lldb::offset_t length);
 
     DataExtractor (const DataExtractor& rhs);
     //------------------------------------------------------------------
@@ -204,10 +204,10 @@ public:
     /// @return
     ///     The offset at which dumping ended.
     //------------------------------------------------------------------
-    uint32_t
+    lldb::offset_t
     PutToLog (Log *log,
-              uint32_t offset,
-              uint32_t length,
+              lldb::offset_t offset,
+              lldb::offset_t length,
               uint64_t base_addr,
               uint32_t num_per_line,
               Type type,
@@ -273,13 +273,13 @@ public:
     /// @return
     ///     The offset at which dumping ended.
     //------------------------------------------------------------------
-    uint32_t
+    lldb::offset_t
     Dump (Stream *s,
-          uint32_t offset,
+          lldb::offset_t offset,
           lldb::Format item_format,
-          uint32_t item_byte_size,
-          uint32_t item_count,
-          uint32_t num_per_line,
+          size_t item_byte_size,
+          size_t item_count,
+          size_t num_per_line,
           uint64_t base_addr,
           uint32_t item_bit_size,
           uint32_t item_bit_offset,
@@ -300,7 +300,7 @@ public:
     ///     UUID value.
     //------------------------------------------------------------------
     void
-    DumpUUID (Stream *s, uint32_t offset) const;
+    DumpUUID (Stream *s, lldb::offset_t offset) const;
 
     //------------------------------------------------------------------
     /// Extract an arbitrary number of bytes in the specified byte
@@ -332,7 +332,7 @@ public:
     ///     if there aren't enough bytes at the specified offset.
     //------------------------------------------------------------------
     size_t
-    ExtractBytes (uint32_t offset, uint32_t length, lldb::ByteOrder dst_byte_order, void *dst) const;
+    ExtractBytes (lldb::offset_t offset, lldb::offset_t length, lldb::ByteOrder dst_byte_order, void *dst) const;
 
     //------------------------------------------------------------------
     /// Extract an address from \a *offset_ptr.
@@ -353,10 +353,10 @@ public:
     ///     The extracted address value.
     //------------------------------------------------------------------
     uint64_t
-    GetAddress (uint32_t *offset_ptr) const;
+    GetAddress (lldb::offset_t *offset_ptr) const;
     
     uint64_t
-    GetAddress_unchecked (uint32_t *offset_ptr) const;
+    GetAddress_unchecked (lldb::offset_t *offset_ptr) const;
 
     //------------------------------------------------------------------
     /// Get the current address size.
@@ -367,7 +367,7 @@ public:
     /// @return
     ///     The size in bytes of address values that will be extracted.
     //------------------------------------------------------------------
-    uint8_t
+    uint32_t
     GetAddressByteSize () const
     {
         return m_addr_size;
@@ -379,7 +379,7 @@ public:
     /// @return
     ///     The total number of bytes of data this object refers to.
     //------------------------------------------------------------------
-    size_t
+    uint64_t
     GetByteSize () const
     {
         return m_end - m_start;
@@ -408,7 +408,7 @@ public:
     ///     NULL will be returned.
     //------------------------------------------------------------------
     const char *
-    GetCStr (uint32_t *offset_ptr) const;
+    GetCStr (lldb::offset_t *offset_ptr) const;
 
     //------------------------------------------------------------------
     /// Extract \a length bytes from \a *offset_ptr.
@@ -434,7 +434,13 @@ public:
     ///     and length are valid, or NULL otherwise.
     //------------------------------------------------------------------
     const void*
-    GetData (uint32_t *offset_ptr, uint32_t length) const;
+    GetData (lldb::offset_t *offset_ptr, lldb::offset_t length) const
+    {
+        const uint8_t *ptr = PeekData (*offset_ptr, length);
+        if (ptr)
+            *offset_ptr += length;
+        return ptr;
+    }
     
     //------------------------------------------------------------------
     /// Copy \a dst_len bytes from \a *offset_ptr and ensure the copied
@@ -475,11 +481,11 @@ public:
     ///     Returns the number of bytes that were copied, or zero if 
     ///     anything goes wrong.
     //------------------------------------------------------------------
-    uint32_t
-    CopyByteOrderedData (uint32_t src_offset, 
-                         uint32_t src_len,
+    lldb::offset_t
+    CopyByteOrderedData (lldb::offset_t src_offset,
+                         lldb::offset_t src_len,
                          void *dst, 
-                         uint32_t dst_len, 
+                         lldb::offset_t dst_len,
                          lldb::ByteOrder dst_byte_order) const;
 
     //------------------------------------------------------------------
@@ -538,13 +544,13 @@ public:
     ///     The floating value that was extracted, or zero on failure.
     //------------------------------------------------------------------
     float
-    GetFloat (uint32_t *offset_ptr) const;
+    GetFloat (lldb::offset_t *offset_ptr) const;
 
     double
-    GetDouble (uint32_t *offset_ptr) const;
+    GetDouble (lldb::offset_t *offset_ptr) const;
 
     long double
-    GetLongDouble (uint32_t *offset_ptr) const;
+    GetLongDouble (lldb::offset_t *offset_ptr) const;
 
     //------------------------------------------------------------------
     /// Extract a GNU encoded pointer value from \a *offset_ptr.
@@ -575,7 +581,11 @@ public:
     ///     The extracted GNU encoded pointer value.
     //------------------------------------------------------------------
     uint64_t
-    GetGNUEHPointer (uint32_t *offset_ptr, uint32_t eh_ptr_enc, lldb::addr_t pc_rel_addr, lldb::addr_t text_addr, lldb::addr_t data_addr);
+    GetGNUEHPointer (lldb::offset_t *offset_ptr,
+                     uint32_t eh_ptr_enc,
+                     lldb::addr_t pc_rel_addr,
+                     lldb::addr_t text_addr,
+                     lldb::addr_t data_addr);
 
     //------------------------------------------------------------------
     /// Extract an integer of size \a byte_size from \a *offset_ptr.
@@ -601,7 +611,7 @@ public:
     ///     The integer value that was extracted, or zero on failure.
     //------------------------------------------------------------------
     uint32_t
-    GetMaxU32 (uint32_t *offset_ptr, uint32_t byte_size) const;
+    GetMaxU32 (lldb::offset_t *offset_ptr, size_t byte_size) const;
 
     //------------------------------------------------------------------
     /// Extract an unsigned integer of size \a byte_size from \a
@@ -630,10 +640,10 @@ public:
     ///     failure.
     //------------------------------------------------------------------
     uint64_t
-    GetMaxU64 (uint32_t *offset_ptr, uint32_t byte_size) const;
+    GetMaxU64 (lldb::offset_t *offset_ptr, size_t byte_size) const;
 
     uint64_t
-    GetMaxU64_unchecked (uint32_t *offset_ptr, uint32_t byte_size) const;
+    GetMaxU64_unchecked (lldb::offset_t *offset_ptr, size_t byte_size) const;
 
     //------------------------------------------------------------------
     /// Extract an signed integer of size \a byte_size from \a *offset_ptr.
@@ -661,7 +671,7 @@ public:
     ///     or zero on failure.
     //------------------------------------------------------------------
     int64_t
-    GetMaxS64 (uint32_t *offset_ptr, uint32_t size) const;
+    GetMaxS64 (lldb::offset_t *offset_ptr, size_t size) const;
 
     //------------------------------------------------------------------
     /// Extract an unsigned integer of size \a byte_size from \a
@@ -700,7 +710,10 @@ public:
     ///     zero on failure.
     //------------------------------------------------------------------
     uint64_t
-    GetMaxU64Bitfield (uint32_t *offset_ptr, uint32_t size, uint32_t bitfield_bit_size, uint32_t bitfield_bit_offset) const;
+    GetMaxU64Bitfield (lldb::offset_t *offset_ptr,
+                       size_t size,
+                       uint32_t bitfield_bit_size,
+                       uint32_t bitfield_bit_offset) const;
 
     //------------------------------------------------------------------
     /// Extract an signed integer of size \a byte_size from \a
@@ -739,7 +752,10 @@ public:
     ///     zero on failure.
     //------------------------------------------------------------------
     int64_t
-    GetMaxS64Bitfield (uint32_t *offset_ptr, uint32_t size, uint32_t bitfield_bit_size, uint32_t bitfield_bit_offset) const;
+    GetMaxS64Bitfield (lldb::offset_t *offset_ptr,
+                       size_t size,
+                       uint32_t bitfield_bit_size,
+                       uint32_t bitfield_bit_offset) const;
 
     //------------------------------------------------------------------
     /// Extract an pointer from \a *offset_ptr.
@@ -760,7 +776,7 @@ public:
     ///     The extracted pointer value as a 64 integer.
     //------------------------------------------------------------------
     uint64_t
-    GetPointer (uint32_t *offset_ptr) const;
+    GetPointer (lldb::offset_t *offset_ptr) const;
 
     //------------------------------------------------------------------
     /// Get the current byte order value.
@@ -792,10 +808,10 @@ public:
     ///     The extracted uint8_t value.
     //------------------------------------------------------------------
     uint8_t
-    GetU8 ( uint32_t *offset_ptr) const;
+    GetU8 ( lldb::offset_t *offset_ptr) const;
 
     uint8_t
-    GetU8_unchecked (uint32_t *offset_ptr) const
+    GetU8_unchecked (lldb::offset_t *offset_ptr) const
     {
         uint8_t val = m_start[*offset_ptr];
         *offset_ptr += 1;
@@ -803,13 +819,13 @@ public:
     }
     
     uint16_t
-    GetU16_unchecked (uint32_t *offset_ptr) const;
+    GetU16_unchecked (lldb::offset_t *offset_ptr) const;
 
     uint32_t
-    GetU32_unchecked (uint32_t *offset_ptr) const;
+    GetU32_unchecked (lldb::offset_t *offset_ptr) const;
 
     uint64_t
-    GetU64_unchecked (uint32_t *offset_ptr) const;
+    GetU64_unchecked (lldb::offset_t *offset_ptr) const;
     //------------------------------------------------------------------
     /// Extract \a count uint8_t values from \a *offset_ptr.
     ///
@@ -836,7 +852,7 @@ public:
     ///     NULL otherise.
     //------------------------------------------------------------------
     void *
-    GetU8 ( uint32_t *offset_ptr, void *dst, uint32_t count) const;
+    GetU8 (lldb::offset_t *offset_ptr, void *dst, uint32_t count) const;
 
     //------------------------------------------------------------------
     /// Extract a uint16_t value from \a *offset_ptr.
@@ -855,7 +871,7 @@ public:
     ///     The extracted uint16_t value.
     //------------------------------------------------------------------
     uint16_t
-    GetU16 (uint32_t *offset_ptr) const;
+    GetU16 (lldb::offset_t *offset_ptr) const;
 
     //------------------------------------------------------------------
     /// Extract \a count uint16_t values from \a *offset_ptr.
@@ -883,7 +899,7 @@ public:
     ///     NULL otherise.
     //------------------------------------------------------------------
     void *
-    GetU16 (uint32_t *offset_ptr, void *dst, uint32_t count) const;
+    GetU16 (lldb::offset_t *offset_ptr, void *dst, uint32_t count) const;
 
     //------------------------------------------------------------------
     /// Extract a uint32_t value from \a *offset_ptr.
@@ -902,7 +918,7 @@ public:
     ///     The extracted uint32_t value.
     //------------------------------------------------------------------
     uint32_t
-    GetU32 (uint32_t *offset_ptr) const;
+    GetU32 (lldb::offset_t *offset_ptr) const;
 
     //------------------------------------------------------------------
     /// Extract \a count uint32_t values from \a *offset_ptr.
@@ -930,7 +946,7 @@ public:
     ///     NULL otherise.
     //------------------------------------------------------------------
     void *
-    GetU32 (uint32_t *offset_ptr, void *dst, uint32_t count) const;
+    GetU32 (lldb::offset_t *offset_ptr, void *dst, uint32_t count) const;
 
     //------------------------------------------------------------------
     /// Extract a uint64_t value from \a *offset_ptr.
@@ -949,7 +965,7 @@ public:
     ///     The extracted uint64_t value.
     //------------------------------------------------------------------
     uint64_t
-    GetU64 (uint32_t *offset_ptr) const;
+    GetU64 (lldb::offset_t *offset_ptr) const;
 
     //------------------------------------------------------------------
     /// Extract \a count uint64_t values from \a *offset_ptr.
@@ -977,7 +993,7 @@ public:
     ///     NULL otherise.
     //------------------------------------------------------------------
     void *
-    GetU64 ( uint32_t *offset_ptr, void *dst, uint32_t count) const;
+    GetU64 ( lldb::offset_t *offset_ptr, void *dst, uint32_t count) const;
 
     //------------------------------------------------------------------
     /// Extract a signed LEB128 value from \a *offset_ptr.
@@ -998,7 +1014,7 @@ public:
     ///     The extracted signed integer value.
     //------------------------------------------------------------------
     int64_t
-    GetSLEB128 (uint32_t *offset_ptr) const;
+    GetSLEB128 (lldb::offset_t *offset_ptr) const;
 
     //------------------------------------------------------------------
     /// Extract a unsigned LEB128 value from \a *offset_ptr.
@@ -1019,7 +1035,7 @@ public:
     ///     The extracted unsigned integer value.
     //------------------------------------------------------------------
     uint64_t
-    GetULEB128 (uint32_t *offset_ptr) const;
+    GetULEB128 (lldb::offset_t *offset_ptr) const;
 
     lldb::DataBufferSP &
     GetSharedDataBuffer ()
@@ -1042,7 +1058,7 @@ public:
     ///     NULL otherwise.
     //------------------------------------------------------------------
     const char *
-    PeekCStr (uint32_t offset) const;
+    PeekCStr (lldb::offset_t offset) const;
 
     //------------------------------------------------------------------
     /// Peek at a bytes at \a offset.
@@ -1056,7 +1072,12 @@ public:
     ///     otherwise.
     //------------------------------------------------------------------
     const uint8_t*
-    PeekData (uint32_t offset, uint32_t length) const;
+    PeekData (lldb::offset_t offset, lldb::offset_t length) const
+    {
+        if (length > 0 && ValidOffsetForDataOfSize(offset, length))
+            return m_start + offset;
+        return NULL;
+    }
 
     //------------------------------------------------------------------
     /// Set the address byte size.
@@ -1068,7 +1089,7 @@ public:
     ///     The size in bytes to use when extracting addresses.
     //------------------------------------------------------------------
     void
-    SetAddressByteSize (uint8_t addr_size)
+    SetAddressByteSize (uint32_t addr_size)
     {
         m_addr_size = addr_size;
     }
@@ -1094,8 +1115,8 @@ public:
     /// @return
     ///     The number of bytes that this object now contains.
     //------------------------------------------------------------------
-    uint32_t
-    SetData (const void *bytes, uint32_t length, lldb::ByteOrder byte_order);
+    lldb::offset_t
+    SetData (const void *bytes, lldb::offset_t length, lldb::ByteOrder byte_order);
 
     //------------------------------------------------------------------
     /// Adopt a subset of \a data.
@@ -1123,8 +1144,8 @@ public:
     /// @return
     ///     The number of bytes that this object now contains.
     //------------------------------------------------------------------
-    uint32_t
-    SetData (const DataExtractor& data, uint32_t offset, uint32_t length);
+    lldb::offset_t
+    SetData (const DataExtractor& data, lldb::offset_t offset, lldb::offset_t length);
 
     //------------------------------------------------------------------
     /// Adopt a subset of shared data in \a data_sp.
@@ -1151,8 +1172,8 @@ public:
     /// @return
     ///     The number of bytes that this object now contains.
     //------------------------------------------------------------------
-    uint32_t
-    SetData (const lldb::DataBufferSP& data_sp, uint32_t offset = 0, uint32_t length = UINT32_MAX);
+    lldb::offset_t
+    SetData (const lldb::DataBufferSP& data_sp, lldb::offset_t offset = 0, lldb::offset_t length = LLDB_INVALID_OFFSET);
 
     //------------------------------------------------------------------
     /// Set the byte_order value.
@@ -1188,7 +1209,7 @@ public:
     //      The number of bytes consumed during the extraction.
     //------------------------------------------------------------------
     uint32_t
-    Skip_LEB128 (uint32_t *offset_ptr) const;
+    Skip_LEB128 (lldb::offset_t *offset_ptr) const;
 
     //------------------------------------------------------------------
     /// Test the validity of \a offset.
@@ -1198,7 +1219,7 @@ public:
     ///     object, \b false otherwise.
     //------------------------------------------------------------------
     bool
-    ValidOffset (uint32_t offset) const
+    ValidOffset (lldb::offset_t offset) const
     {
         return offset < GetByteSize();
     }
@@ -1211,7 +1232,10 @@ public:
     ///     length bytes available at that offset, \b false otherwise.
     //------------------------------------------------------------------
     bool
-    ValidOffsetForDataOfSize (uint32_t offset, uint32_t length) const;
+    ValidOffsetForDataOfSize (lldb::offset_t offset, lldb::offset_t length) const
+    {
+        return length <= BytesLeft (offset);
+    }
 
     size_t
     Copy (DataExtractor& dest_data) const;
@@ -1220,16 +1244,26 @@ public:
     Append (DataExtractor& rhs);
     
     bool
-    Append (void* bytes, uint32_t length);
-    
+    Append (void* bytes, lldb::offset_t length);
+
+    lldb::offset_t
+    BytesLeft (lldb::offset_t offset) const
+    {
+        const lldb::offset_t size = GetByteSize();
+        if (size > offset)
+            return size - offset;
+        return 0;
+    }
+
 protected:
+    
     //------------------------------------------------------------------
     // Member variables
     //------------------------------------------------------------------
     const uint8_t * m_start;        ///< A pointer to the first byte of data.
     const uint8_t * m_end;          ///< A pointer to the byte that is past the end of the data.
     lldb::ByteOrder m_byte_order;   ///< The byte order of the data we are extracting from.
-    uint8_t         m_addr_size;    ///< The address size to use when extracting pointers or addresses
+    uint32_t m_addr_size;           ///< The address size to use when extracting pointers or addresses
     mutable lldb::DataBufferSP m_data_sp; ///< The shared pointer to data that can be shared among multilple instances
 };
 

Removed: lldb/branches/lldb-platform-work/include/lldb/Core/DataVisualization.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Core/DataVisualization.h?rev=183467&view=auto
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Core/DataVisualization.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Core/DataVisualization.h (removed)
@@ -1,174 +0,0 @@
-//===-- DataVisualization.h ----------------------------------------*- C++ -*-===//
-//
-//                     The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef lldb_DataVisualization_h_
-#define lldb_DataVisualization_h_
-
-// C Includes
-// C++ Includes
-
-// Other libraries and framework includes
-// Project includes
-#include "lldb/Core/ConstString.h"
-#include "lldb/Core/FormatClasses.h"
-#include "lldb/Core/FormatManager.h"
-
-namespace lldb_private {
-
-// this class is the high-level front-end of LLDB Data Visualization
-// code in FormatManager.h/cpp is the low-level implementation of this feature
-// clients should refer to this class as the entry-point into the data formatters
-// unless they have a good reason to bypass this and go to the backend
-class DataVisualization
-{
-public:
-    
-    // use this call to force the FM to consider itself updated even when there is no apparent reason for that
-    static void
-    ForceUpdate();
-    
-    static uint32_t
-    GetCurrentRevision ();
-    
-    class ValueFormats
-    {
-    public:
-        static lldb::TypeFormatImplSP
-        GetFormat (ValueObject& valobj, lldb::DynamicValueType use_dynamic);
-        
-        static lldb::TypeFormatImplSP
-        GetFormat (const ConstString &type);
-        
-        static void
-        Add (const ConstString &type, const lldb::TypeFormatImplSP &entry);
-        
-        static bool
-        Delete (const ConstString &type);
-        
-        static void
-        Clear ();
-        
-        static void
-        LoopThrough (TypeFormatImpl::ValueCallback callback, void* callback_baton);
-        
-        static uint32_t
-        GetCount ();
-        
-        static lldb::TypeNameSpecifierImplSP
-        GetTypeNameSpecifierForFormatAtIndex (uint32_t);
-        
-        static lldb::TypeFormatImplSP
-        GetFormatAtIndex (uint32_t);
-    };
-    
-    static lldb::TypeSummaryImplSP
-    GetSummaryFormat(ValueObject& valobj,
-                     lldb::DynamicValueType use_dynamic);
-
-    static lldb::TypeSummaryImplSP
-    GetSummaryForType (lldb::TypeNameSpecifierImplSP type_sp);
-    
-#ifndef LLDB_DISABLE_PYTHON
-    static lldb::SyntheticChildrenSP
-    GetSyntheticChildrenForType (lldb::TypeNameSpecifierImplSP type_sp);
-#endif
-    
-    static lldb::TypeFilterImplSP
-    GetFilterForType (lldb::TypeNameSpecifierImplSP type_sp);
-
-#ifndef LLDB_DISABLE_PYTHON
-    static lldb::TypeSyntheticImplSP
-    GetSyntheticForType (lldb::TypeNameSpecifierImplSP type_sp);
-#endif
-    
-#ifndef LLDB_DISABLE_PYTHON
-    static lldb::SyntheticChildrenSP
-    GetSyntheticChildren(ValueObject& valobj,
-                         lldb::DynamicValueType use_dynamic);
-#endif
-    
-    static bool
-    AnyMatches(ConstString type_name,
-               TypeCategoryImpl::FormatCategoryItems items = TypeCategoryImpl::ALL_ITEM_TYPES,
-               bool only_enabled = true,
-               const char** matching_category = NULL,
-               TypeCategoryImpl::FormatCategoryItems* matching_type = NULL);
-    
-    class NamedSummaryFormats
-    {
-    public:
-        static bool
-        GetSummaryFormat (const ConstString &type, lldb::TypeSummaryImplSP &entry);
-        
-        static void
-        Add (const ConstString &type, const lldb::TypeSummaryImplSP &entry);
-        
-        static bool
-        Delete (const ConstString &type);
-        
-        static void
-        Clear ();
-        
-        static void
-        LoopThrough (TypeSummaryImpl::SummaryCallback callback, void* callback_baton);
-        
-        static uint32_t
-        GetCount ();
-    };
-    
-    class Categories
-    {
-    public:
-        
-        static bool
-        GetCategory (const ConstString &category,
-                     lldb::TypeCategoryImplSP &entry,
-                     bool allow_create = true);
-
-        static void
-        Add (const ConstString &category);
-        
-        static bool
-        Delete (const ConstString &category);
-        
-        static void
-        Clear ();
-        
-        static void
-        Clear (const ConstString &category);
-        
-        static void
-        Enable (const ConstString& category,
-                CategoryMap::Position = CategoryMap::Default);
-        
-        static void
-        Disable (const ConstString& category);
-
-        static void
-        Enable (const lldb::TypeCategoryImplSP& category,
-                CategoryMap::Position = CategoryMap::Default);
-        
-        static void
-        Disable (const lldb::TypeCategoryImplSP& category);
-        
-        static void
-        LoopThrough (FormatManager::CategoryCallback callback, void* callback_baton);
-        
-        static uint32_t
-        GetCount ();
-        
-        static lldb::TypeCategoryImplSP
-        GetCategoryAtIndex (uint32_t);
-    };
-};
-
-    
-} // namespace lldb_private
-
-#endif	// lldb_DataVisualization_h_

Modified: lldb/branches/lldb-platform-work/include/lldb/Core/Debugger.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Core/Debugger.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Core/Debugger.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Core/Debugger.h Thu Jun  6 19:06:43 2013
@@ -18,15 +18,20 @@
 #include <stack>
 
 #include "lldb/lldb-public.h"
+
+#include "lldb/API/SBDefines.h"
+
 #include "lldb/Core/Broadcaster.h"
 #include "lldb/Core/Communication.h"
-#include "lldb/Core/FormatManager.h"
 #include "lldb/Core/InputReaderStack.h"
 #include "lldb/Core/Listener.h"
 #include "lldb/Core/StreamFile.h"
 #include "lldb/Core/SourceManager.h"
 #include "lldb/Core/UserID.h"
 #include "lldb/Core/UserSettingsController.h"
+#include "lldb/DataFormatters/FormatManager.h"
+#include "lldb/Host/Terminal.h"
+#include "lldb/Interpreter/OptionValueProperties.h"
 #include "lldb/Target/ExecutionContext.h"
 #include "lldb/Target/Platform.h"
 #include "lldb/Target/TargetList.h"
@@ -39,267 +44,18 @@ namespace lldb_private {
 ///
 /// Provides a global root objects for the debugger core.
 //----------------------------------------------------------------------
-    
-
-class DebuggerInstanceSettings : public InstanceSettings
-{
-public:
-    
-    enum StopDisassemblyType
-    {
-        eStopDisassemblyTypeNever = 0,
-        eStopDisassemblyTypeNoSource,
-        eStopDisassemblyTypeAlways
-    };
-    
-
-    DebuggerInstanceSettings (const lldb::UserSettingsControllerSP &m_owner_sp, bool live_instance = true, const char *name = NULL);
-
-    DebuggerInstanceSettings (const DebuggerInstanceSettings &rhs);
-
-    virtual
-    ~DebuggerInstanceSettings ();
-
-    DebuggerInstanceSettings&
-    operator= (const DebuggerInstanceSettings &rhs);
-
-    void
-    UpdateInstanceSettingsVariable (const ConstString &var_name,
-                                    const char *index_value,
-                                    const char *value,
-                                    const ConstString &instance_name,
-                                    const SettingEntry &entry,
-                                    VarSetOperationType op,
-                                    Error &err,
-                                    bool pending);
-
-    bool
-    GetInstanceSettingsValue (const SettingEntry &entry,
-                              const ConstString &var_name,
-                              StringList &value,
-                              Error *err);
-
-    uint32_t
-    GetTerminalWidth () const
-    {
-        return m_term_width;
-    }
-
-    void
-    SetTerminalWidth (uint32_t term_width)
-    {
-        Error err;
-        if (ValidTermWidthValue(term_width, err))
-            m_term_width = term_width;
-    }
-
-    uint32_t
-    GetStopSourceLineCount (bool before) const
-    {
-        if (before)
-            return m_stop_source_before_count;
-        else
-            return m_stop_source_after_count;
-    }
-
-    
-    void
-    SetStopSourceLineCount (bool before, uint32_t n)
-    {
-        if (before)
-            m_stop_source_before_count = n;
-        else
-            m_stop_source_after_count = n;
-    }
-
-    StopDisassemblyType
-    GetStopDisassemblyDisplay () const
-    {
-        return m_stop_disassembly_display;
-    }
-    
-
-    uint32_t
-    GetDisassemblyLineCount () const
-    {
-        return m_stop_disassembly_count;
-    }
-    
-    void
-    SetDisassemblyLineCount (uint32_t n)
-    {
-        m_stop_disassembly_count = n;
-    }
-    
-    const char *
-    GetPrompt() const
-    {
-        return m_prompt.c_str();
-    }
-
-    void
-    SetPrompt(const char *p)
-    {
-        if (p)
-            m_prompt.assign (p);
-        else
-            m_prompt.assign ("(lldb) ");
-        BroadcastPromptChange (m_instance_name, m_prompt.c_str());
-    }
-    
-    bool
-    GetNotifyVoid() const
-    {
-        return m_notify_void;
-    }
-
-    const char *
-    GetFrameFormat() const
-    {
-        return m_frame_format.c_str();
-    }
-
-    bool
-    SetFrameFormat(const char *frame_format)
-    {
-        if (frame_format && frame_format[0])
-        {
-            m_frame_format.assign (frame_format);
-            return true;
-        }
-        return false;
-    }
-
-    const char *
-    GetThreadFormat() const
-    {
-        return m_thread_format.c_str();
-    }
-
-    bool
-    SetThreadFormat(const char *thread_format)
-    {
-        if (thread_format && thread_format[0])
-        {
-            m_thread_format.assign (thread_format);
-            return true;
-        }
-        return false;
-    }
-
-    lldb::ScriptLanguage 
-    GetScriptLanguage() const
-    {
-        return m_script_lang;
-    }
-
-    void
-    SetScriptLanguage (lldb::ScriptLanguage script_lang)
-    {
-        m_script_lang = script_lang;
-    }
-
-    bool
-    GetUseExternalEditor () const
-    {
-        return m_use_external_editor;
-    }
-
-    bool
-    SetUseExternalEditor (bool use_external_editor_p)
-    {
-        bool old_value = m_use_external_editor;
-        m_use_external_editor = use_external_editor_p;
-        return old_value;
-    }
-    
-    bool 
-    GetAutoConfirm () const
-    {
-        return m_auto_confirm_on;
-    }
-    
-    void
-    SetAutoConfirm (bool auto_confirm_on) 
-    {
-        m_auto_confirm_on = auto_confirm_on;
-    }
-    
-protected:
-
-    void
-    CopyInstanceSettings (const lldb::InstanceSettingsSP &new_settings,
-                          bool pending);
-
-    bool
-    BroadcastPromptChange (const ConstString &instance_name, const char *new_prompt);
-
-    bool
-    ValidTermWidthValue (const char *value, Error err);
-
-    bool
-    ValidTermWidthValue (uint32_t value, Error err);
-
-    const ConstString
-    CreateInstanceName ();
-
-    static OptionEnumValueElement g_show_disassembly_enum_values[];
-
-private:
-
-    uint32_t m_term_width;
-    uint32_t m_stop_source_before_count;
-    uint32_t m_stop_source_after_count;
-    uint32_t m_stop_disassembly_count;
-    StopDisassemblyType m_stop_disassembly_display;
-    std::string m_prompt;
-    bool m_notify_void;
-    std::string m_frame_format;
-    std::string m_thread_format;
-    lldb::ScriptLanguage m_script_lang;
-    bool m_use_external_editor;
-    bool m_auto_confirm_on;
-};
-
 
 
 class Debugger :
-    public STD_ENABLE_SHARED_FROM_THIS(Debugger),
+    public std::enable_shared_from_this<Debugger>,
     public UserID,
-    public DebuggerInstanceSettings,
+    public Properties,
     public BroadcasterManager
 {
 friend class SourceManager;  // For GetSourceFileCache.
 
 public:
 
-    class SettingsController : public UserSettingsController
-    {
-    public:
-
-        SettingsController ();
-
-        virtual
-        ~SettingsController ();
-
-        static SettingEntry global_settings_table[];
-        static SettingEntry instance_settings_table[];
-
-    protected:
-
-        lldb::InstanceSettingsSP
-        CreateInstanceSettings (const char *instance_name);
-
-    private:
-
-        // Class-wide settings.
-
-        DISALLOW_COPY_AND_ASSIGN (SettingsController);
-    };
-
-    static lldb::UserSettingsControllerSP &
-    GetSettingsController ();
-
     static lldb::DebuggerSP
     CreateInstance (lldb::LogOutputCallback log_callback = NULL, void *baton = NULL);
 
@@ -361,6 +117,12 @@ public:
 
     void
     SetErrorFileHandle (FILE *fh, bool tranfer_ownership);
+    
+    void
+    SaveInputTerminalState();
+    
+    void
+    RestoreInputTerminalState();
 
     Stream&
     GetOutputStream ()
@@ -397,10 +159,7 @@ public:
     // information, but it can look up files by absolute path and display them to you.
     // To get the target's source manager, call GetSourceManager on the target instead.
     SourceManager &
-    GetSourceManager ()
-    {
-        return m_source_manager;
-    }
+    GetSourceManager ();
 
 public:
     
@@ -465,11 +224,11 @@ public:
     static lldb::DebuggerSP
     FindDebuggerWithInstanceName (const ConstString &instance_name);
     
-    static uint32_t
+    static size_t
     GetNumDebuggers();
     
     static lldb::DebuggerSP
-    GetDebuggerAtIndex (uint32_t);
+    GetDebuggerAtIndex (size_t index);
 
     static bool
     FormatPrompt (const char *format,
@@ -477,7 +236,6 @@ public:
                   const ExecutionContext *exe_ctx,
                   const Address *addr,
                   Stream &s,
-                  const char **end,
                   ValueObject* valobj = NULL);
 
 
@@ -499,6 +257,86 @@ public:
     void
     SetLoggingCallback (lldb::LogOutputCallback log_callback, void *baton);
     
+
+    //----------------------------------------------------------------------
+    // Properties Functions
+    //----------------------------------------------------------------------
+    enum StopDisassemblyType
+    {
+        eStopDisassemblyTypeNever = 0,
+        eStopDisassemblyTypeNoSource,
+        eStopDisassemblyTypeAlways
+    };
+    
+    virtual Error
+    SetPropertyValue (const ExecutionContext *exe_ctx,
+                      VarSetOperationType op,
+                      const char *property_path,
+                      const char *value);
+
+    bool
+    GetAutoConfirm () const;
+    
+    const char *
+    GetFrameFormat() const;
+    
+    const char *
+    GetThreadFormat() const;
+    
+    lldb::ScriptLanguage
+    GetScriptLanguage() const;
+    
+    bool
+    SetScriptLanguage (lldb::ScriptLanguage script_lang);
+    
+    uint32_t
+    GetTerminalWidth () const;
+    
+    bool
+    SetTerminalWidth (uint32_t term_width);
+    
+    const char *
+    GetPrompt() const;
+    
+    void
+    SetPrompt(const char *p);
+    
+    bool
+    GetUseExternalEditor () const;
+    
+    bool
+    SetUseExternalEditor (bool use_external_editor_p);
+    
+    bool
+    GetUseColor () const;
+    
+    bool
+    SetUseColor (bool use_color);
+    
+    uint32_t
+    GetStopSourceLineCount (bool before) const;
+    
+    StopDisassemblyType
+    GetStopDisassemblyDisplay () const;
+    
+    uint32_t
+    GetDisassemblyLineCount () const;
+    
+    bool
+    GetNotifyVoid () const;
+
+    
+    const ConstString &
+    GetInstanceName()
+    {
+        return m_instance_name;
+    }
+    
+    typedef bool (*LLDBCommandPluginInit) (lldb::SBDebugger& debugger);
+    
+    bool
+    LoadPlugin (const FileSpec& spec, Error& error);
+
 protected:
 
     static void
@@ -518,25 +356,31 @@ protected:
     {
         return m_source_file_cache;
     }
-
     Communication m_input_comm;
     StreamFile m_input_file;
     StreamFile m_output_file;
     StreamFile m_error_file;
+    TerminalState m_terminal_state;
     TargetList m_target_list;
     PlatformList m_platform_list;
     Listener m_listener;
-    SourceManager m_source_manager;    // This is a scratch source manager that we return if we have no targets.
+    std::unique_ptr<SourceManager> m_source_manager_ap;    // This is a scratch source manager that we return if we have no targets.
     SourceManager::SourceFileCache m_source_file_cache; // All the source managers for targets created in this debugger used this shared
                                                         // source file cache.
-    std::auto_ptr<CommandInterpreter> m_command_interpreter_ap;
+    std::unique_ptr<CommandInterpreter> m_command_interpreter_ap;
 
     InputReaderStack m_input_reader_stack;
     std::string m_input_reader_data;
-    typedef std::map<std::string, lldb::StreamSP> LogStreamMap;
+    typedef std::map<std::string, lldb::StreamWP> LogStreamMap;
     LogStreamMap m_log_streams;
     lldb::StreamSP m_log_callback_stream_sp;
-
+    ConstString m_instance_name;
+    typedef std::vector<lldb::DynamicLibrarySP> LoadedPluginsList;
+    LoadedPluginsList m_loaded_plugins;
+    
+    void
+    InstanceInitialize ();
+    
 private:
 
     // Use Debugger::CreateInstance() to get a shared pointer to a new

Modified: lldb/branches/lldb-platform-work/include/lldb/Core/Disassembler.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Core/Disassembler.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Core/Disassembler.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Core/Disassembler.h Thu Jun  6 19:06:43 2013
@@ -13,6 +13,7 @@
 // C Includes
 // C++ Includes
 #include <vector>
+#include <string>
 
 // Other libraries and framework includes
 // Project includes
@@ -22,7 +23,7 @@
 #include "lldb/Core/EmulateInstruction.h"
 #include "lldb/Core/Opcode.h"
 #include "lldb/Core/PluginInterface.h"
-#include "lldb/Interpreter/NamedOptionValue.h"
+#include "lldb/Interpreter/OptionValue.h"
 
 namespace lldb_private {
 
@@ -51,7 +52,7 @@ public:
     GetOperands (const ExecutionContext* exe_ctx)
     {
         CalculateMnemonicOperandsAndCommentIfNeeded (exe_ctx);
-        return m_mnemocics.c_str();
+        return m_mnemonics.c_str();
     }
     
     const char *
@@ -84,12 +85,12 @@ public:
           const ExecutionContext* exe_ctx);
     
     virtual bool
-    DoesBranch () const = 0;
+    DoesBranch () = 0;
 
     virtual size_t
     Decode (const Disassembler &disassembler, 
-            const DataExtractor& data, 
-            uint32_t data_offset) = 0;
+            const DataExtractor& data,
+            lldb::offset_t data_offset) = 0;
             
     virtual void
     SetDescription (const char *) {}  // May be overridden in sub-classes that have descriptions.
@@ -137,7 +138,7 @@ private:
 protected:
     Opcode m_opcode; // The opcode for this instruction
     std::string m_opcode_name;
-    std::string m_mnemocics;
+    std::string m_mnemonics;
     std::string m_comment;
     bool m_calculated_strings;
 
@@ -166,7 +167,7 @@ public:
     GetMaxOpcocdeByteSize () const;
 
     lldb::InstructionSP
-    GetInstructionAtIndex (uint32_t idx) const;
+    GetInstructionAtIndex (size_t idx) const;
     
     uint32_t
     GetIndexOfNextBranchInstruction(uint32_t start) const;
@@ -205,7 +206,7 @@ public:
      ~PseudoInstruction ();
      
     virtual bool
-    DoesBranch () const;
+    DoesBranch ();
 
     virtual void
     CalculateMnemonicOperandsAndComment (const ExecutionContext* exe_ctx)
@@ -218,7 +219,7 @@ public:
     virtual size_t
     Decode (const Disassembler &disassembler,
             const DataExtractor &data,
-            uint32_t data_offset);
+            lldb::offset_t data_offset);
             
     void
     SetOpcode (size_t opcode_size, void *opcode_data);
@@ -233,7 +234,7 @@ protected:
 };
 
 class Disassembler :
-    public STD_ENABLE_SHARED_FROM_THIS(Disassembler),
+    public std::enable_shared_from_this<Disassembler>,
     public PluginInterface
 {
 public:
@@ -247,27 +248,39 @@ public:
         eOptionMarkPCAddress    = (1u << 3)  // Mark the disassembly line the contains the PC
     };
 
+    // FindPlugin should be lax about the flavor string (it is too annoying to have various internal uses of the
+    // disassembler fail because the global flavor string gets set wrong.  Instead, if you get a flavor string you
+    // don't understand, use the default.  Folks who care to check can use the FlavorValidForArchSpec method on the
+    // disassembler they got back.
     static lldb::DisassemblerSP
-    FindPlugin (const ArchSpec &arch, const char *plugin_name);
+    FindPlugin (const ArchSpec &arch, const char *flavor, const char *plugin_name);
+    
+    // This version will use the value in the Target settings if flavor is NULL;
+    static lldb::DisassemblerSP
+    FindPluginForTarget(const lldb::TargetSP target_sp, const ArchSpec &arch, const char *flavor, const char *plugin_name);
 
     static lldb::DisassemblerSP
     DisassembleRange (const ArchSpec &arch,
                       const char *plugin_name,
+                      const char *flavor,
                       const ExecutionContext &exe_ctx,
                       const AddressRange &disasm_range);
     
     static lldb::DisassemblerSP 
     DisassembleBytes (const ArchSpec &arch,
                       const char *plugin_name,
+                      const char *flavor,
                       const Address &start,
                       const void *bytes,
                       size_t length,
-                      uint32_t num_instructions = UINT32_MAX);
+                      uint32_t max_num_instructions,
+                      bool data_from_file);
 
     static bool
     Disassemble (Debugger &debugger,
                  const ArchSpec &arch,
                  const char *plugin_name,
+                 const char *flavor,
                  const ExecutionContext &exe_ctx,
                  const AddressRange &range,
                  uint32_t num_instructions,
@@ -279,6 +292,7 @@ public:
     Disassemble (Debugger &debugger,
                  const ArchSpec &arch,
                  const char *plugin_name,
+                 const char *flavor,
                  const ExecutionContext &exe_ctx,
                  const Address &start,
                  uint32_t num_instructions,
@@ -290,6 +304,7 @@ public:
     Disassemble (Debugger &debugger,
                  const ArchSpec &arch,
                  const char *plugin_name,
+                 const char *flavor,
                  const ExecutionContext &exe_ctx,
                  SymbolContextList &sc_list,
                  uint32_t num_instructions,
@@ -301,6 +316,7 @@ public:
     Disassemble (Debugger &debugger,
                  const ArchSpec &arch,
                  const char *plugin_name,
+                 const char *flavor,
                  const ExecutionContext &exe_ctx,
                  const ConstString &name,
                  Module *module,
@@ -313,16 +329,17 @@ public:
     Disassemble (Debugger &debugger,
                  const ArchSpec &arch,
                  const char *plugin_name,
+                 const char *flavor,
                  const ExecutionContext &exe_ctx,
                  uint32_t num_instructions,
                  uint32_t num_mixed_context_lines,
                  uint32_t options,
                  Stream &strm);
-
+    
     //------------------------------------------------------------------
     // Constructors and Destructors
     //------------------------------------------------------------------
-    Disassembler(const ArchSpec &arch);
+    Disassembler(const ArchSpec &arch, const char *flavor);
     virtual ~Disassembler();
 
     typedef const char * (*SummaryCallback)(const Instruction& inst, ExecutionContext *exe_context, void *user_data);
@@ -340,19 +357,22 @@ public:
     size_t
     ParseInstructions (const ExecutionContext *exe_ctx,
                        const AddressRange &range,
-                       Stream *error_strm_ptr);
+                       Stream *error_strm_ptr,
+                       bool prefer_file_cache);
 
     size_t
     ParseInstructions (const ExecutionContext *exe_ctx,
                        const Address &range,
-                       uint32_t num_instructions);
+                       uint32_t num_instructions,
+                       bool prefer_file_cache);
 
     virtual size_t
     DecodeInstructions (const Address &base_addr,
                         const DataExtractor& data,
-                        uint32_t data_offset,
-                        uint32_t num_instructions,
-                        bool append) = 0;
+                        lldb::offset_t data_offset,
+                        size_t num_instructions,
+                        bool append,
+                        bool data_from_file) = 0;
     
     InstructionList &
     GetInstructionList ();
@@ -365,6 +385,15 @@ public:
     {
         return m_arch;
     }
+    
+    const char *
+    GetFlavor () const
+    {
+        return m_flavor.c_str();
+    }
+    
+    virtual bool
+    FlavorValidForArchSpec (const lldb_private::ArchSpec &arch, const char *flavor) = 0;    
 
 protected:
     //------------------------------------------------------------------
@@ -373,6 +402,7 @@ protected:
     const ArchSpec m_arch;
     InstructionList m_instruction_list;
     lldb::addr_t m_base_addr;
+    std::string m_flavor;
 
 private:
     //------------------------------------------------------------------

Modified: lldb/branches/lldb-platform-work/include/lldb/Core/EmulateInstruction.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Core/EmulateInstruction.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Core/EmulateInstruction.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Core/EmulateInstruction.h Thu Jun  6 19:06:43 2013
@@ -18,7 +18,6 @@
 #include "lldb/Core/PluginInterface.h"
 #include "lldb/Core/Opcode.h"
 #include "lldb/Core/RegisterValue.h"
-#include "lldb/Interpreter/NamedOptionValue.h"
 
 //----------------------------------------------------------------------
 /// @class EmulateInstruction EmulateInstruction.h "lldb/Core/EmulateInstruction.h"

Modified: lldb/branches/lldb-platform-work/include/lldb/Core/Event.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Core/Event.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Core/Event.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Core/Event.h Thu Jun  6 19:06:43 2013
@@ -205,7 +205,7 @@ private:
 
     Broadcaster *   m_broadcaster;  // The broadcaster that sent this event
     uint32_t        m_type;         // The bit describing this event
-    std::auto_ptr<EventData> m_data_ap;         // User specific data for this event
+    std::unique_ptr<EventData> m_data_ap;         // User specific data for this event
 
 
     DISALLOW_COPY_AND_ASSIGN (Event);

Modified: lldb/branches/lldb-platform-work/include/lldb/Core/FileLineResolver.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Core/FileLineResolver.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Core/FileLineResolver.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Core/FileLineResolver.h Thu Jun  6 19:06:43 2013
@@ -12,6 +12,7 @@
 
 // Project includes
 #include "lldb/Core/AddressResolver.h"
+#include "lldb/Symbol/SymbolContext.h"
 
 namespace lldb_private {
 

Modified: lldb/branches/lldb-platform-work/include/lldb/Core/FileSpecList.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Core/FileSpecList.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Core/FileSpecList.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Core/FileSpecList.h Thu Jun  6 19:06:43 2013
@@ -123,8 +123,8 @@ public:
     ///     The index of the file that matches \a file if it is found,
     ///     else UINT32_MAX is returned.
     //------------------------------------------------------------------
-    uint32_t
-    FindFileIndex (uint32_t idx, const FileSpec &file, bool full) const;
+    size_t
+    FindFileIndex (size_t idx, const FileSpec &file, bool full) const;
 
     //------------------------------------------------------------------
     /// Get file at index.
@@ -143,7 +143,7 @@ public:
     ///     returned.
     //------------------------------------------------------------------
     const FileSpec &
-    GetFileSpecAtIndex (uint32_t idx) const;
+    GetFileSpecAtIndex (size_t idx) const;
 
     //------------------------------------------------------------------
     /// Get file specification pointer at index.
@@ -159,7 +159,7 @@ public:
     ///     If \a idx is out of range, then an NULL is returned.
     //------------------------------------------------------------------
     const FileSpec *
-    GetFileSpecPointerAtIndex (uint32_t idx) const;
+    GetFileSpecPointerAtIndex (size_t idx) const;
 
     //------------------------------------------------------------------
     /// Get the memory cost of this object.
@@ -176,15 +176,59 @@ public:
     size_t
     MemorySize () const;
 
+    bool
+    IsEmpty() const
+    {
+        return m_files.empty();
+    }
+
     //------------------------------------------------------------------
     /// Get the number of files in the file list.
     ///
     /// @return
     ///     The number of files in the file spec list.
     //------------------------------------------------------------------
-    uint32_t
+    size_t
     GetSize () const;
 
+    bool
+    Insert (size_t idx, const FileSpec &file)
+    {
+        if (idx < m_files.size())
+        {
+            m_files.insert(m_files.begin() + idx, file);
+            return true;
+        }
+        else if (idx == m_files.size())
+        {
+            m_files.push_back(file);
+            return true;
+        }
+        return false;
+    }
+
+    bool
+    Replace (size_t idx, const FileSpec &file)
+    {
+        if (idx < m_files.size())
+        {
+            m_files[idx] = file;
+            return true;
+        }
+        return false;
+    }
+
+    bool
+    Remove (size_t idx)
+    {
+        if (idx < m_files.size())
+        {
+            m_files.erase(m_files.begin() + idx);
+            return true;
+        }
+        return false;
+    }
+
     static size_t GetFilesMatchingPartialPath (const char *path, bool dir_okay, FileSpecList &matches);
 
 protected:

Removed: lldb/branches/lldb-platform-work/include/lldb/Core/FormatClasses.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Core/FormatClasses.h?rev=183467&view=auto
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Core/FormatClasses.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Core/FormatClasses.h (removed)
@@ -1,1437 +0,0 @@
-//===-- FormatClasses.h -----------------------------------------*- C++ -*-===//
-//
-//                     The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef lldb_FormatClasses_h_
-#define lldb_FormatClasses_h_
-
-// C Includes
-#include <stdint.h>
-#include <unistd.h>
-
-// C++ Includes
-#include <string>
-#include <vector>
-
-// Other libraries and framework includes
-
-// Project includes
-#include "lldb/lldb-public.h"
-#include "lldb/lldb-enumerations.h"
-
-#include "lldb/Core/ValueObject.h"
-#include "lldb/Interpreter/ScriptInterpreterPython.h"
-#include "lldb/Symbol/Type.h"
-
-namespace lldb_private {
-
-class TypeFormatImpl
-{
-public:
-    class Flags
-    {
-    public:
-        
-        Flags () :
-        m_flags (lldb::eTypeOptionCascade)
-        {}
-        
-        Flags (const Flags& other) :
-        m_flags (other.m_flags)
-        {}
-        
-        Flags (uint32_t value) :
-        m_flags (value)
-        {}
-        
-        Flags&
-        operator = (const Flags& rhs)
-        {
-            if (&rhs != this)
-                m_flags = rhs.m_flags;
-            
-            return *this;
-        }
-        
-        Flags&
-        operator = (const uint32_t& rhs)
-        {
-            m_flags = rhs;
-            return *this;
-        }
-        
-        Flags&
-        Clear()
-        {
-            m_flags = 0;
-            return *this;
-        }
-        
-        bool
-        GetCascades () const
-        {
-            return (m_flags & lldb::eTypeOptionCascade) == lldb::eTypeOptionCascade;
-        }
-        
-        Flags&
-        SetCascades (bool value = true)
-        {
-            if (value)
-                m_flags |= lldb::eTypeOptionCascade;
-            else
-                m_flags &= ~lldb::eTypeOptionCascade;
-            return *this;
-        }
-        
-        bool
-        GetSkipPointers () const
-        {
-            return (m_flags & lldb::eTypeOptionSkipPointers) == lldb::eTypeOptionSkipPointers;
-        }
-        
-        Flags&
-        SetSkipPointers (bool value = true)
-        {
-            if (value)
-                m_flags |= lldb::eTypeOptionSkipPointers;
-            else
-                m_flags &= ~lldb::eTypeOptionSkipPointers;
-            return *this;
-        }
-        
-        bool
-        GetSkipReferences () const
-        {
-            return (m_flags & lldb::eTypeOptionSkipReferences) == lldb::eTypeOptionSkipReferences;
-        }
-        
-        Flags&
-        SetSkipReferences (bool value = true)
-        {
-            if (value)
-                m_flags |= lldb::eTypeOptionSkipReferences;
-            else
-                m_flags &= ~lldb::eTypeOptionSkipReferences;
-            return *this;
-        }
-        
-        uint32_t
-        GetValue ()
-        {
-            return m_flags;
-        }
-        
-        void
-        SetValue (uint32_t value)
-        {
-            m_flags = value;
-        }
-
-    private:
-        uint32_t m_flags;
-    };
-    
-    TypeFormatImpl (lldb::Format f = lldb::eFormatInvalid,
-                 const Flags& flags = Flags());
-    
-    typedef STD_SHARED_PTR(TypeFormatImpl) SharedPointer;
-    typedef bool(*ValueCallback)(void*, ConstString, const lldb::TypeFormatImplSP&);
-    
-    ~TypeFormatImpl ()
-    {
-    }
-    
-    bool
-    Cascades () const
-    {
-        return m_flags.GetCascades();
-    }
-    bool
-    SkipsPointers () const
-    {
-        return m_flags.GetSkipPointers();
-    }
-    bool
-    SkipsReferences () const
-    {
-        return m_flags.GetSkipReferences();
-    }
-    
-    void
-    SetCascades (bool value)
-    {
-        m_flags.SetCascades(value);
-    }
-    
-    void
-    SetSkipsPointers (bool value)
-    {
-        m_flags.SetSkipPointers(value);
-    }
-    
-    void
-    SetSkipsReferences (bool value)
-    {
-        m_flags.SetSkipReferences(value);
-    }
-    
-    lldb::Format
-    GetFormat () const
-    {
-        return m_format;
-    }
-    
-    void
-    SetFormat (lldb::Format fmt)
-    {
-        m_format = fmt;
-    }
-    
-    uint32_t
-    GetOptions ()
-    {
-        return m_flags.GetValue();
-    }
-    
-    void
-    SetOptions (uint32_t value)
-    {
-        m_flags.SetValue(value);
-    }
-    
-    uint32_t&
-    GetRevision ()
-    {
-        return m_my_revision;
-    }
-    
-    std::string
-    GetDescription();
-    
-protected:
-    Flags m_flags;
-    lldb::Format m_format;
-    uint32_t m_my_revision;
-    
-private:
-    DISALLOW_COPY_AND_ASSIGN(TypeFormatImpl);
-};
-
-class SyntheticChildrenFrontEnd
-{
-protected:
-    ValueObject &m_backend;
-public:
-    
-    SyntheticChildrenFrontEnd(ValueObject &backend) :
-    m_backend(backend)
-    {}
-    
-    virtual
-    ~SyntheticChildrenFrontEnd()
-    {
-    }
-    
-    virtual uint32_t
-    CalculateNumChildren() = 0;
-    
-    virtual lldb::ValueObjectSP
-    GetChildAtIndex (uint32_t idx, bool can_create) = 0;
-    
-    virtual uint32_t
-    GetIndexOfChildWithName (const ConstString &name) = 0;
-    
-    // this function is assumed to always succeed and it if fails, the front-end should know to deal
-    // with it in the correct way (most probably, by refusing to return any children)
-    // the return value of Update() should actually be interpreted as "ValueObjectSyntheticFilter cache is good/bad"
-    // if =true, ValueObjectSyntheticFilter is allowed to use the children it fetched previously and cached
-    // if =false, ValueObjectSyntheticFilter must throw away its cache, and query again for children
-    virtual bool
-    Update() = 0;
-    
-    typedef STD_SHARED_PTR(SyntheticChildrenFrontEnd) SharedPointer;
-    typedef std::auto_ptr<SyntheticChildrenFrontEnd> AutoPointer;
-    
-private:
-    DISALLOW_COPY_AND_ASSIGN(SyntheticChildrenFrontEnd);
-};
-
-class SyntheticChildren
-{
-public:
-    
-    class Flags
-    {
-    public:
-        
-        Flags () :
-        m_flags (lldb::eTypeOptionCascade)
-        {}
-        
-        Flags (const Flags& other) :
-        m_flags (other.m_flags)
-        {}
-        
-        Flags (uint32_t value) :
-        m_flags (value)
-        {}
-        
-        Flags&
-        operator = (const Flags& rhs)
-        {
-            if (&rhs != this)
-                m_flags = rhs.m_flags;
-            
-            return *this;
-        }
-        
-        Flags&
-        operator = (const uint32_t& rhs)
-        {
-            m_flags = rhs;
-            return *this;
-        }
-        
-        Flags&
-        Clear()
-        {
-            m_flags = 0;
-            return *this;
-        }
-        
-        bool
-        GetCascades () const
-        {
-            return (m_flags & lldb::eTypeOptionCascade) == lldb::eTypeOptionCascade;
-        }
-        
-        Flags&
-        SetCascades (bool value = true)
-        {
-            if (value)
-                m_flags |= lldb::eTypeOptionCascade;
-            else
-                m_flags &= ~lldb::eTypeOptionCascade;
-            return *this;
-        }
-        
-        bool
-        GetSkipPointers () const
-        {
-            return (m_flags & lldb::eTypeOptionSkipPointers) == lldb::eTypeOptionSkipPointers;
-        }
-        
-        Flags&
-        SetSkipPointers (bool value = true)
-        {
-            if (value)
-                m_flags |= lldb::eTypeOptionSkipPointers;
-            else
-                m_flags &= ~lldb::eTypeOptionSkipPointers;
-            return *this;
-        }
-        
-        bool
-        GetSkipReferences () const
-        {
-            return (m_flags & lldb::eTypeOptionSkipReferences) == lldb::eTypeOptionSkipReferences;
-        }
-        
-        Flags&
-        SetSkipReferences (bool value = true)
-        {
-            if (value)
-                m_flags |= lldb::eTypeOptionSkipReferences;
-            else
-                m_flags &= ~lldb::eTypeOptionSkipReferences;
-            return *this;
-        }
-        
-        uint32_t
-        GetValue ()
-        {
-            return m_flags;
-        }
-        
-        void
-        SetValue (uint32_t value)
-        {
-            m_flags = value;
-        }
-        
-    private:
-        uint32_t m_flags;
-    };
-    
-    SyntheticChildren (const Flags& flags) :
-        m_flags(flags)
-    {
-    }
-    
-    virtual
-    ~SyntheticChildren ()
-    {
-    }
-    
-    bool
-    Cascades () const
-    {
-        return m_flags.GetCascades();
-    }
-    bool
-    SkipsPointers () const
-    {
-        return m_flags.GetSkipPointers();
-    }
-    bool
-    SkipsReferences () const
-    {
-        return m_flags.GetSkipReferences();
-    }
-    
-    void
-    SetCascades (bool value)
-    {
-        m_flags.SetCascades(value);
-    }
-    
-    void
-    SetSkipsPointers (bool value)
-    {
-        m_flags.SetSkipPointers(value);
-    }
-    
-    void
-    SetSkipsReferences (bool value)
-    {
-        m_flags.SetSkipReferences(value);
-    }
-    
-    uint32_t
-    GetOptions ()
-    {
-        return m_flags.GetValue();
-    }
-    
-    void
-    SetOptions (uint32_t value)
-    {
-        m_flags.SetValue(value);
-    }
-    
-    virtual bool
-    IsScripted () = 0;
-    
-    virtual std::string
-    GetDescription () = 0;
-    
-    virtual SyntheticChildrenFrontEnd::AutoPointer
-    GetFrontEnd (ValueObject &backend) = 0;
-    
-    typedef STD_SHARED_PTR(SyntheticChildren) SharedPointer;
-    typedef bool(*SyntheticChildrenCallback)(void*, ConstString, const SyntheticChildren::SharedPointer&);
-    
-    uint32_t&
-    GetRevision ()
-    {
-        return m_my_revision;
-    }
-    
-protected:
-    uint32_t m_my_revision;
-    Flags m_flags;
-    
-private:
-    DISALLOW_COPY_AND_ASSIGN(SyntheticChildren);
-};
-
-class TypeFilterImpl : public SyntheticChildren
-{
-    std::vector<std::string> m_expression_paths;
-public:
-    TypeFilterImpl(const SyntheticChildren::Flags& flags) :
-        SyntheticChildren(flags),
-        m_expression_paths()
-    {
-    }
-    
-    void
-    AddExpressionPath (const char* path)
-    {
-        AddExpressionPath(std::string(path));
-    }
-        
-    void
-    Clear()
-    {
-        m_expression_paths.clear();
-    }
-    
-    int
-    GetCount() const
-    {
-        return m_expression_paths.size();
-    }
-    
-    const char*
-    GetExpressionPathAtIndex(int i) const
-    {
-        return m_expression_paths[i].c_str();
-    }
-    
-    bool
-    SetExpressionPathAtIndex (int i, const char* path)
-    {
-        return SetExpressionPathAtIndex(i, std::string(path));
-    }
-    
-    void
-    AddExpressionPath (std::string path)
-    {
-        bool need_add_dot = true;
-        if (path[0] == '.' ||
-            (path[0] == '-' && path[1] == '>') ||
-            path[0] == '[')
-            need_add_dot = false;
-        // add a '.' symbol to help forgetful users
-        if(!need_add_dot)
-            m_expression_paths.push_back(path);
-        else
-            m_expression_paths.push_back(std::string(".") + path);
-    }
-    
-    bool
-    SetExpressionPathAtIndex (int i, std::string path)
-    {
-        if (i >= GetCount())
-            return false;
-        bool need_add_dot = true;
-        if (path[0] == '.' ||
-            (path[0] == '-' && path[1] == '>') ||
-            path[0] == '[')
-            need_add_dot = false;
-        // add a '.' symbol to help forgetful users
-        if(!need_add_dot)
-            m_expression_paths[i] = path;
-        else
-            m_expression_paths[i] = std::string(".") + path;
-        return true;
-    }
-    
-    bool
-    IsScripted()
-    {
-        return false;
-    }
-    
-    std::string
-    GetDescription();
-    
-    class FrontEnd : public SyntheticChildrenFrontEnd
-    {
-    private:
-        TypeFilterImpl* filter;
-    public:
-        
-        FrontEnd(TypeFilterImpl* flt,
-                 ValueObject &backend) :
-        SyntheticChildrenFrontEnd(backend),
-        filter(flt)
-        {}
-        
-        virtual
-        ~FrontEnd()
-        {
-        }
-        
-        virtual uint32_t
-        CalculateNumChildren()
-        {
-            return filter->GetCount();
-        }
-        
-        virtual lldb::ValueObjectSP
-        GetChildAtIndex (uint32_t idx, bool can_create)
-        {
-            if (idx >= filter->GetCount())
-                return lldb::ValueObjectSP();
-            return m_backend.GetSyntheticExpressionPathChild(filter->GetExpressionPathAtIndex(idx), can_create);
-        }
-        
-        virtual bool
-        Update() { return false; }
-        
-        virtual uint32_t
-        GetIndexOfChildWithName (const ConstString &name)
-        {
-            const char* name_cstr = name.GetCString();
-            for (int i = 0; i < filter->GetCount(); i++)
-            {
-                const char* expr_cstr = filter->GetExpressionPathAtIndex(i);
-                if (expr_cstr)
-                {
-                    if (*expr_cstr == '.')
-                        expr_cstr++;
-                    else if (*expr_cstr == '-' && *(expr_cstr+1) == '>')
-                        expr_cstr += 2;
-                }
-                if (!::strcmp(name_cstr, expr_cstr))
-                    return i;
-            }
-            return UINT32_MAX;
-        }
-        
-        typedef STD_SHARED_PTR(SyntheticChildrenFrontEnd) SharedPointer;
-        
-    private:
-        DISALLOW_COPY_AND_ASSIGN(FrontEnd);
-    };
-    
-    virtual SyntheticChildrenFrontEnd::AutoPointer
-    GetFrontEnd(ValueObject &backend)
-    {
-        return SyntheticChildrenFrontEnd::AutoPointer(new FrontEnd(this, backend));
-    }
-    
-private:
-    DISALLOW_COPY_AND_ASSIGN(TypeFilterImpl);
-};
-
-#ifndef LLDB_DISABLE_PYTHON
-
-class TypeSyntheticImpl : public SyntheticChildren
-{
-    std::string m_python_class;
-    std::string m_python_code;
-public:
-    
-    TypeSyntheticImpl(const SyntheticChildren::Flags& flags,
-                      const char* pclass,
-                      const char* pcode = NULL) :
-        SyntheticChildren(flags),
-        m_python_class(),
-        m_python_code()
-    {
-        if (pclass)
-                m_python_class = pclass;
-        if (pcode)
-                m_python_code = pcode;
-    }
-
-    const char*
-    GetPythonClassName()
-    {
-        return m_python_class.c_str();
-    }
-
-    const char*
-    GetPythonCode()
-    {
-        return m_python_code.c_str();
-    }
-    
-    void
-    SetPythonClassName (const char* fname)
-    {
-        m_python_class.assign(fname);
-        m_python_code.clear();
-    }
-    
-    void
-    SetPythonCode (const char* script)
-    {
-        m_python_code.assign(script);
-    }
-    
-    std::string
-    GetDescription();
-    
-    bool
-    IsScripted()
-    {
-        return true;
-    }
-
-    class FrontEnd : public SyntheticChildrenFrontEnd
-    {
-    private:
-        std::string m_python_class;
-        lldb::ScriptInterpreterObjectSP m_wrapper_sp;
-        ScriptInterpreter *m_interpreter;
-    public:
-        
-        FrontEnd(std::string pclass,
-                 ValueObject &backend);
-        
-        virtual
-        ~FrontEnd();
-        
-        virtual uint32_t
-        CalculateNumChildren()
-        {
-            if (!m_wrapper_sp || m_interpreter == NULL)
-                return 0;
-            return m_interpreter->CalculateNumChildren(m_wrapper_sp);
-        }
-        
-        virtual lldb::ValueObjectSP
-        GetChildAtIndex (uint32_t idx, bool can_create);
-        
-        virtual bool
-        Update()
-        {
-            if (!m_wrapper_sp || m_interpreter == NULL)
-                return false;
-            
-            return m_interpreter->UpdateSynthProviderInstance(m_wrapper_sp);
-        }
-                
-        virtual uint32_t
-        GetIndexOfChildWithName (const ConstString &name)
-        {
-            if (!m_wrapper_sp || m_interpreter == NULL)
-                return UINT32_MAX;
-            return m_interpreter->GetIndexOfChildWithName(m_wrapper_sp, name.GetCString());
-        }
-        
-        typedef STD_SHARED_PTR(SyntheticChildrenFrontEnd) SharedPointer;
-
-    private:
-        DISALLOW_COPY_AND_ASSIGN(FrontEnd);
-    };
-    
-    virtual SyntheticChildrenFrontEnd::AutoPointer
-    GetFrontEnd(ValueObject &backend)
-    {
-        return SyntheticChildrenFrontEnd::AutoPointer(new FrontEnd(m_python_class, backend));
-    }    
-    
-private:
-    DISALLOW_COPY_AND_ASSIGN(TypeSyntheticImpl);
-};
-
-#endif // #ifndef LLDB_DISABLE_PYTHON
-class SyntheticArrayView : public SyntheticChildren
-{
-public:
-    
-    struct SyntheticArrayRange
-    {
-    private:
-        int m_low;
-        int m_high;
-        SyntheticArrayRange* m_next;
-        
-    public:
-        
-        SyntheticArrayRange () : 
-        m_low(-1),
-        m_high(-2),
-        m_next(NULL)
-        {}
-        
-        SyntheticArrayRange (int L) : 
-        m_low(L),
-        m_high(L),
-        m_next(NULL)
-        {}
-        
-        SyntheticArrayRange (int L, int H) : 
-        m_low(L),
-        m_high(H),
-        m_next(NULL)
-        {}
-        
-        SyntheticArrayRange (int L, int H, SyntheticArrayRange* N) : 
-        m_low(L),
-        m_high(H),
-        m_next(N)
-        {}
-        
-        inline int
-        GetLow ()
-        {
-            return m_low;
-        }
-        
-        inline int
-        GetHigh ()
-        {
-            return m_high;
-        }
-        
-        inline void
-        SetLow (int L)
-        {
-            m_low = L;
-        }
-        
-        inline void
-        SetHigh (int H)
-        {
-            m_high = H;
-        }
-        
-        inline  int
-        GetSelfCount()
-        {
-            return GetHigh() - GetLow() + 1;
-        }
-        
-        int
-        GetCount()
-        {
-            int count = GetSelfCount();
-            if (m_next)
-                count += m_next->GetCount();
-            return count;
-        }
-        
-        inline SyntheticArrayRange*
-        GetNext()
-        {
-            return m_next;
-        }
-        
-        void
-        SetNext(SyntheticArrayRange* N)
-        {
-            if (m_next)
-                delete m_next;
-            m_next = N;
-        }
-        
-        void
-        SetNext(int L, int H)
-        {
-            if (m_next)
-                delete m_next;
-            m_next = new SyntheticArrayRange(L, H);
-        }
-        
-        void
-        SetNext(int L)
-        {
-            if (m_next)
-                delete m_next;
-            m_next = new SyntheticArrayRange(L);
-        }
-        
-        ~SyntheticArrayRange()
-        {
-            delete m_next;
-            m_next = NULL;
-        }
-        
-    };
-    
-    SyntheticArrayView(const SyntheticChildren::Flags& flags) :
-        SyntheticChildren(flags),
-        m_head(),
-        m_tail(&m_head)
-    {
-    }
-    
-    void
-    AddRange(int L, int H)
-    {
-        m_tail->SetLow(L);
-        m_tail->SetHigh(H);
-        m_tail->SetNext(new SyntheticArrayRange());
-        m_tail = m_tail->GetNext();
-    }
-    
-    int
-    GetCount()
-    {
-        return m_head.GetCount();
-    }
-    
-    int
-    GetRealIndexForIndex(int i);
-    
-    bool
-    IsScripted()
-    {
-        return false;
-    }
-    
-    std::string
-    GetDescription();
-    
-    class FrontEnd : public SyntheticChildrenFrontEnd
-    {
-    private:
-        SyntheticArrayView* filter;
-    public:
-        
-        FrontEnd(SyntheticArrayView* flt,
-                 ValueObject &backend) :
-        SyntheticChildrenFrontEnd(backend),
-        filter(flt)
-        {}
-        
-        virtual
-        ~FrontEnd()
-        {
-        }
-        
-        virtual uint32_t
-        CalculateNumChildren()
-        {
-            return filter->GetCount();
-        }
-        
-        virtual lldb::ValueObjectSP
-        GetChildAtIndex (uint32_t idx, bool can_create)
-        {
-            if (idx >= filter->GetCount())
-                return lldb::ValueObjectSP();
-            return m_backend.GetSyntheticArrayMember(filter->GetRealIndexForIndex(idx), can_create);
-        }
-        
-        virtual bool
-        Update() { return false; }
-        
-        virtual uint32_t
-        GetIndexOfChildWithName (const ConstString &name_cs);
-        
-        typedef STD_SHARED_PTR(SyntheticChildrenFrontEnd) SharedPointer;
-    
-    private:
-        DISALLOW_COPY_AND_ASSIGN(FrontEnd);
-    };
-    
-    virtual SyntheticChildrenFrontEnd::AutoPointer
-    GetFrontEnd(ValueObject &backend)
-    {
-        return SyntheticChildrenFrontEnd::AutoPointer(new FrontEnd(this, backend));
-    }
-private:
-    SyntheticArrayRange m_head;
-    SyntheticArrayRange *m_tail;
-
-private:
-    DISALLOW_COPY_AND_ASSIGN(SyntheticArrayView);
-};
-
-
-class TypeSummaryImpl
-{
-public:
-    class Flags
-    {
-    public:
-        
-        Flags () :
-            m_flags (lldb::eTypeOptionCascade)
-        {}
-        
-        Flags (const Flags& other) :
-            m_flags (other.m_flags)
-        {}
-        
-        Flags (uint32_t value) :
-            m_flags (value)
-        {}
-        
-        Flags&
-        operator = (const Flags& rhs)
-        {
-            if (&rhs != this)
-                m_flags = rhs.m_flags;
-            
-            return *this;
-        }
-        
-        Flags&
-        operator = (const uint32_t& rhs)
-        {
-            m_flags = rhs;
-            return *this;
-        }
-        
-        Flags&
-        Clear()
-        {
-            m_flags = 0;
-            return *this;
-        }
-        
-        bool
-        GetCascades () const
-        {
-            return (m_flags & lldb::eTypeOptionCascade) == lldb::eTypeOptionCascade;
-        }
-        
-        Flags&
-        SetCascades (bool value = true)
-        {
-            if (value)
-                m_flags |= lldb::eTypeOptionCascade;
-            else
-                m_flags &= ~lldb::eTypeOptionCascade;
-            return *this;
-        }
-
-        bool
-        GetSkipPointers () const
-        {
-            return (m_flags & lldb::eTypeOptionSkipPointers) == lldb::eTypeOptionSkipPointers;
-        }
-
-        Flags&
-        SetSkipPointers (bool value = true)
-        {
-            if (value)
-                m_flags |= lldb::eTypeOptionSkipPointers;
-            else
-                m_flags &= ~lldb::eTypeOptionSkipPointers;
-            return *this;
-        }
-        
-        bool
-        GetSkipReferences () const
-        {
-            return (m_flags & lldb::eTypeOptionSkipReferences) == lldb::eTypeOptionSkipReferences;
-        }
-        
-        Flags&
-        SetSkipReferences (bool value = true)
-        {
-            if (value)
-                m_flags |= lldb::eTypeOptionSkipReferences;
-            else
-                m_flags &= ~lldb::eTypeOptionSkipReferences;
-            return *this;
-        }
-        
-        bool
-        GetDontShowChildren () const
-        {
-            return (m_flags & lldb::eTypeOptionHideChildren) == lldb::eTypeOptionHideChildren;
-        }
-        
-        Flags&
-        SetDontShowChildren (bool value = true)
-        {
-            if (value)
-                m_flags |= lldb::eTypeOptionHideChildren;
-            else
-                m_flags &= ~lldb::eTypeOptionHideChildren;
-            return *this;
-        }
-        
-        bool
-        GetDontShowValue () const
-        {
-            return (m_flags & lldb::eTypeOptionHideValue) == lldb::eTypeOptionHideValue;
-        }
-        
-        Flags&
-        SetDontShowValue (bool value = true)
-        {
-            if (value)
-                m_flags |= lldb::eTypeOptionHideValue;
-            else
-                m_flags &= ~lldb::eTypeOptionHideValue;
-            return *this;
-        }
-        
-        bool
-        GetShowMembersOneLiner () const
-        {
-            return (m_flags & lldb::eTypeOptionShowOneLiner) == lldb::eTypeOptionShowOneLiner;
-        }
-        
-        Flags&
-        SetShowMembersOneLiner (bool value = true)
-        {
-            if (value)
-                m_flags |= lldb::eTypeOptionShowOneLiner;
-            else
-                m_flags &= ~lldb::eTypeOptionShowOneLiner;
-            return *this;
-        }
-        
-        bool
-        GetHideItemNames () const
-        {
-            return (m_flags & lldb::eTypeOptionHideNames) == lldb::eTypeOptionHideNames;
-        }
-        
-        Flags&
-        SetHideItemNames (bool value = true)
-        {
-            if (value)
-                m_flags |= lldb::eTypeOptionHideNames;
-            else
-                m_flags &= ~lldb::eTypeOptionHideNames;
-            return *this;
-        }
-        
-        uint32_t
-        GetValue ()
-        {
-            return m_flags;
-        }
-        
-        void
-        SetValue (uint32_t value)
-        {
-            m_flags = value;
-        }
-                
-    private:
-        uint32_t m_flags;
-    };
-    
-    TypeSummaryImpl (const TypeSummaryImpl::Flags& flags);
-    
-    bool
-    Cascades () const
-    {
-        return m_flags.GetCascades();
-    }
-    bool
-    SkipsPointers () const
-    {
-        return m_flags.GetSkipPointers();
-    }
-    bool
-    SkipsReferences () const
-    {
-        return m_flags.GetSkipReferences();
-    }
-    
-    bool
-    DoesPrintChildren () const
-    {
-        return !m_flags.GetDontShowChildren();
-    }
-    
-    bool
-    DoesPrintValue () const
-    {
-        return !m_flags.GetDontShowValue();
-    }
-    
-    bool
-    IsOneliner () const
-    {
-        return m_flags.GetShowMembersOneLiner();
-    }
-    
-    bool
-    HideNames () const
-    {
-        return m_flags.GetHideItemNames();
-    }
-    
-    void
-    SetCascades (bool value)
-    {
-        m_flags.SetCascades(value);
-    }
-    
-    void
-    SetSkipsPointers (bool value)
-    {
-        m_flags.SetSkipPointers(value);
-    }
-    
-    void
-    SetSkipsReferences (bool value)
-    {
-        m_flags.SetSkipReferences(value);
-    }
-    
-    void
-    SetDoesPrintChildren (bool value)
-    {
-        m_flags.SetDontShowChildren(!value);
-    }
-    
-    void
-    SetDoesPrintValue (bool value)
-    {
-        m_flags.SetDontShowValue(!value);
-    }
-    
-    void
-    SetIsOneliner (bool value)
-    {
-        m_flags.SetShowMembersOneLiner(value);
-    }
-    
-    void
-    SetHideNames (bool value)
-    {
-        m_flags.SetHideItemNames(value);
-    }
-    
-    uint32_t
-    GetOptions ()
-    {
-        return m_flags.GetValue();
-    }
-    
-    void
-    SetOptions (uint32_t value)
-    {
-        m_flags.SetValue(value);
-    }
-    
-    virtual
-    ~TypeSummaryImpl ()
-    {
-    }
-    
-    // we are using a ValueObject* instead of a ValueObjectSP because we do not need to hold on to this for
-    // extended periods of time and we trust the ValueObject to stay around for as long as it is required
-    // for us to generate its summary
-    virtual bool
-    FormatObject (ValueObject *valobj,
-                  std::string& dest) = 0;
-    
-    virtual std::string
-    GetDescription () = 0;
-    
-    virtual bool
-    IsScripted() = 0;
-    
-    uint32_t&
-    GetRevision ()
-    {
-        return m_my_revision;
-    }
-    
-    typedef STD_SHARED_PTR(TypeSummaryImpl) SharedPointer;
-    typedef bool(*SummaryCallback)(void*, ConstString, const lldb::TypeSummaryImplSP&);
-    typedef bool(*RegexSummaryCallback)(void*, lldb::RegularExpressionSP, const lldb::TypeSummaryImplSP&);
-
-protected:
-    uint32_t m_my_revision;
-    Flags m_flags;
-    
-private:
-    DISALLOW_COPY_AND_ASSIGN(TypeSummaryImpl);
-};
-
-// simple string-based summaries, using ${var to show data
-struct StringSummaryFormat : public TypeSummaryImpl
-{
-    std::string m_format;
-    
-    StringSummaryFormat(const TypeSummaryImpl::Flags& flags,
-                        const char* f);
-    
-    const char*
-    GetSummaryString () const
-    {
-        return m_format.c_str();
-    }
-    
-    void
-    SetSummaryString (const char* data)
-    {
-        if (data)
-                m_format.assign(data);
-        else
-                m_format.clear();
-    }
-    
-    virtual
-    ~StringSummaryFormat()
-    {
-    }
-    
-    virtual bool
-    FormatObject(ValueObject *valobj,
-                 std::string& dest);
-    
-    virtual std::string
-    GetDescription();
-    
-    virtual bool
-    IsScripted()
-    {
-        return false;
-    }
-
-    
-private:
-    DISALLOW_COPY_AND_ASSIGN(StringSummaryFormat);
-};
-    
-#ifndef LLDB_DISABLE_PYTHON
-
-// Python-based summaries, running script code to show data
-struct ScriptSummaryFormat : public TypeSummaryImpl
-{
-    std::string m_function_name;
-    std::string m_python_script;
-    lldb::ScriptInterpreterObjectSP m_script_function_sp;
-    
-    ScriptSummaryFormat(const TypeSummaryImpl::Flags& flags,
-                        const char *function_name,
-                        const char* python_script = NULL);
-    
-    const char*
-    GetFunctionName () const
-    {
-        return m_function_name.c_str();
-    }
-    
-    const char*
-    GetPythonScript () const
-    {
-        return m_python_script.c_str();
-    }
-    
-    void
-    SetFunctionName (const char* function_name)
-    {
-        if (function_name)
-                m_function_name.assign(function_name);
-        else
-                m_function_name.clear();
-        m_python_script.clear();
-    }
-    
-    void
-    SetPythonScript (const char* script)
-    {
-        if (script)
-                m_python_script.assign(script);
-        else
-                m_python_script.clear();
-    }
-    
-    virtual
-    ~ScriptSummaryFormat()
-    {
-    }
-    
-    virtual bool
-    FormatObject(ValueObject *valobj,
-                 std::string& dest);
-    
-    virtual std::string
-    GetDescription();
-    
-    virtual bool
-    IsScripted()
-    {
-        return true;
-    }
-    
-    typedef STD_SHARED_PTR(ScriptSummaryFormat) SharedPointer;
-
-    
-private:
-    DISALLOW_COPY_AND_ASSIGN(ScriptSummaryFormat);
-};
-
-#endif // #ifndef LLDB_DISABLE_PYTHON
-
-// TODO: at the moment, this class is only used as a backing store for SBTypeNameSpecifier in the public API
-// In the future, this might be used as the basic unit for typename-to-formatter matching, replacing
-// the current plain/regexp distinction in FormatNavigator<>
-class TypeNameSpecifierImpl
-{
-public:
-    
-    TypeNameSpecifierImpl() :
-    m_is_regex(false),
-    m_type()
-    {
-    }
-    
-    TypeNameSpecifierImpl (const char* name, bool is_regex) :
-    m_is_regex(is_regex),
-    m_type()
-    {
-        if (name)
-            m_type.m_type_name.assign(name);
-    }
-    
-    // if constructing with a given type, is_regex cannot be true since we are
-    // giving an exact type to match
-    TypeNameSpecifierImpl (lldb::TypeSP type) :
-    m_is_regex(false),
-    m_type()
-    {
-        if (type)
-        {
-            m_type.m_type_name.assign(type->GetName().GetCString());
-            m_type.m_typeimpl_sp = lldb::TypeImplSP(new TypeImpl(type));
-        }
-    }
-
-    TypeNameSpecifierImpl (ClangASTType type) :
-    m_is_regex(false),
-    m_type()
-    {
-        if (type.IsValid())
-        {
-            m_type.m_type_name.assign(type.GetConstTypeName().GetCString());
-            m_type.m_typeimpl_sp = lldb::TypeImplSP(new TypeImpl(type));
-        }
-    }
-    
-    const char*
-    GetName()
-    {
-        if (m_type.m_type_name.size())
-            return m_type.m_type_name.c_str();
-        return NULL;
-    }
-    
-    lldb::TypeSP
-    GetTypeSP ()
-    {
-        if (m_type.m_typeimpl_sp && m_type.m_typeimpl_sp->IsValid())
-            return m_type.m_typeimpl_sp->GetTypeSP();
-        return lldb::TypeSP();
-    }
-    
-    ClangASTType
-    GetClangASTType ()
-    {
-        if (m_type.m_typeimpl_sp && m_type.m_typeimpl_sp->IsValid())
-            return m_type.m_typeimpl_sp->GetClangASTType();
-        return ClangASTType();
-    }
-    
-    bool
-    IsRegex()
-    {
-        return m_is_regex;
-    }
-    
-private:
-    bool m_is_regex;
-    // this works better than TypeAndOrName because the latter only wraps a TypeSP
-    // whereas TypeImplSP can also be backed by a ClangASTType which is more commonly
-    // used in LLDB. moreover, TypeImplSP is also what is currently backing SBType
-    struct TypeOrName
-    {
-        std::string m_type_name;
-        lldb::TypeImplSP m_typeimpl_sp;
-    };
-    TypeOrName m_type;
-    
-    
-private:
-    DISALLOW_COPY_AND_ASSIGN(TypeNameSpecifierImpl);
-};
-    
-} // namespace lldb_private
-
-#endif	// lldb_FormatClasses_h_

Removed: lldb/branches/lldb-platform-work/include/lldb/Core/FormatManager.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Core/FormatManager.h?rev=183467&view=auto
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Core/FormatManager.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Core/FormatManager.h (removed)
@@ -1,778 +0,0 @@
-//===-- FormatManager.h -------------------------------------------*- C++ -*-===//
-//
-//                     The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef lldb_FormatManager_h_
-#define lldb_FormatManager_h_
-
-// C Includes
-// C++ Includes
-
-// Other libraries and framework includes
-// Project includes
-#include "lldb/lldb-public.h"
-#include "lldb/lldb-enumerations.h"
-
-#include "lldb/Core/FormatNavigator.h"
-#include "lldb/Interpreter/ScriptInterpreterPython.h"
-#include "lldb/Target/ExecutionContext.h"
-#include "lldb/Target/Platform.h"
-
-using lldb::LogSP;
-
-namespace lldb_private {
-    
-// this file (and its. cpp) contain the low-level implementation of LLDB Data Visualization
-// class DataVisualization is the high-level front-end of this feature
-// clients should refer to that class as the entry-point into the data formatters
-// unless they have a good reason to bypass it and prefer to use this file's objects directly
-    
-class CategoryMap;
-    
-class TypeCategoryImpl
-{
-private:
-    
-    typedef FormatNavigator<ConstString, TypeSummaryImpl> SummaryNavigator;
-    typedef FormatNavigator<lldb::RegularExpressionSP, TypeSummaryImpl> RegexSummaryNavigator;
-    
-    typedef FormatNavigator<ConstString, TypeFilterImpl> FilterNavigator;
-    typedef FormatNavigator<lldb::RegularExpressionSP, TypeFilterImpl> RegexFilterNavigator;
-    
-#ifndef LLDB_DISABLE_PYTHON
-    typedef FormatNavigator<ConstString, TypeSyntheticImpl> SynthNavigator;
-    typedef FormatNavigator<lldb::RegularExpressionSP, TypeSyntheticImpl> RegexSynthNavigator;
-#endif // #ifndef LLDB_DISABLE_PYTHON
-
-    typedef SummaryNavigator::MapType SummaryMap;
-    typedef RegexSummaryNavigator::MapType RegexSummaryMap;
-    typedef FilterNavigator::MapType FilterMap;
-    typedef RegexFilterNavigator::MapType RegexFilterMap;
-#ifndef LLDB_DISABLE_PYTHON
-    typedef SynthNavigator::MapType SynthMap;
-    typedef RegexSynthNavigator::MapType RegexSynthMap;
-#endif // #ifndef LLDB_DISABLE_PYTHON
-
-public:
-        
-    typedef uint16_t FormatCategoryItems;
-    static const uint16_t ALL_ITEM_TYPES = UINT16_MAX;
-    
-    typedef SummaryNavigator::SharedPointer SummaryNavigatorSP;
-    typedef RegexSummaryNavigator::SharedPointer RegexSummaryNavigatorSP;
-    typedef FilterNavigator::SharedPointer FilterNavigatorSP;
-    typedef RegexFilterNavigator::SharedPointer RegexFilterNavigatorSP;
-#ifndef LLDB_DISABLE_PYTHON
-    typedef SynthNavigator::SharedPointer SynthNavigatorSP;
-    typedef RegexSynthNavigator::SharedPointer RegexSynthNavigatorSP;
-#endif // #ifndef LLDB_DISABLE_PYTHON
-
-    TypeCategoryImpl (IFormatChangeListener* clist,
-                      ConstString name);
-    
-    SummaryNavigatorSP
-    GetSummaryNavigator ()
-    {
-        return SummaryNavigatorSP(m_summary_nav);
-    }
-    
-    RegexSummaryNavigatorSP
-    GetRegexSummaryNavigator ()
-    {
-        return RegexSummaryNavigatorSP(m_regex_summary_nav);
-    }
-    
-    FilterNavigatorSP
-    GetFilterNavigator ()
-    {
-        return FilterNavigatorSP(m_filter_nav);
-    }
-    
-    RegexFilterNavigatorSP
-    GetRegexFilterNavigator ()
-    {
-        return RegexFilterNavigatorSP(m_regex_filter_nav);
-    }
-    
-    SummaryNavigator::MapValueType
-    GetSummaryForType (lldb::TypeNameSpecifierImplSP type_sp)
-    {
-        SummaryNavigator::MapValueType retval;
-        
-        if (type_sp)
-        {
-            if (type_sp->IsRegex())
-                m_regex_summary_nav->GetExact(ConstString(type_sp->GetName()),retval);
-            else
-                m_summary_nav->GetExact(ConstString(type_sp->GetName()),retval);
-        }
-
-        return retval;
-    }
-    
-    FilterNavigator::MapValueType
-    GetFilterForType (lldb::TypeNameSpecifierImplSP type_sp)
-    {
-        FilterNavigator::MapValueType retval;
-        
-        if (type_sp)
-        {
-            if (type_sp->IsRegex())
-                m_regex_filter_nav->GetExact(ConstString(type_sp->GetName()),retval);
-            else
-                m_filter_nav->GetExact(ConstString(type_sp->GetName()),retval);
-        }
-        
-        return retval;
-    }
-    
-#ifndef LLDB_DISABLE_PYTHON
-    SynthNavigator::MapValueType
-    GetSyntheticForType (lldb::TypeNameSpecifierImplSP type_sp)
-    {
-        SynthNavigator::MapValueType retval;
-        
-        if (type_sp)
-        {
-            if (type_sp->IsRegex())
-                m_regex_synth_nav->GetExact(ConstString(type_sp->GetName()),retval);
-            else
-                m_synth_nav->GetExact(ConstString(type_sp->GetName()),retval);
-        }
-        
-        return retval;
-    }
-#endif
-    
-    lldb::TypeNameSpecifierImplSP
-    GetTypeNameSpecifierForSummaryAtIndex (uint32_t index)
-    {
-        if (index < m_summary_nav->GetCount())
-            return m_summary_nav->GetTypeNameSpecifierAtIndex(index);
-        else
-            return m_regex_summary_nav->GetTypeNameSpecifierAtIndex(index-m_summary_nav->GetCount());
-    }
-    
-    SummaryNavigator::MapValueType
-    GetSummaryAtIndex (uint32_t index)
-    {
-        if (index < m_summary_nav->GetCount())
-            return m_summary_nav->GetAtIndex(index);
-        else
-            return m_regex_summary_nav->GetAtIndex(index-m_summary_nav->GetCount());
-    }
-
-    FilterNavigator::MapValueType
-    GetFilterAtIndex (uint32_t index)
-    {
-        if (index < m_filter_nav->GetCount())
-            return m_filter_nav->GetAtIndex(index);
-        else
-            return m_regex_filter_nav->GetAtIndex(index-m_filter_nav->GetCount());
-    }
-    
-    lldb::TypeNameSpecifierImplSP
-    GetTypeNameSpecifierForFilterAtIndex (uint32_t index)
-    {
-        if (index < m_filter_nav->GetCount())
-            return m_filter_nav->GetTypeNameSpecifierAtIndex(index);
-        else
-            return m_regex_filter_nav->GetTypeNameSpecifierAtIndex(index-m_filter_nav->GetCount());
-    }
-
-#ifndef LLDB_DISABLE_PYTHON
-    SynthNavigatorSP
-    GetSyntheticNavigator ()
-    {
-        return SynthNavigatorSP(m_synth_nav);
-    }
-    
-    RegexSynthNavigatorSP
-    GetRegexSyntheticNavigator ()
-    {
-        return RegexSynthNavigatorSP(m_regex_synth_nav);
-    }
-    
-    SynthNavigator::MapValueType
-    GetSyntheticAtIndex (uint32_t index)
-    {
-        if (index < m_synth_nav->GetCount())
-            return m_synth_nav->GetAtIndex(index);
-        else
-            return m_regex_synth_nav->GetAtIndex(index-m_synth_nav->GetCount());
-    }
-    
-    lldb::TypeNameSpecifierImplSP
-    GetTypeNameSpecifierForSyntheticAtIndex (uint32_t index)
-    {
-        if (index < m_synth_nav->GetCount())
-            return m_synth_nav->GetTypeNameSpecifierAtIndex(index);
-        else
-            return m_regex_synth_nav->GetTypeNameSpecifierAtIndex(index - m_synth_nav->GetCount());
-    }
-    
-#endif // #ifndef LLDB_DISABLE_PYTHON
-
-    bool
-    IsEnabled () const
-    {
-        return m_enabled;
-    }
-    
-    uint32_t
-    GetEnabledPosition()
-    {
-        if (m_enabled == false)
-            return UINT32_MAX;
-        else
-            return m_enabled_position;
-    }
-    
-    bool
-    Get (ValueObject& valobj,
-         lldb::TypeSummaryImplSP& entry,
-         lldb::DynamicValueType use_dynamic,
-         uint32_t* reason = NULL);
-    
-    bool
-    Get (ValueObject& valobj,
-         lldb::SyntheticChildrenSP& entry,
-         lldb::DynamicValueType use_dynamic,
-         uint32_t* reason = NULL);
-        
-    void
-    Clear (FormatCategoryItems items = ALL_ITEM_TYPES);
-    
-    bool
-    Delete (ConstString name,
-            FormatCategoryItems items = ALL_ITEM_TYPES);
-    
-    uint32_t
-    GetCount (FormatCategoryItems items = ALL_ITEM_TYPES);
-    
-    const char*
-    GetName ()
-    {
-        return m_name.GetCString();
-    }
-    
-    bool
-    AnyMatches (ConstString type_name,
-                FormatCategoryItems items = ALL_ITEM_TYPES,
-                bool only_enabled = true,
-                const char** matching_category = NULL,
-                FormatCategoryItems* matching_type = NULL);
-    
-    typedef STD_SHARED_PTR(TypeCategoryImpl) SharedPointer;
-    
-private:
-    SummaryNavigator::SharedPointer m_summary_nav;
-    RegexSummaryNavigator::SharedPointer m_regex_summary_nav;
-    FilterNavigator::SharedPointer m_filter_nav;
-    RegexFilterNavigator::SharedPointer m_regex_filter_nav;
-#ifndef LLDB_DISABLE_PYTHON
-    SynthNavigator::SharedPointer m_synth_nav;
-    RegexSynthNavigator::SharedPointer m_regex_synth_nav;
-#endif // #ifndef LLDB_DISABLE_PYTHON
-    
-    bool m_enabled;
-    
-    IFormatChangeListener* m_change_listener;
-    
-    Mutex m_mutex;
-    
-    ConstString m_name;
-    
-    uint32_t m_enabled_position;
-    
-    void
-    Enable (bool value,
-            uint32_t position)
-    {
-        Mutex::Locker(m_mutex);
-        m_enabled = value;
-        m_enabled_position = position;
-        if (m_change_listener)
-            m_change_listener->Changed();
-    }
-    
-    void
-    Disable ()
-    {
-        Enable(false, UINT32_MAX);
-    }
-    
-    friend class CategoryMap;
-    
-    friend class FormatNavigator<ConstString, TypeSummaryImpl>;
-    friend class FormatNavigator<lldb::RegularExpressionSP, TypeSummaryImpl>;
-    
-    friend class FormatNavigator<ConstString, TypeFilterImpl>;
-    friend class FormatNavigator<lldb::RegularExpressionSP, TypeFilterImpl>;
-    
-#ifndef LLDB_DISABLE_PYTHON
-    friend class FormatNavigator<ConstString, TypeSyntheticImpl>;
-    friend class FormatNavigator<lldb::RegularExpressionSP, TypeSyntheticImpl>;
-#endif // #ifndef LLDB_DISABLE_PYTHON
-    
-
-};
-
-class CategoryMap
-{
-private:
-    typedef ConstString KeyType;
-    typedef TypeCategoryImpl ValueType;
-    typedef ValueType::SharedPointer ValueSP;
-    typedef std::list<lldb::TypeCategoryImplSP> ActiveCategoriesList;
-    typedef ActiveCategoriesList::iterator ActiveCategoriesIterator;
-        
-public:
-    typedef std::map<KeyType, ValueSP> MapType;
-    typedef MapType::iterator MapIterator;
-    typedef bool(*CallbackType)(void*, const ValueSP&);
-    typedef uint32_t Position;
-    
-    static const Position First = 0;
-    static const Position Default = 1;
-    static const Position Last = UINT32_MAX;
-    
-    CategoryMap (IFormatChangeListener* lst) :
-        m_map_mutex(Mutex::eMutexTypeRecursive),
-        listener(lst),
-        m_map(),
-        m_active_categories()
-    {
-        ConstString default_cs("default");
-        lldb::TypeCategoryImplSP default_sp = lldb::TypeCategoryImplSP(new TypeCategoryImpl(listener, default_cs));
-        Add(default_cs,default_sp);
-        Enable(default_cs,First);
-    }
-    
-    void
-    Add (KeyType name,
-         const ValueSP& entry)
-    {
-        Mutex::Locker(m_map_mutex);
-        m_map[name] = entry;
-        if (listener)
-            listener->Changed();
-    }
-    
-    bool
-    Delete (KeyType name)
-    {
-        Mutex::Locker(m_map_mutex);
-        MapIterator iter = m_map.find(name);
-        if (iter == m_map.end())
-            return false;
-        m_map.erase(name);
-        Disable(name);
-        if (listener)
-            listener->Changed();
-        return true;
-    }
-    
-    bool
-    Enable (KeyType category_name,
-            Position pos = Default)
-    {
-        Mutex::Locker(m_map_mutex);
-        ValueSP category;
-        if (!Get(category_name,category))
-            return false;
-        return Enable(category, pos);
-    }
-    
-    bool
-    Disable (KeyType category_name)
-    {
-        Mutex::Locker(m_map_mutex);
-        ValueSP category;
-        if (!Get(category_name,category))
-            return false;
-        return Disable(category);
-    }
-    
-    bool
-    Enable (ValueSP category,
-            Position pos = Default)
-    {
-        Mutex::Locker(m_map_mutex);
-        if (category.get())
-        {
-            Position pos_w = pos;
-            if (pos == First || m_active_categories.size() == 0)
-                m_active_categories.push_front(category);
-            else if (pos == Last || pos == m_active_categories.size())
-                m_active_categories.push_back(category);
-            else if (pos < m_active_categories.size())
-            {
-                ActiveCategoriesList::iterator iter = m_active_categories.begin();
-                while (pos_w)
-                {
-                    pos_w--,iter++;
-                }
-                m_active_categories.insert(iter,category);
-            }
-            else
-                return false;
-            category->Enable(true,
-                             pos);
-            return true;
-        }
-        return false;
-    }
-    
-    bool
-    Disable (ValueSP category)
-    {
-        Mutex::Locker(m_map_mutex);
-        if (category.get())
-        {
-            m_active_categories.remove_if(delete_matching_categories(category));
-            category->Disable();
-            return true;
-        }
-        return false;
-    }
-    
-    void
-    Clear ()
-    {
-        Mutex::Locker(m_map_mutex);
-        m_map.clear();
-        m_active_categories.clear();
-        if (listener)
-            listener->Changed();
-    }
-    
-    bool
-    Get (KeyType name,
-         ValueSP& entry)
-    {
-        Mutex::Locker(m_map_mutex);
-        MapIterator iter = m_map.find(name);
-        if (iter == m_map.end())
-            return false;
-        entry = iter->second;
-        return true;
-    }
-    
-    bool
-    Get (uint32_t pos,
-         ValueSP& entry)
-    {
-        Mutex::Locker(m_map_mutex);
-        MapIterator iter = m_map.begin();
-        MapIterator end = m_map.end();
-        while (pos > 0)
-        {
-            iter++;
-            pos--;
-            if (iter == end)
-                return false;
-        }
-        entry = iter->second;
-        return false;
-    }
-    
-    void
-    LoopThrough (CallbackType callback, void* param);
-    
-    lldb::TypeCategoryImplSP
-    GetAtIndex (uint32_t);
-    
-    bool
-    AnyMatches (ConstString type_name,
-                TypeCategoryImpl::FormatCategoryItems items = TypeCategoryImpl::ALL_ITEM_TYPES,
-                bool only_enabled = true,
-                const char** matching_category = NULL,
-                TypeCategoryImpl::FormatCategoryItems* matching_type = NULL);
-    
-    uint32_t
-    GetCount ()
-    {
-        return m_map.size();
-    }
-    
-    lldb::TypeSummaryImplSP
-    GetSummaryFormat (ValueObject& valobj,
-         lldb::DynamicValueType use_dynamic);
-    
-#ifndef LLDB_DISABLE_PYTHON
-    lldb::SyntheticChildrenSP
-    GetSyntheticChildren (ValueObject& valobj,
-                          lldb::DynamicValueType use_dynamic);
-#endif
-    
-private:
-    
-    class delete_matching_categories
-    {
-        lldb::TypeCategoryImplSP ptr;
-    public:
-        delete_matching_categories(lldb::TypeCategoryImplSP p) : ptr(p)
-        {}
-        
-        bool operator()(const lldb::TypeCategoryImplSP& other)
-        {
-            return ptr.get() == other.get();
-        }
-    };
-    
-    Mutex m_map_mutex;
-    IFormatChangeListener* listener;
-    
-    MapType m_map;
-    ActiveCategoriesList m_active_categories;
-    
-    MapType& map ()
-    {
-        return m_map;
-    }
-    
-    ActiveCategoriesList& active_list ()
-    {
-        return m_active_categories;
-    }
-    
-    Mutex& mutex ()
-    {
-        return m_map_mutex;
-    }
-    
-    friend class FormatNavigator<KeyType, ValueType>;
-    friend class FormatManager;
-};
-
-class FormatManager : public IFormatChangeListener
-{
-    typedef FormatNavigator<ConstString, TypeFormatImpl> ValueNavigator;
-    typedef ValueNavigator::MapType ValueMap;
-    typedef FormatMap<ConstString, TypeSummaryImpl> NamedSummariesMap;
-    typedef CategoryMap::MapType::iterator CategoryMapIterator;
-public:
-    
-    typedef CategoryMap::CallbackType CategoryCallback;
-    
-    FormatManager ();
-    
-    ValueNavigator&
-    GetValueNavigator ()
-    {
-        return m_value_nav;
-    }
-    
-    NamedSummariesMap&
-    GetNamedSummaryNavigator ()
-    {
-        return m_named_summaries_map;
-    }
-    
-    void
-    EnableCategory (const ConstString& category_name,
-                    CategoryMap::Position pos = CategoryMap::Default)
-    {
-        m_categories_map.Enable(category_name,
-                                pos);
-    }
-    
-    void
-    DisableCategory (const ConstString& category_name)
-    {
-        m_categories_map.Disable(category_name);
-    }
-    
-    void
-    EnableCategory (const lldb::TypeCategoryImplSP& category,
-                    CategoryMap::Position pos = CategoryMap::Default)
-    {
-        m_categories_map.Enable(category,
-                                pos);
-    }
-    
-    void
-    DisableCategory (const lldb::TypeCategoryImplSP& category)
-    {
-        m_categories_map.Disable(category);
-    }
-    
-    bool
-    DeleteCategory (const ConstString& category_name)
-    {
-        return m_categories_map.Delete(category_name);
-    }
-    
-    void
-    ClearCategories ()
-    {
-        return m_categories_map.Clear();
-    }
-    
-    uint32_t
-    GetCategoriesCount ()
-    {
-        return m_categories_map.GetCount();
-    }
-    
-    lldb::TypeCategoryImplSP
-    GetCategoryAtIndex (uint32_t index)
-    {
-        return m_categories_map.GetAtIndex(index);
-    }
-    
-    void
-    LoopThroughCategories (CategoryCallback callback, void* param)
-    {
-        m_categories_map.LoopThrough(callback, param);
-    }
-    
-    lldb::TypeCategoryImplSP
-    GetCategory (const char* category_name = NULL,
-                 bool can_create = true)
-    {
-        if (!category_name)
-            return GetCategory(m_default_category_name);
-        return GetCategory(ConstString(category_name));
-    }
-    
-    lldb::TypeCategoryImplSP
-    GetCategory (const ConstString& category_name,
-                 bool can_create = true);
-    
-    lldb::TypeSummaryImplSP
-    GetSummaryFormat (ValueObject& valobj,
-                      lldb::DynamicValueType use_dynamic)
-    {
-        return m_categories_map.GetSummaryFormat(valobj, use_dynamic);
-    }
-    
-    lldb::TypeSummaryImplSP
-    GetSummaryForType (lldb::TypeNameSpecifierImplSP type_sp);
-
-    lldb::TypeFilterImplSP
-    GetFilterForType (lldb::TypeNameSpecifierImplSP type_sp);
-
-#ifndef LLDB_DISABLE_PYTHON
-    lldb::TypeSyntheticImplSP
-    GetSyntheticForType (lldb::TypeNameSpecifierImplSP type_sp);
-#endif
-    
-#ifndef LLDB_DISABLE_PYTHON
-    lldb::SyntheticChildrenSP
-    GetSyntheticChildrenForType (lldb::TypeNameSpecifierImplSP type_sp);
-#endif
-    
-#ifndef LLDB_DISABLE_PYTHON
-    lldb::SyntheticChildrenSP
-    GetSyntheticChildren (ValueObject& valobj,
-                          lldb::DynamicValueType use_dynamic)
-    {
-        return m_categories_map.GetSyntheticChildren(valobj, use_dynamic);
-    }
-#endif
-    
-    bool
-    AnyMatches (ConstString type_name,
-                TypeCategoryImpl::FormatCategoryItems items = TypeCategoryImpl::ALL_ITEM_TYPES,
-                bool only_enabled = true,
-                const char** matching_category = NULL,
-                TypeCategoryImpl::FormatCategoryItems* matching_type = NULL)
-    {
-        return m_categories_map.AnyMatches(type_name,
-                                           items,
-                                           only_enabled,
-                                           matching_category,
-                                           matching_type);
-    }
-
-    static bool
-    GetFormatFromCString (const char *format_cstr,
-                          bool partial_match_ok,
-                          lldb::Format &format);
-
-    static char
-    GetFormatAsFormatChar (lldb::Format format);
-
-    static const char *
-    GetFormatAsCString (lldb::Format format);
-    
-    // if the user tries to add formatters for, say, "struct Foo"
-    // those will not match any type because of the way we strip qualifiers from typenames
-    // this method looks for the case where the user is adding a "class","struct","enum" or "union" Foo
-    // and strips the unnecessary qualifier
-    static ConstString
-    GetValidTypeName (const ConstString& type);
-    
-    // when DataExtractor dumps a vectorOfT, it uses a predefined format for each item
-    // this method returns it, or eFormatInvalid if vector_format is not a vectorOf
-    static lldb::Format
-    GetSingleItemFormat (lldb::Format vector_format);
-    
-    void
-    Changed ()
-    {
-        __sync_add_and_fetch(&m_last_revision, +1);
-    }
-    
-    uint32_t
-    GetCurrentRevision ()
-    {
-        return m_last_revision;
-    }
-    
-    ~FormatManager ()
-    {
-    }
-    
-private:    
-    ValueNavigator m_value_nav;
-    NamedSummariesMap m_named_summaries_map;
-    uint32_t m_last_revision;
-    CategoryMap m_categories_map;
-    
-    ConstString m_default_category_name;
-    ConstString m_system_category_name;
-    ConstString m_gnu_cpp_category_name;
-    ConstString m_libcxx_category_name;
-    ConstString m_objc_category_name;
-    ConstString m_corefoundation_category_name;
-    ConstString m_coregraphics_category_name;
-    ConstString m_coreservices_category_name;
-    ConstString m_vectortypes_category_name;
-    ConstString m_appkit_category_name;
-    
-    CategoryMap&
-    GetCategories ()
-    {
-        return m_categories_map;
-    }
-    
-    // WARNING: these are temporary functions that setup formatters
-    // while a few of these actually should be globally available and setup by LLDB itself
-    // most would actually belong to the users' lldbinit file or to some other form of configurable
-    // storage
-    void
-    LoadSTLFormatters();
-    
-    void
-    LoadLibcxxFormatters();
-    
-    void
-    LoadSystemFormatters();
-    
-#ifndef LLDB_DISABLE_PYTHON
-    void
-    LoadObjCFormatters();
-#endif
-};
-    
-} // namespace lldb_private
-
-#endif	// lldb_FormatManager_h_

Removed: lldb/branches/lldb-platform-work/include/lldb/Core/FormatNavigator.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Core/FormatNavigator.h?rev=183467&view=auto
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Core/FormatNavigator.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Core/FormatNavigator.h (removed)
@@ -1,631 +0,0 @@
-//===-- FormatNavigator.h ----------------------------------------*- C++ -*-===//
-//
-//                     The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef lldb_FormatNavigator_h_
-#define lldb_FormatNavigator_h_
-
-// C Includes
-// C++ Includes
-
-// Other libraries and framework includes
-#include "clang/AST/DeclCXX.h"
-#include "clang/AST/Type.h"
-#include "clang/AST/DeclObjC.h"
-
-// Project includes
-#include "lldb/lldb-public.h"
-
-#include "lldb/Core/FormatClasses.h"
-#include "lldb/Core/Log.h"
-#include "lldb/Core/RegularExpression.h"
-#include "lldb/Core/ValueObject.h"
-#include "lldb/Target/ObjCLanguageRuntime.h"
-#include "lldb/Target/Process.h"
-#include "lldb/Target/StackFrame.h"
-#include "lldb/Target/TargetList.h"
-
-using lldb::LogSP;
-
-namespace lldb_private {
-    
-// this file (and its. cpp) contain the low-level implementation of LLDB Data Visualization
-// class DataVisualization is the high-level front-end of this feature
-// clients should refer to that class as the entry-point into the data formatters
-// unless they have a good reason to bypass it and prefer to use this file's objects directly
-class IFormatChangeListener
-{
-public:
-    virtual void
-    Changed () = 0;
-    
-    virtual
-    ~IFormatChangeListener () {}
-    
-    virtual uint32_t
-    GetCurrentRevision () = 0;
-    
-};
-    
-static inline bool
-IsWhitespace (char c)
-{
-    return ( (c == ' ') || (c == '\t') || (c == '\v') || (c == '\f') );
-}
-
-static inline bool
-HasPrefix (const char* str1, const char* str2)
-{
-    return ( ::strstr(str1, str2) == str1 );
-}
-    
-// if the user tries to add formatters for, say, "struct Foo"
-// those will not match any type because of the way we strip qualifiers from typenames
-// this method looks for the case where the user is adding a "class","struct","enum" or "union" Foo
-// and strips the unnecessary qualifier
-static ConstString
-GetValidTypeName_Impl (const ConstString& type)
-{
-    int strip_len = 0;
-    
-    if (type == false)
-        return type;
-    
-    const char* type_cstr = type.AsCString();
-    
-    if ( HasPrefix(type_cstr, "class ") )
-        strip_len = 6;
-    else if ( HasPrefix(type_cstr, "enum ") )
-        strip_len = 5;
-    else if ( HasPrefix(type_cstr, "struct ") )
-        strip_len = 7;
-    else if ( HasPrefix(type_cstr, "union ") )
-        strip_len = 6;
-    
-    if (strip_len == 0)
-        return type;
-    
-    type_cstr += strip_len;
-    while (IsWhitespace(*type_cstr) && ++type_cstr)
-        ;
-    
-    return ConstString(type_cstr);
-}
-    
-template<typename KeyType, typename ValueType>
-class FormatNavigator;
-
-template<typename KeyType, typename ValueType>
-class FormatMap
-{
-public:
-
-    typedef typename ValueType::SharedPointer ValueSP;
-    typedef std::map<KeyType, ValueSP> MapType;
-    typedef typename MapType::iterator MapIterator;
-    typedef bool(*CallbackType)(void*, KeyType, const ValueSP&);
-    
-    FormatMap(IFormatChangeListener* lst) :
-    m_map(),
-    m_map_mutex(Mutex::eMutexTypeRecursive),
-    listener(lst)
-    {
-    }
-    
-    void
-    Add(KeyType name,
-        const ValueSP& entry)
-    {
-        if (listener)
-            entry->GetRevision() = listener->GetCurrentRevision();
-        else
-            entry->GetRevision() = 0;
-
-        Mutex::Locker(m_map_mutex);
-        m_map[name] = entry;
-        if (listener)
-            listener->Changed();
-    }
-    
-    bool
-    Delete (KeyType name)
-    {
-        Mutex::Locker(m_map_mutex);
-        MapIterator iter = m_map.find(name);
-        if (iter == m_map.end())
-            return false;
-        m_map.erase(name);
-        if (listener)
-            listener->Changed();
-        return true;
-    }
-    
-    void
-    Clear ()
-    {
-        Mutex::Locker(m_map_mutex);
-        m_map.clear();
-        if (listener)
-            listener->Changed();
-    }
-    
-    bool
-    Get(KeyType name,
-        ValueSP& entry)
-    {
-        Mutex::Locker(m_map_mutex);
-        MapIterator iter = m_map.find(name);
-        if (iter == m_map.end())
-            return false;
-        entry = iter->second;
-        return true;
-    }
-    
-    void
-    LoopThrough (CallbackType callback, void* param)
-    {
-        if (callback)
-        {
-            Mutex::Locker(m_map_mutex);
-            MapIterator pos, end = m_map.end();
-            for (pos = m_map.begin(); pos != end; pos++)
-            {
-                KeyType type = pos->first;
-                if (!callback(param, type, pos->second))
-                    break;
-            }
-        }
-    }
-    
-    uint32_t
-    GetCount ()
-    {
-        return m_map.size();
-    }
-    
-    ValueSP
-    GetValueAtIndex (uint32_t index)
-    {
-        Mutex::Locker(m_map_mutex);
-        MapIterator iter = m_map.begin();
-        MapIterator end = m_map.end();
-        while (index > 0)
-        {
-            iter++;
-            index--;
-            if (end == iter)
-                return ValueSP();
-        }
-        return iter->second;
-    }
-    
-    KeyType
-    GetKeyAtIndex (uint32_t index)
-    {
-        Mutex::Locker(m_map_mutex);
-        MapIterator iter = m_map.begin();
-        MapIterator end = m_map.end();
-        while (index > 0)
-        {
-            iter++;
-            index--;
-            if (end == iter)
-                return KeyType();
-        }
-        return iter->first;
-    }
-    
-protected:
-    MapType m_map;    
-    Mutex m_map_mutex;
-    IFormatChangeListener* listener;
-    
-    MapType&
-    map ()
-    {
-        return m_map;
-    }
-    
-    Mutex&
-    mutex ()
-    {
-        return m_map_mutex;
-    }
-    
-    friend class FormatNavigator<KeyType, ValueType>;
-    friend class FormatManager;
-    
-};
-    
-template<typename KeyType, typename ValueType>
-class FormatNavigator
-{
-protected:
-    typedef FormatMap<KeyType,ValueType> BackEndType;
-    
-public:
-    typedef typename BackEndType::MapType MapType;
-    typedef typename MapType::iterator MapIterator;
-    typedef typename MapType::key_type MapKeyType;
-    typedef typename MapType::mapped_type MapValueType;
-    typedef typename BackEndType::CallbackType CallbackType;
-#ifdef _LIBCPP_VERSION
-    typedef typename std::shared_ptr<FormatNavigator<KeyType, ValueType> > SharedPointer;
-#else
-    typedef typename std::tr1::shared_ptr<FormatNavigator<KeyType, ValueType> > SharedPointer;
-#endif
-    
-    friend class TypeCategoryImpl;
-
-    FormatNavigator(std::string name,
-                    IFormatChangeListener* lst) :
-    m_format_map(lst),
-    m_name(name),
-    m_id_cs(ConstString("id"))
-    {
-    }
-    
-    void
-    Add (const MapKeyType &type, const MapValueType& entry)
-    {
-        Add_Impl(type, entry, (KeyType*)NULL);
-    }
-    
-    bool
-    Delete (ConstString type)
-    {
-        return Delete_Impl(type, (KeyType*)NULL);
-    }
-        
-    bool
-    Get(ValueObject& valobj,
-        MapValueType& entry,
-        lldb::DynamicValueType use_dynamic,
-        uint32_t* why = NULL)
-    {
-        uint32_t value = lldb_private::eFormatterChoiceCriterionDirectChoice;
-        clang::QualType type = clang::QualType::getFromOpaquePtr(valobj.GetClangType());
-        bool ret = Get(valobj, type, entry, use_dynamic, value);
-        if (ret)
-            entry = MapValueType(entry);
-        else
-            entry = MapValueType();        
-        if (why)
-            *why = value;
-        return ret;
-    }
-    
-    bool
-    Get (ConstString type, MapValueType& entry)
-    {
-        return Get_Impl(type, entry, (KeyType*)NULL);
-    }
-    
-    bool
-    GetExact (ConstString type, MapValueType& entry)
-    {
-        return GetExact_Impl(type, entry, (KeyType*)NULL);
-    }
-    
-    MapValueType
-    GetAtIndex (uint32_t index)
-    {
-        return m_format_map.GetValueAtIndex(index);
-    }
-    
-    lldb::TypeNameSpecifierImplSP
-    GetTypeNameSpecifierAtIndex (uint32_t index)
-    {
-        return GetTypeNameSpecifierAtIndex_Impl(index, (KeyType*)NULL);
-    }
-    
-    void
-    Clear ()
-    {
-        m_format_map.Clear();
-    }
-    
-    void
-    LoopThrough (CallbackType callback, void* param)
-    {
-        m_format_map.LoopThrough(callback,param);
-    }
-    
-    uint32_t
-    GetCount ()
-    {
-        return m_format_map.GetCount();
-    }
-    
-protected:
-        
-    BackEndType m_format_map;
-    
-    std::string m_name;
-    
-    DISALLOW_COPY_AND_ASSIGN(FormatNavigator);
-    
-    ConstString m_id_cs;
-                           
-    void
-    Add_Impl (const MapKeyType &type, const MapValueType& entry, lldb::RegularExpressionSP *dummy)
-    {
-       m_format_map.Add(type,entry);
-    }
-
-    void Add_Impl (const ConstString &type, const MapValueType& entry, ConstString *dummy)
-    {
-       m_format_map.Add(GetValidTypeName_Impl(type), entry);
-    }
-
-    bool
-    Delete_Impl (ConstString type, ConstString *dummy)
-    {
-       return m_format_map.Delete(type);
-    }
-
-    bool
-    Delete_Impl (ConstString type, lldb::RegularExpressionSP *dummy)
-    {
-       Mutex& x_mutex = m_format_map.mutex();
-        lldb_private::Mutex::Locker locker(x_mutex);
-       MapIterator pos, end = m_format_map.map().end();
-       for (pos = m_format_map.map().begin(); pos != end; pos++)
-       {
-           lldb::RegularExpressionSP regex = pos->first;
-           if ( ::strcmp(type.AsCString(),regex->GetText()) == 0)
-           {
-               m_format_map.map().erase(pos);
-               if (m_format_map.listener)
-                   m_format_map.listener->Changed();
-               return true;
-           }
-       }
-       return false;
-    }    
-
-    bool
-    Get_Impl (ConstString type, MapValueType& entry, ConstString *dummy)
-    {
-       return m_format_map.Get(type, entry);
-    }
-
-    bool
-    GetExact_Impl (ConstString type, MapValueType& entry, ConstString *dummy)
-    {
-        return Get_Impl(type,entry, (KeyType*)0);
-    }
-    
-    lldb::TypeNameSpecifierImplSP
-    GetTypeNameSpecifierAtIndex_Impl (uint32_t index, ConstString *dummy)
-    {
-        ConstString key = m_format_map.GetKeyAtIndex(index);
-        if (key)
-            return lldb::TypeNameSpecifierImplSP(new TypeNameSpecifierImpl(key.AsCString(),
-                                                                           false));
-        else
-            return lldb::TypeNameSpecifierImplSP();
-    }
-    
-    lldb::TypeNameSpecifierImplSP
-    GetTypeNameSpecifierAtIndex_Impl (uint32_t index, lldb::RegularExpressionSP *dummy)
-    {
-        lldb::RegularExpressionSP regex = m_format_map.GetKeyAtIndex(index);
-        if (regex.get() == NULL)
-            return lldb::TypeNameSpecifierImplSP();
-        return lldb::TypeNameSpecifierImplSP(new TypeNameSpecifierImpl(regex->GetText(),
-                                                                       true));
-    }
-
-    bool
-    Get_Impl (ConstString key, MapValueType& value, lldb::RegularExpressionSP *dummy)
-    {
-       Mutex& x_mutex = m_format_map.mutex();
-       lldb_private::Mutex::Locker locker(x_mutex);
-       MapIterator pos, end = m_format_map.map().end();
-       for (pos = m_format_map.map().begin(); pos != end; pos++)
-       {
-           lldb::RegularExpressionSP regex = pos->first;
-           if (regex->Execute(key.AsCString()))
-           {
-               value = pos->second;
-               return true;
-           }
-       }
-       return false;
-    }
-    
-    bool
-    GetExact_Impl (ConstString key, MapValueType& value, lldb::RegularExpressionSP *dummy)
-    {
-        Mutex& x_mutex = m_format_map.mutex();
-        lldb_private::Mutex::Locker locker(x_mutex);
-        MapIterator pos, end = m_format_map.map().end();
-        for (pos = m_format_map.map().begin(); pos != end; pos++)
-        {
-            lldb::RegularExpressionSP regex = pos->first;
-            if (strcmp(regex->GetText(),key.AsCString()) == 0)
-            {
-                value = pos->second;
-                return true;
-            }
-        }
-        return false;
-    }
-    
-    bool
-    Get_BitfieldMatch (ValueObject& valobj,
-                       ConstString typeName,
-                       MapValueType& entry,
-                       uint32_t& reason)
-    {
-        LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_TYPES));
-        // for bitfields, append size to the typename so one can custom format them
-        StreamString sstring;
-        sstring.Printf("%s:%d",typeName.AsCString(),valobj.GetBitfieldBitSize());
-        ConstString bitfieldname = ConstString(sstring.GetData());
-        if (log)
-            log->Printf("appended bitfield info, final result is %s", bitfieldname.GetCString());
-        if (Get(bitfieldname, entry))
-        {
-            if (log)
-                log->Printf("bitfield direct match found, returning");
-            return true;
-        }
-        else
-        {
-            reason |= lldb_private::eFormatterChoiceCriterionStrippedBitField;
-            if (log)
-                log->Printf("no bitfield direct match");
-            return false;
-        }
-    }
-    
-    bool Get_ObjC (ValueObject& valobj,
-                   MapValueType& entry)
-    {
-        LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_TYPES));
-        lldb::ProcessSP process_sp = valobj.GetProcessSP();
-        ObjCLanguageRuntime* runtime = process_sp->GetObjCLanguageRuntime();
-        if (runtime == NULL)
-        {
-            if (log)
-                log->Printf("no valid ObjC runtime, skipping dynamic");
-            return false;
-        }
-        ObjCLanguageRuntime::ObjCISA isa = runtime->GetISA(valobj);
-        if (runtime->IsValidISA(isa) == false)
-        {
-            if (log)
-                log->Printf("invalid ISA, skipping dynamic");
-            return false;
-        }
-        ConstString name = runtime->GetActualTypeName(isa);
-        if (log)
-            log->Printf("dynamic type inferred is %s - looking for direct dynamic match", name.GetCString());
-        if (Get(name, entry))
-        {
-            if (log)
-                log->Printf("direct dynamic match found, returning");
-            return true;
-        }
-        if (log)
-            log->Printf("no dynamic match");
-        return false;
-    }
-    
-    bool Get (ValueObject& valobj,
-              clang::QualType type, // TODO: find out why "type" is passed in the type when it belongs to valobj? Can it ever differ?
-              MapValueType& entry,
-              lldb::DynamicValueType use_dynamic,
-              uint32_t& reason)
-    {
-        LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_TYPES));
-        if (type.isNull())
-        {
-            if (log)
-                log->Printf("type is NULL, returning");
-            return false;
-        }
-
-        type.removeLocalConst(); type.removeLocalVolatile(); type.removeLocalRestrict();
-        const clang::Type* typePtr = type.getTypePtrOrNull();
-        if (!typePtr)
-        {
-            if (log)
-                log->Printf("type is NULL, returning");
-            return false;
-        }
-        ConstString typeName(ClangASTType::GetTypeNameForQualType(valobj.GetClangAST(), type).c_str());
-        
-        if (valobj.GetBitfieldBitSize() > 0)
-        {
-            if (Get_BitfieldMatch(valobj, typeName, entry, reason))
-                return true;
-        }
-        
-        if (log)
-            log->Printf("trying to get %s for VO name %s of type %s",
-                        m_name.c_str(),
-                        valobj.GetName().AsCString(),
-                        typeName.AsCString());
-        
-        if (Get(typeName, entry))
-        {
-            if (log)
-                log->Printf("direct match found, returning");
-            return true;
-        }
-        if (log)
-            log->Printf("no direct match");
-
-        // strip pointers and references and see if that helps
-        if (typePtr->isReferenceType())
-        {
-            if (log)
-                log->Printf("stripping reference");
-            if (Get(valobj,type.getNonReferenceType(),entry, use_dynamic, reason) && !entry->SkipsReferences())
-            {
-                reason |= lldb_private::eFormatterChoiceCriterionStrippedPointerReference;
-                return true;
-            }
-        }
-        
-        if (typePtr->isPointerType())
-        {
-            if (log)
-                log->Printf("stripping pointer");
-            clang::QualType pointee = typePtr->getPointeeType();
-            if (Get(valobj, pointee, entry, use_dynamic, reason) && !entry->SkipsPointers())
-            {
-                reason |= lldb_private::eFormatterChoiceCriterionStrippedPointerReference;
-                return true;
-            }
-        }
-
-        if (typePtr->isObjCObjectPointerType())
-        {
-            if (use_dynamic != lldb::eNoDynamicValues)
-            {
-                if (log)
-                    log->Printf("allowed to figure out dynamic ObjC type");
-                if (Get_ObjC(valobj,entry))
-                {
-                    reason |= lldb_private::eFormatterChoiceCriterionDynamicObjCDiscovery;
-                    return true;
-                }
-            }
-            if (log)
-                log->Printf("dynamic disabled or failed - stripping ObjC pointer");
-            clang::QualType pointee = typePtr->getPointeeType();
-            if (Get(valobj, pointee, entry, use_dynamic, reason) && !entry->SkipsPointers())
-            {
-                reason |= lldb_private::eFormatterChoiceCriterionStrippedPointerReference;
-                return true;
-            }
-        }
-    
-        // try to strip typedef chains
-        const clang::TypedefType* type_tdef = type->getAs<clang::TypedefType>();
-        if (type_tdef)
-        {
-            if (log)
-                log->Printf("stripping typedef");
-            if ((Get(valobj, type_tdef->getDecl()->getUnderlyingType(), entry, use_dynamic, reason)) && entry->Cascades())
-            {
-                reason |= lldb_private::eFormatterChoiceCriterionNavigatedTypedefs;
-                return true;
-            }
-        }
-        return false;
-    }
-};
-
-} // namespace lldb_private
-
-#endif	// lldb_FormatNavigator_h_

Modified: lldb/branches/lldb-platform-work/include/lldb/Core/Language.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Core/Language.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Core/Language.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Core/Language.h Thu Jun  6 19:06:43 2013
@@ -74,7 +74,7 @@ public:
     ///     The enumeration value that describes the programming
     ///     language that an object is associated with.
     //------------------------------------------------------------------
-    lldb::LanguageType
+    virtual lldb::LanguageType
     GetLanguage() const;
 
     //------------------------------------------------------------------

Modified: lldb/branches/lldb-platform-work/include/lldb/Core/Listener.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Core/Listener.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Core/Listener.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Core/Listener.h Thu Jun  6 19:06:43 2013
@@ -117,7 +117,7 @@ public:
     size_t
     HandleBroadcastEvent (lldb::EventSP &event_sp);
 
-protected:
+private:
 
     //------------------------------------------------------------------
     // Classes that inherit from Listener can see and modify these
@@ -177,7 +177,6 @@ protected:
     void
     BroadcasterManagerWillDestruct (BroadcasterManager *manager);
     
-private:
 
 //    broadcaster_collection::iterator
 //    FindBroadcasterWithMask (Broadcaster *broadcaster,

Modified: lldb/branches/lldb-platform-work/include/lldb/Core/Log.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Core/Log.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Core/Log.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Core/Log.h Thu Jun  6 19:06:43 2013
@@ -46,6 +46,7 @@
 #define LLDB_LOG_OPTION_PREPEND_TIMESTAMP       (1u << 4)
 #define LLDB_LOG_OPTION_PREPEND_PROC_AND_THREAD (1u << 5)
 #define LLDB_LOG_OPTION_PREPEND_THREAD_NAME     (1U << 6)
+#define LLDB_LOG_OPTION_BACKTRACE               (1U << 7)
 
 //----------------------------------------------------------------------
 // Logging Functions
@@ -60,10 +61,10 @@ public:
     // Callback definitions for abstracted plug-in log access.
     //------------------------------------------------------------------
     typedef void (*DisableCallback) (const char **categories, Stream *feedback_strm);
-    typedef lldb::LogSP (*EnableCallback) (lldb::StreamSP &log_stream_sp,
-                                           uint32_t log_options,
-                                           const char **categories,
-                                           Stream *feedback_strm);
+    typedef Log * (*EnableCallback) (lldb::StreamSP &log_stream_sp,
+                                     uint32_t log_options,
+                                     const char **categories,
+                                     Stream *feedback_strm);
     typedef void (*ListCategoriesCallback) (Stream *strm);
 
     struct Callbacks
@@ -77,14 +78,14 @@ public:
     // Static accessors for logging channels
     //------------------------------------------------------------------
     static void
-    RegisterLogChannel (const char *channel,
+    RegisterLogChannel (const ConstString &channel,
                         const Log::Callbacks &log_callbacks);
 
     static bool
-    UnregisterLogChannel (const char *channel);
+    UnregisterLogChannel (const ConstString &channel);
 
     static bool
-    GetLogChannelCallbacks (const char *channel,
+    GetLogChannelCallbacks (const ConstString &channel,
                             Log::Callbacks &log_callbacks);
 
 
@@ -118,7 +119,7 @@ public:
     //------------------------------------------------------------------
     Log ();
 
-    Log (lldb::StreamSP &stream_sp);
+    Log (const lldb::StreamSP &stream_sp);
 
     ~Log ();
 
@@ -176,6 +177,12 @@ public:
     bool
     GetDebug() const;
 
+    void
+    SetStream (const lldb::StreamSP &stream_sp)
+    {
+        m_stream_sp = stream_sp;
+    }
+
 protected:
     //------------------------------------------------------------------
     // Member variables
@@ -217,7 +224,7 @@ public:
     ListCategories (Stream *strm) = 0;
 
 protected:
-    lldb::LogSP m_log_sp;
+    std::unique_ptr<Log> m_log_ap;
 
 private:
     DISALLOW_COPY_AND_ASSIGN (LogChannel);

Modified: lldb/branches/lldb-platform-work/include/lldb/Core/MappedHash.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Core/MappedHash.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Core/MappedHash.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Core/MappedHash.h Thu Jun  6 19:06:43 2013
@@ -36,7 +36,7 @@ public:
     }
     
     static uint32_t
-    HashString (const uint8_t hash_function, const char *s)
+    HashString (uint32_t hash_function, const char *s)
     {
         switch (hash_function)
         {
@@ -115,8 +115,8 @@ public:
             s.Printf ("header.header_data_len    = 0x%8.8x %u\n", header_data_len, header_data_len);
         }
         
-        virtual uint32_t
-        Read (lldb_private::DataExtractor &data, uint32_t offset)
+        virtual lldb::offset_t
+        Read (lldb_private::DataExtractor &data, lldb::offset_t offset)
         {
             if (data.ValidOffsetForDataOfSize (offset, 
                                                sizeof (magic) + 
@@ -140,14 +140,14 @@ public:
                                 data.SetByteOrder(lldb::eByteOrderBig);
                                 break;
                             default:
-                                return UINT32_MAX;
+                                return LLDB_INVALID_OFFSET;
                         }
                     }
                     else
                     {
                         // Magic bytes didn't match
                         version = 0;
-                        return UINT32_MAX;
+                        return LLDB_INVALID_OFFSET;
                     }
                 }
                 
@@ -155,7 +155,7 @@ public:
                 if (version != 1)
                 {
                     // Unsupported version
-                    return UINT32_MAX;
+                    return LLDB_INVALID_OFFSET;
                 }
                 hash_function       = data.GetU16 (&offset);
                 if (hash_function == 4)
@@ -165,7 +165,7 @@ public:
                 header_data_len     = data.GetU32 (&offset);
                 return offset;
             }
-            return UINT32_MAX;
+            return LLDB_INVALID_OFFSET;
         }
 //        
 //        // Returns a buffer that contains a serialized version of this table
@@ -271,7 +271,7 @@ public:
                 const uint32_t hash = m_entries[i].hash;
                 const uint32_t bucket_idx = hash % header.bucket_count;
                 const uint32_t strp_offset = m_entries[i].str_offset;
-                const dw_offset_t die_offset = m_entries[i].die_offset;
+                const uint32_t die_offset = m_entries[i].die_offset;
                 hash_buckets[bucket_idx][hash][strp_offset].push_back(die_offset);
             }
             
@@ -379,8 +379,8 @@ public:
             m_hash_values (NULL),
             m_hash_offsets (NULL)
         {
-            uint32_t offset = m_header.Read (data, 0);
-            if (offset != UINT32_MAX && IsValid ())
+            lldb::offset_t offset = m_header.Read (data, 0);
+            if (offset != LLDB_INVALID_OFFSET && IsValid ())
             {
                 m_hash_indexes = (uint32_t *)data.GetData (&offset, m_header.bucket_count * sizeof(uint32_t));
                 m_hash_values  = (uint32_t *)data.GetData (&offset, m_header.hashes_count * sizeof(uint32_t));
@@ -443,10 +443,10 @@ public:
                         const uint32_t curr_hash_value = GetHashValue (hash_idx);
                         if (curr_hash_value == hash_value)
                         {
-                            uint32_t hash_data_offset = GetHashDataOffset (hash_idx);
+                            lldb::offset_t hash_data_offset = GetHashDataOffset (hash_idx);
                             while (hash_data_offset != UINT32_MAX)
                             {
-                                const uint32_t prev_hash_data_offset = hash_data_offset;
+                                const lldb::offset_t prev_hash_data_offset = hash_data_offset;
                                 Result hash_result = GetHashDataForName (name, &hash_data_offset, pair);
                                 // Check the result of getting our hash data
                                 switch (hash_result)
@@ -505,7 +505,7 @@ public:
 
         virtual Result
         GetHashDataForName (const char *name,
-                            uint32_t* hash_data_offset_ptr, 
+                            lldb::offset_t* hash_data_offset_ptr, 
                             Pair &pair) const = 0;
 
         const HeaderType &

Modified: lldb/branches/lldb-platform-work/include/lldb/Core/Module.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Core/Module.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Core/Module.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Core/Module.h Thu Jun  6 19:06:43 2013
@@ -11,270 +11,16 @@
 #define liblldb_Module_h_
 
 #include "lldb/Core/ArchSpec.h"
-#include "lldb/Core/Section.h"
 #include "lldb/Core/UUID.h"
-#include "lldb/Symbol/ObjectFile.h"
+#include "lldb/Host/FileSpec.h"
 #include "lldb/Host/Mutex.h"
 #include "lldb/Host/TimeValue.h"
 #include "lldb/Symbol/ClangASTContext.h"
-#include "lldb/Symbol/CompileUnit.h"
-#include "lldb/Symbol/SymbolContext.h"
-#include "lldb/Symbol/Symtab.h"
-#include "lldb/Symbol/TypeList.h"
+#include "lldb/Symbol/SymbolContextScope.h"
 #include "lldb/Target/PathMappingList.h"
 
-
 namespace lldb_private {
 
-class ModuleSpec
-{
-public:
-    ModuleSpec () :
-        m_file (),
-        m_platform_file (),
-        m_symbol_file (),
-        m_arch (),
-        m_uuid (),
-        m_object_name (),
-        m_object_offset (0),
-        m_source_mappings ()
-    {
-    }
-
-    ModuleSpec (const FileSpec &file_spec) :
-        m_file (file_spec),
-        m_platform_file (),
-        m_symbol_file (),
-        m_arch (),
-        m_uuid (),
-        m_object_name (),
-        m_object_offset (0),
-        m_source_mappings ()
-    {
-    }
-
-    ModuleSpec (const FileSpec &file_spec, const ArchSpec &arch) :
-        m_file (file_spec),
-        m_platform_file (),
-        m_symbol_file (),
-        m_arch (arch),
-        m_uuid (),
-        m_object_name (),
-        m_object_offset (0),
-        m_source_mappings ()
-    {
-    }
-    
-    ModuleSpec (const ModuleSpec &rhs) :
-        m_file (rhs.m_file),
-        m_platform_file (rhs.m_platform_file),
-        m_symbol_file (rhs.m_symbol_file),
-        m_arch (rhs.m_arch),
-        m_uuid (rhs.m_uuid),
-        m_object_name (rhs.m_object_name),
-        m_object_offset (rhs.m_object_offset),
-        m_source_mappings (rhs.m_source_mappings)
-    {
-    }
-
-    ModuleSpec &
-    operator = (const ModuleSpec &rhs)
-    {
-        if (this != &rhs)
-        {
-            m_file = rhs.m_file;
-            m_platform_file = rhs.m_platform_file;
-            m_symbol_file = rhs.m_symbol_file;
-            m_arch = rhs.m_arch;
-            m_uuid = rhs.m_uuid;
-            m_object_name = rhs.m_object_name;
-            m_object_offset = rhs.m_object_offset;
-            m_source_mappings = rhs.m_source_mappings;
-        }
-        return *this;
-    }
-
-    FileSpec *
-    GetFileSpecPtr ()
-    {
-        if (m_file)
-            return &m_file;
-        return NULL;
-    }
-
-    const FileSpec *
-    GetFileSpecPtr () const
-    {
-        if (m_file)
-            return &m_file;
-        return NULL;
-    }
-    
-    FileSpec &
-    GetFileSpec ()
-    {
-        return m_file;
-    }
-    const FileSpec &
-    GetFileSpec () const
-    {
-        return m_file;
-    }
-
-    FileSpec *
-    GetPlatformFileSpecPtr ()
-    {
-        if (m_platform_file)
-            return &m_platform_file;
-        return NULL;
-    }
-
-    const FileSpec *
-    GetPlatformFileSpecPtr () const
-    {
-        if (m_platform_file)
-            return &m_platform_file;
-        return NULL;
-    }
-
-    FileSpec &
-    GetPlatformFileSpec ()
-    {
-        return m_platform_file;
-    }
-
-    const FileSpec &
-    GetPlatformFileSpec () const
-    {
-        return m_platform_file;
-    }
-
-    FileSpec *
-    GetSymbolFileSpecPtr ()
-    {
-        if (m_symbol_file)
-            return &m_symbol_file;
-        return NULL;
-    }
-    
-    const FileSpec *
-    GetSymbolFileSpecPtr () const
-    {
-        if (m_symbol_file)
-            return &m_symbol_file;
-        return NULL;
-    }
-    
-    FileSpec &
-    GetSymbolFileSpec ()
-    {
-        return m_symbol_file;
-    }
-    
-    const FileSpec &
-    GetSymbolFileSpec () const
-    {
-        return m_symbol_file;
-    }
-
-    
-    ArchSpec *
-    GetArchitecturePtr ()
-    {
-        if (m_arch.IsValid())
-            return &m_arch;
-        return NULL;
-    }
-    
-    const ArchSpec *
-    GetArchitecturePtr () const
-    {
-        if (m_arch.IsValid())
-            return &m_arch;
-        return NULL;
-    }
-    
-    ArchSpec &
-    GetArchitecture ()
-    {
-        return m_arch;
-    }
-    
-    const ArchSpec &
-    GetArchitecture () const
-    {
-        return m_arch;
-    }
-
-    UUID *
-    GetUUIDPtr ()
-    {
-        if (m_uuid.IsValid())
-            return &m_uuid;
-        return NULL;
-    }
-    
-    const UUID *
-    GetUUIDPtr () const
-    {
-        if (m_uuid.IsValid())
-            return &m_uuid;
-        return NULL;
-    }
-    
-    UUID &
-    GetUUID ()
-    {
-        return m_uuid;
-    }
-    
-    const UUID &
-    GetUUID () const
-    {
-        return m_uuid;
-    }
-
-    ConstString &
-    GetObjectName ()
-    {
-        return m_object_name;
-    }
-
-    const ConstString &
-    GetObjectName () const
-    {
-        return m_object_name;
-    }
-
-    uint64_t
-    GetObjectOffset () const
-    {
-        return m_object_offset;
-    }
-
-    void
-    SetObjectOffset (uint64_t object_offset)
-    {
-        m_object_offset = object_offset;
-    }
-
-    PathMappingList &
-    GetSourceMappingList () const
-    {
-        return m_source_mappings;
-    }
-
-protected:
-    FileSpec m_file;
-    FileSpec m_platform_file;
-    FileSpec m_symbol_file;
-    ArchSpec m_arch;
-    UUID m_uuid;
-    ConstString m_object_name;
-    uint64_t m_object_offset;
-    mutable PathMappingList m_source_mappings;
-};
-
 //----------------------------------------------------------------------
 /// @class Module Module.h "lldb/Core/Module.h"
 /// @brief A class that describes an executable image and its associated
@@ -295,13 +41,10 @@ protected:
 /// made.
 //----------------------------------------------------------------------
 class Module :
-    public STD_ENABLE_SHARED_FROM_THIS(Module),
+    public std::enable_shared_from_this<Module>,
     public SymbolContextScope
 {
 public:
-    friend class ModuleList;
-    friend bool ObjectFile::SetModulesArchitecture (const ArchSpec &new_arch);
-
 	// Static functions that can track the lifetime of moodule objects.
 	// This is handy because we might have Module objects that are in
 	// shared pointers that aren't in the global module list (from 
@@ -345,7 +88,8 @@ public:
     Module (const FileSpec& file_spec,
             const ArchSpec& arch,
             const ConstString *object_name = NULL,
-            off_t object_offset = 0);
+            off_t object_offset = 0,
+            const TimeValue *object_mod_time_ptr = NULL);
 
     Module (const ModuleSpec &module_spec);
     //------------------------------------------------------------------
@@ -408,6 +152,29 @@ public:
                     lldb::DescriptionLevel level = lldb::eDescriptionLevelFull);
 
     //------------------------------------------------------------------
+    /// Get the module path and object name.
+    ///
+    /// Modules can refer to object files. In this case the specification
+    /// is simple and would return the path to the file:
+    ///
+    ///     "/usr/lib/foo.dylib"
+    ///
+    /// Modules can be .o files inside of a BSD archive (.a file). In
+    /// this case, the object specification will look like:
+    ///
+    ///     "/usr/lib/foo.a(bar.o)"
+    ///
+    /// There are many places where logging wants to log this fully
+    /// qualified specification, so we centralize this functionality
+    /// here.
+    ///
+    /// @return
+    ///     The object path + object name if there is one.
+    //------------------------------------------------------------------
+    std::string
+    GetSpecificationDescription () const;
+
+    //------------------------------------------------------------------
     /// Dump a description of this object to a Stream.
     ///
     /// Dump a description of the contents of this object to the
@@ -430,8 +197,9 @@ public:
     virtual void
     DumpSymbolContext (Stream *s);
 
+    
     //------------------------------------------------------------------
-    /// Find a symbol in the object files symbol table.
+    /// Find a symbol in the object file's symbol table.
     ///
     /// @param[in] name
     ///     The name of the symbol that we are looking for.
@@ -461,6 +229,28 @@ public:
                                      SymbolContextList &sc_list);
 
     //------------------------------------------------------------------
+    /// Find a funciton symbols in the object file's symbol table.
+    ///
+    /// @param[in] name
+    ///     The name of the symbol that we are looking for.
+    ///
+    /// @param[in] name_type_mask
+    ///     A mask that has one or more bitwise OR'ed values from the
+    ///     lldb::FunctionNameType enumeration type that indicate what
+    ///     kind of names we are looking for.
+    ///
+    /// @param[out] sc_list
+    ///     A list to append any matching symbol contexts to.
+    ///
+    /// @return
+    ///     The number of symbol contexts that were added to \a sc_list
+    //------------------------------------------------------------------
+    size_t
+    FindFunctionSymbols (const ConstString &name,
+                         uint32_t name_type_mask,
+                         SymbolContextList& sc_list);
+
+    //------------------------------------------------------------------
     /// Find compile units by partial or full path.
     ///
     /// Finds all compile units that match \a path in all of the modules
@@ -481,7 +271,7 @@ public:
     /// @return
     ///     The number of matches added to \a sc_list.
     //------------------------------------------------------------------
-    uint32_t
+    size_t
     FindCompileUnits (const FileSpec &path,
                       bool append,
                       SymbolContextList &sc_list);
@@ -518,7 +308,7 @@ public:
     /// @return
     ///     The number of matches added to \a sc_list.
     //------------------------------------------------------------------
-    uint32_t
+    size_t
     FindFunctions (const ConstString &name,
                    const ClangNamespaceDecl *namespace_decl,
                    uint32_t name_type_mask, 
@@ -549,7 +339,7 @@ public:
     /// @return
     ///     The number of matches added to \a sc_list.
     //------------------------------------------------------------------
-    uint32_t
+    size_t
     FindFunctions (const RegularExpression& regex, 
                    bool symbols_ok, 
                    bool inlines_ok,
@@ -582,11 +372,11 @@ public:
     /// @return
     ///     The number of matches added to \a variable_list.
     //------------------------------------------------------------------
-    uint32_t
+    size_t
     FindGlobalVariables (const ConstString &name,
                          const ClangNamespaceDecl *namespace_decl,
                          bool append, 
-                         uint32_t max_matches, 
+                         size_t max_matches,
                          VariableList& variable_list);
 
     //------------------------------------------------------------------
@@ -611,10 +401,10 @@ public:
     /// @return
     ///     The number of matches added to \a variable_list.
     //------------------------------------------------------------------
-    uint32_t
+    size_t
     FindGlobalVariables (const RegularExpression& regex, 
                          bool append, 
-                         uint32_t max_matches, 
+                         size_t max_matches,
                          VariableList& variable_list);
 
     //------------------------------------------------------------------
@@ -658,13 +448,18 @@ public:
     /// @return
     ///     The number of matches added to \a type_list.
     //------------------------------------------------------------------
-    uint32_t
+    size_t
     FindTypes (const SymbolContext& sc,
                const ConstString &type_name,
                bool exact_match,
-               uint32_t max_matches,
+               size_t max_matches,
                TypeList& types);
 
+    lldb::TypeSP
+    FindFirstType (const SymbolContext& sc,
+                   const ConstString &type_name,
+                   bool exact_match);
+
     //------------------------------------------------------------------
     /// Find types by name that are in a namespace. This function is
     /// used by the expression parser when searches need to happen in
@@ -687,11 +482,11 @@ public:
     /// @return
     ///     The number of matches added to \a type_list.
     //------------------------------------------------------------------
-    uint32_t
+    size_t
     FindTypesInNamespace (const SymbolContext& sc,
                           const ConstString &type_name,
                           const ClangNamespaceDecl *namespace_decl,
-                          uint32_t max_matches,
+                          size_t max_matches,
                           TypeList& type_list);
 
     //------------------------------------------------------------------
@@ -755,16 +550,26 @@ public:
     }
     
     void
-    SetSymbolFileFileSpec (const FileSpec &file)
+    SetSymbolFileFileSpec (const FileSpec &file);
+
+    const TimeValue &
+    GetModificationTime () const
     {
-        m_symfile_spec = file;
-        m_symfile_ap.reset();
-        m_did_load_symbol_vendor = false;
+        return m_mod_time;
     }
 
     const TimeValue &
-    GetModificationTime () const;
-   
+    GetObjectModificationTime () const
+    {
+        return m_object_mod_time;
+    }
+
+    void
+    SetObjectModificationTime (const TimeValue &mod_time)
+    {
+        m_mod_time = mod_time;
+    }
+
     //------------------------------------------------------------------
     /// Tells whether this module is capable of being the main executable
     /// for a process.
@@ -789,6 +594,11 @@ public:
     bool
     IsLoadedInTarget (Target *target);
 
+    bool
+    LoadScriptingResourceInTarget (Target *target,
+                                   Error& error,
+                                   Stream* feedback_stream = NULL);
+    
     //------------------------------------------------------------------
     /// Get the number of compile units for this module.
     ///
@@ -796,11 +606,11 @@ public:
     ///     The number of compile units that the symbol vendor plug-in
     ///     finds.
     //------------------------------------------------------------------
-    uint32_t
+    size_t
     GetNumCompileUnits();
 
     lldb::CompUnitSP
-    GetCompileUnitAtIndex (uint32_t);
+    GetCompileUnitAtIndex (size_t idx);
 
     const ConstString &
     GetObjectName() const;
@@ -826,8 +636,11 @@ public:
     ///     returned. The returned pointer is owned by this object and
     ///     remains valid as long as the object is around.
     //------------------------------------------------------------------
-    ObjectFile *
+    virtual ObjectFile *
     GetObjectFile ();
+    
+    uint32_t
+    GetVersion (uint32_t *versions, uint32_t num_versions);
 
     // Load an object file from memory.
     ObjectFile *
@@ -848,8 +661,9 @@ public:
     ///     will be returned. The returned pointer is owned by this
     ///     object and remains valid as long as the object is around.
     //------------------------------------------------------------------
-    SymbolVendor*
-    GetSymbolVendor(bool can_create = true);
+    virtual SymbolVendor*
+    GetSymbolVendor(bool can_create = true,
+                    lldb_private::Stream *feedback_strm = NULL);
 
     //------------------------------------------------------------------
     /// Get accessor the type list for this module.
@@ -1104,6 +918,56 @@ public:
     bool
     RemapSourceFile (const char *path, std::string &new_path) const;
     
+    
+    //------------------------------------------------------------------
+    /// Prepare to do a function name lookup.
+    ///
+    /// Looking up functions by name can be a tricky thing. LLDB requires
+    /// that accelerator tables contain full names for functions as well
+    /// as function basenames which include functions, class methods and
+    /// class functions. When the user requests that an action use a
+    /// function by name, we are sometimes asked to automatically figure
+    /// out what a name could possibly map to. A user might request a
+    /// breakpoint be set on "count". If no options are supplied to limit
+    /// the scope of where to search for count, we will by default match
+    /// any function names named "count", all class and instance methods
+    /// named "count" (no matter what the namespace or contained context)
+    /// and any selectors named "count". If a user specifies "a::b" we
+    /// will search for the basename "b", and then prune the results that
+    /// don't match "a::b" (note that "c::a::b" and "d::e::a::b" will
+    /// match a query of "a::b".
+    ///
+    /// @param[in] name
+    ///     The user supplied name to use in the lookup
+    ///
+    /// @param[in] name_type_mask
+    ///     The mask of bits from lldb::FunctionNameType enumerations
+    ///     that tell us what kind of name we are looking for.
+    ///
+    /// @param[out] lookup_name
+    ///     The actual name that will be used when calling
+    ///     SymbolVendor::FindFunctions() or Symtab::FindFunctionSymbols()
+    ///
+    /// @param[out] lookup_name_type_mask
+    ///     The actual name mask that should be used in the calls to
+    ///     SymbolVendor::FindFunctions() or Symtab::FindFunctionSymbols()
+    ///
+    /// @param[out] match_name_after_lookup
+    ///     A boolean that indicates if we need to iterate through any
+    ///     match results obtained from SymbolVendor::FindFunctions() or
+    ///     Symtab::FindFunctionSymbols() to see if the name contains
+    ///     \a name. For example if \a name is "a::b", this function will
+    ///     return a \a lookup_name of "b", with \a match_name_after_lookup
+    ///     set to true to indicate any matches will need to be checked
+    ///     to make sure they contain \a name.
+    //------------------------------------------------------------------
+    static void
+    PrepareForFunctionNameLookup (const ConstString &name,
+                                  uint32_t name_type_mask,
+                                  ConstString &lookup_name,
+                                  uint32_t &lookup_name_type_mask,
+                                  bool &match_name_after_lookup);
+
 protected:
     //------------------------------------------------------------------
     // Member Variables
@@ -1117,8 +981,9 @@ protected:
     FileSpec                    m_symfile_spec; ///< If this path is valid, then this is the file that _will_ be used as the symbol file for this module
     ConstString                 m_object_name;  ///< The name an object within this module that is selected, or empty of the module is represented by \a m_file.
     uint64_t                    m_object_offset;
+    TimeValue                   m_object_mod_time;
     lldb::ObjectFileSP          m_objfile_sp;   ///< A shared pointer to the object file parser for this module as it may or may not be shared with the SymbolFile
-    std::auto_ptr<SymbolVendor> m_symfile_ap;   ///< A pointer to the symbol vendor for this module.
+    std::unique_ptr<SymbolVendor> m_symfile_ap;   ///< A pointer to the symbol vendor for this module.
     ClangASTContext             m_ast;          ///< The AST context for this module.
     PathMappingList             m_source_mappings; ///< Module specific source remappings for when you have debug info for a module that doesn't match where the sources currently are
 
@@ -1179,14 +1044,18 @@ protected:
     bool
     SetArchitecture (const ArchSpec &new_arch);
     
+    
+    friend class ModuleList;
+    friend class ObjectFile;
+
 private:
 
-    uint32_t
+    size_t
     FindTypes_Impl (const SymbolContext& sc, 
                     const ConstString &name,
                     const ClangNamespaceDecl *namespace_decl,
                     bool append, 
-                    uint32_t max_matches, 
+                    size_t max_matches,
                     TypeList& types);
 
     

Modified: lldb/branches/lldb-platform-work/include/lldb/Core/ModuleList.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Core/ModuleList.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Core/ModuleList.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Core/ModuleList.h Thu Jun  6 19:06:43 2013
@@ -11,6 +11,7 @@
 #define liblldb_ModuleList_h_
 
 #include <vector>
+#include <list>
 
 #include "lldb/lldb-private.h"
 #include "lldb/Host/Mutex.h"
@@ -27,6 +28,25 @@ namespace lldb_private {
 class ModuleList
 {
 public:
+    
+    class Notifier
+    {
+    public:
+        virtual void
+        ModuleAdded (const ModuleList& module_list, const lldb::ModuleSP& module_sp) = 0;
+        virtual void
+        ModuleRemoved (const ModuleList& module_list, const lldb::ModuleSP& module_sp) = 0;
+        virtual void
+        ModuleUpdated (const ModuleList& module_list, const lldb::ModuleSP& old_module_sp,
+                       const lldb::ModuleSP& new_module_sp) = 0;
+        virtual void
+        WillClearList (const ModuleList& module_list) = 0;
+        
+        virtual
+        ~Notifier ()
+        {}
+    };
+    
     //------------------------------------------------------------------
     /// Default constructor.
     ///
@@ -44,6 +64,8 @@ public:
     ///     Another module list object.
     //------------------------------------------------------------------
     ModuleList (const ModuleList& rhs);
+    
+    ModuleList (ModuleList::Notifier* notifier);
 
     //------------------------------------------------------------------
     /// Destructor.
@@ -91,6 +113,15 @@ public:
     bool
     AppendIfNeeded (const lldb::ModuleSP &module_sp);
 
+    void
+    Append (const ModuleList& module_list);
+    
+    bool
+    AppendIfNeeded (const ModuleList& module_list);
+    
+    bool
+    ReplaceModule (const lldb::ModuleSP &old_module_sp, const lldb::ModuleSP &new_module_sp);
+    
     //------------------------------------------------------------------
     /// Clear the object's state.
     ///
@@ -126,16 +157,15 @@ public:
     Dump (Stream *s) const;
 
     void
-    LogUUIDAndPaths (lldb::LogSP &log_sp, 
-                     const char *prefix_cstr);
+    LogUUIDAndPaths (Log *log, const char *prefix_cstr);
                      
     Mutex &
-    GetMutex ()
+    GetMutex () const
     {
         return m_modules_mutex;
     }
     
-    uint32_t
+    size_t
     GetIndexForModule (const Module *module) const;
 
     //------------------------------------------------------------------
@@ -151,7 +181,7 @@ public:
     /// @see ModuleList::GetSize()
     //------------------------------------------------------------------
     lldb::ModuleSP
-    GetModuleAtIndex (uint32_t idx);
+    GetModuleAtIndex (size_t idx) const;
 
     //------------------------------------------------------------------
     /// Get the module shared pointer for the module at index \a idx without
@@ -168,7 +198,7 @@ public:
     /// @see ModuleList::GetSize()
     //------------------------------------------------------------------
     lldb::ModuleSP
-    GetModuleAtIndexUnlocked (uint32_t idx);
+    GetModuleAtIndexUnlocked (size_t idx) const;
 
     //------------------------------------------------------------------
     /// Get the module pointer for the module at index \a idx.
@@ -183,7 +213,7 @@ public:
     /// @see ModuleList::GetSize()
     //------------------------------------------------------------------
     Module*
-    GetModulePointerAtIndex (uint32_t idx) const;
+    GetModulePointerAtIndex (size_t idx) const;
 
     //------------------------------------------------------------------
     /// Get the module pointer for the module at index \a idx without
@@ -200,7 +230,7 @@ public:
     /// @see ModuleList::GetSize()
     //------------------------------------------------------------------
     Module*
-    GetModulePointerAtIndexUnlocked (uint32_t idx) const;
+    GetModulePointerAtIndexUnlocked (size_t idx) const;
 
     //------------------------------------------------------------------
     /// Find compile units by partial or full path.
@@ -223,21 +253,21 @@ public:
     /// @return
     ///     The number of matches added to \a sc_list.
     //------------------------------------------------------------------
-    uint32_t
+    size_t
     FindCompileUnits (const FileSpec &path,
                       bool append,
-                      SymbolContextList &sc_list);
+                      SymbolContextList &sc_list) const;
     
     //------------------------------------------------------------------
     /// @see Module::FindFunctions ()
     //------------------------------------------------------------------
-    uint32_t
+    size_t
     FindFunctions (const ConstString &name,
                    uint32_t name_type_mask,
                    bool include_symbols,
                    bool include_inlines,
                    bool append,
-                   SymbolContextList &sc_list);
+                   SymbolContextList &sc_list) const;
 
     //------------------------------------------------------------------
     /// Find global and static variables by name.
@@ -262,11 +292,11 @@ public:
     /// @return
     ///     The number of matches added to \a variable_list.
     //------------------------------------------------------------------
-    uint32_t
+    size_t
     FindGlobalVariables (const ConstString &name,
                          bool append,
-                         uint32_t max_matches,
-                         VariableList& variable_list);
+                         size_t max_matches,
+                         VariableList& variable_list) const;
 
     //------------------------------------------------------------------
     /// Find global and static variables by regular exression.
@@ -290,11 +320,11 @@ public:
     /// @return
     ///     The number of matches added to \a variable_list.
     //------------------------------------------------------------------
-    uint32_t
+    size_t
     FindGlobalVariables (const RegularExpression& regex,
                          bool append,
-                         uint32_t max_matches,
-                         VariableList& variable_list);
+                         size_t max_matches,
+                         VariableList& variable_list) const;
 
     //------------------------------------------------------------------
     /// Finds the first module whose file specification matches \a
@@ -332,7 +362,7 @@ public:
                  ModuleList& matching_module_list) const;
 
     lldb::ModuleSP
-    FindModule (const Module *module_ptr);
+    FindModule (const Module *module_ptr) const;
 
     //------------------------------------------------------------------
     // Find a module by UUID
@@ -342,22 +372,22 @@ public:
     // finding modules by UUID values is very efficient and accurate.
     //------------------------------------------------------------------
     lldb::ModuleSP
-    FindModule (const UUID &uuid);
+    FindModule (const UUID &uuid) const;
     
     lldb::ModuleSP
-    FindFirstModule (const ModuleSpec &module_spec);
+    FindFirstModule (const ModuleSpec &module_spec) const;
 
     size_t
     FindSymbolsWithNameAndType (const ConstString &name,
                                 lldb::SymbolType symbol_type,
                                 SymbolContextList &sc_list,
-                                bool append = false);
+                                bool append = false) const;
 
     size_t
     FindSymbolsMatchingRegExAndType (const RegularExpression &regex, 
                                      lldb::SymbolType symbol_type, 
                                      SymbolContextList &sc_list,
-                                     bool append = false);
+                                     bool append = false) const;
                                      
     //------------------------------------------------------------------
     /// Find types by name.
@@ -392,12 +422,12 @@ public:
     /// @return
     ///     The number of matches added to \a type_list.
     //------------------------------------------------------------------
-    uint32_t
+    size_t
     FindTypes (const SymbolContext& sc,
                const ConstString &name,
                bool name_is_fully_qualified,
-               uint32_t max_matches,
-               TypeList& types);
+               size_t max_matches,
+               TypeList& types) const;
     
     bool
     FindSourceFile (const FileSpec &orig_spec, FileSpec &new_spec) const;
@@ -416,7 +446,7 @@ public:
 
     bool
     ResolveFileAddress (lldb::addr_t vm_addr,
-                        Address& so_addr);
+                        Address& so_addr) const;
 
     //------------------------------------------------------------------
     /// @copydoc Module::ResolveSymbolContextForAddress (const Address &,uint32_t,SymbolContext&)
@@ -424,7 +454,7 @@ public:
     uint32_t
     ResolveSymbolContextForAddress (const Address& so_addr,
                                     uint32_t resolve_scope,
-                                    SymbolContext& sc);
+                                    SymbolContext& sc) const;
 
     //------------------------------------------------------------------
     /// @copydoc Module::ResolveSymbolContextForFilePath (const char *,uint32_t,bool,uint32_t,SymbolContextList&)
@@ -434,7 +464,7 @@ public:
                                      uint32_t line,
                                      bool check_inlines,
                                      uint32_t resolve_scope,
-                                     SymbolContextList& sc_list);
+                                     SymbolContextList& sc_list) const;
 
     //------------------------------------------------------------------
     /// @copydoc Module::ResolveSymbolContextsForFileSpec (const FileSpec &,uint32_t,bool,uint32_t,SymbolContextList&)
@@ -444,7 +474,7 @@ public:
                                      uint32_t line,
                                      bool check_inlines,
                                      uint32_t resolve_scope,
-                                     SymbolContextList& sc_list);
+                                     SymbolContextList& sc_list) const;
 
     //------------------------------------------------------------------
     /// Gets the size of the module list.
@@ -455,6 +485,12 @@ public:
     size_t
     GetSize () const;
 
+    bool
+    LoadScriptingResourcesInTarget (Target *target,
+                                    std::list<Error>& errors,
+                                    Stream* feedback_stream = NULL,
+                                    bool continue_on_error = true);
+    
     static bool
     ModuleIsInCache (const Module *module_ptr);
 
@@ -473,7 +509,7 @@ public:
     FindSharedModules (const ModuleSpec &module_spec,
                        ModuleList &matching_module_list);
 
-    static uint32_t
+    static size_t
     RemoveOrphanSharedModules (bool mandatory);
     
     static bool
@@ -485,12 +521,26 @@ protected:
     //------------------------------------------------------------------
     typedef std::vector<lldb::ModuleSP> collection; ///< The module collection type.
 
+    void
+    AppendImpl (const lldb::ModuleSP &module_sp, bool use_notifier = true);
+    
+    bool
+    RemoveImpl (const lldb::ModuleSP &module_sp, bool use_notifier = true);
+    
+    collection::iterator
+    RemoveImpl (collection::iterator pos, bool use_notifier = true);
+    
+    void
+    ClearImpl (bool use_notifier = true);
+    
     //------------------------------------------------------------------
     // Member variables.
     //------------------------------------------------------------------
     collection m_modules; ///< The collection of modules.
     mutable Mutex m_modules_mutex;
 
+    Notifier* m_notifier;
+    
 };
 
 } // namespace lldb_private

Modified: lldb/branches/lldb-platform-work/include/lldb/Core/PluginInterface.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Core/PluginInterface.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Core/PluginInterface.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Core/PluginInterface.h Thu Jun  6 19:06:43 2013
@@ -24,12 +24,9 @@ public:
     virtual
     ~PluginInterface () {}
 
-    virtual const char *
+    virtual ConstString
     GetPluginName() = 0;
 
-    virtual const char *
-    GetShortPluginName() = 0;
-
     virtual uint32_t
     GetPluginVersion() = 0;
 

Modified: lldb/branches/lldb-platform-work/include/lldb/Core/PluginManager.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Core/PluginManager.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Core/PluginManager.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Core/PluginManager.h Thu Jun  6 19:06:43 2013
@@ -29,7 +29,7 @@ public:
     // ABI
     //------------------------------------------------------------------
     static bool
-    RegisterPlugin (const char *name,
+    RegisterPlugin (const ConstString &name,
                     const char *description,
                     ABICreateInstance create_callback);
 
@@ -40,14 +40,14 @@ public:
     GetABICreateCallbackAtIndex (uint32_t idx);
 
     static ABICreateInstance
-    GetABICreateCallbackForPluginName (const char *name);
+    GetABICreateCallbackForPluginName (const ConstString &name);
 
 
     //------------------------------------------------------------------
     // Disassembler
     //------------------------------------------------------------------
     static bool
-    RegisterPlugin (const char *name,
+    RegisterPlugin (const ConstString &name,
                     const char *description,
                     DisassemblerCreateInstance create_callback);
 
@@ -58,16 +58,17 @@ public:
     GetDisassemblerCreateCallbackAtIndex (uint32_t idx);
 
     static DisassemblerCreateInstance
-    GetDisassemblerCreateCallbackForPluginName (const char *name);
+    GetDisassemblerCreateCallbackForPluginName (const ConstString &name);
 
 
     //------------------------------------------------------------------
     // DynamicLoader
     //------------------------------------------------------------------
     static bool
-    RegisterPlugin (const char *name,
+    RegisterPlugin (const ConstString &name,
                     const char *description,
-                    DynamicLoaderCreateInstance create_callback);
+                    DynamicLoaderCreateInstance create_callback,
+                    DebuggerInitializeCallback debugger_init_callback = NULL);
 
     static bool
     UnregisterPlugin (DynamicLoaderCreateInstance create_callback);
@@ -76,14 +77,13 @@ public:
     GetDynamicLoaderCreateCallbackAtIndex (uint32_t idx);
 
     static DynamicLoaderCreateInstance
-    GetDynamicLoaderCreateCallbackForPluginName (const char *name);
-
+    GetDynamicLoaderCreateCallbackForPluginName (const ConstString &name);
 
     //------------------------------------------------------------------
     // EmulateInstruction
     //------------------------------------------------------------------
     static bool
-    RegisterPlugin (const char *name,
+    RegisterPlugin (const ConstString &name,
                     const char *description,
                     EmulateInstructionCreateInstance create_callback);
     
@@ -94,13 +94,13 @@ public:
     GetEmulateInstructionCreateCallbackAtIndex (uint32_t idx);
     
     static EmulateInstructionCreateInstance
-    GetEmulateInstructionCreateCallbackForPluginName (const char *name);
+    GetEmulateInstructionCreateCallbackForPluginName (const ConstString &name);
 
     //------------------------------------------------------------------
     // OperatingSystem
     //------------------------------------------------------------------
     static bool
-    RegisterPlugin (const char *name,
+    RegisterPlugin (const ConstString &name,
                     const char *description,
                     OperatingSystemCreateInstance create_callback);
     
@@ -111,13 +111,13 @@ public:
     GetOperatingSystemCreateCallbackAtIndex (uint32_t idx);
     
     static OperatingSystemCreateInstance
-    GetOperatingSystemCreateCallbackForPluginName (const char *name);
+    GetOperatingSystemCreateCallbackForPluginName (const ConstString &name);
 
     //------------------------------------------------------------------
     // LanguageRuntime
     //------------------------------------------------------------------
     static bool
-    RegisterPlugin (const char *name,
+    RegisterPlugin (const ConstString &name,
                     const char *description,
                     LanguageRuntimeCreateInstance create_callback);
 
@@ -128,17 +128,18 @@ public:
     GetLanguageRuntimeCreateCallbackAtIndex (uint32_t idx);
 
     static LanguageRuntimeCreateInstance
-    GetLanguageRuntimeCreateCallbackForPluginName (const char *name);
+    GetLanguageRuntimeCreateCallbackForPluginName (const ConstString &name);
 
 
     //------------------------------------------------------------------
     // ObjectFile
     //------------------------------------------------------------------
     static bool
-    RegisterPlugin (const char *name,
+    RegisterPlugin (const ConstString &name,
                     const char *description,
                     ObjectFileCreateInstance create_callback,
-                    ObjectFileCreateMemoryInstance create_memory_callback);
+                    ObjectFileCreateMemoryInstance create_memory_callback,
+                    ObjectFileGetModuleSpecifications get_module_specifications);
 
     static bool
     UnregisterPlugin (ObjectFileCreateInstance create_callback);
@@ -149,20 +150,24 @@ public:
     static ObjectFileCreateMemoryInstance
     GetObjectFileCreateMemoryCallbackAtIndex (uint32_t idx);
 
+    static ObjectFileGetModuleSpecifications
+    GetObjectFileGetModuleSpecificationsCallbackAtIndex (uint32_t idx);
+
     static ObjectFileCreateInstance
-    GetObjectFileCreateCallbackForPluginName (const char *name);
+    GetObjectFileCreateCallbackForPluginName (const ConstString &name);
 
     static ObjectFileCreateMemoryInstance
-    GetObjectFileCreateMemoryCallbackForPluginName (const char *name);
+    GetObjectFileCreateMemoryCallbackForPluginName (const ConstString &name);
 
 
     //------------------------------------------------------------------
     // ObjectContainer
     //------------------------------------------------------------------
     static bool
-    RegisterPlugin (const char *name,
+    RegisterPlugin (const ConstString &name,
                     const char *description,
-                    ObjectContainerCreateInstance create_callback);
+                    ObjectContainerCreateInstance create_callback,
+                    ObjectFileGetModuleSpecifications get_module_specifications);
 
     static bool
     UnregisterPlugin (ObjectContainerCreateInstance create_callback);
@@ -171,13 +176,16 @@ public:
     GetObjectContainerCreateCallbackAtIndex (uint32_t idx);
 
     static ObjectContainerCreateInstance
-    GetObjectContainerCreateCallbackForPluginName (const char *name);
+    GetObjectContainerCreateCallbackForPluginName (const ConstString &name);
+
+    static ObjectFileGetModuleSpecifications
+    GetObjectContainerGetModuleSpecificationsCallbackAtIndex (uint32_t idx);
 
     //------------------------------------------------------------------
     // LogChannel
     //------------------------------------------------------------------
     static bool
-    RegisterPlugin (const char *name,
+    RegisterPlugin (const ConstString &name,
                     const char *description,
                     LogChannelCreateInstance create_callback);
 
@@ -188,7 +196,7 @@ public:
     GetLogChannelCreateCallbackAtIndex (uint32_t idx);
 
     static LogChannelCreateInstance
-    GetLogChannelCreateCallbackForPluginName (const char *name);
+    GetLogChannelCreateCallbackForPluginName (const ConstString &name);
 
     static const char *
     GetLogChannelCreateNameAtIndex (uint32_t idx);
@@ -197,9 +205,10 @@ public:
     // Platform
     //------------------------------------------------------------------
     static bool
-    RegisterPlugin (const char *name,
+    RegisterPlugin (const ConstString &name,
                     const char *description,
-                    PlatformCreateInstance create_callback);
+                    PlatformCreateInstance create_callback,
+                    DebuggerInitializeCallback debugger_init_callback = NULL);
 
     static bool
     UnregisterPlugin (PlatformCreateInstance create_callback);
@@ -208,7 +217,7 @@ public:
     GetPlatformCreateCallbackAtIndex (uint32_t idx);
 
     static PlatformCreateInstance
-    GetPlatformCreateCallbackForPluginName (const char *name);
+    GetPlatformCreateCallbackForPluginName (const ConstString &name);
     
     static const char *
     GetPlatformPluginNameAtIndex (uint32_t idx);
@@ -216,14 +225,14 @@ public:
     static const char *
     GetPlatformPluginDescriptionAtIndex (uint32_t idx);
 
-    static uint32_t
+    static size_t
     AutoCompletePlatformName (const char *partial_name, 
                               StringList &matches);
     //------------------------------------------------------------------
     // Process
     //------------------------------------------------------------------
     static bool
-    RegisterPlugin (const char *name,
+    RegisterPlugin (const ConstString &name,
                     const char *description,
                     ProcessCreateInstance create_callback);
     
@@ -234,7 +243,7 @@ public:
     GetProcessCreateCallbackAtIndex (uint32_t idx);
     
     static ProcessCreateInstance
-    GetProcessCreateCallbackForPluginName (const char *name);
+    GetProcessCreateCallbackForPluginName (const ConstString &name);
     
     static const char *
     GetProcessPluginNameAtIndex (uint32_t idx);
@@ -246,7 +255,7 @@ public:
     // SymbolFile
     //------------------------------------------------------------------
     static bool
-    RegisterPlugin (const char *name,
+    RegisterPlugin (const ConstString &name,
                     const char *description,
                     SymbolFileCreateInstance create_callback);
 
@@ -257,14 +266,14 @@ public:
     GetSymbolFileCreateCallbackAtIndex (uint32_t idx);
 
     static SymbolFileCreateInstance
-    GetSymbolFileCreateCallbackForPluginName (const char *name);
+    GetSymbolFileCreateCallbackForPluginName (const ConstString &name);
 
 
     //------------------------------------------------------------------
     // SymbolVendor
     //------------------------------------------------------------------
     static bool
-    RegisterPlugin (const char *name,
+    RegisterPlugin (const ConstString &name,
                     const char *description,
                     SymbolVendorCreateInstance create_callback);
 
@@ -275,13 +284,13 @@ public:
     GetSymbolVendorCreateCallbackAtIndex (uint32_t idx);
 
     static SymbolVendorCreateInstance
-    GetSymbolVendorCreateCallbackForPluginName (const char *name);
+    GetSymbolVendorCreateCallbackForPluginName (const ConstString &name);
 
     //------------------------------------------------------------------
     // UnwindAssembly
     //------------------------------------------------------------------
     static bool
-    RegisterPlugin (const char *name,
+    RegisterPlugin (const ConstString &name,
                     const char *description,
                     UnwindAssemblyCreateInstance create_callback);
 
@@ -292,8 +301,37 @@ public:
     GetUnwindAssemblyCreateCallbackAtIndex (uint32_t idx);
 
     static UnwindAssemblyCreateInstance
-    GetUnwindAssemblyCreateCallbackForPluginName (const char *name);
+    GetUnwindAssemblyCreateCallbackForPluginName (const ConstString &name);
 
+    //------------------------------------------------------------------
+    // Some plug-ins might register a DebuggerInitializeCallback
+    // callback when registering the plug-in. After a new Debugger
+    // instance is created, this DebuggerInitialize function will get
+    // called. This allows plug-ins to install Properties and do any
+    // other initialization that requires a debugger instance.
+    //------------------------------------------------------------------
+    static void
+    DebuggerInitialize (Debugger &debugger);
+    
+    static lldb::OptionValuePropertiesSP
+    GetSettingForDynamicLoaderPlugin (Debugger &debugger,
+                                       const ConstString &setting_name);
+    
+    static bool
+    CreateSettingForDynamicLoaderPlugin (Debugger &debugger,
+                                         const lldb::OptionValuePropertiesSP &properties_sp,
+                                         const ConstString &description,
+                                         bool is_global_property);
+    
+    static lldb::OptionValuePropertiesSP
+    GetSettingForPlatformPlugin (Debugger &debugger,
+                                       const ConstString &setting_name);
+    
+    static bool
+    CreateSettingForPlatformPlugin (Debugger &debugger,
+                                         const lldb::OptionValuePropertiesSP &properties_sp,
+                                         const ConstString &description,
+                                         bool is_global_property);
 };
 
 

Modified: lldb/branches/lldb-platform-work/include/lldb/Core/RangeMap.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Core/RangeMap.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Core/RangeMap.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Core/RangeMap.h Thu Jun  6 19:06:43 2013
@@ -10,6 +10,8 @@
 #ifndef liblldb_RangeMap_h_
 #define liblldb_RangeMap_h_
 
+#include <vector>
+
 #include "lldb/lldb-private.h"
 #include "llvm/ADT/SmallVector.h"
 
@@ -171,7 +173,6 @@ namespace lldb_private {
         typedef B BaseType;
         typedef S SizeType;
         typedef Range<B,S> Entry;
-        //typedef std::vector<Entry> Collection;
         typedef llvm::SmallVector<Entry, N> Collection;
         
         RangeArray () :
@@ -445,90 +446,48 @@ namespace lldb_private {
         Collection m_entries;
     };
 
-    //----------------------------------------------------------------------
-    // A simple range  with data class where you get to define the type of
-    // the range base "B", the type used for the range byte size "S", and
-    // the type for the associated data "T".
-    //----------------------------------------------------------------------
-    template <typename B, typename S, typename T>
-    struct RangeData : public Range<B,S>
+    template <typename B, typename S>
+    class RangeVector
     {
-        typedef T DataType;
-        
-        DataType data;
-        
-        RangeData () :
-            Range<B,S> (),
-            data ()
-        {
-        }
+    public:
+        typedef B BaseType;
+        typedef S SizeType;
+        typedef Range<B,S> Entry;
+        typedef std::vector<Entry> Collection;
         
-        RangeData (B base, S size, DataType d) :
-            Range<B,S> (base, size),
-            data (d)
+        RangeVector () :
+            m_entries ()
         {
         }
         
-        bool
-        operator < (const RangeData &rhs) const
+        ~RangeVector()
         {
-            if (this->base == rhs.base)
-            {
-                if (this->size == rhs.size)
-                    return this->data < rhs.data;
-                else
-                    return this->size < rhs.size;
-            }
-            return this->base < rhs.base;
         }
         
-        bool
-        operator == (const RangeData &rhs) const
+        void
+        Append (const Entry &entry)
         {
-            return this->GetRangeBase() == rhs.GetRangeBase() &&
-                   this->GetByteSize() == rhs.GetByteSize() &&
-                   this->data      == rhs.data;
+            m_entries.push_back (entry);
         }
         
         bool
-        operator != (const RangeData &rhs) const
-        {
-            return this->GetRangeBase() != rhs.GetRangeBase() ||
-                   this->GetByteSize() != rhs.GetByteSize() ||
-                   this->data      != rhs.data;
-        }
-    };
-    
-    template <typename B, typename S, typename T, unsigned N>
-    class RangeDataArray
-    {
-    public:
-        typedef RangeData<B,S,T> Entry;
-        //typedef std::vector<Entry> Collection;
-        typedef llvm::SmallVector<Entry, N> Collection;
-
-
-        RangeDataArray ()
-        {
-        }
-        
-        ~RangeDataArray()
+        RemoveEntrtAtIndex (uint32_t idx)
         {
+            if (idx < m_entries.size())
+            {
+                m_entries.erase (m_entries.begin() + idx);
+                return true;
+            }
+            return false;
         }
         
         void
-        Append (const Entry &entry)
-        {
-            m_entries.push_back (entry);
-        }
-    
-        void
         Sort ()
         {
             if (m_entries.size() > 1)
                 std::stable_sort (m_entries.begin(), m_entries.end());
         }
-    
+        
 #ifdef ASSERT_RANGEMAP_ARE_SORTED
         bool
         IsSorted () const
@@ -544,53 +503,98 @@ namespace lldb_private {
             return true;
         }
 #endif
-
         void
-        CombineConsecutiveEntriesWithEqualData ()
+        CombineConsecutiveRanges ()
         {
 #ifdef ASSERT_RANGEMAP_ARE_SORTED
             assert (IsSorted());
 #endif
-            typename Collection::iterator pos;
-            typename Collection::iterator end;
-            typename Collection::iterator prev;
-            bool can_combine = false;
-            // First we determine if we can combine any of the Entry objects so we
-            // don't end up allocating and making a new collection for no reason
-            for (pos = m_entries.begin(), end = m_entries.end(), prev = end; pos != end; prev = pos++)
+            // Can't combine if ranges if we have zero or one range
+            if (m_entries.size() > 1)
             {
-                if (prev != end && prev->data == pos->data)
+                // The list should be sorted prior to calling this function
+                typename Collection::iterator pos;
+                typename Collection::iterator end;
+                typename Collection::iterator prev;
+                bool can_combine = false;
+                // First we determine if we can combine any of the Entry objects so we
+                // don't end up allocating and making a new collection for no reason
+                for (pos = m_entries.begin(), end = m_entries.end(), prev = end; pos != end; prev = pos++)
                 {
-                    can_combine = true;
-                    break;
+                    if (prev != end && prev->Overlap(*pos))
+                    {
+                        can_combine = true;
+                        break;
+                    }
                 }
-            }
-            
-            // We we can combine at least one entry, then we make a new collection
-            // and populate it accordingly, and then swap it into place. 
-            if (can_combine)
-            {
-                Collection minimal_ranges;
-                for (pos = m_entries.begin(), end = m_entries.end(), prev = end; pos != end; prev = pos++)
+                
+                // We we can combine at least one entry, then we make a new collection
+                // and populate it accordingly, and then swap it into place.
+                if (can_combine)
                 {
-                    if (prev != end && prev->data == pos->data)
-                        minimal_ranges.back().SetRangeEnd (pos->GetRangeEnd());
-                    else
-                        minimal_ranges.push_back (*pos);
+                    Collection minimal_ranges;
+                    for (pos = m_entries.begin(), end = m_entries.end(), prev = end; pos != end; prev = pos++)
+                    {
+                        if (prev != end && prev->Overlap(*pos))
+                            minimal_ranges.back().SetRangeEnd (std::max<BaseType>(prev->GetRangeEnd(), pos->GetRangeEnd()));
+                        else
+                            minimal_ranges.push_back (*pos);
+                    }
+                    // Use the swap technique in case our new vector is much smaller.
+                    // We must swap when using the STL because std::vector objects never
+                    // release or reduce the memory once it has been allocated/reserved.
+                    m_entries.swap (minimal_ranges);
                 }
-                // Use the swap technique in case our new vector is much smaller.
-                // We must swap when using the STL because std::vector objects never
-                // release or reduce the memory once it has been allocated/reserved.
-                m_entries.swap (minimal_ranges);
             }
         }
-    
+        
+        
+        BaseType
+        GetMinRangeBase (BaseType fail_value) const
+        {
+#ifdef ASSERT_RANGEMAP_ARE_SORTED
+            assert (IsSorted());
+#endif
+            if (m_entries.empty())
+                return fail_value;
+            // m_entries must be sorted, so if we aren't empty, we grab the
+            // first range's base
+            return m_entries.front().GetRangeBase();
+        }
+        
+        BaseType
+        GetMaxRangeEnd (BaseType fail_value) const
+        {
+#ifdef ASSERT_RANGEMAP_ARE_SORTED
+            assert (IsSorted());
+#endif
+            if (m_entries.empty())
+                return fail_value;
+            // m_entries must be sorted, so if we aren't empty, we grab the
+            // last range's end
+            return m_entries.back().GetRangeEnd();
+        }
+        
+        void
+        Slide (BaseType slide)
+        {
+            typename Collection::iterator pos, end;
+            for (pos = m_entries.begin(), end = m_entries.end(); pos != end; ++pos)
+                pos->Slide (slide);
+        }
+        
         void
         Clear ()
         {
             m_entries.clear();
         }
-        
+
+        void
+        Reserve (typename Collection::size_type size)
+        {
+            m_entries.resize (size);
+        }
+
         bool
         IsEmpty () const
         {
@@ -610,14 +614,30 @@ namespace lldb_private {
                 return &m_entries[i];
             return NULL;
         }
-
+        
         // Clients must ensure that "i" is a valid index prior to calling this function
         const Entry &
         GetEntryRef (size_t i) const
         {
             return m_entries[i];
         }
-
+        
+        Entry *
+        Back()
+        {
+            if (m_entries.empty())
+                return NULL;
+            return &m_entries.back();
+        }
+        
+        const Entry *
+        Back() const
+        {
+            if (m_entries.empty())
+                return NULL;
+            return &m_entries.back();
+        }
+        
         static bool
         BaseLessThan (const Entry& lhs, const Entry& rhs)
         {
@@ -630,7 +650,7 @@ namespace lldb_private {
 #ifdef ASSERT_RANGEMAP_ARE_SORTED
             assert (IsSorted());
 #endif
-            if ( !m_entries.empty() )
+            if (!m_entries.empty())
             {
                 Entry entry (addr, 1);
                 typename Collection::const_iterator begin = m_entries.begin();
@@ -650,62 +670,30 @@ namespace lldb_private {
             }
             return UINT32_MAX;
         }
-
-        Entry *
-        FindEntryThatContains (B addr)
-        {
-#ifdef ASSERT_RANGEMAP_ARE_SORTED
-            assert (IsSorted());
-#endif
-            if ( !m_entries.empty() )
-            {
-                Entry entry;
-                entry.SetRangeBase(addr);
-                entry.SetByteSize(1);
-                typename Collection::iterator begin = m_entries.begin();
-                typename Collection::iterator end = m_entries.end();
-                typename Collection::iterator pos = std::lower_bound (begin, end, entry, BaseLessThan);
-                
-                if (pos != end && pos->Contains(addr))
-                {
-                    return &(*pos); 
-                }
-                else if (pos != begin)
-                {
-                    --pos;
-                    if (pos->Contains(addr))
-                    {
-                        return &(*pos); 
-                    }
-                }
-            }
-            return NULL;
-        }
+        
         const Entry *
         FindEntryThatContains (B addr) const
         {
 #ifdef ASSERT_RANGEMAP_ARE_SORTED
             assert (IsSorted());
 #endif
-            if ( !m_entries.empty() )
+            if (!m_entries.empty())
             {
-                Entry entry;
-                entry.SetRangeBase(addr);
-                entry.SetByteSize(1);
+                Entry entry (addr, 1);
                 typename Collection::const_iterator begin = m_entries.begin();
                 typename Collection::const_iterator end = m_entries.end();
                 typename Collection::const_iterator pos = std::lower_bound (begin, end, entry, BaseLessThan);
                 
                 if (pos != end && pos->Contains(addr))
                 {
-                    return &(*pos); 
+                    return &(*pos);
                 }
                 else if (pos != begin)
                 {
                     --pos;
                     if (pos->Contains(addr))
                     {
-                        return &(*pos); 
+                        return &(*pos);
                     }
                 }
             }
@@ -718,7 +706,7 @@ namespace lldb_private {
 #ifdef ASSERT_RANGEMAP_ARE_SORTED
             assert (IsSorted());
 #endif
-            if ( !m_entries.empty() )
+            if (!m_entries.empty())
             {
                 typename Collection::const_iterator begin = m_entries.begin();
                 typename Collection::const_iterator end = m_entries.end();
@@ -726,28 +714,332 @@ namespace lldb_private {
                 
                 if (pos != end && pos->Contains(range))
                 {
-                    return &(*pos); 
+                    return &(*pos);
                 }
                 else if (pos != begin)
                 {
                     --pos;
                     if (pos->Contains(range))
                     {
-                        return &(*pos); 
+                        return &(*pos);
                     }
                 }
             }
             return NULL;
         }
         
-        Entry *
-        Back()
-        {
-            if (!m_entries.empty())
-                return &m_entries.back();
-            return NULL;
-        }
-
+    protected:
+        Collection m_entries;
+    };
+
+    //----------------------------------------------------------------------
+    // A simple range  with data class where you get to define the type of
+    // the range base "B", the type used for the range byte size "S", and
+    // the type for the associated data "T".
+    //----------------------------------------------------------------------
+    template <typename B, typename S, typename T>
+    struct RangeData : public Range<B,S>
+    {
+        typedef T DataType;
+        
+        DataType data;
+        
+        RangeData () :
+            Range<B,S> (),
+            data ()
+        {
+        }
+        
+        RangeData (B base, S size) :
+            Range<B,S> (base, size),
+            data ()
+        {
+        }
+        
+        RangeData (B base, S size, DataType d) :
+            Range<B,S> (base, size),
+            data (d)
+        {
+        }
+        
+        bool
+        operator < (const RangeData &rhs) const
+        {
+            if (this->base == rhs.base)
+            {
+                if (this->size == rhs.size)
+                    return this->data < rhs.data;
+                else
+                    return this->size < rhs.size;
+            }
+            return this->base < rhs.base;
+        }
+        
+        bool
+        operator == (const RangeData &rhs) const
+        {
+            return this->GetRangeBase() == rhs.GetRangeBase() &&
+                   this->GetByteSize() == rhs.GetByteSize() &&
+                   this->data      == rhs.data;
+        }
+        
+        bool
+        operator != (const RangeData &rhs) const
+        {
+            return this->GetRangeBase() != rhs.GetRangeBase() ||
+                   this->GetByteSize() != rhs.GetByteSize() ||
+                   this->data      != rhs.data;
+        }
+    };
+    
+    template <typename B, typename S, typename T, unsigned N>
+    class RangeDataArray
+    {
+    public:
+        typedef RangeData<B,S,T> Entry;
+        typedef llvm::SmallVector<Entry, N> Collection;
+
+
+        RangeDataArray ()
+        {
+        }
+        
+        ~RangeDataArray()
+        {
+        }
+        
+        void
+        Append (const Entry &entry)
+        {
+            m_entries.push_back (entry);
+        }
+    
+        void
+        Sort ()
+        {
+            if (m_entries.size() > 1)
+                std::stable_sort (m_entries.begin(), m_entries.end());
+        }
+    
+#ifdef ASSERT_RANGEMAP_ARE_SORTED
+        bool
+        IsSorted () const
+        {
+            typename Collection::const_iterator pos, end, prev;
+            // First we determine if we can combine any of the Entry objects so we
+            // don't end up allocating and making a new collection for no reason
+            for (pos = m_entries.begin(), end = m_entries.end(), prev = end; pos != end; prev = pos++)
+            {
+                if (prev != end && *pos < *prev)
+                    return false;
+            }
+            return true;
+        }
+#endif
+
+        void
+        CombineConsecutiveEntriesWithEqualData ()
+        {
+#ifdef ASSERT_RANGEMAP_ARE_SORTED
+            assert (IsSorted());
+#endif
+            typename Collection::iterator pos;
+            typename Collection::iterator end;
+            typename Collection::iterator prev;
+            bool can_combine = false;
+            // First we determine if we can combine any of the Entry objects so we
+            // don't end up allocating and making a new collection for no reason
+            for (pos = m_entries.begin(), end = m_entries.end(), prev = end; pos != end; prev = pos++)
+            {
+                if (prev != end && prev->data == pos->data)
+                {
+                    can_combine = true;
+                    break;
+                }
+            }
+            
+            // We we can combine at least one entry, then we make a new collection
+            // and populate it accordingly, and then swap it into place. 
+            if (can_combine)
+            {
+                Collection minimal_ranges;
+                for (pos = m_entries.begin(), end = m_entries.end(), prev = end; pos != end; prev = pos++)
+                {
+                    if (prev != end && prev->data == pos->data)
+                        minimal_ranges.back().SetRangeEnd (pos->GetRangeEnd());
+                    else
+                        minimal_ranges.push_back (*pos);
+                }
+                // Use the swap technique in case our new vector is much smaller.
+                // We must swap when using the STL because std::vector objects never
+                // release or reduce the memory once it has been allocated/reserved.
+                m_entries.swap (minimal_ranges);
+            }
+        }
+    
+        void
+        Clear ()
+        {
+            m_entries.clear();
+        }
+        
+        bool
+        IsEmpty () const
+        {
+            return m_entries.empty();
+        }
+        
+        size_t
+        GetSize () const
+        {
+            return m_entries.size();
+        }
+        
+        const Entry *
+        GetEntryAtIndex (size_t i) const
+        {
+            if (i<m_entries.size())
+                return &m_entries[i];
+            return NULL;
+        }
+
+        // Clients must ensure that "i" is a valid index prior to calling this function
+        const Entry &
+        GetEntryRef (size_t i) const
+        {
+            return m_entries[i];
+        }
+
+        static bool
+        BaseLessThan (const Entry& lhs, const Entry& rhs)
+        {
+            return lhs.GetRangeBase() < rhs.GetRangeBase();
+        }
+        
+        uint32_t
+        FindEntryIndexThatContains (B addr) const
+        {
+#ifdef ASSERT_RANGEMAP_ARE_SORTED
+            assert (IsSorted());
+#endif
+            if ( !m_entries.empty() )
+            {
+                Entry entry (addr, 1);
+                typename Collection::const_iterator begin = m_entries.begin();
+                typename Collection::const_iterator end = m_entries.end();
+                typename Collection::const_iterator pos = std::lower_bound (begin, end, entry, BaseLessThan);
+                
+                if (pos != end && pos->Contains(addr))
+                {
+                    return std::distance (begin, pos);
+                }
+                else if (pos != begin)
+                {
+                    --pos;
+                    if (pos->Contains(addr))
+                        return std::distance (begin, pos);
+                }
+            }
+            return UINT32_MAX;
+        }
+
+        Entry *
+        FindEntryThatContains (B addr)
+        {
+#ifdef ASSERT_RANGEMAP_ARE_SORTED
+            assert (IsSorted());
+#endif
+            if ( !m_entries.empty() )
+            {
+                Entry entry;
+                entry.SetRangeBase(addr);
+                entry.SetByteSize(1);
+                typename Collection::iterator begin = m_entries.begin();
+                typename Collection::iterator end = m_entries.end();
+                typename Collection::iterator pos = std::lower_bound (begin, end, entry, BaseLessThan);
+                
+                if (pos != end && pos->Contains(addr))
+                {
+                    return &(*pos); 
+                }
+                else if (pos != begin)
+                {
+                    --pos;
+                    if (pos->Contains(addr))
+                    {
+                        return &(*pos); 
+                    }
+                }
+            }
+            return NULL;
+        }
+        const Entry *
+        FindEntryThatContains (B addr) const
+        {
+#ifdef ASSERT_RANGEMAP_ARE_SORTED
+            assert (IsSorted());
+#endif
+            if ( !m_entries.empty() )
+            {
+                Entry entry;
+                entry.SetRangeBase(addr);
+                entry.SetByteSize(1);
+                typename Collection::const_iterator begin = m_entries.begin();
+                typename Collection::const_iterator end = m_entries.end();
+                typename Collection::const_iterator pos = std::lower_bound (begin, end, entry, BaseLessThan);
+                
+                if (pos != end && pos->Contains(addr))
+                {
+                    return &(*pos); 
+                }
+                else if (pos != begin)
+                {
+                    --pos;
+                    if (pos->Contains(addr))
+                    {
+                        return &(*pos); 
+                    }
+                }
+            }
+            return NULL;
+        }
+        
+        const Entry *
+        FindEntryThatContains (const Entry &range) const
+        {
+#ifdef ASSERT_RANGEMAP_ARE_SORTED
+            assert (IsSorted());
+#endif
+            if ( !m_entries.empty() )
+            {
+                typename Collection::const_iterator begin = m_entries.begin();
+                typename Collection::const_iterator end = m_entries.end();
+                typename Collection::const_iterator pos = std::lower_bound (begin, end, range, BaseLessThan);
+                
+                if (pos != end && pos->Contains(range))
+                {
+                    return &(*pos); 
+                }
+                else if (pos != begin)
+                {
+                    --pos;
+                    if (pos->Contains(range))
+                    {
+                        return &(*pos); 
+                    }
+                }
+            }
+            return NULL;
+        }
+        
+        Entry *
+        Back()
+        {
+            if (!m_entries.empty())
+                return &m_entries.back();
+            return NULL;
+        }
+
         const Entry *
         Back() const
         {
@@ -759,7 +1051,274 @@ namespace lldb_private {
     protected:
         Collection m_entries;
     };
+
+    // Same as RangeDataArray, but uses std::vector as to not
+    // require static storage of N items in the class itself
+    template <typename B, typename S, typename T>
+    class RangeDataVector
+    {
+    public:
+        typedef RangeData<B,S,T> Entry;
+        typedef std::vector<Entry> Collection;
+        
+        RangeDataVector ()
+        {
+        }
+        
+        ~RangeDataVector()
+        {
+        }
+        
+        void
+        Append (const Entry &entry)
+        {
+            m_entries.push_back (entry);
+        }
+        
+        void
+        Sort ()
+        {
+            if (m_entries.size() > 1)
+                std::stable_sort (m_entries.begin(), m_entries.end());
+        }
+        
+#ifdef ASSERT_RANGEMAP_ARE_SORTED
+        bool
+        IsSorted () const
+        {
+            typename Collection::const_iterator pos, end, prev;
+            // First we determine if we can combine any of the Entry objects so we
+            // don't end up allocating and making a new collection for no reason
+            for (pos = m_entries.begin(), end = m_entries.end(), prev = end; pos != end; prev = pos++)
+            {
+                if (prev != end && *pos < *prev)
+                    return false;
+            }
+            return true;
+        }
+#endif
+        
+        void
+        CombineConsecutiveEntriesWithEqualData ()
+        {
+#ifdef ASSERT_RANGEMAP_ARE_SORTED
+            assert (IsSorted());
+#endif
+            typename Collection::iterator pos;
+            typename Collection::iterator end;
+            typename Collection::iterator prev;
+            bool can_combine = false;
+            // First we determine if we can combine any of the Entry objects so we
+            // don't end up allocating and making a new collection for no reason
+            for (pos = m_entries.begin(), end = m_entries.end(), prev = end; pos != end; prev = pos++)
+            {
+                if (prev != end && prev->data == pos->data)
+                {
+                    can_combine = true;
+                    break;
+                }
+            }
+            
+            // We we can combine at least one entry, then we make a new collection
+            // and populate it accordingly, and then swap it into place.
+            if (can_combine)
+            {
+                Collection minimal_ranges;
+                for (pos = m_entries.begin(), end = m_entries.end(), prev = end; pos != end; prev = pos++)
+                {
+                    if (prev != end && prev->data == pos->data)
+                        minimal_ranges.back().SetRangeEnd (pos->GetRangeEnd());
+                    else
+                        minimal_ranges.push_back (*pos);
+                }
+                // Use the swap technique in case our new vector is much smaller.
+                // We must swap when using the STL because std::vector objects never
+                // release or reduce the memory once it has been allocated/reserved.
+                m_entries.swap (minimal_ranges);
+            }
+        }
+        
+        void
+        Clear ()
+        {
+            m_entries.clear();
+        }
+
+        void
+        Reserve (typename Collection::size_type size)
+        {
+            m_entries.resize (size);
+        }
+
+        bool
+        IsEmpty () const
+        {
+            return m_entries.empty();
+        }
+        
+        size_t
+        GetSize () const
+        {
+            return m_entries.size();
+        }
+        
+        const Entry *
+        GetEntryAtIndex (size_t i) const
+        {
+            if (i<m_entries.size())
+                return &m_entries[i];
+            return NULL;
+        }
+        
+        // Clients must ensure that "i" is a valid index prior to calling this function
+        const Entry &
+        GetEntryRef (size_t i) const
+        {
+            return m_entries[i];
+        }
+        
+        static bool
+        BaseLessThan (const Entry& lhs, const Entry& rhs)
+        {
+            return lhs.GetRangeBase() < rhs.GetRangeBase();
+        }
+        
+        uint32_t
+        FindEntryIndexThatContains (B addr) const
+        {
+#ifdef ASSERT_RANGEMAP_ARE_SORTED
+            assert (IsSorted());
+#endif
+            if ( !m_entries.empty() )
+            {
+                Entry entry (addr, 1);
+                typename Collection::const_iterator begin = m_entries.begin();
+                typename Collection::const_iterator end = m_entries.end();
+                typename Collection::const_iterator pos = std::lower_bound (begin, end, entry, BaseLessThan);
+                
+                if (pos != end && pos->Contains(addr))
+                {
+                    return std::distance (begin, pos);
+                }
+                else if (pos != begin)
+                {
+                    --pos;
+                    if (pos->Contains(addr))
+                        return std::distance (begin, pos);
+                }
+            }
+            return UINT32_MAX;
+        }
+        
+        Entry *
+        FindEntryThatContains (B addr)
+        {
+#ifdef ASSERT_RANGEMAP_ARE_SORTED
+            assert (IsSorted());
+#endif
+            if ( !m_entries.empty() )
+            {
+                Entry entry;
+                entry.SetRangeBase(addr);
+                entry.SetByteSize(1);
+                typename Collection::iterator begin = m_entries.begin();
+                typename Collection::iterator end = m_entries.end();
+                typename Collection::iterator pos = std::lower_bound (begin, end, entry, BaseLessThan);
+                
+                if (pos != end && pos->Contains(addr))
+                {
+                    return &(*pos);
+                }
+                else if (pos != begin)
+                {
+                    --pos;
+                    if (pos->Contains(addr))
+                    {
+                        return &(*pos);
+                    }
+                }
+            }
+            return NULL;
+        }
+        const Entry *
+        FindEntryThatContains (B addr) const
+        {
+#ifdef ASSERT_RANGEMAP_ARE_SORTED
+            assert (IsSorted());
+#endif
+            if ( !m_entries.empty() )
+            {
+                Entry entry;
+                entry.SetRangeBase(addr);
+                entry.SetByteSize(1);
+                typename Collection::const_iterator begin = m_entries.begin();
+                typename Collection::const_iterator end = m_entries.end();
+                typename Collection::const_iterator pos = std::lower_bound (begin, end, entry, BaseLessThan);
+                
+                if (pos != end && pos->Contains(addr))
+                {
+                    return &(*pos); 
+                }
+                else if (pos != begin)
+                {
+                    --pos;
+                    if (pos->Contains(addr))
+                    {
+                        return &(*pos); 
+                    }
+                }
+            }
+            return NULL;
+        }
+        
+        const Entry *
+        FindEntryThatContains (const Entry &range) const
+        {
+#ifdef ASSERT_RANGEMAP_ARE_SORTED
+            assert (IsSorted());
+#endif
+            if ( !m_entries.empty() )
+            {
+                typename Collection::const_iterator begin = m_entries.begin();
+                typename Collection::const_iterator end = m_entries.end();
+                typename Collection::const_iterator pos = std::lower_bound (begin, end, range, BaseLessThan);
                 
+                if (pos != end && pos->Contains(range))
+                {
+                    return &(*pos); 
+                }
+                else if (pos != begin)
+                {
+                    --pos;
+                    if (pos->Contains(range))
+                    {
+                        return &(*pos); 
+                    }
+                }
+            }
+            return NULL;
+        }
+        
+        Entry *
+        Back()
+        {
+            if (!m_entries.empty())
+                return &m_entries.back();
+            return NULL;
+        }
+        
+        const Entry *
+        Back() const
+        {
+            if (!m_entries.empty())
+                return &m_entries.back();
+            return NULL;
+        }
+        
+    protected:
+        Collection m_entries;
+    };
+                    
                 
     //----------------------------------------------------------------------
     // A simple range  with data class where you get to define the type of
@@ -816,7 +1375,6 @@ namespace lldb_private {
     {
     public:
         typedef AddressData<B,T> Entry;
-        //typedef std::vector<Entry> Collection;
         typedef llvm::SmallVector<Entry, N> Collection;
 
 

Modified: lldb/branches/lldb-platform-work/include/lldb/Core/RegisterValue.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Core/RegisterValue.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Core/RegisterValue.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Core/RegisterValue.h Thu Jun  6 19:06:43 2013
@@ -345,7 +345,7 @@ namespace lldb_private {
         Error
         SetValueFromData (const RegisterInfo *reg_info, 
                           DataExtractor &data, 
-                          uint32_t offset,
+                          lldb::offset_t offset,
                           bool partial_data_ok);
 
         // The default value of 0 for reg_name_right_align_at means no alignment at all.
@@ -382,7 +382,7 @@ namespace lldb_private {
         RegisterValue::Type m_type;
         union
         {
-             uint8_t uint8;
+            uint8_t  uint8;
             uint16_t uint16;
             uint32_t uint32;
             uint64_t uint64;

Modified: lldb/branches/lldb-platform-work/include/lldb/Core/RegularExpression.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Core/RegularExpression.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Core/RegularExpression.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Core/RegularExpression.h Thu Jun  6 19:06:43 2013
@@ -17,6 +17,11 @@
 #include <string>
 #include <vector>
 
+namespace llvm
+{
+    class StringRef;
+}
+
 namespace lldb_private {
 
 //----------------------------------------------------------------------
@@ -30,6 +35,52 @@ namespace lldb_private {
 class RegularExpression
 {
 public:
+    class Match
+    {
+    public:
+        Match (uint32_t max_matches) :
+            m_matches ()
+        {
+            if (max_matches > 0)
+                m_matches.resize(max_matches + 1);
+        }
+
+        void
+        Clear()
+        {
+            const size_t num_matches = m_matches.size();
+            regmatch_t invalid_match = { -1, -1 };
+            for (size_t i=0; i<num_matches; ++i)
+                m_matches[i] = invalid_match;
+        }
+
+        size_t
+        GetSize () const
+        {
+            return m_matches.size();
+        }
+        
+        regmatch_t *
+        GetData ()
+        {
+            if (m_matches.empty())
+                return NULL;
+            return m_matches.data();
+        }
+        
+        bool
+        GetMatchAtIndex (const char* s, uint32_t idx, std::string& match_str) const;
+        
+        bool
+        GetMatchAtIndex (const char* s, uint32_t idx, llvm::StringRef& match_str) const;
+        
+        bool
+        GetMatchSpanningIndices (const char* s, uint32_t idx1, uint32_t idx2, llvm::StringRef& match_str) const;
+
+    protected:
+        
+        std::vector<regmatch_t> m_matches; ///< Where parenthesized subexpressions results are stored
+    };
     //------------------------------------------------------------------
     /// Default constructor.
     ///
@@ -110,8 +161,10 @@ public:
     /// @param[in] string
     ///     The string to match against the compile regular expression.
     ///
-    /// @param[in] match_count
-    ///     The number of regmatch_t objects in \a match_ptr
+    /// @param[in] match
+    ///     A pointer to a RegularExpression::Match structure that was
+    ///     properly initialized with the desired number of maximum
+    ///     matches, or NULL if no parenthesized matching is needed.
     ///
     /// @param[in] execute_flags
     ///     Flags to pass to the \c regexec() function.
@@ -121,13 +174,11 @@ public:
     ///     expression, \b false otherwise.
     //------------------------------------------------------------------
     bool
-    Execute (const char* string, size_t match_count = 0, int execute_flags = 0) const;
+    Execute (const char* string, Match *match = NULL, int execute_flags = 0) const;
 
     size_t
     GetErrorAsCString (char *err_str, size_t err_str_max_len) const;
 
-    bool
-    GetMatchAtIndex (const char* s, uint32_t idx, std::string& match_str) const;
     //------------------------------------------------------------------
     /// Free the compiled regular expression.
     ///
@@ -168,6 +219,21 @@ public:
     bool
     IsValid () const;
     
+    void
+    Clear ()
+    {
+        Free();
+        m_re.clear();
+        m_compile_flags = 0;
+        m_comp_err = 1;
+    }
+    
+    int
+    GetErrorCode() const
+    {
+        return m_comp_err;
+    }
+
     bool
     operator < (const RegularExpression& rhs) const;
 
@@ -179,8 +245,6 @@ private:
     int m_comp_err;     ///< Error code for the regular expression compilation
     regex_t m_preg;     ///< The compiled regular expression
     int     m_compile_flags; ///< Stores the flags from the last compile.
-    mutable std::vector<regmatch_t> m_matches; ///< Where parenthesized subexpressions results are stored
-    
 };
 
 } // namespace lldb_private

Modified: lldb/branches/lldb-platform-work/include/lldb/Core/Scalar.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Core/Scalar.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Core/Scalar.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Core/Scalar.h Thu Jun  6 19:06:43 2013
@@ -73,9 +73,9 @@ public:
     bool
     GetData (DataExtractor &data, size_t limit_byte_size = UINT32_MAX) const;
 
-    uint32_t 
+    size_t
     GetAsMemoryData (void *dst,
-                     uint32_t dst_len, 
+                     size_t dst_len, 
                      lldb::ByteOrder dst_byte_order,
                      Error &error) const;
 
@@ -102,6 +102,9 @@ public:
 
     bool
     Cast (Scalar::Type type);
+    
+    bool
+    MakeSigned ();
 
     static const char *
     GetValueTypeAsCString (Scalar::Type value_type);
@@ -219,7 +222,10 @@ public:
     GetRawBits64 (uint64_t fail_value) const;
 
     Error
-    SetValueFromCString (const char *s, lldb::Encoding encoding, uint32_t byte_size);
+    SetValueFromCString (const char *s, lldb::Encoding encoding, size_t byte_size);
+    
+    Error
+    SetValueFromData (DataExtractor &data, lldb::Encoding encoding, size_t byte_size);
 
     static bool
     UIntValueIsValidForSize (uint64_t uval64, size_t total_byte_size)
@@ -249,6 +255,16 @@ public:
     }
 
 protected:
+    typedef int                 sint_t;
+    typedef unsigned int        uint_t;
+    typedef long                slong_t;
+    typedef unsigned long       ulong_t;
+    typedef long long           slonglong_t;
+    typedef unsigned long long  ulonglong_t;
+    typedef float               float_t;
+    typedef double              double_t;
+    typedef long double         long_double_t;
+    
     union ValueData
     {
         int                 sint;
@@ -277,6 +293,8 @@ private:
     friend const Scalar operator|   (const Scalar& lhs, const Scalar& rhs);
     friend const Scalar operator%   (const Scalar& lhs, const Scalar& rhs);
     friend const Scalar operator^   (const Scalar& lhs, const Scalar& rhs);
+    friend const Scalar operator<<  (const Scalar& lhs, const Scalar& rhs);
+    friend const Scalar operator>>  (const Scalar& lhs, const Scalar& rhs);
     friend          bool operator== (const Scalar& lhs, const Scalar& rhs);
     friend          bool operator!= (const Scalar& lhs, const Scalar& rhs);
     friend          bool operator<  (const Scalar& lhs, const Scalar& rhs);
@@ -309,6 +327,8 @@ const Scalar operator& (const Scalar& lh
 const Scalar operator| (const Scalar& lhs, const Scalar& rhs);
 const Scalar operator% (const Scalar& lhs, const Scalar& rhs);
 const Scalar operator^ (const Scalar& lhs, const Scalar& rhs);
+const Scalar operator<< (const Scalar& lhs, const Scalar& rhs);
+const Scalar operator>> (const Scalar& lhs, const Scalar& rhs);
 bool operator== (const Scalar& lhs, const Scalar& rhs);
 bool operator!= (const Scalar& lhs, const Scalar& rhs);
 bool operator<  (const Scalar& lhs, const Scalar& rhs);

Modified: lldb/branches/lldb-platform-work/include/lldb/Core/SearchFilter.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Core/SearchFilter.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Core/SearchFilter.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Core/SearchFilter.h Thu Jun  6 19:06:43 2013
@@ -15,11 +15,7 @@
 // Other libraries and framework includes
 // Project includes
 #include "lldb/lldb-private.h"
-#include "lldb/Core/Stream.h"
-#include "lldb/Host/FileSpec.h"
-#include "lldb/Core/Address.h"
-#include "lldb/Symbol/SymbolContext.h"
-#include "lldb/Core/Module.h"
+#include "lldb/Core/FileSpecList.h"
 
 namespace lldb_private {
 
@@ -139,23 +135,6 @@ public:
     ModulePasses (const lldb::ModuleSP &module_sp);
 
     //------------------------------------------------------------------
-    /// Call this method with a SymbolContext and a SymbolContextScope to see if
-    /// that SymbolContext passes the filter up to the level in \a scope.
-    ///
-    /// @param[in] context
-    ///    The SymbolContext to check against the filter.
-    ///
-    /// @param[in] scope
-    ///    The SymbolContextItem indicating what bits of the SymbolContextScope
-    ///    to check against the filter.
-    ///
-    ///  @return
-    ///    \b true if \a SymbolContext passes, and \b false otherwise.
-    //------------------------------------------------------------------
-    virtual bool
-    SymbolContextPasses (const SymbolContext &context,
-                         lldb::SymbolContextItem scope);
-    //------------------------------------------------------------------
     /// Call this method with a Address to see if \a address passes the filter.
     ///
     /// @param[in] addr
@@ -329,10 +308,6 @@ public:
     ModulePasses (const FileSpec &spec);
 
     virtual bool
-    SymbolContextPasses (const SymbolContext &context,
-                         lldb::SymbolContextItem scope);
-
-    virtual bool
     AddressPasses (Address &address);
 
     virtual bool
@@ -390,10 +365,6 @@ public:
     ModulePasses (const FileSpec &spec);
 
     virtual bool
-    SymbolContextPasses (const SymbolContext &context,
-                         lldb::SymbolContextItem scope);
-
-    virtual bool
     AddressPasses (Address &address);
 
     virtual bool
@@ -446,10 +417,6 @@ public:
     operator=(const SearchFilterByModuleListAndCU& rhs);
 
     virtual bool
-    SymbolContextPasses (const SymbolContext &context,
-                         lldb::SymbolContextItem scope);
-
-    virtual bool
     AddressPasses (Address &address);
 
     virtual bool

Modified: lldb/branches/lldb-platform-work/include/lldb/Core/Section.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Core/Section.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Core/Section.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Core/Section.h Thu Jun  6 19:06:43 2013
@@ -34,13 +34,13 @@ public:
     virtual
     ~SectionList();
 
-    uint32_t
+    size_t
     AddSection (const lldb::SectionSP& section_sp);
 
-    uint32_t
+    size_t
     AddUniqueSection (const lldb::SectionSP& section_sp);
 
-    uint32_t
+    size_t
     FindSectionIndex (const Section* sect);
 
     bool
@@ -56,14 +56,11 @@ public:
     FindSectionByID (lldb::user_id_t sect_id) const;
 
     lldb::SectionSP
-    FindSectionByType (lldb::SectionType sect_type, bool check_children, uint32_t start_idx = 0) const;
+    FindSectionByType (lldb::SectionType sect_type, bool check_children, size_t start_idx = 0) const;
 
     lldb::SectionSP
     FindSectionContainingFileAddress (lldb::addr_t addr, uint32_t depth = UINT32_MAX) const;
 
-    lldb::SectionSP
-    FindSectionContainingLinkedFileAddress (lldb::addr_t vm_addr, uint32_t depth) const;
-
     bool
     GetSectionData (const DataExtractor& module_data, DataExtractor& section_data) const;
 
@@ -82,7 +79,7 @@ public:
     ReplaceSection (lldb::user_id_t sect_id, const lldb::SectionSP& section_sp, uint32_t depth = UINT32_MAX);
 
     lldb::SectionSP
-    GetSectionAtIndex (uint32_t idx) const;
+    GetSectionAtIndex (size_t idx) const;
 
     size_t
     Slide (lldb::addr_t slide_amount, bool slide_children);
@@ -91,23 +88,19 @@ public:
     void
     Finalize ();
 
+    void
+    Clear ()
+    {
+        m_sections.clear();
+    }
+
 protected:
     collection  m_sections;
-
-    typedef RangeDataArray<uint64_t, uint64_t, collection::size_type, 1> SectionRangeCache;
-    mutable SectionRangeCache   m_range_cache;
-#ifdef LLDB_CONFIGURATION_DEBUG
-    mutable bool                m_finalized;
-#endif
-    
-    void BuildRangeCache() const;
-    
-    void InvalidateRangeCache() const;
 };
 
 
 class Section :
-    public STD_ENABLE_SHARED_FROM_THIS(Section),
+    public std::enable_shared_from_this<Section>,
     public ModuleChild,
     public UserID,
     public Flags
@@ -120,8 +113,8 @@ public:
              lldb::SectionType sect_type,
              lldb::addr_t file_vm_addr,
              lldb::addr_t vm_size,
-             uint64_t file_offset,
-             uint64_t file_size,
+             lldb::offset_t file_offset,
+             lldb::offset_t file_size,
              uint32_t flags);
 
     // Create a section that is a child of parent_section_sp
@@ -132,8 +125,8 @@ public:
              lldb::SectionType sect_type,
              lldb::addr_t file_vm_addr,
              lldb::addr_t vm_size,
-             uint64_t file_offset,
-             uint64_t file_size,
+             lldb::offset_t file_offset,
+             lldb::offset_t file_size,
              uint32_t flags);
 
     ~Section ();
@@ -168,26 +161,26 @@ public:
     bool
     ResolveContainedAddress (lldb::addr_t offset, Address &so_addr) const;
 
-    uint64_t
+    lldb::offset_t
     GetFileOffset () const
     {
         return m_file_offset;
     }
 
     void
-    SetFileOffset (uint64_t file_offset) 
+    SetFileOffset (lldb::offset_t file_offset) 
     {
         m_file_offset = file_offset;
     }
 
-    uint64_t
+    lldb::offset_t
     GetFileSize () const
     {
         return m_file_size;
     }
 
     void
-    SetFileSize (uint64_t file_size)
+    SetFileSize (lldb::offset_t file_size)
     {
         m_file_size = file_size;
     }
@@ -239,31 +232,14 @@ public:
     IsDescendant (const Section *section);
 
     const ConstString&
-    GetName () const;
-
-    bool
-    Slide (lldb::addr_t slide_amount, bool slide_children);
-
-    void
-    SetLinkedLocation (const lldb::SectionSP &linked_section_sp, uint64_t linked_offset);
-
-    bool
-    ContainsLinkedFileAddress (lldb::addr_t vm_addr) const;
-
-    lldb::SectionSP
-    GetLinkedSection () const
+    GetName () const
     {
-        return m_linked_section_wp.lock();
+        return m_name;
     }
 
-    uint64_t
-    GetLinkedOffset () const
-    {
-        return m_linked_offset;
-    }
+    bool
+    Slide (lldb::addr_t slide_amount, bool slide_children);
 
-    lldb::addr_t
-    GetLinkedFileAddress () const;
 
     lldb::SectionType
     GetType () const
@@ -304,8 +280,8 @@ protected:
     lldb::addr_t    m_file_addr;        // The absolute file virtual address range of this section if m_parent == NULL,
                                         // offset from parent file virtual address if m_parent != NULL
     lldb::addr_t    m_byte_size;        // Size in bytes that this section will occupy in memory at runtime
-    uint64_t        m_file_offset;      // Object file offset (if any)
-    uint64_t        m_file_size;        // Object file size (can be smaller than m_byte_size for zero filled sections...)
+    lldb::offset_t  m_file_offset;      // Object file offset (if any)
+    lldb::offset_t  m_file_size;        // Object file size (can be smaller than m_byte_size for zero filled sections...)
     SectionList     m_children;         // Child sections
     bool            m_fake:1,           // If true, then this section only can contain the address if one of its
                                         // children contains an address. This allows for gaps between the children
@@ -313,8 +289,6 @@ protected:
                                         // hits unless the children contain the address.
                     m_encrypted:1,      // Set to true if the contents are encrypted
                     m_thread_specific:1;// This section is thread specific
-    lldb::SectionWP m_linked_section_wp;
-    uint64_t        m_linked_offset;
 private:
     DISALLOW_COPY_AND_ASSIGN (Section);
 };

Modified: lldb/branches/lldb-platform-work/include/lldb/Core/SourceManager.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Core/SourceManager.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Core/SourceManager.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Core/SourceManager.h Thu Jun  6 19:06:43 2013
@@ -64,6 +64,12 @@ public:
             return m_file_spec;
         }
         
+        uint32_t
+        GetSourceMapModificationID() const
+        {
+            return m_source_map_mod_id;
+        }
+        
     protected:
 
         bool
@@ -72,6 +78,7 @@ public:
         FileSpec m_file_spec_orig;  // The original file spec that was used (can be different from m_file_spec)
         FileSpec m_file_spec;       // The actualy file spec being used (if the target has source mappings, this might be different from m_file_spec_orig)
         TimeValue m_mod_time;       // Keep the modification time that this file data is valid for
+        uint32_t m_source_map_mod_id; // If the target uses path remappings, be sure to clear our notion of a source file if the path modification ID changes
         lldb::DataBufferSP m_data_sp;
         typedef std::vector<uint32_t> LineOffsets;
         LineOffsets m_offsets;
@@ -79,7 +86,7 @@ public:
 
 #endif // SWIG
 
-    typedef STD_SHARED_PTR(File) FileSP;
+    typedef std::shared_ptr<File> FileSP;
 
 #ifndef SWIG
 
@@ -106,8 +113,8 @@ public:
     //------------------------------------------------------------------
     // A source manager can be made with a non-null target, in which case it can use the path remappings to find 
     // source files that are not in their build locations.  With no target it won't be able to do this.
-    SourceManager (Debugger &debugger);
-    SourceManager (Target &target);
+    SourceManager (const lldb::DebuggerSP &debugger_sp);
+    SourceManager (const lldb::TargetSP &target_sp);
 
     ~SourceManager();
 
@@ -119,13 +126,6 @@ public:
     }
 
     size_t
-    DisplaySourceLines (const FileSpec &file,
-                        uint32_t line,
-                        uint32_t context_before,
-                        uint32_t context_after,
-                        Stream *s);
-
-    size_t
     DisplaySourceLinesWithLineNumbers (const FileSpec &file,
                                        uint32_t line,
                                        uint32_t context_before,
@@ -136,15 +136,17 @@ public:
 
     // This variant uses the last file we visited.
     size_t
-    DisplaySourceLinesWithLineNumbersUsingLastFile (uint32_t line,
-                                                    uint32_t context_before,
-                                                    uint32_t context_after,
+    DisplaySourceLinesWithLineNumbersUsingLastFile (uint32_t start_line,
+                                                    uint32_t count,
+                                                    uint32_t curr_line,
                                                     const char* current_line_cstr,
                                                     Stream *s,
                                                     const SymbolContextList *bp_locs = NULL);
 
     size_t
     DisplayMoreWithLineNumbers (Stream *s,
+                                uint32_t count,
+                                bool reverse,
                                 const SymbolContextList *bp_locs = NULL);
 
     bool
@@ -175,12 +177,11 @@ protected:
     // Classes that inherit from SourceManager can see and modify these
     //------------------------------------------------------------------
     FileSP m_last_file_sp;
-    uint32_t m_last_file_line;
-    uint32_t m_last_file_context_before;
-    uint32_t m_last_file_context_after;
+    uint32_t m_last_line;
+    uint32_t m_last_count;
     bool     m_default_set;
-    Target *m_target;
-    Debugger *m_debugger;
+    lldb::TargetWP m_target_wp;
+    lldb::DebuggerWP m_debugger_wp;
     
 private:
     //------------------------------------------------------------------

Modified: lldb/branches/lldb-platform-work/include/lldb/Core/Stream.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Core/Stream.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Core/Stream.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Core/Stream.h Thu Jun  6 19:06:43 2013
@@ -87,13 +87,13 @@ public:
     /// @return
     ///     The number of bytes that were appended to the stream.
     //------------------------------------------------------------------
-    virtual int
+    virtual size_t
     Write (const void *src, size_t src_len) = 0;
 
     //------------------------------------------------------------------
     // Member functions
     //------------------------------------------------------------------
-    int
+    size_t
     PutChar (char ch);
 
     //------------------------------------------------------------------
@@ -125,7 +125,7 @@ public:
     /// @return
     ///     The number of bytes that were appended to the stream.
     //------------------------------------------------------------------
-    int
+    size_t
     PrintfAsRawHex8 (const char *format, ...)  __attribute__ ((format (printf, 2, 3)));
 
     //------------------------------------------------------------------
@@ -142,56 +142,59 @@ public:
     /// @return
     ///     The number of bytes that were appended to the stream.
     //------------------------------------------------------------------
-    int
+    size_t
     PutHex8 (uint8_t uvalue);
 
-    int
+    size_t
     PutNHex8 (size_t n, uint8_t uvalue);
 
-    int
+    size_t
     PutHex16 (uint16_t uvalue,
               lldb::ByteOrder byte_order = lldb::eByteOrderInvalid);
 
-    int
+    size_t
     PutHex32 (uint32_t uvalue,
               lldb::ByteOrder byte_order = lldb::eByteOrderInvalid);
 
-    int
+    size_t
     PutHex64 (uint64_t uvalue,
               lldb::ByteOrder byte_order = lldb::eByteOrderInvalid);
 
-    int
+    size_t
     PutMaxHex64 (uint64_t uvalue,
                  size_t byte_size,
                  lldb::ByteOrder byte_order = lldb::eByteOrderInvalid);
-    int
+    size_t
     PutFloat (float f,
               lldb::ByteOrder byte_order = lldb::eByteOrderInvalid);
 
-    int
+    size_t
     PutDouble (double d,
                lldb::ByteOrder byte_order = lldb::eByteOrderInvalid);
 
-    int
+    size_t
     PutLongDouble (long double ld,
                    lldb::ByteOrder byte_order = lldb::eByteOrderInvalid);
 
-    int
+    size_t
     PutPointer (void *ptr);
 
-    int
+    // Append \a src_len bytes from \a src to the stream as hex characters
+    // (two ascii characters per byte of input data)
+    size_t
     PutBytesAsRawHex8 (const void *src,
                        size_t src_len,
                        lldb::ByteOrder src_byte_order = lldb::eByteOrderInvalid,
                        lldb::ByteOrder dst_byte_order = lldb::eByteOrderInvalid);
 
-    int
+    // Append \a src_len bytes from \a s to the stream as binary data.
+    size_t
     PutRawBytes (const void *s, 
                  size_t src_len,
                  lldb::ByteOrder src_byte_order = lldb::eByteOrderInvalid,
                  lldb::ByteOrder dst_byte_order = lldb::eByteOrderInvalid);
 
-    int
+    size_t
     PutCStringAsRawHex8 (const char *s);
 
     //------------------------------------------------------------------
@@ -356,7 +359,7 @@ public:
     ///     A suffix C string. If NULL, no suffix will be output.
     //------------------------------------------------------------------
     void
-    Address (uint64_t addr, int addr_size, const char *prefix = NULL, const char *suffix = NULL);
+    Address (uint64_t addr, uint32_t addr_size, const char *prefix = NULL, const char *suffix = NULL);
 
     //------------------------------------------------------------------
     /// Output an address range to this stream.
@@ -380,7 +383,7 @@ public:
     ///     A suffix C string. If NULL, no suffix will be output.
     //------------------------------------------------------------------
     void
-    AddressRange(uint64_t lo_addr, uint64_t hi_addr, int addr_size, const char *prefix = NULL, const char *suffix = NULL);
+    AddressRange(uint64_t lo_addr, uint64_t hi_addr, uint32_t addr_size, const char *prefix = NULL, const char *suffix = NULL);
 
     //------------------------------------------------------------------
     /// Output a C string to the stream.
@@ -390,13 +393,13 @@ public:
     /// @param[in] cstr
     ///     The string to be output to the stream.
     //------------------------------------------------------------------
-    int
+    size_t
     PutCString (const char *cstr);
 
     //------------------------------------------------------------------
     /// Output and End of Line character to the stream.
     //------------------------------------------------------------------
-    int
+    size_t
     EOL();
 
     //------------------------------------------------------------------
@@ -406,7 +409,7 @@ public:
     ///     The size of an address in bytes that is used when outputting
     ///     address and pointer values to the stream.
     //------------------------------------------------------------------
-    uint8_t
+    uint32_t
     GetAddressByteSize () const;
 
     //------------------------------------------------------------------
@@ -475,7 +478,7 @@ public:
     ///     A C string to print following the indentation. If NULL, just
     ///     output the indentation characters.
     //------------------------------------------------------------------
-    int
+    size_t
     Indent(const char *s = NULL);
 
     //------------------------------------------------------------------
@@ -517,10 +520,10 @@ public:
     ///     Variable arguments that are needed for the printf style
     ///     format string \a format.
     //------------------------------------------------------------------
-    int
+    size_t
     Printf (const char *format, ...)  __attribute__ ((format (printf, 2, 3)));
 
-    int
+    size_t
     PrintfVarArg(const char *format, va_list args);
 
     //------------------------------------------------------------------
@@ -546,7 +549,7 @@ public:
     ///     address and pointer values.
     //------------------------------------------------------------------
     void
-    SetAddressByteSize (uint8_t addr_size);
+    SetAddressByteSize (uint32_t addr_size);
 
     //------------------------------------------------------------------
     /// Set the current indentation level.
@@ -569,7 +572,7 @@ public:
     /// @param[in] format
     ///     The optional printf format that can be overridden.
     //------------------------------------------------------------------
-    int
+    size_t
     PutSLEB128 (int64_t uval);
 
     //------------------------------------------------------------------
@@ -584,7 +587,7 @@ public:
     /// @param[in] format
     ///     The optional printf format that can be overridden.
     //------------------------------------------------------------------
-    int
+    size_t
     PutULEB128 (uint64_t uval);
 
     static void
@@ -594,12 +597,12 @@ protected:
     //------------------------------------------------------------------
     // Member variables
     //------------------------------------------------------------------
-    Flags m_flags;      ///< Dump flags.
-    uint8_t m_addr_size;    ///< Size of an address in bytes.
-    lldb::ByteOrder m_byte_order;///< Byte order to use when encoding scalar types.
-    int m_indent_level;     ///< Indention level.
+    Flags m_flags;                  ///< Dump flags.
+    uint32_t m_addr_size;           ///< Size of an address in bytes.
+    lldb::ByteOrder m_byte_order;   ///< Byte order to use when encoding scalar types.
+    int m_indent_level;             ///< Indention level.
 
-    int _PutHex8 (uint8_t uvalue, bool add_prefix);
+    size_t _PutHex8 (uint8_t uvalue, bool add_prefix);
 };
 
 } // namespace lldb_private

Modified: lldb/branches/lldb-platform-work/include/lldb/Core/StreamAsynchronousIO.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Core/StreamAsynchronousIO.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Core/StreamAsynchronousIO.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Core/StreamAsynchronousIO.h Thu Jun  6 19:06:43 2013
@@ -28,7 +28,7 @@ public:
     virtual void
     Flush ();
     
-    virtual int
+    virtual size_t
     Write (const void *src, size_t src_len);
     
     

Modified: lldb/branches/lldb-platform-work/include/lldb/Core/StreamBuffer.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Core/StreamBuffer.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Core/StreamBuffer.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Core/StreamBuffer.h Thu Jun  6 19:06:43 2013
@@ -47,7 +47,7 @@ public:
         // Nothing to do when flushing a buffer based stream...
     }
 
-    virtual int
+    virtual size_t
     Write (const void *s, size_t length)
     {
         if (s && length)
@@ -61,6 +61,10 @@ public:
         m_packet.clear();
     }
 
+    // Beware, this might not be NULL terminated as you can expect from
+    // StringString as there may be random bits in the llvm::SmallVector. If
+    // you are using this class to create a C string, be sure the call PutChar ('\0')
+    // after you have created your string, or use StreamString.
     const char *
     GetData () const
     {

Modified: lldb/branches/lldb-platform-work/include/lldb/Core/StreamCallback.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Core/StreamCallback.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Core/StreamCallback.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Core/StreamCallback.h Thu Jun  6 19:06:43 2013
@@ -29,7 +29,7 @@ public:
     virtual void
     Flush ();
     
-    virtual int
+    virtual size_t
     Write (const void *src, size_t src_len);
     
     

Modified: lldb/branches/lldb-platform-work/include/lldb/Core/StreamFile.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Core/StreamFile.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Core/StreamFile.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Core/StreamFile.h Thu Jun  6 19:06:43 2013
@@ -57,7 +57,7 @@ public:
     virtual void
     Flush ();
 
-    virtual int
+    virtual size_t
     Write (const void *s, size_t length);
 
 protected:

Modified: lldb/branches/lldb-platform-work/include/lldb/Core/StreamString.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Core/StreamString.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Core/StreamString.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Core/StreamString.h Thu Jun  6 19:06:43 2013
@@ -31,7 +31,7 @@ public:
     virtual void
     Flush ();
 
-    virtual int
+    virtual size_t
     Write (const void *s, size_t length);
 
     void

Modified: lldb/branches/lldb-platform-work/include/lldb/Core/StreamTee.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Core/StreamTee.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Core/StreamTee.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Core/StreamTee.h Thu Jun  6 19:06:43 2013
@@ -93,14 +93,14 @@ public:
         }
     }
 
-    virtual int
+    virtual size_t
     Write (const void *s, size_t length)
     {
         Mutex::Locker locker (m_streams_mutex);
         if (m_streams.empty())
             return 0;
     
-        int min_bytes_written = INT_MAX;
+        size_t min_bytes_written = SIZE_MAX;
         collection::iterator pos, end;
         for (pos = m_streams.begin(), end = m_streams.end(); pos != end; ++pos)
         {
@@ -111,11 +111,13 @@ public:
             Stream *strm = pos->get();
             if (strm)
             {
-                int bytes_written = strm->Write (s, length);
+                const size_t bytes_written = strm->Write (s, length);
                 if (min_bytes_written > bytes_written)
                     min_bytes_written = bytes_written;
             }
         }
+        if (min_bytes_written == SIZE_MAX)
+            return 0;
         return min_bytes_written;
     }
 

Modified: lldb/branches/lldb-platform-work/include/lldb/Core/StringList.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Core/StringList.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Core/StringList.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Core/StringList.h Thu Jun  6 19:06:43 2013
@@ -31,6 +31,9 @@ public:
     ~StringList ();
 
     void
+    AppendString (const std::string &s);
+    
+    void
     AppendString (const char *str);
 
     void
@@ -45,7 +48,7 @@ public:
     bool
     ReadFileLines (FileSpec &input_file);
     
-    uint32_t
+    size_t
     GetSize () const;
 
     const char *
@@ -81,7 +84,19 @@ public:
 
     StringList&
     operator << (StringList strings);
-        
+    
+    // This string list contains a list of valid auto completion
+    // strings, and the "s" is passed in. "matches" is filled in
+    // with zero or more string values that start with "s", and
+    // the first string to exactly match one of the string
+    // values in this collection, will have "exact_matches_idx"
+    // filled in to match the index, or "exact_matches_idx" will
+    // have SIZE_MAX
+    size_t
+    AutoComplete (const char *s,
+                  StringList &matches,
+                  size_t &exact_matches_idx) const;
+
 private:
 
     STLStringArray m_strings;

Modified: lldb/branches/lldb-platform-work/include/lldb/Core/Timer.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Core/Timer.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Core/Timer.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Core/Timer.h Thu Jun  6 19:06:43 2013
@@ -11,8 +11,9 @@
 #define liblldb_Timer_h_
 #if defined(__cplusplus)
 
-#include <memory>
+#include <stdarg.h>
 #include <stdio.h>
+#include <string>
 #include "lldb/lldb-private.h"
 #include "lldb/Host/TimeValue.h"
 
@@ -90,6 +91,68 @@ private:
     Timer();
     DISALLOW_COPY_AND_ASSIGN (Timer);
 };
+    
+class IntervalTimer
+{
+public:
+    IntervalTimer() :
+        m_start (TimeValue::Now())
+    {
+    }
+    
+    ~IntervalTimer()
+    {
+    }
+
+    uint64_t
+    GetElapsedNanoSeconds() const
+    {
+        return TimeValue::Now() - m_start;
+    }
+    
+    void
+    Reset ()
+    {
+        m_start = TimeValue::Now();
+    }
+    
+    int
+    PrintfElapsed (const char *format, ...)  __attribute__ ((format (printf, 2, 3)))
+    {
+        TimeValue now (TimeValue::Now());
+        const uint64_t elapsed_nsec = now - m_start;
+        const char *unit = NULL;
+        float elapsed_value;
+        if (elapsed_nsec < 1000)
+        {
+            unit = "ns";
+            elapsed_value = (float)elapsed_nsec;
+        }
+        else if (elapsed_nsec < 1000000)
+        {
+            unit = "us";
+            elapsed_value = (float)elapsed_nsec/1000.0f;
+        }
+        else if (elapsed_nsec < 1000000000)
+        {
+            unit = "ms";
+            elapsed_value = (float)elapsed_nsec/1000000.0f;
+        }
+        else
+        {
+            unit = "sec";
+            elapsed_value = (float)elapsed_nsec/1000000000.0f;
+        }
+        int result = printf ("%3.2f %s: ", elapsed_value, unit);
+        va_list args;
+        va_start (args, format);
+        result += vprintf (format, args);
+        va_end (args);
+        return result;
+    }
+protected:
+    TimeValue m_start;
+};
 
 } // namespace lldb_private
 

Modified: lldb/branches/lldb-platform-work/include/lldb/Core/UUID.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Core/UUID.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Core/UUID.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Core/UUID.h Thu Jun  6 19:06:43 2013
@@ -22,7 +22,8 @@ namespace lldb_private {
 class UUID
 {
 public:
-    typedef uint8_t ValueType[16];
+    // Most UUIDs are 16 bytes, but some Linux build-ids (SHA1) are 20.
+    typedef uint8_t ValueType[20];
 
     //------------------------------------------------------------------
     // Constructors and Destructors
@@ -45,25 +46,54 @@ public:
     const void *
     GetBytes() const;
 
-    static size_t
+    size_t
     GetByteSize();
 
     bool
     IsValid () const;
 
     void
-    SetBytes (const void *uuid_bytes);
+    SetBytes (const void *uuid_bytes, uint32_t num_uuid_bytes = 16);
 
-    char *
-    GetAsCString (char *dst, size_t dst_len) const;
+    std::string
+    GetAsString () const;
 
     size_t
-    SetfromCString (const char *c_str);
+    SetFromCString (const char *c_str, uint32_t num_uuid_bytes = 16);
 
+    // Decode as many UUID bytes (up to 16) as possible from the C string "cstr"
+    // This is used for auto completion where a partial UUID might have been
+    // typed in. It 
+    //------------------------------------------------------------------
+    /// Decode as many UUID bytes (up to 16) as possible from the C
+    /// string \a cstr.
+    ///
+    /// @param[in] cstr
+    ///     A NULL terminate C string that points at a UUID string value
+    ///     (no leading spaces). The string must contain only hex
+    ///     characters and optionally can contain the '-' sepearators.
+    ///
+    /// @param[in] uuid_bytes
+    ///     A buffer of bytes that will contain a full or patially
+    ///     decoded UUID.
+    ///
+    /// @param[out] end
+    ///     If \a end is not NULL, it will be filled in with the a
+    ///     pointer to the character after the last successfully decoded
+    ///     byte.
+    ///
+    /// @return
+    ///     Returns the number of bytes that were successfully decoded
+    ///     which should be 16 if a full UUID value was properly decoded.
+    //------------------------------------------------------------------
+    static size_t
+    DecodeUUIDBytesFromCString (const char *cstr, ValueType &uuid_bytes, const char **end, uint32_t num_uuid_bytes = 16);
+    
 protected:
     //------------------------------------------------------------------
     // Classes that inherit from UUID can see and modify these
     //------------------------------------------------------------------
+    uint32_t m_num_uuid_bytes; // Should be 16 or 20
     ValueType m_uuid;
 };
 

Modified: lldb/branches/lldb-platform-work/include/lldb/Core/UniqueCStringMap.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Core/UniqueCStringMap.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Core/UniqueCStringMap.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Core/UniqueCStringMap.h Thu Jun  6 19:06:43 2013
@@ -146,6 +146,27 @@ public:
     }
 
     //------------------------------------------------------------------
+    // Find the value for the unique string in the map.
+    //
+    // Return the value for \a unique_cstr if one is found, return
+    // \a fail_value otherwise. This method works well for simple type
+    // T values and only if there is a sensible failure value that can
+    // be returned and that won't match any existing values.
+    //------------------------------------------------------------------
+    T
+    Find (const char *unique_cstr, T fail_value) const
+    {
+        Entry search_entry (unique_cstr);
+        const_iterator end = m_map.end();
+        const_iterator pos = std::lower_bound (m_map.begin(), end, search_entry);
+        if (pos != end)
+        {
+            if (pos->cstring == unique_cstr)
+                return pos->value;
+        }
+        return fail_value;
+    }
+    //------------------------------------------------------------------
     // Get a pointer to the first entry that matches "name". NULL will
     // be returned if there is no entry that matches "name".
     //
@@ -292,6 +313,33 @@ public:
         }
     }
 
+    size_t
+    Erase (const char *unique_cstr)
+    {
+        size_t num_removed = 0;
+        Entry search_entry (unique_cstr);
+        iterator end = m_map.end();
+        iterator begin = m_map.begin();
+        iterator lower_pos = std::lower_bound (begin, end, search_entry);
+        if (lower_pos != end)
+        {
+            if (lower_pos->cstring == unique_cstr)
+            {
+                iterator upper_pos = std::upper_bound (lower_pos, end, search_entry);
+                if (lower_pos == upper_pos)
+                {
+                    m_map.erase (lower_pos);
+                    num_removed = 1;
+                }
+                else
+                {
+                    num_removed = std::distance (lower_pos, upper_pos);
+                    m_map.erase (lower_pos, upper_pos);
+                }
+            }
+        }
+        return num_removed;
+    }
 protected:
     typedef std::vector<Entry> collection;
     typedef typename collection::iterator iterator;

Modified: lldb/branches/lldb-platform-work/include/lldb/Core/UserSettingsController.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Core/UserSettingsController.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Core/UserSettingsController.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Core/UserSettingsController.h Thu Jun  6 19:06:43 2013
@@ -25,438 +25,74 @@
 #include "lldb/Core/Stream.h"
 #include "lldb/Core/StreamString.h"
 #include "lldb/Host/Mutex.h"
-#include "lldb/Interpreter/NamedOptionValue.h"
+#include "lldb/Interpreter/OptionValue.h"
 
 namespace lldb_private {
 
-typedef struct
-{
-    const char *var_name;
-    SettableVariableType var_type;
-    const char *default_value;
-    OptionEnumValueElement *enum_values;
-    bool initialized;
-    bool hidden;
-    const char *description;   //help text
-} SettingEntry;
-
-
-typedef struct
-{
-    lldb::UserSettingsControllerSP parent;
-    ConstString level_name;
-    std::vector<SettingEntry> global_settings;
-    std::vector<SettingEntry> instance_settings;
-} UserSettingDefinition;
-
-class UserSettingsController : 
-    public STD_ENABLE_SHARED_FROM_THIS(UserSettingsController)
+class Properties
 {
 public:
-
-    UserSettingsController (const char *level_name, 
-                            const lldb::UserSettingsControllerSP &parent);
-
-    virtual
-    ~UserSettingsController ();
-
-    // Pure virtual functions, which all sub-classes must implement.
-    virtual lldb::InstanceSettingsSP
-    CreateInstanceSettings (const char *instance_name) = 0;
-
-    // Virtual functions that you can override if you have global settings
-    // (not instance specific).
-    virtual bool
-    SetGlobalVariable (const ConstString &var_name,
-                       const char *index_value,
-                       const char *value,
-                       const SettingEntry &entry,
-                       const VarSetOperationType op,
-                       Error &err);
-
-    virtual bool
-    GetGlobalVariable (const ConstString &var_name, 
-                       StringList &value,
-                       Error &err);
-    
-    // End of pure virtual functions.
-    StringList
-    GetVariable (const char *full_dot_name, 
-                 SettableVariableType &var_type,
-                 const char *debugger_instance_name,
-                 Error &err);
-
-    Error
-    SetVariable (const char *full_dot_name, 
-                 const char *value, 
-                 const VarSetOperationType op,
-                 const bool override,
-                 const char *debugger_instance_name,
-                 const char *index_value = NULL);
-
-    const lldb::UserSettingsControllerSP &
-    GetParent ();
-
-    const ConstString &
-    GetLevelName ();
-
-    void
-    RegisterChild (const lldb::UserSettingsControllerSP &child);
-
-    void
-    RemoveChild (const lldb::UserSettingsControllerSP &child);
-
-    void
-    CreateSettingsVector (const SettingEntry *table,
-                          const bool global);
-
-    void
-    CreateDefaultInstanceSettings ();
-
-    void
-    InitializeGlobalVariables ();
-
-    const lldb::InstanceSettingsSP &
-    FindPendingSettings (const ConstString &instance_name);
-
-    void
-    RemovePendingSettings (const ConstString &instance_name);
-  
-    void
-    RegisterInstanceSettings (InstanceSettings *instance_settings);
-
-    void
-    UnregisterInstanceSettings (InstanceSettings *instance_settings);
-
-    void
-    RenameInstanceSettings (const char *old_name, const char *new_name);
-
-    void
-    SetDefaultInstanceSettings (const lldb::InstanceSettingsSP &instance_settings_sp)
+    Properties () :
+        m_collection_sp ()
     {
-        m_default_settings = instance_settings_sp;
     }
-    // -------------------------------------------------------------------------
-    // Public static methods
-    // -------------------------------------------------------------------------
-
-    static void
-    FindAllSettingsDescriptions (CommandInterpreter &interpreter,
-                                 const lldb::UserSettingsControllerSP& usc_sp, 
-                                 const char *current_prefix, 
-                                 Stream &result_stream,
-                                 Error &err);
-
-    static void
-    FindSettingsDescriptions (CommandInterpreter &interpreter,
-                              const lldb::UserSettingsControllerSP& usc_sp, 
-                              const char *current_prefix, 
-                              const char *search_name,
-                              Stream &result_stream,
-                              Error &err);
-    
-    static void
-    SearchAllSettingsDescriptions (CommandInterpreter &interpreter,
-                                   const lldb::UserSettingsControllerSP& usc_sp,
-                                   const char *current_prefix,
-                                   const char *search_word,
-                                   Stream &result_stream);
 
-    static void
-    GetAllVariableValues (CommandInterpreter &interpreter,
-                          const lldb::UserSettingsControllerSP& usc_sp,
-                          const char *current_prefix, 
-                          Stream &result_stream,
-                          Error &err);
-
-    static bool
-    DumpValue (CommandInterpreter &interpreter, 
-               const lldb::UserSettingsControllerSP& usc_sp,
-               const char *variable_dot_name,
-               Stream &strm);
-    
-    static bool
-    DumpValue (const char *variable_dot_name,
-               SettableVariableType var_type,
-               const StringList &variable_value,
-               Stream &strm);
-
-    static int
-    CompleteSettingsNames (const lldb::UserSettingsControllerSP& usc_sp,
-                           Args &partial_setting_name_pieces,
-                           bool &word_complete,
-                           StringList &matches);
-
-    static int
-    CompleteSettingsValue (const lldb::UserSettingsControllerSP& usc_sp,
-                           const char *full_dot_name,
-                           const char *partial_value,
-                           bool &word_complete,
-                           StringList &matches);
-
-    static Args
-    BreakNameIntoPieces (const char *full_dot_name);
-
-    static const char *
-    GetTypeString (SettableVariableType var_type);
-
-
-    static const char *
-    EnumToString (const OptionEnumValueElement *enum_values, int value);
-
-    static void
-    UpdateStringVariable (VarSetOperationType op, 
-                          std::string &string_var, 
-                          const char *new_value,
-                          Error &err);
-
-
-    static void
-    UpdateBooleanVariable (VarSetOperationType op,
-                           bool &bool_var,
-                           const char *new_value,
-                           bool clear_value, // Used for op == eVarSetOperationClear
-                           Error &err);
-
-    static void
-    UpdateStringArrayVariable (VarSetOperationType op, 
-                               const char *index_value, 
-                               Args &array_var, 
-                               const char *new_value,
-                               Error &err);
-  
-    static void
-    UpdateDictionaryVariable (VarSetOperationType op,
-                              const char *index_value,
-                              std::map<std::string, std::string> &dictionary,
-                              const char *new_value,
-                              Error &err);
-
-    static void
-    UpdateEnumVariable (OptionEnumValueElement *enum_values,
-                        int *enum_var,
-                        const char *new_value,
-                        Error &err);
-
-    static Error
-    UpdateStringOptionValue (const char *new_value_cstr,
-                             VarSetOperationType op, 
-                             OptionValueString &option_value);
-    
-    static Error
-    UpdateBooleanOptionValue (const char *new_value_cstr,
-                              VarSetOperationType op,
-                              OptionValueBoolean &option_value);
-
-    static Error
-    UpdateFileSpecOptionValue (const char *new_value_cstr,
-                               VarSetOperationType op, 
-                               OptionValueFileSpec &option_value);
-
-    static bool
-    InitializeSettingsController (lldb::UserSettingsControllerSP &controller_sp,
-                                  SettingEntry *global_settings,
-                                  SettingEntry *instance_settings);
-
-    static void
-    FinalizeSettingsController (lldb::UserSettingsControllerSP &controller_sp);
-
-
-    lldb::InstanceSettingsSP
-    GetDefaultInstanceSettings ()
+    Properties (const lldb::OptionValuePropertiesSP &collection_sp) :
+        m_collection_sp (collection_sp)
     {
-        return m_default_settings;
     }
-
-protected:
-
-    // -------------------------------------------------------------------------
-    // Protected methods are declared below here.
-    // -------------------------------------------------------------------------
-
-    bool
-    IsLiveInstance (const std::string &instance_name);
-
-    int
-    GlobalVariableMatches (const char *partial_name,
-                           const std::string &complete_prefix,
-                           StringList &matches);
-
-    int
-    InstanceVariableMatches (const char *partial_name,
-                             const std::string &complete_prefix,
-                             const char *instance_name,
-                             StringList &matches);
-
-    int
-    LiveInstanceMatches (const char *partial_name,
-                         const std::string &complete_prefix,
-                         bool &word_complete,
-                         StringList &matches);
-
-    int
-    ChildMatches (const char *partial_name,
-                  const std::string &complete_prefix,
-                  bool &word_complete,
-                  StringList &matches);
-
-
-    size_t
-    GetNumChildren ();
-
-    const lldb::UserSettingsControllerSP
-    GetChildAtIndex (size_t index);
-
-
-    const SettingEntry *
-    GetGlobalEntry (const ConstString &var_name);
-
-    const SettingEntry *
-    GetInstanceEntry (const ConstString &var_name);
-
-    void
-    BuildParentPrefix (std::string &parent_prefix);
-
-
-    void
-    CopyDefaultSettings (const lldb::InstanceSettingsSP &new_settings,
-                         const ConstString &instance_name,
-                         bool pending);
-
-    lldb::InstanceSettingsSP
-    PendingSettingsForInstance (const ConstString &instance_name);
-
-    InstanceSettings *
-    FindSettingsForInstance (const ConstString &instance_name);
-
-    void
-    GetAllPendingSettingValues (Stream &result_stream);
-
-    void
-    GetAllDefaultSettingValues (Stream &result_stream);
-
-    void
-    GetAllInstanceVariableValues (CommandInterpreter &interpreter, 
-                                  Stream &result_stream);
-
-    void
-    OverrideAllInstances (const ConstString &var_name, 
-                          const char *value,
-                          VarSetOperationType op, 
-                          const char *index_value, 
-                          Error &err);
-
-    UserSettingDefinition &
-    GetControllerSettings () { return m_settings; }
-
-    // -------------------------------------------------------------------------
-    // Static protected methods are declared below here.
-    // -------------------------------------------------------------------------
-
-    static void
-    PrintEnumValues (const OptionEnumValueElement *enum_values, 
-                     Stream &str);
-    
-
-    static int
-    BooleanMatches (const char *partial_value,
-                    bool &word_complete,
-                    StringList &matches);
     
-    static int
-    EnumMatches (const char *partial_value,
-                 OptionEnumValueElement *enum_values,
-                 bool &word_complete,
-                 StringList &matches);
-
-    static void
-    VerifyOperationForType (SettableVariableType var_type, 
-                            VarSetOperationType op, 
-                            const ConstString &var_name,
-                            Error &err);
-
-    // This is protected rather than private so that classes that inherit from UserSettingsController can access it.
-
-    lldb::InstanceSettingsSP m_default_settings;
-
-private:
-
-    UserSettingDefinition m_settings;
-    
-    typedef std::map<std::string,InstanceSettings*> InstanceSettingsMap;
-
-    std::vector<lldb::UserSettingsControllerSP> m_children;
-    std::map <std::string, lldb::InstanceSettingsSP> m_pending_settings;
-    InstanceSettingsMap m_live_settings;    // live settings should never be NULL (hence 'live')
-    mutable Mutex m_children_mutex;
-    mutable Mutex m_pending_settings_mutex;
-    mutable Mutex m_live_settings_mutex;
-
-    DISALLOW_COPY_AND_ASSIGN (UserSettingsController);
-};
-
-class InstanceSettings 
-{
-public:
-
-    InstanceSettings (const lldb::UserSettingsControllerSP &owner_sp, const char *instance_name, bool live_instance = true);
-
-    InstanceSettings (const InstanceSettings &rhs);
-
     virtual
-    ~InstanceSettings ();
-
-    InstanceSettings&
-    operator= (const InstanceSettings &rhs);
+    ~Properties()
+    {
+    }
+    
+    virtual lldb::OptionValuePropertiesSP
+    GetValueProperties () const
+    {
+        // This function is virtual in case subclasses want to lazily
+        // implement creating the properties.
+        return m_collection_sp;
+    }
 
-    // Begin Pure Virtual Functions
+    virtual lldb::OptionValueSP
+    GetPropertyValue (const ExecutionContext *exe_ctx,
+                      const char *property_path,
+                      bool will_modify,
+                      Error &error) const;
+
+    virtual Error
+    SetPropertyValue (const ExecutionContext *exe_ctx,
+                      VarSetOperationType op,
+                      const char *property_path,
+                      const char *value);
+    
+    virtual Error
+    DumpPropertyValue (const ExecutionContext *exe_ctx,
+                       Stream &strm,
+                       const char *property_path,
+                       uint32_t dump_mask);
 
     virtual void
-    UpdateInstanceSettingsVariable (const ConstString &var_name,
-                                    const char *index_value,
-                                    const char *value,
-                                    const ConstString &instance_name,
-                                    const SettingEntry &entry,
-                                    VarSetOperationType op,
-                                    Error &err,
-                                    bool pending) = 0;
-
-    virtual bool
-    GetInstanceSettingsValue (const SettingEntry &entry,
-                              const ConstString &var_name,
-                              StringList &value,
-                              Error *err) = 0;
-
+    DumpAllPropertyValues (const ExecutionContext *exe_ctx,
+                           Stream &strm,
+                           uint32_t dump_mask);
+    
     virtual void
-    CopyInstanceSettings (const lldb::InstanceSettingsSP &new_settings,
-                          bool pending) = 0;
-
-    virtual const ConstString
-    CreateInstanceName () = 0;
-
-    // End Pure Virtual Functions
-
-    const ConstString &
-    GetInstanceName () { return m_instance_name; }
-
+    DumpAllDescriptions (CommandInterpreter &interpreter,
+                         Stream &strm) const;
 
-    void
-    ChangeInstanceName (const std::string &new_instance_name);
-
-    static const ConstString &
-    GetDefaultName ();
-
-    static const ConstString &
-    InvalidName ();
+    size_t
+    Apropos (const char *keyword,
+             std::vector<const Property *> &matching_properties) const;
 
+    lldb::OptionValuePropertiesSP
+    GetSubProperty (const ExecutionContext *exe_ctx,
+                    const ConstString &name);
 protected:
-
-    lldb::UserSettingsControllerWP m_owner_wp;
-    ConstString m_instance_name;
+    lldb::OptionValuePropertiesSP m_collection_sp;
 };
 
-
-
 } // namespace lldb_private
 
 #endif // liblldb_UserSettingsController_h_

Modified: lldb/branches/lldb-platform-work/include/lldb/Core/VMRange.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Core/VMRange.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Core/VMRange.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Core/VMRange.h Thu Jun  6 19:06:43 2013
@@ -161,7 +161,7 @@ public:
 
     // Returns a valid index into coll when a match is found, else UINT32_MAX
     // is returned
-    static uint32_t
+    static size_t
     FindRangeIndexThatContainsValue (const VMRange::collection& coll, lldb::addr_t value);
 
 protected:

Modified: lldb/branches/lldb-platform-work/include/lldb/Core/Value.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Core/Value.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Core/Value.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Core/Value.h Thu Jun  6 19:06:43 2013
@@ -12,6 +12,7 @@
 
 // C Includes
 // C++ Includes
+#include <string>
 #include <vector>
 // Other libraries and framework includes
 // Project includes
@@ -34,6 +35,7 @@ public:
                                         // m_value contains...
                                         // ============================
         eValueTypeScalar,               // raw scalar value
+        eValueTypeVector,               // byte array of m_vector.length with endianness of m_vector.byte_order
         eValueTypeFileAddress,          // file address value
         eValueTypeLoadAddress,          // load address value
         eValueTypeHostAddress           // host address value (for memory in the process that is using liblldb)
@@ -45,13 +47,77 @@ public:
                                         // ====================
         eContextTypeInvalid,            // undefined
         eContextTypeClangType,          // void * (an opaque clang::QualType * that can be fed to "static QualType QualType::getFromOpaquePtr(void *)")
-        eContextTypeRegisterInfo,       // RegisterInfo *
+        eContextTypeRegisterInfo,       // RegisterInfo * (can be a scalar or a vector register)
         eContextTypeLLDBType,           // lldb_private::Type *
         eContextTypeVariable            // lldb_private::Variable *
     };
 
+    const static size_t kMaxByteSize = 32u;
+
+    struct Vector
+    {
+        // The byte array must be big enough to hold vector registers for any supported target.
+        uint8_t bytes[kMaxByteSize];
+        size_t length;
+        lldb::ByteOrder byte_order;
+
+        Vector() : 
+			length(0), 
+			byte_order(lldb::eByteOrderInvalid) 
+        {
+		}
+
+        Vector(const Vector& vector) 
+		{ *this = vector; 
+        }
+        const Vector& 
+		operator=(const Vector& vector) 
+		{
+            SetBytes(vector.bytes, vector.length, vector.byte_order);
+            return *this;
+        }
+
+        bool 
+		SetBytes(const void *bytes, size_t length, lldb::ByteOrder byte_order)
+		{
+            this->length = length;
+            this->byte_order = byte_order;
+            if (length)
+                ::memcpy(this->bytes, bytes, length < kMaxByteSize ? length : kMaxByteSize);
+            return IsValid();
+        }
+
+        bool
+		IsValid() const 
+		{
+            return (length > 0 && length < kMaxByteSize && byte_order != lldb::eByteOrderInvalid);
+        }
+        // Casts a vector, if valid, to an unsigned int of matching or largest supported size.
+        // Truncates to the beginning of the vector if required.
+        // Returns a default constructed Scalar if the Vector data is internally inconsistent.
+        Scalar 
+		GetAsScalar() const 
+		{
+            Scalar scalar;
+            if (IsValid())
+            {
+                if (length == 1) scalar = *(const uint8_t *)bytes;
+                else if (length == 2) scalar = *(const uint16_t *)bytes;
+                else if (length == 4) scalar = *(const uint32_t *)bytes;
+                else if (length == 8) scalar = *(const uint64_t *)bytes;
+#if defined (ENABLE_128_BIT_SUPPORT)
+                else if (length >= 16) scalar = *(const __uint128_t *)bytes;
+#else
+                else if (length >= 16) scalar = *(const __uint64_t *)bytes;
+#endif
+            }
+            return scalar;
+        }
+    };
+
     Value();
     Value(const Scalar& scalar);
+    Value(const Vector& vector);
     Value(const uint8_t *bytes, int len);
     Value(const Value &rhs);
     
@@ -91,10 +157,17 @@ public:
     {
         m_context_type = context_type;
         m_context = p;
+        if (m_context_type == eContextTypeRegisterInfo) {
+            RegisterInfo *reg_info = GetRegisterInfo();
+            if (reg_info->encoding == lldb::eEncodingVector)
+                SetValueType(eValueTypeVector);
+            else
+                SetValueType(eValueTypeScalar);
+        }
     }
 
     RegisterInfo *
-    GetRegisterInfo();
+    GetRegisterInfo() const;
 
     Type *
     GetType();
@@ -102,14 +175,56 @@ public:
     Scalar &
     ResolveValue (ExecutionContext *exe_ctx, clang::ASTContext *ast_context);
 
+    const Scalar &
+    GetScalar() const
+    {
+        return m_value;
+    }
+    
+    const Vector &
+    GetVector() const
+    {
+        return m_vector;
+    }
+    
     Scalar &
     GetScalar()
     {
         return m_value;
     }
     
+    Vector &
+    GetVector()
+    {
+        return m_vector;
+    }
+
+    bool
+    SetVectorBytes(const Vector& vector) 
+	{
+        m_vector = vector;
+        return m_vector.IsValid();
+    }
+    
+    bool
+    SetVectorBytes(uint8_t *bytes, size_t length, lldb::ByteOrder byte_order) 
+	{
+        return m_vector.SetBytes(bytes, length, byte_order);
+    }
+
+    bool
+    SetScalarFromVector() 
+	{
+        if (m_vector.IsValid()) 
+		{
+            m_value = m_vector.GetAsScalar();
+            return true;
+        }
+        return false;
+    }
+
     void
-    ResizeData(int len);
+    ResizeData(size_t len);
 
     bool
     ValueOf(ExecutionContext *exe_ctx, clang::ASTContext *ast_context);
@@ -123,7 +238,7 @@ public:
     lldb::Format
     GetValueDefaultFormat ();
 
-    size_t
+    uint64_t
     GetValueByteSize (clang::ASTContext *ast_context, Error *error_ptr);
 
     Error
@@ -144,6 +259,7 @@ public:
 
 protected:
     Scalar          m_value;
+    Vector          m_vector;
     ValueType       m_value_type;
     void *          m_context;
     ContextType     m_context_type;

Modified: lldb/branches/lldb-platform-work/include/lldb/Core/ValueObject.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Core/ValueObject.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Core/ValueObject.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Core/ValueObject.h Thu Jun  6 19:06:43 2013
@@ -12,6 +12,7 @@
 
 // C Includes
 // C++ Includes
+#include <initializer_list>
 #include <map>
 #include <vector>
 // Other libraries and framework includes
@@ -232,6 +233,8 @@ public:
         lldb::TypeSummaryImplSP m_summary_sp;
         std::string m_root_valobj_name;
         bool m_hide_root_type;
+        bool m_hide_name;
+        bool m_hide_value;
         
         DumpValueObjectOptions() :
             m_max_ptr_depth(0),
@@ -248,7 +251,9 @@ public:
             m_format (lldb::eFormatDefault),
             m_summary_sp(),
             m_root_valobj_name(),
-            m_hide_root_type(false)  // <rdar://problem/11505459> provide a special compact display for "po",
+            m_hide_root_type(false),  // provide a special compact display for "po"
+            m_hide_name(false), // provide a special compact display for "po"
+            m_hide_value(false) // provide a special compact display for "po"
         {}
         
         static const DumpValueObjectOptions
@@ -274,7 +279,9 @@ public:
             m_format(rhs.m_format),
             m_summary_sp(rhs.m_summary_sp),
             m_root_valobj_name(rhs.m_root_valobj_name),
-            m_hide_root_type(rhs.m_hide_root_type)
+            m_hide_root_type(rhs.m_hide_root_type),
+            m_hide_name(rhs.m_hide_name),
+            m_hide_value(rhs.m_hide_value)
         {}
         
         DumpValueObjectOptions&
@@ -372,12 +379,16 @@ public:
                 SetUseSyntheticValue(false);
                 SetOmitSummaryDepth(UINT32_MAX);
                 SetIgnoreCap(true);
+                SetHideName(false);
+                SetHideValue(false);
             }
             else
             {
                 SetUseSyntheticValue(true);
                 SetOmitSummaryDepth(0);
                 SetIgnoreCap(false);
+                SetHideName(false);
+                SetHideValue(false);
             }
             return *this;
         }
@@ -412,7 +423,20 @@ public:
             m_hide_root_type = hide_root_type;
             return *this;
         }
+        
+        DumpValueObjectOptions&
+        SetHideName (bool hide_name = false)
+        {
+            m_hide_name = hide_name;
+            return *this;
+        }
 
+        DumpValueObjectOptions&
+        SetHideValue (bool hide_value = false)
+        {
+            m_hide_value = hide_value;
+            return *this;
+        }        
     };
 
     class EvaluationPoint
@@ -579,7 +603,7 @@ public:
     //------------------------------------------------------------------
     // Sublasses must implement the functions below.
     //------------------------------------------------------------------
-    virtual size_t
+    virtual uint64_t
     GetByteSize() = 0;
 
     virtual lldb::ValueType
@@ -597,6 +621,9 @@ public:
     virtual lldb::LanguageType
     GetObjectRuntimeLanguage();
 
+    virtual uint32_t
+    GetTypeInfo (lldb::clang_type_t *pointee_or_element_clang_type = NULL);
+
     virtual bool
     IsPointerType ();
     
@@ -613,6 +640,9 @@ public:
     IsPossibleDynamicType ();
 
     virtual bool
+    IsObjCNil ();
+    
+    virtual bool
     IsBaseClass ()
     {
         return false;
@@ -709,12 +739,10 @@ public:
     // value is from an executable file and might have its data in
     // sections of the file. This can be used for variables.
     virtual lldb::ModuleSP
-    GetModule()
-    {
-        if (m_parent)
-            return m_parent->GetModule();
-        return lldb::ModuleSP();
-    }
+    GetModule();
+    
+    virtual ValueObject*
+    GetRoot ();
     
     virtual bool
     GetDeclaration (Declaration &decl);
@@ -729,15 +757,32 @@ public:
     GetName() const;
 
     virtual lldb::ValueObjectSP
-    GetChildAtIndex (uint32_t idx, bool can_create);
+    GetChildAtIndex (size_t idx, bool can_create);
 
+    // this will always create the children if necessary
+    lldb::ValueObjectSP
+    GetChildAtIndexPath (const std::initializer_list<size_t> &idxs,
+                         size_t* index_of_error = NULL);
+    
+    lldb::ValueObjectSP
+    GetChildAtIndexPath (const std::vector<size_t> &idxs,
+                         size_t* index_of_error = NULL);
+    
+    lldb::ValueObjectSP
+    GetChildAtIndexPath (const std::initializer_list< std::pair<size_t, bool> > &idxs,
+                         size_t* index_of_error = NULL);
+
+    lldb::ValueObjectSP
+    GetChildAtIndexPath (const std::vector< std::pair<size_t, bool> > &idxs,
+                         size_t* index_of_error = NULL);
+    
     virtual lldb::ValueObjectSP
     GetChildMemberWithName (const ConstString &name, bool can_create);
 
-    virtual uint32_t
+    virtual size_t
     GetIndexOfChildWithName (const ConstString &name);
 
-    uint32_t
+    size_t
     GetNumChildren ();
 
     const Value &
@@ -749,7 +794,7 @@ public:
     virtual bool
     ResolveValue (Scalar &scalar);
     
-    const char *
+    virtual const char *
     GetLocationAsCString ();
 
     const char *
@@ -788,10 +833,7 @@ public:
     UpdateValueIfNeeded (bool update_format = true);
     
     bool
-    UpdateValueIfNeeded (lldb::DynamicValueType use_dynamic, bool update_format = true);
-    
-    bool
-    UpdateFormatsIfNeeded(lldb::DynamicValueType use_dynamic = lldb::eNoDynamicValues);
+    UpdateFormatsIfNeeded();
 
     lldb::ValueObjectSP
     GetSP ()
@@ -813,20 +855,17 @@ public:
     GetSyntheticChild (const ConstString &key) const;
     
     lldb::ValueObjectSP
-    GetSyntheticArrayMember (int32_t index, bool can_create);
+    GetSyntheticArrayMember (size_t index, bool can_create);
 
     lldb::ValueObjectSP
-    GetSyntheticArrayMemberFromPointer (int32_t index, bool can_create);
+    GetSyntheticArrayMemberFromPointer (size_t index, bool can_create);
     
     lldb::ValueObjectSP
-    GetSyntheticArrayMemberFromArray (int32_t index, bool can_create);
+    GetSyntheticArrayMemberFromArray (size_t index, bool can_create);
     
     lldb::ValueObjectSP
     GetSyntheticBitFieldChild (uint32_t from, uint32_t to, bool can_create);
-    
-    lldb::ValueObjectSP
-    GetSyntheticArrayRangeChild (uint32_t from, uint32_t to, bool can_create);
-    
+
     lldb::ValueObjectSP
     GetSyntheticExpressionPathChild(const char* expression, bool can_create);
     
@@ -836,6 +875,9 @@ public:
     virtual lldb::ValueObjectSP
     GetDynamicValue (lldb::DynamicValueType valueType);
     
+    lldb::DynamicValueType
+    GetDynamicValueType ();
+    
     virtual lldb::ValueObjectSP
     GetStaticValue ();
     
@@ -910,6 +952,23 @@ public:
                      ValueObject *valobj,
                      const DumpValueObjectOptions& options);
 
+    static lldb::ValueObjectSP
+    CreateValueObjectFromExpression (const char* name,
+                                     const char* expression,
+                                     const ExecutionContext& exe_ctx);
+    
+    static lldb::ValueObjectSP
+    CreateValueObjectFromAddress (const char* name,
+                                  uint64_t address,
+                                  const ExecutionContext& exe_ctx,
+                                  ClangASTType type);
+    
+    static lldb::ValueObjectSP
+    CreateValueObjectFromData (const char* name,
+                               DataExtractor& data,
+                               const ExecutionContext& exe_ctx,
+                               ClangASTType type);
+    
     static void
     LogValueObject (Log *log,
                     ValueObject *valobj);
@@ -926,7 +985,7 @@ public:
     bool
     IsCStringContainer (bool check_pointer = false);
     
-    void
+    size_t
     ReadPointedString (Stream& s,
                        Error& error,
                        uint32_t max_length = 0,
@@ -938,8 +997,11 @@ public:
                     uint32_t item_idx = 0,
 					uint32_t item_count = 1);
     
-    virtual size_t
+    virtual uint64_t
     GetData (DataExtractor& data);
+    
+    virtual bool
+    SetData (DataExtractor &data, Error &error);
 
     bool
     GetIsConstant () const
@@ -954,12 +1016,7 @@ public:
     }
 
     lldb::Format
-    GetFormat () const
-    {
-        if (m_parent && m_format == lldb::eFormatDefault)
-            return m_parent->GetFormat();
-        return m_format;
-    }
+    GetFormat () const;
     
     void
     SetFormat (lldb::Format format)
@@ -972,7 +1029,7 @@ public:
     lldb::TypeSummaryImplSP
     GetSummaryFormat()
     {
-        UpdateFormatsIfNeeded(m_last_format_mgr_dynamic);
+        UpdateFormatsIfNeeded();
         return m_type_summary_sp;
     }
     
@@ -993,7 +1050,7 @@ public:
     lldb::TypeFormatImplSP
     GetValueFormat()
     {
-        UpdateFormatsIfNeeded(m_last_format_mgr_dynamic);
+        UpdateFormatsIfNeeded();
         return m_type_format_sp;
     }
     
@@ -1009,7 +1066,7 @@ public:
     lldb::SyntheticChildrenSP
     GetSyntheticChildren()
     {
-        UpdateFormatsIfNeeded(m_last_format_mgr_dynamic);
+        UpdateFormatsIfNeeded();
         return m_synthetic_children_sp;
     }
 
@@ -1038,16 +1095,33 @@ public:
     }
     
     AddressType
-    GetAddressTypeOfChildren()
+    GetAddressTypeOfChildren();
+    
+    void
+    SetHasCompleteType()
     {
-        if (m_address_type_of_ptr_or_ref_children == eAddressTypeInvalid)
-        {
-            if (m_parent)
-                return m_parent->GetAddressTypeOfChildren();
-        }
-        return m_address_type_of_ptr_or_ref_children;
+        m_did_calculate_complete_objc_class_type = true;
     }
     
+    //------------------------------------------------------------------
+    /// Find out if a ValueObject might have children.
+    ///
+    /// This call is much more efficient than CalculateNumChildren() as
+    /// it doesn't need to complete the underlying type. This is designed
+    /// to be used in a UI environment in order to detect if the
+    /// disclosure triangle should be displayed or not.
+    ///
+    /// This function returns true for class, union, structure,
+    /// pointers, references, arrays and more. Again, it does so without
+    /// doing any expensive type completion.
+    ///
+    /// @return
+    ///     Returns \b true if the ValueObject might have children, or \b
+    ///     false otherwise.
+    //------------------------------------------------------------------
+    virtual bool
+    MightHaveChildren();
+
 protected:
     typedef ClusterManager<ValueObject> ValueObjectManager;
     
@@ -1055,24 +1129,24 @@ protected:
     {
     public:
         ChildrenManager() :
-        m_mutex(Mutex::eMutexTypeRecursive),
-        m_children(),
-        m_children_count(0)
+            m_mutex(Mutex::eMutexTypeRecursive),
+            m_children(),
+            m_children_count(0)
         {}
         
         bool
-        HasChildAtIndex (uint32_t idx)
+        HasChildAtIndex (size_t idx)
         {
-            Mutex::Locker(m_mutex);
+            Mutex::Locker locker(m_mutex);
             ChildrenIterator iter = m_children.find(idx);
             ChildrenIterator end = m_children.end();
             return (iter != end);
         }
         
         ValueObject*
-        GetChildAtIndex (uint32_t idx)
+        GetChildAtIndex (size_t idx)
         {
-            Mutex::Locker(m_mutex);
+            Mutex::Locker locker(m_mutex);
             ChildrenIterator iter = m_children.find(idx);
             ChildrenIterator end = m_children.end();
             if (iter == end)
@@ -1082,20 +1156,20 @@ protected:
         }
         
         void
-        SetChildAtIndex (uint32_t idx, ValueObject* valobj)
+        SetChildAtIndex (size_t idx, ValueObject* valobj)
         {
             ChildrenPair pair(idx,valobj); // we do not need to be mutex-protected to make a pair
-            Mutex::Locker(m_mutex);
+            Mutex::Locker locker(m_mutex);
             m_children.insert(pair);
         }
         
         void
-        SetChildrenCount (uint32_t count)
+        SetChildrenCount (size_t count)
         {
             m_children_count = count;
         }
         
-        uint32_t
+        size_t
         GetChildrenCount ()
         {
             return m_children_count;
@@ -1105,23 +1179,24 @@ protected:
         Clear()
         {
             m_children_count = 0;
-            Mutex::Locker(m_mutex);
+            Mutex::Locker locker(m_mutex);
             m_children.clear();
         }
         
     private:
-        typedef std::map<uint32_t, ValueObject*> ChildrenMap;
+        typedef std::map<size_t, ValueObject*> ChildrenMap;
         typedef ChildrenMap::iterator ChildrenIterator;
         typedef ChildrenMap::value_type ChildrenPair;
         Mutex m_mutex;
         ChildrenMap m_children;
-        uint32_t m_children_count;
+        size_t m_children_count;
     };
 
     //------------------------------------------------------------------
     // Classes that inherit from ValueObject can see and modify these
     //------------------------------------------------------------------
     ValueObject  *      m_parent;       // The parent value object, or NULL if this has no parent
+    ValueObject  *      m_root;         // The root of the hierarchy for this ValueObject (or NULL if never calculated)
     EvaluationPoint     m_update_point; // Stores both the stop id and the full context at which this value was last 
                                         // updated.  When we are asked to update the value object, we check whether
                                         // the context & stop id are the same before updating.
@@ -1155,8 +1230,8 @@ protected:
                                              // as an independent ValueObjectConstResult, which isn't managed by us.
 
     lldb::Format                m_format;
+    lldb::Format                m_last_format;
     uint32_t                    m_last_format_mgr_revision;
-    lldb::DynamicValueType      m_last_format_mgr_dynamic;
     lldb::TypeSummaryImplSP     m_type_summary_sp;
     lldb::TypeFormatImplSP      m_type_format_sp;
     lldb::SyntheticChildrenSP   m_synthetic_children_sp;
@@ -1170,7 +1245,6 @@ protected:
                         m_is_deref_of_parent:1,
                         m_is_array_item_for_pointer:1,
                         m_is_bitfield_for_scalar:1,
-                        m_is_expression_path_child:1,
                         m_is_child_at_offset:1,
                         m_is_getting_summary:1,
                         m_did_calculate_complete_objc_class_type:1;
@@ -1211,20 +1285,32 @@ protected:
     virtual void
     CalculateDynamicValue (lldb::DynamicValueType use_dynamic);
     
+    virtual lldb::DynamicValueType
+    GetDynamicValueTypeImpl ()
+    {
+        return lldb::eNoDynamicValues;
+    }
+    
+    virtual bool
+    HasDynamicValueTypeInfo ()
+    {
+        return false;
+    }
+    
     virtual void
     CalculateSyntheticValue (bool use_synthetic = true);
     
     // Should only be called by ValueObject::GetChildAtIndex()
     // Returns a ValueObject managed by this ValueObject's manager.
     virtual ValueObject *
-    CreateChildAtIndex (uint32_t idx, bool synthetic_array_member, int32_t synthetic_index);
+    CreateChildAtIndex (size_t idx, bool synthetic_array_member, int32_t synthetic_index);
 
     // Should only be called by ValueObject::GetNumChildren()
-    virtual uint32_t
+    virtual size_t
     CalculateNumChildren() = 0;
 
     void
-    SetNumChildren (uint32_t num_children);
+    SetNumChildren (size_t num_children);
 
     void
     SetValueDidChange (bool value_changed);
@@ -1242,6 +1328,9 @@ protected:
     DataExtractor &
     GetDataExtractor ();
     
+    void
+    ClearDynamicTypeInformation ();
+    
     //------------------------------------------------------------------
     // Sublasses must implement the functions below.
     //------------------------------------------------------------------
@@ -1252,6 +1341,10 @@ protected:
     virtual lldb::clang_type_t
     GetClangTypeImpl () = 0;
     
+    const char *
+    GetLocationAsCStringImpl (const Value& value,
+                              const DataExtractor& data);
+    
 private:
     //------------------------------------------------------------------
     // For ValueObject only

Modified: lldb/branches/lldb-platform-work/include/lldb/Core/ValueObjectChild.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Core/ValueObjectChild.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Core/ValueObjectChild.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Core/ValueObjectChild.h Thu Jun  6 19:06:43 2013
@@ -26,7 +26,7 @@ class ValueObjectChild : public ValueObj
 public:
     virtual ~ValueObjectChild();
 
-    virtual size_t
+    virtual uint64_t
     GetByteSize()
     {
         return m_byte_size;
@@ -53,7 +53,7 @@ public:
     virtual lldb::ValueType
     GetValueType() const;
 
-    virtual uint32_t
+    virtual size_t
     CalculateNumChildren();
 
     virtual ConstString
@@ -96,7 +96,7 @@ protected:
     clang::ASTContext *m_clang_ast; // The clang AST that the clang type comes from
     void *m_clang_type; // The type of the child in question within the parent (m_parent_sp)
     ConstString m_type_name;
-    uint32_t m_byte_size;
+    uint64_t m_byte_size;
     int32_t m_byte_offset;
     uint8_t m_bitfield_bit_size;
     uint8_t m_bitfield_bit_offset;
@@ -114,7 +114,7 @@ protected:
                       clang::ASTContext *clang_ast,
                       void *clang_type,
                       const ConstString &name,
-                      uint32_t byte_size,
+                      uint64_t byte_size,
                       int32_t byte_offset,
                       uint32_t bitfield_bit_size,
                       uint32_t bitfield_bit_offset,

Modified: lldb/branches/lldb-platform-work/include/lldb/Core/ValueObjectConstResult.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Core/ValueObjectConstResult.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Core/ValueObjectConstResult.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Core/ValueObjectConstResult.h Thu Jun  6 19:06:43 2013
@@ -47,7 +47,7 @@ public:
             const ConstString &name,
             const lldb::DataBufferSP &result_data_sp,
             lldb::ByteOrder byte_order, 
-            uint8_t addr_size,
+            uint32_t addr_size,
             lldb::addr_t address = LLDB_INVALID_ADDRESS);
 
     static lldb::ValueObjectSP
@@ -57,7 +57,7 @@ public:
             const ConstString &name,
             lldb::addr_t address,
             AddressType address_type,
-            uint8_t addr_byte_size);
+            uint32_t addr_byte_size);
 
     static lldb::ValueObjectSP
     Create (ExecutionContextScope *exe_scope,
@@ -72,13 +72,13 @@ public:
 
     virtual ~ValueObjectConstResult();
 
-    virtual size_t
+    virtual uint64_t
     GetByteSize();
 
     virtual lldb::ValueType
     GetValueType() const;
 
-    virtual uint32_t
+    virtual size_t
     CalculateNumChildren();
 
     virtual ConstString
@@ -101,7 +101,7 @@ public:
     Dereference (Error &error);
     
     virtual ValueObject *
-    CreateChildAtIndex (uint32_t idx, bool synthetic_array_member, int32_t synthetic_index);
+    CreateChildAtIndex (size_t idx, bool synthetic_array_member, int32_t synthetic_index);
     
     virtual lldb::ValueObjectSP
     GetSyntheticChildAtOffset(uint32_t offset, const ClangASTType& type, bool can_create);
@@ -147,7 +147,7 @@ protected:
 
     clang::ASTContext *m_clang_ast; // The clang AST that the clang type comes from
     ConstString m_type_name;
-    uint32_t m_byte_size;
+    uint64_t m_byte_size;
     
     ValueObjectConstResultImpl m_impl;
 
@@ -171,7 +171,7 @@ private:
                             const ConstString &name,
                             const lldb::DataBufferSP &result_data_sp,
                             lldb::ByteOrder byte_order, 
-                            uint8_t addr_size,
+                            uint32_t addr_size,
                             lldb::addr_t address);
 
     ValueObjectConstResult (ExecutionContextScope *exe_scope,
@@ -180,7 +180,7 @@ private:
                             const ConstString &name,
                             lldb::addr_t address,
                             AddressType address_type,
-                            uint8_t addr_byte_size);
+                            uint32_t addr_byte_size);
 
     ValueObjectConstResult (ExecutionContextScope *exe_scope,
                             clang::ASTContext *clang_ast,

Modified: lldb/branches/lldb-platform-work/include/lldb/Core/ValueObjectConstResultChild.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Core/ValueObjectConstResultChild.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Core/ValueObjectConstResultChild.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Core/ValueObjectConstResultChild.h Thu Jun  6 19:06:43 2013
@@ -43,7 +43,7 @@ public:
     Dereference (Error &error);
     
     virtual ValueObject *
-    CreateChildAtIndex (uint32_t idx, bool synthetic_array_member, int32_t synthetic_index);
+    CreateChildAtIndex (size_t idx, bool synthetic_array_member, int32_t synthetic_index);
 
     virtual lldb::clang_type_t
     GetClangType ()

Modified: lldb/branches/lldb-platform-work/include/lldb/Core/ValueObjectConstResultImpl.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Core/ValueObjectConstResultImpl.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Core/ValueObjectConstResultImpl.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Core/ValueObjectConstResultImpl.h Thu Jun  6 19:06:43 2013
@@ -39,7 +39,7 @@ public:
     Dereference (Error &error);
     
     ValueObject *
-    CreateChildAtIndex (uint32_t idx, bool synthetic_array_member, int32_t synthetic_index);
+    CreateChildAtIndex (size_t idx, bool synthetic_array_member, int32_t synthetic_index);
     
     lldb::ValueObjectSP
     GetSyntheticChildAtOffset (uint32_t offset, const ClangASTType& type, bool can_create);

Modified: lldb/branches/lldb-platform-work/include/lldb/Core/ValueObjectDynamicValue.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Core/ValueObjectDynamicValue.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Core/ValueObjectDynamicValue.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Core/ValueObjectDynamicValue.h Thu Jun  6 19:06:43 2013
@@ -15,86 +15,10 @@
 // Other libraries and framework includes
 // Project includes
 #include "lldb/Core/ValueObject.h"
-#include "lldb/Symbol/ClangASTType.h"
+#include "lldb/Symbol/Type.h"
 
 namespace lldb_private {
 
-    class ValueObjectCast : public ValueObject
-    {
-    public:
-        static lldb::ValueObjectSP
-        Create (ValueObject &parent, 
-                const ConstString &name, 
-                const ClangASTType &cast_type);
-
-        virtual
-        ~ValueObjectCast();
-        
-        virtual size_t
-        GetByteSize();
-        
-        virtual uint32_t
-        CalculateNumChildren();
-        
-        virtual lldb::ValueType
-        GetValueType() const;
-        
-        virtual bool
-        IsInScope ();
-        
-        virtual bool
-        IsDynamic ()
-        {
-            return true;
-        }
-        
-        virtual ValueObject *
-        GetParent()
-        {
-            if (m_parent)
-                return m_parent->GetParent();
-            else
-                return NULL;
-        }
-        
-        virtual const ValueObject *
-        GetParent() const
-        {
-            if (m_parent)
-                return m_parent->GetParent();
-            else
-                return NULL;
-        }
-        
-        virtual lldb::ValueObjectSP
-        GetStaticValue ()
-        {
-            return m_parent->GetSP();
-        }
-        
-    protected:
-        virtual bool
-        UpdateValue ();
-        
-        virtual clang::ASTContext *
-        GetClangASTImpl ();
-        
-        virtual lldb::clang_type_t
-        GetClangTypeImpl ();
-        
-        ClangASTType m_cast_type;
-        
-    private:
-        ValueObjectCast (ValueObject &parent, 
-                         const ConstString &name, 
-                         const ClangASTType &cast_type);
-        
-        //------------------------------------------------------------------
-        // For ValueObject only
-        //------------------------------------------------------------------
-        DISALLOW_COPY_AND_ASSIGN (ValueObjectCast);
-    };
-
 //----------------------------------------------------------------------
 // A ValueObject that represents memory at a given address, viewed as some 
 // set lldb type.
@@ -105,13 +29,16 @@ public:
     virtual
     ~ValueObjectDynamicValue();
 
-    virtual size_t
+    virtual uint64_t
     GetByteSize();
 
     virtual ConstString
     GetTypeName();
 
-    virtual uint32_t
+    virtual ConstString
+    GetQualifiedTypeName();
+    
+    virtual size_t
     CalculateNumChildren();
 
     virtual lldb::ValueType
@@ -163,10 +90,25 @@ public:
     virtual bool
     SetValueFromCString (const char *value_str, Error& error);
     
+    virtual bool
+    SetData (DataExtractor &data, Error &error);
+    
 protected:
     virtual bool
     UpdateValue ();
     
+    virtual lldb::DynamicValueType
+    GetDynamicValueTypeImpl ()
+    {
+        return m_use_dynamic;
+    }
+    
+    virtual bool
+    HasDynamicValueTypeInfo ()
+    {
+        return true;
+    }
+    
     virtual clang::ASTContext *
     GetClangASTImpl ();
     
@@ -174,7 +116,7 @@ protected:
     GetClangTypeImpl ();
 
     Address  m_address;  ///< The variable that this value object is based upon
-    lldb::TypeSP m_type_sp;
+    TypeAndOrName m_dynamic_type_info; // We can have a type_sp or just a name
     lldb::ValueObjectSP m_owning_valobj_sp;
     lldb::DynamicValueType m_use_dynamic;
 

Modified: lldb/branches/lldb-platform-work/include/lldb/Core/ValueObjectList.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Core/ValueObjectList.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Core/ValueObjectList.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Core/ValueObjectList.h Thu Jun  6 19:06:43 2013
@@ -50,20 +50,20 @@ public:
     lldb::ValueObjectSP
     FindValueObjectByPointer (ValueObject *valobj);
 
-    uint32_t
+    size_t
     GetSize () const;
     
     void
-    Resize (uint32_t size);
+    Resize (size_t size);
 
     lldb::ValueObjectSP
-    GetValueObjectAtIndex (uint32_t idx);
+    GetValueObjectAtIndex (size_t idx);
 
     lldb::ValueObjectSP
-    RemoveValueObjectAtIndex (uint32_t idx);
+    RemoveValueObjectAtIndex (size_t idx);
     
     void
-    SetValueObjectAtIndex (uint32_t idx, 
+    SetValueObjectAtIndex (size_t idx, 
                            const lldb::ValueObjectSP &valobj_sp);
     
     lldb::ValueObjectSP

Modified: lldb/branches/lldb-platform-work/include/lldb/Core/ValueObjectMemory.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Core/ValueObjectMemory.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Core/ValueObjectMemory.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Core/ValueObjectMemory.h Thu Jun  6 19:06:43 2013
@@ -41,13 +41,13 @@ public:
     virtual
     ~ValueObjectMemory();
 
-    virtual size_t
+    virtual uint64_t
     GetByteSize();
 
     virtual ConstString
     GetTypeName();
 
-    virtual uint32_t
+    virtual size_t
     CalculateNumChildren();
 
     virtual lldb::ValueType

Modified: lldb/branches/lldb-platform-work/include/lldb/Core/ValueObjectRegister.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Core/ValueObjectRegister.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Core/ValueObjectRegister.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Core/ValueObjectRegister.h Thu Jun  6 19:06:43 2013
@@ -31,7 +31,7 @@ public:
     virtual
     ~ValueObjectRegisterContext();
 
-    virtual size_t
+    virtual uint64_t
     GetByteSize();
 
     virtual lldb::ValueType
@@ -46,11 +46,11 @@ public:
     virtual ConstString
     GetQualifiedTypeName();
 
-    virtual uint32_t
+    virtual size_t
     CalculateNumChildren();
 
     virtual ValueObject *
-    CreateChildAtIndex (uint32_t idx, bool synthetic_array_member, int32_t synthetic_index);
+    CreateChildAtIndex (size_t idx, bool synthetic_array_member, int32_t synthetic_index);
 
 protected:
     virtual bool
@@ -81,7 +81,7 @@ public:
     virtual
     ~ValueObjectRegisterSet();
 
-    virtual size_t
+    virtual uint64_t
     GetByteSize();
 
     virtual lldb::ValueType
@@ -96,16 +96,16 @@ public:
     virtual ConstString
     GetQualifiedTypeName();
 
-    virtual uint32_t
+    virtual size_t
     CalculateNumChildren();
 
     virtual ValueObject *
-    CreateChildAtIndex (uint32_t idx, bool synthetic_array_member, int32_t synthetic_index);
+    CreateChildAtIndex (size_t idx, bool synthetic_array_member, int32_t synthetic_index);
     
     virtual lldb::ValueObjectSP
     GetChildMemberWithName (const ConstString &name, bool can_create);
 
-    virtual uint32_t
+    virtual size_t
     GetIndexOfChildWithName (const ConstString &name);
 
 
@@ -142,7 +142,7 @@ public:
     virtual
     ~ValueObjectRegister();
 
-    virtual size_t
+    virtual uint64_t
     GetByteSize();
 
     virtual lldb::ValueType
@@ -154,14 +154,20 @@ public:
     virtual ConstString
     GetTypeName();
 
-    virtual uint32_t
+    virtual size_t
     CalculateNumChildren();
     
     virtual bool
     SetValueFromCString (const char *value_str, Error& error);
+    
+    virtual bool
+    SetData (DataExtractor &data, Error &error);
 
     virtual bool
     ResolveValue (Scalar &scalar);
+    
+    virtual void
+    GetExpressionPath (Stream &s, bool qualify_cxx_base_classes, GetExpressionPathFormat epformat = eGetExpressionPathFormatDereferencePointers);
 
 protected:
     virtual bool

Modified: lldb/branches/lldb-platform-work/include/lldb/Core/ValueObjectSyntheticFilter.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Core/ValueObjectSyntheticFilter.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Core/ValueObjectSyntheticFilter.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Core/ValueObjectSyntheticFilter.h Thu Jun  6 19:06:43 2013
@@ -33,27 +33,36 @@ public:
     virtual
     ~ValueObjectSynthetic();
 
-    virtual size_t
+    virtual uint64_t
     GetByteSize();
     
     virtual ConstString
     GetTypeName();
+    
+    virtual ConstString
+    GetQualifiedTypeName();
+
+    virtual bool
+    MightHaveChildren();
 
-    virtual uint32_t
+    virtual size_t
     CalculateNumChildren();
 
     virtual lldb::ValueType
     GetValueType() const;
     
     virtual lldb::ValueObjectSP
-    GetChildAtIndex (uint32_t idx, bool can_create);
+    GetChildAtIndex (size_t idx, bool can_create);
     
     virtual lldb::ValueObjectSP
     GetChildMemberWithName (const ConstString &name, bool can_create);
     
-    virtual uint32_t
+    virtual size_t
     GetIndexOfChildWithName (const ConstString &name);
 
+    virtual lldb::ValueObjectSP
+    GetDynamicValue (lldb::DynamicValueType valueType);
+    
     virtual bool
     IsInScope ();
     
@@ -80,6 +89,24 @@ public:
             return false;
     }
     
+    virtual lldb::ValueObjectSP
+    GetStaticValue ()
+    {
+        if (m_parent)
+            return m_parent->GetStaticValue();
+        else
+            return GetSP();
+    }
+    
+    virtual lldb::DynamicValueType
+    GetDynamicValueType ()
+    {
+        if (m_parent)
+            return m_parent->GetDynamicValueType();
+        else
+            return lldb::eNoDynamicValues;
+    }
+
     virtual ValueObject *
     GetParent()
     {
@@ -101,6 +128,14 @@ public:
     virtual lldb::ValueObjectSP
     GetNonSyntheticValue ();
     
+    virtual bool
+    ResolveValue (Scalar &scalar)
+    {
+        if (m_parent)
+            return m_parent->ResolveValue(scalar);
+        return false;
+    }
+    
 protected:
     virtual bool
     UpdateValue ();
@@ -110,10 +145,13 @@ protected:
     
     virtual lldb::clang_type_t
     GetClangTypeImpl ();
+    
+    virtual void
+    CreateSynthFilter ();
 
     // we need to hold on to the SyntheticChildren because someone might delete the type binding while we are alive
     lldb::SyntheticChildrenSP m_synth_sp;
-    std::auto_ptr<SyntheticChildrenFrontEnd> m_synth_filter_ap;
+    std::unique_ptr<SyntheticChildrenFrontEnd> m_synth_filter_ap;
     
     typedef std::map<uint32_t, ValueObject*> ByIndexMap;
     typedef std::map<const char*, uint32_t> NameToIndexMap;
@@ -124,11 +162,18 @@ protected:
     ByIndexMap      m_children_byindex;
     NameToIndexMap  m_name_toindex;
     uint32_t        m_synthetic_children_count; // FIXME use the ValueObject's ChildrenManager instead of a special purpose solution
+    
+    ConstString     m_parent_type_name;
 
+    LazyBool        m_might_have_children;
+    
 private:
     friend class ValueObject;
     ValueObjectSynthetic (ValueObject &parent, lldb::SyntheticChildrenSP filter);
     
+    void
+    CopyParentData ();
+    
     //------------------------------------------------------------------
     // For ValueObject only
     //------------------------------------------------------------------

Modified: lldb/branches/lldb-platform-work/include/lldb/Core/ValueObjectVariable.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Core/ValueObjectVariable.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Core/ValueObjectVariable.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Core/ValueObjectVariable.h Thu Jun  6 19:06:43 2013
@@ -31,7 +31,7 @@ public:
     virtual
     ~ValueObjectVariable();
 
-    virtual size_t
+    virtual uint64_t
     GetByteSize();
 
     virtual ConstString
@@ -40,7 +40,7 @@ public:
     virtual ConstString
     GetQualifiedTypeName();
 
-    virtual uint32_t
+    virtual size_t
     CalculateNumChildren();
 
     virtual lldb::ValueType
@@ -57,7 +57,16 @@ public:
 
     virtual bool
     GetDeclaration (Declaration &decl);
+    
+    virtual const char *
+    GetLocationAsCString ();
+    
+    virtual bool
+    SetValueFromCString (const char *value_str, Error& error);
 
+    virtual bool
+    SetData (DataExtractor &data, Error &error);
+    
 protected:
     virtual bool
     UpdateValue ();
@@ -69,6 +78,7 @@ protected:
     GetClangTypeImpl ();
 
     lldb::VariableSP  m_variable_sp;  ///< The variable that this value object is based upon
+    Value m_resolved_value;           ///< The value that DWARFExpression resolves this variable to before we patch it up
 
 private:
     ValueObjectVariable (ExecutionContextScope *exe_scope, const lldb::VariableSP &var_sp);

Modified: lldb/branches/lldb-platform-work/include/lldb/Core/cxa_demangle.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Core/cxa_demangle.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Core/cxa_demangle.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Core/cxa_demangle.h Thu Jun  6 19:06:43 2013
@@ -10,6 +10,8 @@
 #ifndef _CXA_DEMANGLE_H
 #define _CXA_DEMANGLE_H
 
+// FreeBSD9-STABLE fix (define size_t before including cxxabi.h)
+#include <cstdlib>
 #include <cxxabi.h>
 
 #pragma GCC visibility push(hidden)

Modified: lldb/branches/lldb-platform-work/include/lldb/Core/dwarf.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Core/dwarf.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Core/dwarf.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Core/dwarf.h Thu Jun  6 19:06:43 2013
@@ -34,7 +34,6 @@ typedef uint32_t    dw_offset_t;    // D
 #endif
 
 /* Constants */
-#define DW_INVALID_ADDRESS                  (~(dw_addr_t)0)
 #define DW_INVALID_OFFSET                   (~(dw_offset_t)0)
 #define DW_INVALID_INDEX                    0xFFFFFFFFul
 

Modified: lldb/branches/lldb-platform-work/include/lldb/Expression/ASTDumper.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Expression/ASTDumper.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Expression/ASTDumper.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Expression/ASTDumper.h Thu Jun  6 19:06:43 2013
@@ -31,7 +31,7 @@ public:
     
     const char *GetCString();
     void ToSTDERR();
-    void ToLog(lldb::LogSP &log, const char *prefix);
+    void ToLog(Log *log, const char *prefix);
     void ToStream(lldb::StreamSP &stream);
 private:
     std::string m_dump;

Modified: lldb/branches/lldb-platform-work/include/lldb/Expression/ClangASTSource.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Expression/ClangASTSource.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Expression/ClangASTSource.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Expression/ClangASTSource.h Thu Jun  6 19:06:43 2013
@@ -17,6 +17,8 @@
 #include "lldb/Symbol/ClangASTImporter.h"
 #include "lldb/Target/Target.h"
 
+#include "llvm/ADT/SmallSet.h"
+
 namespace lldb_private {
     
 //----------------------------------------------------------------------
@@ -98,7 +100,7 @@ public:
     /// @return
     ///     Whatever SetExternalVisibleDeclsForName returns.
     //------------------------------------------------------------------
-    clang::DeclContextLookupResult 
+    bool
     FindExternalVisibleDeclsByName (const clang::DeclContext *DC,
                                     clang::DeclarationName Name);
     
@@ -248,7 +250,7 @@ public:
         {
         }
         
-        clang::DeclContextLookupResult 
+        bool
         FindExternalVisibleDeclsByName (const clang::DeclContext *DC,
                                         clang::DeclarationName Name)
         {
@@ -296,17 +298,20 @@ public:
             return m_original.StartTranslationUnit(Consumer);
         }
         
-        uint64_t GetMetadata(uintptr_t object)
+        ClangASTMetadata *
+        GetMetadata(const void * object)
         {
             return m_original.GetMetadata(object);
         }
         
-        void SetMetadata(uintptr_t object, uint64_t metadata)
+        void
+        SetMetadata(const void * object, ClangASTMetadata &metadata)
         {
             return m_original.SetMetadata(object, metadata);
         }
         
-        bool HasMetadata(uintptr_t object)
+        bool
+        HasMetadata(const void * object)
         {
             return m_original.HasMetadata(object);
         }
@@ -321,6 +326,20 @@ public:
     
 protected:
     //------------------------------------------------------------------
+    /// Look for the complete version of an Objective-C interface, and
+    /// return it if found.
+    ///
+    /// @param[in] interface_decl
+    ///     An ObjCInterfaceDecl that may not be the complete one.
+    ///
+    /// @return
+    ///     NULL if the complete interface couldn't be found;
+    ///     the complete interface otherwise.
+    //------------------------------------------------------------------
+    clang::ObjCInterfaceDecl *
+    GetCompleteObjCInterface (clang::ObjCInterfaceDecl *interface_decl);
+    
+    //------------------------------------------------------------------
     /// Find all entities matching a given name in a given module,
     /// using a NameSearchContext to make Decls for them.
     ///
@@ -410,11 +429,12 @@ protected:
 /// Decls given appropriate type information.
 //----------------------------------------------------------------------
 struct NameSearchContext {
-    ClangASTSource &m_ast_source;                       ///< The AST source making the request
-    llvm::SmallVectorImpl<clang::NamedDecl*> &m_decls;  ///< The list of declarations already constructed
-    ClangASTImporter::NamespaceMapSP m_namespace_map;   ///< The mapping of all namespaces found for this request back to their modules
-    const clang::DeclarationName &m_decl_name;          ///< The name being looked for
-    const clang::DeclContext *m_decl_context;           ///< The DeclContext to put declarations into
+    ClangASTSource &m_ast_source;                               ///< The AST source making the request
+    llvm::SmallVectorImpl<clang::NamedDecl*> &m_decls;          ///< The list of declarations already constructed
+    ClangASTImporter::NamespaceMapSP m_namespace_map;           ///< The mapping of all namespaces found for this request back to their modules
+    const clang::DeclarationName &m_decl_name;                  ///< The name being looked for
+    const clang::DeclContext *m_decl_context;                   ///< The DeclContext to put declarations into
+    llvm::SmallSet <lldb::clang_type_t, 5> m_function_types;    ///< All the types of functions that have been reported, so we don't report conflicts
     
     struct {
         bool variable                   : 1;

Modified: lldb/branches/lldb-platform-work/include/lldb/Expression/ClangExpression.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Expression/ClangExpression.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Expression/ClangExpression.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Expression/ClangExpression.h Thu Jun  6 19:06:43 2013
@@ -14,7 +14,6 @@
 // C++ Includes
 #include <string>
 #include <map>
-#include <memory>
 #include <vector>
 
 // Other libraries and framework includes
@@ -47,8 +46,7 @@ public:
     };
     
     ClangExpression () :
-        m_jit_process_sp(),
-        m_jit_alloc (LLDB_INVALID_ADDRESS),
+        m_jit_process_wp(),
         m_jit_start_addr (LLDB_INVALID_ADDRESS),
         m_jit_end_addr (LLDB_INVALID_ADDRESS)
     {
@@ -59,7 +57,6 @@ public:
     //------------------------------------------------------------------
     virtual ~ClangExpression ()
     {
-        DeallocateJITFunction ();
     }
     
     //------------------------------------------------------------------
@@ -95,13 +92,6 @@ public:
     DeclMap () = 0;
     
     //------------------------------------------------------------------
-    /// Return the object that the parser should use when registering
-    /// local variables.  May be NULL if the Expression doesn't care.
-    //------------------------------------------------------------------
-    virtual ClangExpressionVariableList *
-    LocalVariables () = 0;
-    
-    //------------------------------------------------------------------
     /// Return the object that the parser should allow to access ASTs.
     /// May be NULL if the ASTs do not need to be transformed.
     ///
@@ -140,20 +130,6 @@ public:
     virtual bool
     NeedsVariableResolution () = 0;
 
-    void
-    DeallocateJITFunction ()
-    {
-        if (m_jit_process_sp && m_jit_alloc != LLDB_INVALID_ADDRESS)
-        {
-            m_jit_process_sp->DeallocateMemory (m_jit_alloc);
-            // If this process is ever used for anything else, we can not clear it 
-            // here. For now it is only used in order to deallocate any code if
-            // m_jit_alloc is a valid address.
-            m_jit_process_sp.reset(); 
-            m_jit_alloc = LLDB_INVALID_ADDRESS;
-        }
-    }
-
     //------------------------------------------------------------------
     /// Return the address of the function's JIT-compiled code, or
     /// LLDB_INVALID_ADDRESS if the function is not JIT compiled
@@ -166,8 +142,7 @@ public:
 
 protected:
 
-    lldb::ProcessSP m_jit_process_sp;
-    lldb::addr_t    m_jit_alloc;            ///< The address of the block containing JITted code.  LLDB_INVALID_ADDRESS if invalid.
+    lldb::ProcessWP m_jit_process_wp;
     lldb::addr_t    m_jit_start_addr;       ///< The address of the JITted function within the JIT allocation.  LLDB_INVALID_ADDRESS if invalid.
     lldb::addr_t    m_jit_end_addr;         ///< The address of the JITted function within the JIT allocation.  LLDB_INVALID_ADDRESS if invalid.
 

Modified: lldb/branches/lldb-platform-work/include/lldb/Expression/ClangExpressionDeclMap.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Expression/ClangExpressionDeclMap.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Expression/ClangExpressionDeclMap.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Expression/ClangExpressionDeclMap.h Thu Jun  6 19:06:43 2013
@@ -27,6 +27,7 @@
 #include "lldb/Core/Value.h"
 #include "lldb/Expression/ClangASTSource.h"
 #include "lldb/Expression/ClangExpressionVariable.h"
+#include "lldb/Expression/Materializer.h"
 #include "lldb/Symbol/TaggedASTType.h"
 #include "lldb/Symbol/SymbolContext.h"
 #include "lldb/Target/ExecutionContext.h"
@@ -69,6 +70,9 @@ public:
     ///     If true, inhibits the normal deallocation of the memory for
     ///     the result persistent variable, and instead marks the variable
     ///     as persisting.
+    ///
+    /// @param[in] exe_ctx
+    ///     The execution context to use when parsing.
     //------------------------------------------------------------------
     ClangExpressionDeclMap (bool keep_result_in_memory,
                             ExecutionContext &exe_ctx);
@@ -85,11 +89,16 @@ public:
     ///     The execution context to use when finding types for variables.
     ///     Also used to find a "scratch" AST context to store result types.
     ///
+    /// @param[in] materializer
+    ///     If non-NULL, the materializer to populate with information about
+    ///     the variables to use
+    ///
     /// @return
     ///     True if parsing is possible; false if it is unsafe to continue.
     //------------------------------------------------------------------
     bool
-    WillParse (ExecutionContext &exe_ctx);
+    WillParse (ExecutionContext &exe_ctx,
+               Materializer *materializer);
     
     //------------------------------------------------------------------
     /// [Used by ClangExpressionParser] For each variable that had an unknown
@@ -108,60 +117,6 @@ public:
     DidParse ();
     
     //------------------------------------------------------------------
-    /// [Used by IRForTarget] Get a new result variable name of the form
-    ///     $n, where n is a natural number starting with 0.
-    ///
-    /// @param[in] name
-    ///     The std::string to place the name into.
-    //------------------------------------------------------------------
-    const ConstString &
-    GetPersistentResultName ();
-
-    //------------------------------------------------------------------
-    /// [Used by IRForTarget] Get a constant variable given a name,
-    ///     a type, and an llvm::APInt.
-    ///
-    /// @param[in] name
-    ///     The name of the variable
-    ///
-    /// @param[in] type
-    ///     The type of the variable, which will be imported into the
-    ///     target's AST context
-    ///
-    /// @param[in] value
-    ///     The value of the variable
-    ///
-    /// @return
-    ///     The created variable
-    //------------------------------------------------------------------
-    lldb::ClangExpressionVariableSP
-    BuildIntegerVariable (const ConstString &name,
-                          lldb_private::TypeFromParser type,
-                          const llvm::APInt& value);
-    
-    //------------------------------------------------------------------
-    /// [Used by IRForTarget] Cast an existing variable given a Decl and
-    ///     a type.
-    ///
-    /// @param[in] name
-    ///     The name of the new variable
-    ///
-    /// @param[in] decl
-    ///     The Clang variable declaration for the original variable,
-    ///     which must be looked up in the map
-    ///
-    /// @param[in] type
-    ///     The desired type of the variable after casting
-    ///
-    /// @return
-    ///     The created variable
-    //------------------------------------------------------------------
-    lldb::ClangExpressionVariableSP
-    BuildCastVariable (const ConstString &name,
-                       clang::VarDecl *decl,
-                       lldb_private::TypeFromParser type);
-    
-    //------------------------------------------------------------------
     /// [Used by IRForTarget] Add a variable to the list of persistent
     ///     variables for the process.
     ///
@@ -328,6 +283,11 @@ public:
     ///     The target to find the symbol in.  If not provided,
     ///     then the current parsing context's Target.
     ///
+    /// @param[in] process
+    ///     The process to use.  For Objective-C symbols, the process's
+    ///     Objective-C language runtime may be queried if the process
+    ///     is non-NULL.
+    ///
     /// @param[in] name
     ///     The name of the symbol.  
     ///
@@ -336,6 +296,7 @@ public:
     //------------------------------------------------------------------
     lldb::addr_t 
     GetSymbolAddress (Target &target,
+                      Process *process,
                       const ConstString &name,
                       lldb::SymbolType symbol_type);
     
@@ -376,239 +337,6 @@ public:
     TargetInfo GetTargetInfo();
     
     //------------------------------------------------------------------
-    /// [Used by IRInterpreter] Promote an unknown address to a
-    ///     LoadAddress or FileAddress depending on the presence of a
-    ///     process.
-    ///
-    /// @param[in] addr
-    ///     The address to promote.
-    ///
-    /// @return
-    ///     The wrapped entity.
-    //------------------------------------------------------------------
-    lldb_private::Value WrapBareAddress (lldb::addr_t addr);
-    
-    //------------------------------------------------------------------
-    /// [Used by IRInterpreter] Write to the target.
-    ///
-    /// @param[in] value
-    ///     The address to write to.
-    ///
-    /// @param[in] addr
-    ///     The address of the data buffer to read from.
-    ///
-    /// @param[in] length
-    ///     The amount of data to write, in bytes.
-    ///
-    /// @return
-    ///     True if the write could be performed; false otherwise.
-    //------------------------------------------------------------------
-    bool
-    WriteTarget (lldb_private::Value &value,
-                 const uint8_t *data,
-                 size_t length);
-    
-    //------------------------------------------------------------------
-    /// [Used by IRInterpreter] Read from the target.
-    ///
-    /// @param[in] data
-    ///     The address of the data buffer to write to.
-    ///
-    /// @param[in] value
-    ///     The address to read from.
-    ///
-    /// @param[in] length
-    ///     The amount of data to read, in bytes.
-    ///
-    /// @return
-    ///     True if the read could be performed; false otherwise.
-    //------------------------------------------------------------------
-    bool
-    ReadTarget (uint8_t *data,
-                lldb_private::Value &value,
-                size_t length);
-
-    //------------------------------------------------------------------
-    /// [Used by IRInterpreter] Get the Value for a NamedDecl.
-    ///
-    /// @param[in] decl
-    ///     The Decl whose value is to be found.
-    ///
-    /// @param[out] flags
-    ///     The flags for the found variable.
-    ///
-    /// @return
-    ///     The value, or NULL.
-    //------------------------------------------------------------------
-    lldb_private::Value
-    LookupDecl (clang::NamedDecl *decl,
-                ClangExpressionVariable::FlagType &flags);
-    
-    //------------------------------------------------------------------
-    /// [Used by IRInterpreter] Get the Value for "this", "self", or
-    ///   "_cmd".
-    ///
-    /// @param[in] name
-    ///     The name of the entity to be found.
-    ///
-    /// @return
-    ///     The value, or NULL.
-    //------------------------------------------------------------------
-    lldb_private::Value
-    GetSpecialValue (const ConstString &name);
-    
-    //------------------------------------------------------------------
-    /// [Used by IRInterpreter] Returns true if the result is a
-    ///   reference to data in the target, meaning it must be
-    ///   dereferenced once more to get its data.
-    ///
-    /// @param[in] name
-    ///     The name of the result.
-    ///
-    /// @return
-    ///     True if the result is a reference; false otherwise (or on
-    ///     error).
-    //------------------------------------------------------------------
-    bool
-    ResultIsReference (const ConstString &name);
-    
-    //------------------------------------------------------------------
-    /// [Used by IRInterpreter] Find the result persistent variable,
-    ///   propagate the given value to it, and return it.
-    ///
-    /// @param[out] valobj
-    ///     Set to the complete object.
-    ///
-    /// @param[in] value
-    ///     A value indicating the location of the value's contents.
-    ///
-    /// @param[in] name
-    ///     The name of the result.
-    ///
-    /// @param[in] type
-    ///     The type of the data.
-    ///
-    /// @param[in] transient
-    ///     True if the data should be treated as disappearing after the
-    ///     expression completes.  In that case, it gets no live data.
-    ///
-    /// @param[in] maybe_make_load
-    ///     True if the value is a file address but should be potentially
-    ///     upgraded to a load address if a target is presence.
-    ///
-    /// @return
-    ///     True on success; false otherwise.
-    //------------------------------------------------------------------
-    bool
-    CompleteResultVariable (lldb::ClangExpressionVariableSP &valobj, 
-                            lldb_private::Value &value,
-                            const ConstString &name,
-                            lldb_private::TypeFromParser type,
-                            bool transient,
-                            bool maybe_make_load);
-    
-    
-    void
-    RemoveResultVariable (const ConstString &name);
-    
-    //------------------------------------------------------------------
-    /// [Used by CommandObjectExpression] Materialize the entire struct
-    /// at a given address, which should be aligned as specified by 
-    /// GetStructInfo().
-    ///
-    /// @param[in] struct_address
-    ///     The address at which the struct should be written.
-    ///
-    /// @param[in] error
-    ///     An Error to populate with any messages related to
-    ///     materializing the struct.
-    ///
-    /// @return
-    ///     True on success; false otherwise.
-    //------------------------------------------------------------------
-    bool 
-    Materialize (lldb::addr_t &struct_address,
-                 Error &error);
-    
-    //------------------------------------------------------------------
-    /// [Used by CommandObjectExpression] Get the "this" pointer
-    /// from a given execution context.
-    ///
-    /// @param[out] object_ptr
-    ///     The this pointer.
-    ///
-    /// @param[in] object_name
-    ///     The name of the object pointer -- "this," "self," or similar
-    ///     depending on language
-    ///
-    /// @param[in] error
-    ///     An Error to populate with any messages related to
-    ///     finding the "this" pointer.
-    ///
-    /// @param[in] suppress_type_check
-    ///     True if the type is not needed.
-    ///
-    /// @return
-    ///     True on success; false otherwise.
-    //------------------------------------------------------------------
-    bool
-    GetObjectPointer (lldb::addr_t &object_ptr,
-                      ConstString &object_name,
-                      Error &error,
-                      bool suppress_type_check = false);
-    
-    //------------------------------------------------------------------
-    /// [Used by CommandObjectExpression] Pretty-print a materialized
-    /// struct, which must have been materialized by Materialize(),
-    /// byte for byte on a given stream.
-    ///
-    /// @param[in] exe_ctx
-    ///     The execution context from which to read the struct.
-    ///
-    /// @param[in] s
-    ///     The stream on which to write the pretty-printed output.
-    ///
-    /// @param[in] error
-    ///     An Error to populate with any messages related to
-    ///     pretty-printing the struct.
-    ///
-    /// @return
-    ///     True on success; false otherwise.
-    //------------------------------------------------------------------
-    bool 
-    DumpMaterializedStruct (Stream &s,
-                            Error &error);
-    
-    //------------------------------------------------------------------
-    /// [Used by CommandObjectExpression] Deaterialize the entire struct.
-    ///
-    /// @param[in] exe_ctx
-    ///     The execution context from which to read the struct.
-    ///
-    /// @param[out] result
-    ///     A ClangExpressionVariable containing the result of the
-    ///     expression, for potential re-use.
-    ///
-    /// @param[in] stack_frame_top, stack_frame_bottom
-    ///     If not LLDB_INVALID_ADDRESS, the bounds for the stack frame
-    ///     in which the expression ran.  A result whose address falls
-    ///     inside this stack frame is dematerialized as a value
-    ///     requiring rematerialization.
-    ///
-    /// @param[in] error
-    ///     An Error to populate with any messages related to
-    ///     dematerializing the struct.
-    ///
-    /// @return
-    ///     True on success; false otherwise.
-    //------------------------------------------------------------------
-    bool 
-    Dematerialize (lldb::ClangExpressionVariableSP &result_sp,
-                   lldb::addr_t stack_frame_top,
-                   lldb::addr_t stack_frame_bottom,
-                   Error &error);
-    
-    //------------------------------------------------------------------
     /// [Used by ClangASTSource] Find all entities matching a given name,
     /// using a NameSearchContext to make Decls for them.
     ///
@@ -668,6 +396,7 @@ private:
             m_sym_ctx(),
             m_persistent_vars(NULL),
             m_enable_lookups(false),
+            m_materializer(NULL),
             m_decl_map(decl_map)
         {
         }
@@ -687,12 +416,13 @@ private:
         ClangPersistentVariables   *m_persistent_vars;  ///< The persistent variables for the process.
         bool                        m_enable_lookups;   ///< Set to true during parsing if we have found the first "$__lldb" name.
         TargetInfo                  m_target_info;      ///< Basic information about the target.
+        Materializer               *m_materializer;     ///< If non-NULL, the materializer to use when reporting used variables.
     private:
         ClangExpressionDeclMap     &m_decl_map;
         DISALLOW_COPY_AND_ASSIGN (ParserVars);
     };
     
-    std::auto_ptr<ParserVars> m_parser_vars;
+    std::unique_ptr<ParserVars> m_parser_vars;
     
     //----------------------------------------------------------------------
     /// Activate parser-specific variables
@@ -734,7 +464,7 @@ private:
         TypeFromUser                m_object_pointer_type;      ///< The type of the "this" variable, if one exists
     };
     
-    std::auto_ptr<StructVars> m_struct_vars;
+    std::unique_ptr<StructVars> m_struct_vars;
     
     //----------------------------------------------------------------------
     /// Activate struct variables
@@ -756,73 +486,16 @@ private:
     }
     
     //----------------------------------------------------------------------
-    /// The following values refer to a specific materialization of the
-    /// structure in a process
+    /// Get this parser's ID for use in extracting parser- and JIT-specific
+    /// data from persistent variables.
     //----------------------------------------------------------------------
-    struct MaterialVars {
-        MaterialVars() :
-            m_allocated_area(0),
-            m_materialized_location(0)
-        {
-        }
-        
-        Process                    *m_process;                  ///< The process that the struct is materialized into.
-        lldb::addr_t                m_allocated_area;           ///< The base of the memory allocated for the struct.  Starts on a potentially unaligned address and may therefore be larger than the struct.
-        lldb::addr_t                m_materialized_location;    ///< The address at which the struct is placed.  Falls inside the allocated area.
-    };
-    
-    std::auto_ptr<MaterialVars> m_material_vars;
-    
-    //----------------------------------------------------------------------
-    /// Activate materialization-specific variables
-    //----------------------------------------------------------------------
-    void 
-    EnableMaterialVars()
+    uint64_t
+    GetParserID()
     {
-        if (!m_material_vars.get())
-            m_material_vars.reset(new struct MaterialVars);
-    }
-    
-    //----------------------------------------------------------------------
-    /// Deallocate materialization-specific variables
-    //----------------------------------------------------------------------
-    void 
-    DisableMaterialVars()
-    {
-        m_material_vars.reset();
+        return (uint64_t)this;
     }
     
     //------------------------------------------------------------------
-    /// Given a stack frame, find a variable that matches the given name and 
-    /// type.  We need this for expression re-use; we may not always get the
-    /// same lldb::Variable back, and we want the expression to work wherever 
-    /// it can.  Returns the variable defined in the tightest scope.
-    ///
-    /// @param[in] frame
-    ///     The stack frame to use as a basis for finding the variable.
-    ///
-    /// @param[in] name
-    ///     The name as a plain C string.
-    ///
-    /// @param[in] type
-    ///     The required type for the variable.  This function may be called
-    ///     during parsing, in which case we don't know its type; hence the
-    ///     default.
-    ///
-    /// @param[in] object_pointer
-    ///     The type expected is an object type.  This means we will ignore
-    ///     constness of the pointer target.
-    ///
-    /// @return
-    ///     The LLDB Variable found, or NULL if none was found.
-    //------------------------------------------------------------------
-    lldb::VariableSP
-    FindVariableInScope (StackFrame &frame,
-                         const ConstString &name,
-                         TypeFromUser *type = NULL,
-                         bool object_pointer = false);
-    
-    //------------------------------------------------------------------
     /// Given a target, find a data symbol that has the given name.
     ///
     /// @param[in] target
@@ -834,7 +507,7 @@ private:
     /// @return
     ///     The LLDB Symbol found, or NULL if none was found.
     //---------------------------------------------------------
-    Symbol *
+    const Symbol *
     FindGlobalDataSymbol (Target &target,
                           const ConstString &name);
     
@@ -952,7 +625,7 @@ private:
     //------------------------------------------------------------------
     void
     AddOneGenericVariable (NameSearchContext &context,
-                           Symbol &symbol,
+                           const Symbol &symbol,
                            unsigned int current_id);
     
     //------------------------------------------------------------------
@@ -1001,156 +674,23 @@ private:
     ///
     /// @param[in] type
     ///     The type that needs to be created.
-    ///
-    /// @param[in] add_method
-    ///     True if a method with signature void $__lldb_expr(void*)
-    ///     should be added to the C++ class type passed in
     //------------------------------------------------------------------
     void 
     AddOneType (NameSearchContext &context, 
                 TypeFromUser &type,
-                unsigned int current_id,
-                bool add_method);
+                unsigned int current_id);
     
     //------------------------------------------------------------------
-    /// Actually do the task of materializing or dematerializing the struct.
-    /// Since both tasks are very similar, although ClangExpressionDeclMap
-    /// exposes two functions to the outside, both call DoMaterialize.
-    ///
-    /// @param[in] dematerialize
-    ///     True if the struct is to be dematerialized; false if it is to
-    ///     be materialized.
-    ///
-    /// @param[in] stack_frame_top, stack_frame_bottom
-    ///     If not LLDB_INVALID_ADDRESS, the bounds for the stack frame
-    ///     in which the expression ran.  A result whose address falls
-    ///     inside this stack frame is dematerialized as a value
-    ///     requiring rematerialization.
-    ///
-    /// @param[out] result
-    ///     If the struct is being dematerialized, a pointer into which the
-    ///     location of the result persistent variable is placed.  If not,
-    ///     NULL.
-    ///
-    /// @param[in] err
-    ///     An Error to populate with any messages related to
-    ///     (de)materializing the struct.
+    /// Copy a C++ class type into the parser's AST context and add a
+    /// member function declaration to it for the expression.
     ///
-    /// @return
-    ///     True on success; false otherwise.
-    //------------------------------------------------------------------
-    bool 
-    DoMaterialize (bool dematerialize,
-                   lldb::addr_t stack_frame_top,
-                   lldb::addr_t stack_frame_bottom,
-                   lldb::ClangExpressionVariableSP *result_sp_ptr,
-                   Error &err);
-    
-    //------------------------------------------------------------------
-    /// Clean up the state required to dematerialize the variable.
+    /// @param[in] type
+    ///     The type that needs to be created.
     //------------------------------------------------------------------
-    void 
-    DidDematerialize ();
 
-    //------------------------------------------------------------------
-    /// Actually do the task of materializing or dematerializing a persistent
-    /// variable.
-    ///
-    /// @param[in] dematerialize
-    ///     True if the variable is to be dematerialized; false if it is to
-    ///     be materialized.
-    ///
-    /// @param[in] var_sp
-    ///     The persistent variable to materialize
-    ///
-    /// @param[in] addr
-    ///     The address at which to materialize the variable.
-    ///
-    /// @param[in] stack_frame_top, stack_frame_bottom
-    ///     If not LLDB_INVALID_ADDRESS, the bounds for the stack frame
-    ///     in which the expression ran.  A result whose address falls
-    ///     inside this stack frame is dematerialized as a value
-    ///     requiring rematerialization.
-    ///
-    /// @param[in] err
-    ///     An Error to populate with any messages related to
-    ///     (de)materializing the persistent variable.
-    ///
-    /// @return
-    ///     True on success; false otherwise.
-    //------------------------------------------------------------------
-    bool 
-    DoMaterializeOnePersistentVariable (bool dematerialize,
-                                        lldb::ClangExpressionVariableSP &var_sp,
-                                        lldb::addr_t addr,
-                                        lldb::addr_t stack_frame_top,
-                                        lldb::addr_t stack_frame_bottom,
-                                        Error &err);
-    
-    //------------------------------------------------------------------
-    /// Actually do the task of materializing or dematerializing a 
-    /// variable.
-    ///
-    /// @param[in] dematerialize
-    ///     True if the variable is to be dematerialized; false if it is to
-    ///     be materialized.
-    ///
-    /// @param[in] sym_ctx
-    ///     The symbol context to use (for looking the variable up).
-    ///
-    /// @param[in] expr_var
-    ///     The entity that the expression parser uses for the variable.
-    ///     In case the variable needs to be copied into the target's
-    ///     memory, this location is stored in the variable during
-    ///     materialization and cleared when it is demateralized.
-    ///
-    /// @param[in] addr
-    ///     The address at which to materialize the variable.
-    ///
-    /// @param[in] err
-    ///     An Error to populate with any messages related to
-    ///     (de)materializing the persistent variable.
-    ///
-    /// @return
-    ///     True on success; false otherwise.
-    //------------------------------------------------------------------
-    bool 
-    DoMaterializeOneVariable (bool dematerialize,
-                              const SymbolContext &sym_ctx,
-                              lldb::ClangExpressionVariableSP &expr_var,
-                              lldb::addr_t addr, 
-                              Error &err);
-    
-    //------------------------------------------------------------------
-    /// Actually do the task of materializing or dematerializing a 
-    /// register variable.
-    ///
-    /// @param[in] dematerialize
-    ///     True if the variable is to be dematerialized; false if it is to
-    ///     be materialized.
-    ///
-    /// @param[in] reg_ctx
-    ///     The register context to use.
-    ///
-    /// @param[in] reg_info
-    ///     The information for the register to read/write.
-    ///
-    /// @param[in] addr
-    ///     The address at which to materialize the variable.
-    ///
-    /// @param[in] err
-    ///     An Error to populate with any messages related to
-    ///     (de)materializing the persistent variable.
-    ///
-    /// @return
-    ///     True on success; false otherwise.
-    //------------------------------------------------------------------
-    bool 
-    DoMaterializeOneRegister (bool dematerialize,
-                              RegisterContext &reg_ctx,
-                              const RegisterInfo &reg_info,
-                              lldb::addr_t addr, 
-                              Error &err);
+    TypeFromParser
+    CopyClassType(TypeFromUser &type,
+                  unsigned int current_id);
 };
     
 } // namespace lldb_private

Modified: lldb/branches/lldb-platform-work/include/lldb/Expression/ClangExpressionParser.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Expression/ClangExpressionParser.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Expression/ClangExpressionParser.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Expression/ClangExpressionParser.h Thu Jun  6 19:06:43 2013
@@ -22,7 +22,7 @@
 namespace lldb_private
 {
 
-class RecordingMemoryManager;
+class IRExecutionUnit;
     
 //----------------------------------------------------------------------
 /// @class ClangExpressionParser ClangExpressionParser.h "lldb/Expression/ClangExpressionParser.h"
@@ -76,10 +76,6 @@ public:
     /// Ready an already-parsed expression for execution, possibly
     /// evaluating it statically.
     ///
-    /// @param[out] func_allocation_addr
-    ///     The address which can be used to deallocate the code for this
-    ///     JIT'ed function
-    ///
     /// @param[out] func_addr
     ///     The address to which the function has been written.
     ///
@@ -88,12 +84,13 @@ public:
     ///     and func_end do not delimit an allocated region; the allocated
     ///     region may begin before func_addr.)
     ///
+    /// @param[in] execution_unit_ap
+    ///     After parsing, ownership of the execution unit for
+    ///     for the expression is handed to this unique pointer.
+    ///
     /// @param[in] exe_ctx
     ///     The execution context to write the function into.
     ///
-    /// @param[in] data_allocator
-    ///     If non-NULL, the static data allocator to use for literal strings.
-    ///
     /// @param[out] evaluated_statically
     ///     Set to true if the expression could be interpreted statically;
     ///     untouched otherwise.
@@ -113,13 +110,11 @@ public:
     ///     Test with Success().
     //------------------------------------------------------------------
     Error
-    PrepareForExecution (lldb::addr_t &func_allocation_addr, 
-                         lldb::addr_t &func_addr,
+    PrepareForExecution (lldb::addr_t &func_addr,
                          lldb::addr_t &func_end,
+                         std::unique_ptr<IRExecutionUnit> &execution_unit_ap,
                          ExecutionContext &exe_ctx,
-                         IRForTarget::StaticDataAllocator *data_allocator,
-                         bool &evaluated_statically,
-                         lldb::ClangExpressionVariableSP &const_result,
+                         bool &can_interpret,
                          lldb_private::ExecutionPolicy execution_policy);
         
     //------------------------------------------------------------------
@@ -137,59 +132,18 @@ public:
     //------------------------------------------------------------------
     Error
     DisassembleFunction (Stream &stream, 
-                         ExecutionContext &exe_ctx,
-                         RecordingMemoryManager *jit_memory_manager);
+                         ExecutionContext &exe_ctx);
     
 private:
-    //----------------------------------------------------------------------
-    /// @class JittedFunction ClangExpressionParser.h "lldb/Expression/ClangExpressionParser.h"
-    /// @brief Encapsulates a single function that has been generated by the JIT.
-    ///
-    /// Functions that have been generated by the JIT are first resident in the
-    /// local process, and then placed in the target process.  JittedFunction
-    /// represents a function possibly resident in both.
-    //----------------------------------------------------------------------
-    struct JittedFunction {
-        std::string m_name;             ///< The function's name
-        lldb::addr_t m_local_addr;      ///< The address of the function in LLDB's memory
-        lldb::addr_t m_remote_addr;     ///< The address of the function in the target's memory
-        
-        //------------------------------------------------------------------
-        /// Constructor
-        ///
-        /// Initializes class variabes.
-        ///
-        /// @param[in] name
-        ///     The name of the function.
-        ///
-        /// @param[in] local_addr
-        ///     The address of the function in LLDB, or LLDB_INVALID_ADDRESS if
-        ///     it is not present in LLDB's memory.
-        ///
-        /// @param[in] remote_addr
-        ///     The address of the function in the target, or LLDB_INVALID_ADDRESS
-        ///     if it is not present in the target's memory.
-        //------------------------------------------------------------------
-        JittedFunction (const char *name,
-                        lldb::addr_t local_addr = LLDB_INVALID_ADDRESS,
-                        lldb::addr_t remote_addr = LLDB_INVALID_ADDRESS) :
-            m_name (name),
-            m_local_addr (local_addr),
-            m_remote_addr (remote_addr)
-        {
-        }
-    };
-    
-    ClangExpression                            &m_expr;                 ///< The expression to be parsed
-    
-    std::auto_ptr<llvm::LLVMContext>            m_llvm_context;         ///< The LLVM context to generate IR into
-    std::auto_ptr<clang::FileManager>           m_file_manager;         ///< The Clang file manager object used by the compiler
-    std::auto_ptr<clang::CompilerInstance>      m_compiler;             ///< The Clang compiler used to parse expressions into IR
-    std::auto_ptr<clang::Builtin::Context>      m_builtin_context;      ///< Context for Clang built-ins
-    std::auto_ptr<clang::SelectorTable>         m_selector_table;       ///< Selector table for Objective-C methods
-    std::auto_ptr<clang::ASTContext>            m_ast_context;          ///< The AST context used to hold types and names for the parser
-    std::auto_ptr<clang::CodeGenerator>         m_code_generator;       ///< [owned by the Execution Engine] The Clang object that generates IR
-    std::vector<JittedFunction>                 m_jitted_functions;     ///< A vector of all functions that have been JITted into machine code (just one, if ParseExpression() was called)
+    ClangExpression &                       m_expr;                 ///< The expression to be parsed
+    std::unique_ptr<llvm::LLVMContext>       m_llvm_context;         ///< The LLVM context to generate IR into
+    std::unique_ptr<clang::FileManager>      m_file_manager;         ///< The Clang file manager object used by the compiler
+    std::unique_ptr<clang::CompilerInstance> m_compiler;             ///< The Clang compiler used to parse expressions into IR
+    std::unique_ptr<clang::Builtin::Context> m_builtin_context;      ///< Context for Clang built-ins
+    std::unique_ptr<clang::SelectorTable>    m_selector_table;       ///< Selector table for Objective-C methods
+    std::unique_ptr<clang::ASTContext>       m_ast_context;          ///< The AST context used to hold types and names for the parser
+    std::unique_ptr<clang::CodeGenerator>    m_code_generator;       ///< The Clang object that generates IR
+    std::unique_ptr<IRExecutionUnit>         m_execution_unit;       ///< The container for the finished Module
 };
     
 }

Modified: lldb/branches/lldb-platform-work/include/lldb/Expression/ClangExpressionVariable.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Expression/ClangExpressionVariable.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Expression/ClangExpressionVariable.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Expression/ClangExpressionVariable.h Thu Jun  6 19:06:43 2013
@@ -16,6 +16,7 @@
 #include <string.h>
 
 // C++ Includes
+#include <map>
 #include <string>
 #include <vector>
 
@@ -108,29 +109,45 @@ public:
         llvm::Value            *m_llvm_value;   ///< The IR value corresponding to this variable; usually a GlobalValue
         lldb_private::Value    *m_lldb_value;   ///< The value found in LLDB for this variable
         lldb::VariableSP        m_lldb_var;     ///< The original variable for this variable
-        lldb_private::Symbol   *m_lldb_sym;     ///< The original symbol for this variable, if it was a symbol
-
-    private:
-        DISALLOW_COPY_AND_ASSIGN (ParserVars);
+        const lldb_private::Symbol *m_lldb_sym; ///< The original symbol for this variable, if it was a symbol
     };
+    
+private:
+    typedef std::map <uint64_t, ParserVars> ParserVarMap;
+    ParserVarMap m_parser_vars;
+
+public:
     //----------------------------------------------------------------------
     /// Make this variable usable by the parser by allocating space for
     /// parser-specific variables
     //----------------------------------------------------------------------
     void 
-    EnableParserVars()
+    EnableParserVars(uint64_t parser_id)
     {
-        if (!m_parser_vars.get())
-            m_parser_vars.reset(new ParserVars);
+        m_parser_vars.insert(std::make_pair(parser_id, ParserVars()));
     }
     
     //----------------------------------------------------------------------
     /// Deallocate parser-specific variables
     //----------------------------------------------------------------------
     void
-    DisableParserVars()
+    DisableParserVars(uint64_t parser_id)
+    {
+        m_parser_vars.erase(parser_id);
+    }
+    
+    //----------------------------------------------------------------------
+    /// Access parser-specific variables
+    //----------------------------------------------------------------------
+    ParserVars *
+    GetParserVars(uint64_t parser_id)
     {
-        m_parser_vars.reset();
+        ParserVarMap::iterator i = m_parser_vars.find(parser_id);
+        
+        if (i == m_parser_vars.end())
+            return NULL;
+        else
+            return &i->second;
     }
     
     //----------------------------------------------------------------------
@@ -148,25 +165,39 @@ public:
         size_t  m_size;         ///< The space required for the variable, in bytes
         off_t   m_offset;       ///< The offset of the variable in the struct, in bytes
     };
-
+    
+private:
+    typedef std::map <uint64_t, JITVars> JITVarMap;
+    JITVarMap m_jit_vars;
+    
+public:
     //----------------------------------------------------------------------
     /// Make this variable usable for materializing for the JIT by allocating 
     /// space for JIT-specific variables
     //----------------------------------------------------------------------
     void 
-    EnableJITVars()
+    EnableJITVars(uint64_t parser_id)
     {
-        if (!m_jit_vars.get())
-            m_jit_vars.reset(new JITVars);
+        m_jit_vars.insert(std::make_pair(parser_id, JITVars()));
     }
     
     //----------------------------------------------------------------------
     /// Deallocate JIT-specific variables
     //----------------------------------------------------------------------
     void 
-    DisableJITVars()
+    DisableJITVars(uint64_t parser_id)
     {
-        m_jit_vars.reset();
+        m_jit_vars.erase(parser_id);
+    }
+    
+    JITVars *GetJITVars(uint64_t parser_id)
+    {
+        JITVarMap::iterator i = m_jit_vars.find(parser_id);
+        
+        if (i == m_jit_vars.end())
+            return NULL;
+        else
+            return &i->second;
     }
         
     //----------------------------------------------------------------------
@@ -217,14 +248,11 @@ public:
     void
     TransferAddress (bool force = false);
 
-    typedef STD_SHARED_PTR(ValueObjectConstResult) ValueObjectConstResultSP;
+    typedef std::shared_ptr<ValueObjectConstResult> ValueObjectConstResultSP;
 
     //----------------------------------------------------------------------
     /// Members
     //----------------------------------------------------------------------
-    std::auto_ptr<ParserVars> m_parser_vars;
-    std::auto_ptr<JITVars> m_jit_vars;
-    
     enum Flags 
     {
         EVNone                  = 0,
@@ -245,7 +273,7 @@ public:
     
     lldb::ValueObjectSP m_frozen_sp;
     lldb::ValueObjectSP m_live_sp;
-private:
+    
     DISALLOW_COPY_AND_ASSIGN (ClangExpressionVariable);
 };
 
@@ -348,13 +376,16 @@ public:
     ///     The variable requested, or NULL if that variable is not in the list.
     //----------------------------------------------------------------------
     lldb::ClangExpressionVariableSP
-    GetVariable (const clang::NamedDecl *decl)
+    GetVariable (const clang::NamedDecl *decl, uint64_t parser_id)
     {
         lldb::ClangExpressionVariableSP var_sp;
         for (size_t index = 0, size = GetSize(); index < size; ++index)
         {
             var_sp = GetVariableAtIndex(index);
-            if (var_sp->m_parser_vars.get() && var_sp->m_parser_vars->m_named_decl == decl)
+            
+            ClangExpressionVariable::ParserVars *parser_vars = var_sp->GetParserVars(parser_id);
+            
+            if (parser_vars && parser_vars->m_named_decl == decl)
                 return var_sp;
         }
         var_sp.reset();

Modified: lldb/branches/lldb-platform-work/include/lldb/Expression/ClangFunction.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Expression/ClangFunction.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Expression/ClangFunction.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Expression/ClangFunction.h Thu Jun  6 19:06:43 2013
@@ -132,7 +132,8 @@ public:
     /// @return
     ///     The number of errors.
 	//------------------------------------------------------------------
-    unsigned CompileFunction (Stream &errors);
+    unsigned
+    CompileFunction (Stream &errors);
     
     //------------------------------------------------------------------
 	/// Insert the default function wrapper and its default argument struct  
@@ -152,9 +153,10 @@ public:
     /// @return
     ///     True on success; false otherwise.
 	//------------------------------------------------------------------
-    bool InsertFunction (ExecutionContext &exe_ctx, 
-                         lldb::addr_t &args_addr_ref, 
-                         Stream &errors);
+    bool
+    InsertFunction (ExecutionContext &exe_ctx,
+                    lldb::addr_t &args_addr_ref,
+                    Stream &errors);
 
     //------------------------------------------------------------------
 	/// Insert the default function wrapper (using the JIT)
@@ -246,14 +248,15 @@ public:
     ///     If the timeout expires, true if other threads should run.  If
     ///     the function may try to take locks, this is useful.
     /// 
-    /// @param[in] discard_on_error
+    /// @param[in] unwind_on_error
     ///     If true, and the execution stops before completion, we unwind the
     ///     function call, and return the program state to what it was before the
     ///     execution.  If false, we leave the program in the stopped state.
     /// 
-    /// @param[in] single_thread_timeout_usec
-    ///     If stop_others is true, the length of time to wait before
-    ///     concluding that the system is deadlocked.
+    /// @param[in] timeout_usec
+    ///     Timeout value (0 for no timeout). If try_all_threads is true, then we
+    ///     will try on one thread for the lesser of .25 sec and half the total timeout.
+    ///     then switch to running all threads, otherwise this will be the total timeout.
     ///
     /// @param[in] errors
     ///     The stream to write errors to.
@@ -271,8 +274,9 @@ public:
                      lldb::addr_t &void_arg, 
                      bool stop_others, 
                      bool try_all_threads,
-                     bool discard_on_error,
-                     uint32_t single_thread_timeout_usec, 
+                     bool unwind_on_error,
+                     bool ignore_breakpoints,
+                     uint32_t timeout_usec,
                      Stream &errors,
                      lldb::addr_t* this_arg = 0);
     
@@ -329,7 +333,7 @@ public:
     //------------------------------------------------------------------
     /// Run the function this ClangFunction was created with.
     ///
-    /// This simple version will run the function on one thread.  If \a single_thread_timeout_usec
+    /// This simple version will run the function on one thread.  If \a timeout_usec
     /// is not zero, we time out after that timeout.  If \a try_all_threads is true, then we will
     /// resume with all threads on, otherwise we halt the process, and eExecutionInterrupted will be returned.
     ///
@@ -339,8 +343,10 @@ public:
     /// @param[in] errors
     ///     Errors will be written here if there are any.
     ///
-    /// @param[in] single_thread_timeout_usec
-    ///     If \b true, run only this thread, if \b false let all threads run.
+    /// @param[in] timeout_usec
+    ///     Timeout value (0 for no timeout). If try_all_threads is true, then we
+    ///     will try on one thread for the lesser of .25 sec and half the total timeout.
+    ///     then switch to running all threads, otherwise this will be the total timeout.
     ///
     /// @param[in] try_all_threads
     ///     If \b true, run only this thread, if \b false let all threads run.
@@ -379,8 +385,11 @@ public:
     /// @param[in] stop_others
     ///     If \b true, run only this thread, if \b false let all threads run.
     ///
-    /// @param[in] single_thread_timeout_usec
-    ///     If \b true, run only this thread, if \b false let all threads run.
+    /// @param[in] timeout_usec
+    ///     Timeout value (0 for no timeout). If try_all_threads is true, then we
+    ///     will try on one thread for the lesser of .25 sec and half the total timeout.
+    ///     then switch to running all threads, otherwise this will be the total timeout.
+    ///
     ///
     /// @param[in] try_all_threads
     ///     If \b true, run only this thread, if \b false let all threads run.
@@ -396,9 +405,10 @@ public:
                     lldb::addr_t *args_addr_ptr, 
                     Stream &errors, 
                     bool stop_others, 
-                    uint32_t single_thread_timeout_usec,
+                    uint32_t timeout_usec,
                     bool try_all_threads,
-                    bool discard_on_error, 
+                    bool unwind_on_error,
+                    bool ignore_breakpoints,
                     Value &results);
     
     //------------------------------------------------------------------
@@ -420,9 +430,12 @@ public:
     /// @param[in] stop_others
     ///     True if other threads should pause during execution.
     ///
-    /// @param[in] discard_on_error
+    /// @param[in] unwind_on_error
     ///     True if the thread plan may simply be discarded if an error occurs.
     ///
+    /// @param[in] ignore_breakpoints
+    ///     True if the expression execution will ignore breakpoint hits and continue executing.
+    ///
     /// @param[in] this_arg
     ///     If non-NULL (and cmd_arg is NULL), the function is invoked like a C++ 
     ///     method, with the value pointed to by the pointer as its 'this' 
@@ -441,7 +454,8 @@ public:
                                  lldb::addr_t &args_addr_ref, 
                                  Stream &errors, 
                                  bool stop_others, 
-                                 bool discard_on_error,
+                                 bool unwind_on_error,
+                                 bool ignore_breakpoints,
                                  lldb::addr_t *this_arg = 0,
                                  lldb::addr_t *cmd_arg = 0);
     
@@ -464,7 +478,7 @@ public:
     /// @param[in] stop_others
     ///     True if other threads should pause during execution.
     ///
-    /// @param[in] discard_on_error
+    /// @param[in] unwind_on_error
     ///     True if the thread plan may simply be discarded if an error occurs.
     ///
     /// @return
@@ -475,14 +489,16 @@ public:
                                  lldb::addr_t &args_addr_ref, 
                                  Stream &errors, 
                                  bool stop_others, 
-                                 bool discard_on_error = true)
+                                 bool unwind_on_error = true,
+                                 bool ignore_breakpoints = true)
     {
         return ClangFunction::GetThreadPlanToCallFunction (exe_ctx, 
                                                            m_jit_start_addr, 
                                                            args_addr_ref, 
                                                            errors, 
                                                            stop_others, 
-                                                           discard_on_error);
+                                                           unwind_on_error,
+                                                           ignore_breakpoints);
     }
     
     //------------------------------------------------------------------
@@ -593,12 +609,18 @@ public:
         return false;
     }
     
+    ValueList
+    GetArgumentValues () const
+    {
+        return m_arg_values;
+    }
 private:
 	//------------------------------------------------------------------
 	// For ClangFunction only
 	//------------------------------------------------------------------
 
-    std::auto_ptr<ClangExpressionParser>    m_parser;               ///< The parser responsible for compiling the function.
+    std::unique_ptr<ClangExpressionParser> m_parser;                 ///< The parser responsible for compiling the function.
+    std::unique_ptr<IRExecutionUnit> m_execution_unit_ap;
     
     Function                       *m_function_ptr;                 ///< The function we're going to call.  May be NULL if we don't have debug info for the function.
     Address                         m_function_addr;                ///< If we don't have the FunctionSP, we at least need the address & return type.

Modified: lldb/branches/lldb-platform-work/include/lldb/Expression/ClangUserExpression.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Expression/ClangUserExpression.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Expression/ClangUserExpression.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Expression/ClangUserExpression.h Thu Jun  6 19:06:43 2013
@@ -14,7 +14,6 @@
 // C++ Includes
 #include <string>
 #include <map>
-#include <memory>
 #include <vector>
 
 // Other libraries and framework includes
@@ -22,11 +21,12 @@
 
 #include "lldb/lldb-forward.h"
 #include "lldb/lldb-private.h"
+#include "lldb/Core/Address.h"
 #include "lldb/Core/ClangForward.h"
 #include "lldb/Expression/ClangExpression.h"
 #include "lldb/Expression/ClangExpressionVariable.h"
 #include "lldb/Expression/IRForTarget.h"
-#include "lldb/Expression/ProcessDataAllocator.h"
+#include "lldb/Expression/Materializer.h"
 #include "lldb/Symbol/TaggedASTType.h"
 #include "lldb/Target/ExecutionContext.h"
 
@@ -47,8 +47,9 @@ namespace lldb_private
 class ClangUserExpression : public ClangExpression
 {
 public:
-    typedef STD_SHARED_PTR(ClangUserExpression) ClangUserExpressionSP;
+    typedef std::shared_ptr<ClangUserExpression> ClangUserExpressionSP;
     
+    enum { kDefaultTimeout = 500000u };
     //------------------------------------------------------------------
     /// Constructor
     ///
@@ -106,6 +107,15 @@ public:
            lldb_private::ExecutionPolicy execution_policy,
            bool keep_result_in_memory);
     
+    bool
+    CanInterpret ()
+    {
+        return m_can_interpret;
+    }
+    
+    bool
+    MatchesContext (ExecutionContext &exe_ctx);
+    
     //------------------------------------------------------------------
     /// Execute the parsed expression
     ///
@@ -116,11 +126,14 @@ public:
     ///     The execution context to use when looking up entities that
     ///     are needed for parsing (locations of variables, etc.)
     ///
-    /// @param[in] discard_on_error
+    /// @param[in] unwind_on_error
     ///     If true, and the execution stops before completion, we unwind the
     ///     function call, and return the program state to what it was before the
     ///     execution.  If false, we leave the program in the stopped state.
     ///
+    /// @param[in] ignore_breakpoints
+    ///     If true, ignore breakpoints while executing the expression.
+    ///
     /// @param[in] shared_ptr_to_me
     ///     This is a shared pointer to this ClangUserExpression.  This is
     ///     needed because Execute can push a thread plan that will hold onto
@@ -132,9 +145,16 @@ public:
     ///     A pointer to direct at the persistent variable in which the
     ///     expression's result is stored.
     ///
-    /// @param[in] single_thread_timeout_usec
-    ///     The amount of time (in usec) that we are willing to wait for this
-    ///     expression to complete, before assuming that we are blocked and giving up
+    /// @param[in] try_all_threads
+    ///     If true, then we will try to run all threads if the function doesn't complete on
+    ///     one thread.  See timeout_usec for the interaction of this variable and
+    ///     the timeout.
+    ///
+    /// @param[in] timeout_usec
+    ///     Timeout value (0 for no timeout). If try_all_threads is true, then we
+    ///     will try on one thread for the lesser of .25 sec and half the total timeout.
+    ///     then switch to running all threads, otherwise this will be the total timeout.
+    ///
     ///
     /// @return
     ///     A Process::Execution results value.
@@ -142,10 +162,12 @@ public:
     ExecutionResults
     Execute (Stream &error_stream,
              ExecutionContext &exe_ctx,
-             bool discard_on_error,
+             bool unwind_on_error,
+             bool ignore_breakpoints,
              ClangUserExpressionSP &shared_ptr_to_me,
              lldb::ClangExpressionVariableSP &result,
-             uint32_t single_thread_timeout_usec = 500000);
+             bool try_all_threads,
+             uint32_t timeout_usec);
              
     ThreadPlan *
     GetThreadPlanToExecuteJITExpression (Stream &error_stream,
@@ -178,7 +200,8 @@ public:
     FinalizeJITExecution (Stream &error_stream,
                           ExecutionContext &exe_ctx,
                           lldb::ClangExpressionVariableSP &result,
-                          lldb::addr_t function_stack_pointer = LLDB_INVALID_ADDRESS);
+                          lldb::addr_t function_stack_bottom = LLDB_INVALID_ADDRESS,
+                          lldb::addr_t function_stack_top = LLDB_INVALID_ADDRESS);
     
     //------------------------------------------------------------------
     /// Return the string that the parser should parse.  Must be a full
@@ -231,16 +254,6 @@ public:
     }
     
     //------------------------------------------------------------------
-    /// Return the object that the parser should use when registering
-    /// local variables.  May be NULL if the Expression doesn't care.
-    //------------------------------------------------------------------
-    ClangExpressionVariableList *
-    LocalVariables ()
-    {
-        return m_local_variables.get();
-    }
-    
-    //------------------------------------------------------------------
     /// Return the object that the parser should allow to access ASTs.
     /// May be NULL if the ASTs do not need to be transformed.
     ///
@@ -296,10 +309,13 @@ public:
     ///     the expression.  Currently restricted to those languages 
     ///     supported by Clang.
     ///
-    /// @param[in] discard_on_error
+    /// @param[in] unwind_on_error
     ///     True if the thread's state should be restored in the case 
     ///     of an error.
     ///
+    /// @param[in] ignore_breakpoints
+    ///     If true, ignore breakpoints while executing the expression.
+    ///
     /// @param[in] result_type
     ///     If not eResultTypeAny, the type of the desired result.  Will
     ///     result in parse errors if impossible.
@@ -314,9 +330,15 @@ public:
     /// @param[in/out] result_valobj_sp
     ///      If execution is successful, the result valobj is placed here.
     ///
-    /// @param[in] single_thread_timeout_usec
-    ///     The amount of time (in usec) that we are willing to wait for this
-    ///     expression to complete, before assuming that we are blocked and giving up
+    /// @param[in] try_all_threads
+    ///     If true, then we will try to run all threads if the function doesn't complete on
+    ///     one thread.  See timeout_usec for the interaction of this variable and
+    ///     the timeout.
+    ///
+    /// @param[in] timeout_usec
+    ///     Timeout value (0 for no timeout). If try_all_threads is true, then we
+    ///     will try on one thread for the lesser of .25 sec and half the total timeout.
+    ///     then switch to running all threads, otherwise this will be the total timeout.
     ///
     /// @result
     ///      A Process::ExecutionResults value.  eExecutionCompleted for success.
@@ -326,23 +348,27 @@ public:
               lldb_private::ExecutionPolicy execution_policy,
               lldb::LanguageType language,
               ResultType desired_type,
-              bool discard_on_error,
+              bool unwind_on_error,
+              bool ignore_breakpoints,
               const char *expr_cstr,
               const char *expr_prefix,
               lldb::ValueObjectSP &result_valobj_sp,
-              uint32_t single_thread_timeout_usec = 500000);
+              bool try_all_threads,
+              uint32_t timeout_usec);
               
     static ExecutionResults
     EvaluateWithError (ExecutionContext &exe_ctx,
                        lldb_private::ExecutionPolicy execution_policy,
                        lldb::LanguageType language,
                        ResultType desired_type,
-                       bool discard_on_error,
+                       bool unwind_on_error,
+                       bool ignore_breakpoints,
                        const char *expr_cstr,
                        const char *expr_prefix,
                        lldb::ValueObjectSP &result_valobj_sp,
                        Error &error,
-                       uint32_t single_thread_timeout_usec = 500000);
+                       bool try_all_threads,
+                       uint32_t timeout_usec);
     
     static const Error::ValueType kNoResult = 0x1001; ///< ValueObject::GetError() returns this if there is no result from the expression.
 private:
@@ -361,41 +387,19 @@ private:
                                    lldb::addr_t &object_ptr,
                                    lldb::addr_t &cmd_ptr);
     
-    bool
-    EvaluatedStatically ()
-    {
-        return m_evaluated_statically;
-    }
-    
     void
-    InstallContext (ExecutionContext &exe_ctx)
-    {
-        m_process_wp = exe_ctx.GetProcessSP();
-        m_target_wp = exe_ctx.GetTargetSP();
-        m_frame_wp = exe_ctx.GetFrameSP();
-    }
+    InstallContext (ExecutionContext &exe_ctx);
     
     bool
     LockAndCheckContext (ExecutionContext &exe_ctx,
                          lldb::TargetSP &target_sp,
                          lldb::ProcessSP &process_sp,
-                         lldb::StackFrameSP &frame_sp)
-    {
-        target_sp = m_target_wp.lock();
-        process_sp = m_process_wp.lock();
-        frame_sp = m_frame_wp.lock();
-        
-        if ((target_sp && target_sp.get() != exe_ctx.GetTargetPtr()) || 
-            (process_sp && process_sp.get() != exe_ctx.GetProcessPtr()) ||
-            (frame_sp && frame_sp.get() != exe_ctx.GetFramePtr()))
-            return false;
-        
-        return true;
-    }
+                         lldb::StackFrameSP &frame_sp);
     
-    lldb::TargetWP                              m_target_wp;            ///< The target used as the context for the expression.
     lldb::ProcessWP                             m_process_wp;           ///< The process used as the context for the expression.
-    lldb::StackFrameWP                          m_frame_wp;             ///< The stack frame used as context for the expression.
+    Address                                     m_address;              ///< The address the process is stopped in.
+    lldb::addr_t                                m_stack_frame_bottom;   ///< The bottom of the allocated stack frame.
+    lldb::addr_t                                m_stack_frame_top;      ///< The top of the allocated stack frame.
     
     std::string                                 m_expr_text;            ///< The text of the expression, as typed by the user
     std::string                                 m_expr_prefix;          ///< The text of the translation-level definitions, as provided by the user
@@ -405,11 +409,10 @@ private:
     std::string                                 m_transformed_text;     ///< The text of the expression, as send to the parser
     ResultType                                  m_desired_type;         ///< The type to coerce the expression's result to.  If eResultTypeAny, inferred from the expression.
     
-    std::auto_ptr<ClangExpressionDeclMap>       m_expr_decl_map;        ///< The map to use when parsing and materializing the expression.
-    std::auto_ptr<ClangExpressionVariableList>  m_local_variables;      ///< The local expression variables, if the expression is DWARF.
-    std::auto_ptr<ProcessDataAllocator>         m_data_allocator;       ///< The allocator that the parser uses to place strings for use by JIT-compiled code.
-    
-    std::auto_ptr<ASTResultSynthesizer>         m_result_synthesizer;   ///< The result synthesizer, if one is needed.
+    std::unique_ptr<ClangExpressionDeclMap>      m_expr_decl_map;        ///< The map to use when parsing the expression.
+    std::unique_ptr<IRExecutionUnit>             m_execution_unit_ap;    ///< The execution unit the expression is stored in.
+    std::unique_ptr<Materializer>                m_materializer_ap;      ///< The materializer to use when running the expression.
+    std::unique_ptr<ASTResultSynthesizer>        m_result_synthesizer;   ///< The result synthesizer, if one is needed.
     
     bool                                        m_enforce_valid_object; ///< True if the expression parser should enforce the presence of a valid class pointer in order to generate the expression as a method.
     bool                                        m_cplusplus;            ///< True if the expression is compiled as a C++ member function (true if it was parsed when exe_ctx was in a C++ method).
@@ -419,8 +422,9 @@ private:
     bool                                        m_const_object;         ///< True if "this" is const.
     Target                                     *m_target;               ///< The target for storing persistent data like types and variables.
     
-    bool                                        m_evaluated_statically; ///< True if the expression could be evaluated statically; false otherwise.
-    lldb::ClangExpressionVariableSP             m_const_result;         ///< The statically-computed result of the expression.  NULL if it could not be computed statically or the expression has side effects.
+    bool                                        m_can_interpret;        ///< True if the expression could be evaluated statically; false otherwise.
+    lldb::addr_t                                m_materialized_address; ///< The address at which the arguments to the expression have been materialized.
+    Materializer::DematerializerSP              m_dematerializer_sp;    ///< The dematerializer.
 };
     
 } // namespace lldb_private

Modified: lldb/branches/lldb-platform-work/include/lldb/Expression/ClangUtilityFunction.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Expression/ClangUtilityFunction.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Expression/ClangUtilityFunction.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Expression/ClangUtilityFunction.h Thu Jun  6 19:06:43 2013
@@ -14,7 +14,6 @@
 // C++ Includes
 #include <string>
 #include <map>
-#include <memory>
 #include <vector>
 
 // Other libraries and framework includes
@@ -24,7 +23,6 @@
 #include "lldb/lldb-private.h"
 #include "lldb/Core/ClangForward.h"
 #include "lldb/Expression/ClangExpression.h"
-#include "lldb/Expression/ProcessDataAllocator.h"
 
 namespace lldb_private 
 {
@@ -169,8 +167,8 @@ public:
     }
     
 private:
-    std::auto_ptr<ClangExpressionDeclMap>   m_expr_decl_map;    ///< The map to use when parsing and materializing the expression.
-    std::auto_ptr<ProcessDataAllocator>     m_data_allocator;   ///< The allocator for static data used in the expression.
+    std::unique_ptr<ClangExpressionDeclMap>  m_expr_decl_map;    ///< The map to use when parsing and materializing the expression.
+    std::unique_ptr<IRExecutionUnit>         m_execution_unit_ap;
     
     std::string                             m_function_text;    ///< The text of the function.  Must be a well-formed translation unit.
     std::string                             m_function_name;    ///< The name of the function.

Modified: lldb/branches/lldb-platform-work/include/lldb/Expression/DWARFExpression.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Expression/DWARFExpression.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Expression/DWARFExpression.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Expression/DWARFExpression.h Thu Jun  6 19:06:43 2013
@@ -17,11 +17,11 @@
 #include "lldb/Core/Error.h"
 #include "lldb/Core/Scalar.h"
 
+namespace lldb_private {
+    
 class ClangExpressionVariable;
 class ClangExpressionVariableList;
 
-namespace lldb_private {
-
 class ClangExpressionDeclMap;
 
 //----------------------------------------------------------------------
@@ -59,8 +59,8 @@ public:
     ///     The byte length of the location expression.
     //------------------------------------------------------------------
     DWARFExpression(const DataExtractor& data,
-                    uint32_t data_offset,
-                    uint32_t data_length);
+                    lldb::offset_t data_offset,
+                    lldb::offset_t data_length);
 
     //------------------------------------------------------------------
     /// Copy constructor
@@ -139,21 +139,20 @@ public:
     /// us detect if a variable is a global or static variable since
     /// there is no other indication from DWARF debug info.
     ///
-    /// @param[in] file_addr
-    ///     The file address to search for in the location. 
+    /// @param[in] op_addr_idx
+    ///     The DW_OP_addr index to retrieve in case there is more than
+    ///     one DW_OP_addr opcode in the location byte stream.
     ///
     /// @param[out] error
     ///     If the location stream contains unknown DW_OP opcodes or the
     ///     data is missing, \a error will be set to \b true.
     ///
     /// @return
-    ///     True if IsLocationList() is false and the \a file_addr was
-    ///     is contained in a DW_OP_addr location opcode or if \a file_addr
-    ///     was invalid and there are any DW_OP_addr opcodes, false 
-    ///     otherwise.
+    ///     LLDB_INVALID_ADDRESS if the location doesn't contain a
+    ///     DW_OP_addr for \a op_addr_idx, otherwise a valid file address
     //------------------------------------------------------------------
-    bool
-    LocationContains_DW_OP_addr (lldb::addr_t file_addr, bool &error) const;
+    lldb::addr_t
+    GetLocation_DW_OP_addr (uint32_t op_addr_idx, bool &error) const;
 
     bool
     Update_DW_OP_addr (lldb::addr_t file_addr);
@@ -184,7 +183,7 @@ public:
     ///     The byte length of the location expression.
     //------------------------------------------------------------------
     void
-    SetOpcodeData(const DataExtractor& data, uint32_t data_offset, uint32_t data_length);
+    SetOpcodeData(const DataExtractor& data, lldb::offset_t data_offset, lldb::offset_t data_length);
 
     //------------------------------------------------------------------
     /// Copy the DWARF location expression into a local buffer.
@@ -212,8 +211,8 @@ public:
     //------------------------------------------------------------------
     void
     CopyOpcodeData (const DataExtractor& data,
-                    uint32_t data_offset,
-                    uint32_t data_length);
+                    lldb::offset_t data_offset,
+                    lldb::offset_t data_length);
     
 
     //------------------------------------------------------------------
@@ -340,8 +339,8 @@ public:
               ClangExpressionDeclMap *decl_map,
               RegisterContext *reg_ctx,
               const DataExtractor& opcodes,
-              const uint32_t offset,
-              const uint32_t length,
+              const lldb::offset_t offset,
+              const lldb::offset_t length,
               const uint32_t reg_set,
               const Value* initial_value_ptr,
               Value& result,
@@ -403,16 +402,16 @@ protected:
     //------------------------------------------------------------------
     void
     DumpLocation(Stream *s, 
-                 uint32_t offset, 
-                 uint32_t length, 
+                 lldb::offset_t offset,
+                 lldb::offset_t length,
                  lldb::DescriptionLevel level,
                  ABI *abi) const;
     
     bool
     GetLocation (lldb::addr_t base_addr, 
                  lldb::addr_t pc, 
-                 uint32_t &offset, 
-                 uint32_t &len);
+                 lldb::offset_t &offset, 
+                 lldb::offset_t &len);
 
     //------------------------------------------------------------------
     /// Classes that inherit from DWARFExpression can see and modify these

Modified: lldb/branches/lldb-platform-work/include/lldb/Expression/ExpressionSourceCode.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Expression/ExpressionSourceCode.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Expression/ExpressionSourceCode.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Expression/ExpressionSourceCode.h Thu Jun  6 19:06:43 2013
@@ -20,6 +20,8 @@ namespace lldb_private
 class ExpressionSourceCode
 {
 public:
+    static const char * g_expression_prefix;
+
     static ExpressionSourceCode *CreateWrapped (const char *prefix,
                                                 const char *body)
     {

Modified: lldb/branches/lldb-platform-work/include/lldb/Expression/IRDynamicChecks.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Expression/IRDynamicChecks.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Expression/IRDynamicChecks.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Expression/IRDynamicChecks.h Thu Jun  6 19:06:43 2013
@@ -20,7 +20,7 @@ namespace llvm {
     class Function;
     class Instruction;
     class Module;
-    class TargetData;
+    class DataLayout;
     class Value;
 }
 
@@ -77,8 +77,8 @@ public:
     
     bool DoCheckersExplainStop (lldb::addr_t addr, Stream &message);
     
-    std::auto_ptr<ClangUtilityFunction> m_valid_pointer_check;
-    std::auto_ptr<ClangUtilityFunction> m_objc_object_check;
+    std::unique_ptr<ClangUtilityFunction> m_valid_pointer_check;
+    std::unique_ptr<ClangUtilityFunction> m_objc_object_check;
 };
 
 //----------------------------------------------------------------------

Modified: lldb/branches/lldb-platform-work/include/lldb/Expression/IRForTarget.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Expression/IRForTarget.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Expression/IRForTarget.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Expression/IRForTarget.h Thu Jun  6 19:06:43 2013
@@ -14,6 +14,7 @@
 #include "lldb/Core/ConstString.h"
 #include "lldb/Core/Error.h"
 #include "lldb/Core/Stream.h"
+#include "lldb/Core/StreamString.h"
 #include "lldb/Symbol/TaggedASTType.h"
 #include "llvm/Pass.h"
 
@@ -28,13 +29,15 @@ namespace llvm {
     class Instruction;
     class Module;
     class StoreInst;
-    class TargetData;
+    class DataLayout;
     class Type;
     class Value;
 }
 
 namespace lldb_private {
     class ClangExpressionDeclMap;
+    class IRExecutionUnit;
+    class IRMemoryMap;
 }
 
 //----------------------------------------------------------------------
@@ -54,14 +57,6 @@ namespace lldb_private {
 class IRForTarget : public llvm::ModulePass
 {
 public:
-    class StaticDataAllocator {
-    public:
-        StaticDataAllocator();
-        virtual ~StaticDataAllocator();
-        virtual lldb_private::StreamString &GetStream() = 0;
-        virtual lldb::addr_t Allocate() = 0;
-    };
-    
     //------------------------------------------------------------------
     /// Constructor
     ///
@@ -84,8 +79,8 @@ public:
     ///     of the function, if it has no side-effects and the result can
     ///     be computed statically.
     ///
-    /// @param[in] data_allocator
-    ///     If non-NULL, the static data allocator to use for literal strings.
+    /// @param[in] execution_unit
+    ///     The holder for raw data associated with the expression.
     ///
     /// @param[in] error_stream
     ///     If non-NULL, a stream on which errors can be printed.
@@ -95,9 +90,7 @@ public:
     //------------------------------------------------------------------
     IRForTarget(lldb_private::ClangExpressionDeclMap *decl_map,
                 bool resolve_vars,
-                lldb_private::ExecutionPolicy execution_policy,
-                lldb::ClangExpressionVariableSP &const_result,
-                StaticDataAllocator *data_allocator,
+                lldb_private::IRExecutionUnit &execution_unit,
                 lldb_private::Stream *error_stream,
                 const char* func_name = "$__lldb_expr");
     
@@ -144,18 +137,6 @@ public:
     //------------------------------------------------------------------
     virtual llvm::PassManagerType 
     getPotentialPassManagerType() const;
-    
-    //------------------------------------------------------------------
-    /// Checks whether the IR interpreter successfully interpreted the
-    /// expression.
-    ///
-    /// Returns true if it did; false otherwise.
-    //------------------------------------------------------------------
-    lldb_private::Error &
-    getInterpreterError ()
-    {
-        return m_interpreter_error;
-    }
 
 private:
     //------------------------------------------------------------------
@@ -636,22 +617,50 @@ private:
     bool 
     ReplaceVariables (llvm::Function &llvm_function);
     
+    //------------------------------------------------------------------
+    /// A module-level pass to remove all global variables from the
+    /// module since it no longer should export or import any symbols.
+    //------------------------------------------------------------------
+    
+    //------------------------------------------------------------------
+    /// The top-level pass implementation
+    ///
+    /// @param[in] llvm_module
+    ///     The module currently being processed.
+    ///
+    /// @return
+    ///     True on success; false otherwise
+    //------------------------------------------------------------------
+    bool
+    StripAllGVs (llvm::Module &llvm_module);
+    
+    class StaticDataAllocator {
+    public:
+        StaticDataAllocator(lldb_private::IRExecutionUnit &execution_unit);
+        lldb_private::StreamString &GetStream()
+        {
+            return m_stream_string;
+        }
+        lldb::addr_t Allocate();
+    private:
+        lldb_private::IRExecutionUnit  &m_execution_unit;
+        lldb_private::StreamString      m_stream_string;
+        lldb::addr_t                    m_allocation;
+    };
+    
     /// Flags
     bool                                    m_resolve_vars;             ///< True if external variable references and persistent variable references should be resolved
-    lldb_private::ExecutionPolicy           m_execution_policy;         ///< True if the interpreter should be used to attempt to get a static result
-    bool                                    m_interpret_success;        ///< True if the interpreter successfully handled the whole expression
     std::string                             m_func_name;                ///< The name of the function to translate
     lldb_private::ConstString               m_result_name;              ///< The name of the result variable ($0, $1, ...)
     lldb_private::TypeFromParser            m_result_type;              ///< The type of the result variable.
     llvm::Module                           *m_module;                   ///< The module being processed, or NULL if that has not been determined yet.
-    std::auto_ptr<llvm::TargetData>         m_target_data;              ///< The target data for the module being processed, or NULL if there is no module.
+    std::unique_ptr<llvm::DataLayout>        m_target_data;              ///< The target data for the module being processed, or NULL if there is no module.
     lldb_private::ClangExpressionDeclMap   *m_decl_map;                 ///< The DeclMap containing the Decls 
-    StaticDataAllocator                    *m_data_allocator;           ///< If non-NULL, the allocator to use for constant strings
+    StaticDataAllocator                     m_data_allocator;           ///< The allocator to use for constant strings
+    lldb_private::IRMemoryMap              &m_memory_map;               ///< The memory map to pass to the IR interpreter
     llvm::Constant                         *m_CFStringCreateWithBytes;  ///< The address of the function CFStringCreateWithBytes, cast to the appropriate function pointer type
     llvm::Constant                         *m_sel_registerName;         ///< The address of the function sel_registerName, cast to the appropriate function pointer type
-    lldb::ClangExpressionVariableSP        &m_const_result;             ///< This value should be set to the return value of the expression if it is constant and the expression has no side effects
     lldb_private::Stream                   *m_error_stream;             ///< If non-NULL, the stream on which errors should be printed
-    lldb_private::Error                     m_interpreter_error;        ///< The error result from the IR interpreter
     
     bool                                    m_has_side_effects;         ///< True if the function's result cannot be simply determined statically
     llvm::StoreInst                        *m_result_store;             ///< If non-NULL, the store instruction that writes to the result variable.  If m_has_side_effects is true, this is NULL.

Modified: lldb/branches/lldb-platform-work/include/lldb/Expression/IRInterpreter.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Expression/IRInterpreter.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Expression/IRInterpreter.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Expression/IRInterpreter.h Thu Jun  6 19:06:43 2013
@@ -14,6 +14,7 @@
 #include "lldb/Core/ConstString.h"
 #include "lldb/Core/Stream.h"
 #include "lldb/Symbol/TaggedASTType.h"
+#include "llvm/ADT/ArrayRef.h"
 #include "llvm/Pass.h"
 
 namespace llvm {
@@ -24,6 +25,7 @@ namespace llvm {
 namespace lldb_private {
 
 class ClangExpressionDeclMap;
+class IRMemoryMap;
     
 }
 
@@ -39,75 +41,24 @@ class ClangExpressionDeclMap;
 class IRInterpreter
 {
 public:
-    //------------------------------------------------------------------
-    /// Constructor
-    ///
-    /// @param[in] decl_map
-    ///     The list of externally-referenced variables for the expression,
-    ///     for use in looking up globals and allocating the argument
-    ///     struct.  See the documentation for ClangExpressionDeclMap.
-    ///
-    /// @param[in] error_stream
-    ///     If non-NULL, a stream on which errors can be printed.
-    //------------------------------------------------------------------
-    IRInterpreter(lldb_private::ClangExpressionDeclMap &decl_map,
-                  lldb_private::Stream *error_stream);
+    static bool
+    CanInterpret (llvm::Module &module,
+                  llvm::Function &function,
+                  lldb_private::Error &error);
     
-    //------------------------------------------------------------------
-    /// Destructor
-    //------------------------------------------------------------------
-    ~IRInterpreter();
+    static bool
+    Interpret (llvm::Module &module,
+               llvm::Function &function,
+               llvm::ArrayRef<lldb::addr_t> args,
+               lldb_private::IRMemoryMap &memory_map,
+               lldb_private::Error &error,
+               lldb::addr_t stack_frame_bottom,
+               lldb::addr_t stack_frame_top);
     
-    //------------------------------------------------------------------
-    /// Run the IR interpreter on a single function
-    ///
-    /// @param[in] result
-    ///     This variable is populated with the return value of the
-    ///     function, if it could be interpreted completely.
-    ///
-    /// @param[in] result_name
-    ///     The name of the result in the IR.  If this name got a
-    ///     value written to it as part of execution, then that value
-    ///     will be used to create the result variable.
-    ///
-    /// @param[in] result_type
-    ///     The type of the result.
-    ///
-    /// @param[in] llvm_function
-    ///     The function to interpret.
-    ///
-    /// @param[in] llvm_module
-    ///     The module containing the function.
-    ///
-    /// @param[in] error
-    ///     If the expression fails to interpret, a reason why.
-    ///
-    /// @return
-    ///     True on success; false otherwise
-    //------------------------------------------------------------------
-    bool 
-    maybeRunOnFunction (lldb::ClangExpressionVariableSP &result,
-                        const lldb_private::ConstString &result_name,
-                        lldb_private::TypeFromParser result_type,
-                        llvm::Function &llvm_function,
-                        llvm::Module &llvm_module,
-                        lldb_private::Error &err);
-private:
-    /// Flags
-    lldb_private::ClangExpressionDeclMap &m_decl_map;       ///< The DeclMap containing the Decls 
-    lldb_private::Stream *m_error_stream;
-    
-    bool
+private:   
+    static bool
     supportsFunction (llvm::Function &llvm_function,
                       lldb_private::Error &err);
-    
-    bool 
-    runOnFunction (lldb::ClangExpressionVariableSP &result,
-                   const lldb_private::ConstString &result_name,
-                   lldb_private::TypeFromParser result_type,
-                   llvm::Function &llvm_function,
-                   llvm::Module &llvm_module,
-                   lldb_private::Error &err);
 };
 
 #endif

Copied: lldb/branches/lldb-platform-work/include/lldb/Expression/IRMemoryMap.h (from r182522, lldb/trunk/include/lldb/Expression/IRMemoryMap.h)
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Expression/IRMemoryMap.h?p2=lldb/branches/lldb-platform-work/include/lldb/Expression/IRMemoryMap.h&p1=lldb/trunk/include/lldb/Expression/IRMemoryMap.h&r1=182522&r2=183468&rev=183468&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Expression/IRMemoryMap.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Expression/IRMemoryMap.h Thu Jun  6 19:06:43 2013
@@ -50,6 +50,7 @@ public:
     };
 
     lldb::addr_t Malloc (size_t size, uint8_t alignment, uint32_t permissions, AllocationPolicy policy, Error &error);
+    void Leak (lldb::addr_t process_address, Error &error);
     void Free (lldb::addr_t process_address, Error &error);
     
     void WriteMemory (lldb::addr_t process_address, const uint8_t *bytes, size_t size, Error &error);
@@ -84,7 +85,10 @@ private:
         uint32_t        m_permissions;      ///< The access permissions on the memory in the process.  In the host, the memory is always read/write.
         uint8_t         m_alignment;        ///< The alignment of the requested allocation
         DataBufferHeap  m_data;
+        
+        ///< Flags
         AllocationPolicy    m_policy;
+        bool                m_leak;
     public:
         Allocation (lldb::addr_t process_alloc,
                     lldb::addr_t process_start,
@@ -100,7 +104,8 @@ private:
             m_permissions (0),
             m_alignment (0),
             m_data (),
-            m_policy (eAllocationPolicyInvalid)
+            m_policy (eAllocationPolicyInvalid),
+            m_leak (false)
         {
         }
     };

Copied: lldb/branches/lldb-platform-work/include/lldb/Expression/Materializer.h (from r182522, lldb/trunk/include/lldb/Expression/Materializer.h)
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Expression/Materializer.h?p2=lldb/branches/lldb-platform-work/include/lldb/Expression/Materializer.h&p1=lldb/trunk/include/lldb/Expression/Materializer.h&r1=182522&r2=183468&rev=183468&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Expression/Materializer.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Expression/Materializer.h Thu Jun  6 19:06:43 2013
@@ -155,7 +155,6 @@ private:
     typedef std::unique_ptr<Entity>  EntityUP;
     typedef std::vector<EntityUP>   EntityVector;
     
-    unsigned                        m_result_index;
     DematerializerWP                m_dematerializer_wp;
     EntityVector                    m_entities;
     Entity                         *m_result_entity;

Removed: lldb/branches/lldb-platform-work/include/lldb/Expression/ProcessDataAllocator.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Expression/ProcessDataAllocator.h?rev=183467&view=auto
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Expression/ProcessDataAllocator.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Expression/ProcessDataAllocator.h (removed)
@@ -1,72 +0,0 @@
-//===-- ProcessDataAllocator.h ----------------------------------*- C++ -*-===//
-//
-//                     The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef liblldb_ProcessDataAllocator_h_
-#define liblldb_ProcessDataAllocator_h_
-
-#include "lldb/lldb-forward.h"
-#include "lldb/lldb-private.h"
-#include "lldb/Expression/IRForTarget.h"
-#include "lldb/Target/Process.h"
-
-namespace lldb_private 
-{
-
-class ProcessDataAllocator : public IRForTarget::StaticDataAllocator {
-public:
-    ProcessDataAllocator(Process &process) : 
-        IRForTarget::StaticDataAllocator(),
-        m_process(process),
-        m_stream_string(StreamString::eBinary, process.GetAddressByteSize(), process.GetByteOrder()),
-        m_allocation(0)
-    {
-    }
-    
-    ~ProcessDataAllocator()
-    {
-        if (m_allocation)
-            m_process.DeallocateMemory(m_allocation);
-    }
-    
-    lldb_private::StreamString &GetStream()
-    {
-        return m_stream_string;
-    }
-    
-    lldb::addr_t Allocate()
-    {
-        Error err;
-        
-        if (m_allocation)
-            m_process.DeallocateMemory(m_allocation);
-        
-        m_allocation = m_process.AllocateMemory(m_stream_string.GetSize(), lldb::ePermissionsReadable | lldb::ePermissionsWritable, err);
-        
-        if (!err.Success())
-            return 0;
-        
-        if (m_allocation)
-            m_process.WriteMemory(m_allocation, m_stream_string.GetData(), m_stream_string.GetSize(), err);
-        
-        if (!err.Success())
-            return 0;
-        
-        return m_allocation;
-    }
-    
-    void Dump(lldb_private::Stream &stream);
-private:
-    Process        &m_process;
-    StreamString    m_stream_string;
-    lldb::addr_t    m_allocation;
-};
-    
-} // namespace lldb_private
-
-#endif

Removed: lldb/branches/lldb-platform-work/include/lldb/Expression/RecordingMemoryManager.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Expression/RecordingMemoryManager.h?rev=183467&view=auto
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Expression/RecordingMemoryManager.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Expression/RecordingMemoryManager.h (removed)
@@ -1,401 +0,0 @@
-//===-- RecordingMemoryManager.h --------------------------------*- C++ -*-===//
-//
-//                     The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef lldb_RecordingMemoryManager_h_
-#define lldb_RecordingMemoryManager_h_
-
-// C Includes
-// C++ Includes
-#include <string>
-#include <vector>
-#include <map>
-
-// Other libraries and framework includes
-// Project includes
-#include "lldb/lldb-forward.h"
-#include "lldb/lldb-private.h"
-#include "lldb/Core/ClangForward.h"
-#include "lldb/Core/Log.h"
-#include "llvm/ExecutionEngine/JITMemoryManager.h"
-#include "lldb/Expression/ClangExpression.h"
-#include "lldb/Expression/ClangExpressionParser.h"
-
-namespace lldb_private {
-
-//----------------------------------------------------------------------
-/// @class RecordingMemoryManager RecordingMemoryManager.h "lldb/Expression/RecordingMemoryManager.h"
-/// @brief Passthrough memory manager for the JIT that records what was allocated where
-///
-/// The LLVM JIT is built to compile code for execution in the current
-/// process, so it needs to be able to allocate memory.  Because different
-/// clients have different requirements for the locations of JIT compiled
-/// code, the interface for allocating memory has been abstracted out and
-/// can be implemented by any client.
-///
-/// LLDB, however, needs to move JIT-compiled code into the target process.
-/// Because writing individual bytes of code hasn't been abstracted out of
-/// the JIT, LLDB instead implements a custom memory allocator that records 
-/// what regions have been allocated for code.  When JIT compilation is
-/// complete, these regions are then copied as necessary into the target
-/// process.
-///
-/// Ideally the memory manager would handle this copying, but this class has 
-/// to be built without RTTI, which means it cannot include Process.h.  As a
-/// result, ClangExpression::WriteJITCode() accesses the stored mappings 
-/// directly.
-//----------------------------------------------------------------------
-class RecordingMemoryManager : public llvm::JITMemoryManager
-{
-public:
-    //------------------------------------------------------------------
-    /// Constructor
-    //------------------------------------------------------------------
-    RecordingMemoryManager ();
-    
-    //------------------------------------------------------------------
-    /// Destructor
-    //------------------------------------------------------------------
-    virtual ~RecordingMemoryManager();
-
-    //------------------------------------------------------------------
-    /// Passthrough interface stub
-    //------------------------------------------------------------------
-    virtual void setMemoryWritable ();
-
-    //------------------------------------------------------------------
-    /// Passthrough interface stub
-    //------------------------------------------------------------------
-    virtual void setMemoryExecutable ();
-
-    //------------------------------------------------------------------
-    /// Passthrough interface stub
-    //------------------------------------------------------------------
-    virtual void setPoisonMemory (bool poison)
-    {
-        m_default_mm_ap->setPoisonMemory (poison);
-    }
-
-    //------------------------------------------------------------------
-    /// Passthrough interface stub
-    //------------------------------------------------------------------
-    virtual void AllocateGOT()
-    {
-        m_default_mm_ap->AllocateGOT();
-    }
-
-    //------------------------------------------------------------------
-    /// Passthrough interface stub
-    //------------------------------------------------------------------
-    virtual uint8_t *getGOTBase() const
-    {
-        return m_default_mm_ap->getGOTBase();
-    }
-
-    //------------------------------------------------------------------
-    /// Passthrough interface stub
-    //------------------------------------------------------------------
-    virtual uint8_t *startFunctionBody(const llvm::Function *F,
-                                       uintptr_t &ActualSize);
-
-    //------------------------------------------------------------------
-    /// Allocate room for a dyld stub for a lazy-referenced function,
-    /// and add it to the m_stubs map
-    ///
-    /// @param[in] F
-    ///     The function being referenced.
-    ///
-    /// @param[in] StubSize
-    ///     The size of the stub.
-    ///
-    /// @param[in] Alignment
-    ///     The required alignment of the stub.
-    ///
-    /// @return
-    ///     Allocated space for the stub.
-    //------------------------------------------------------------------
-    virtual uint8_t *allocateStub(const llvm::GlobalValue* F, 
-                                  unsigned StubSize,
-                                  unsigned Alignment);
-
-    //------------------------------------------------------------------
-    /// Complete the body of a function, and add it to the m_functions map
-    ///
-    /// @param[in] F
-    ///     The function being completed.
-    ///
-    /// @param[in] FunctionStart
-    ///     The first instruction of the function.
-    ///
-    /// @param[in] FunctionEnd
-    ///     The last byte of the last instruction of the function.
-    //------------------------------------------------------------------
-    virtual void endFunctionBody(const llvm::Function *F, 
-                                 uint8_t *FunctionStart,
-                                 uint8_t *FunctionEnd);
-    //------------------------------------------------------------------
-    /// Allocate space for an unspecified purpose, and add it to the
-    /// m_spaceBlocks map
-    ///
-    /// @param[in] Size
-    ///     The size of the area.
-    ///
-    /// @param[in] Alignment
-    ///     The required alignment of the area.
-    ///
-    /// @return
-    ///     Allocated space.
-    //------------------------------------------------------------------
-    virtual uint8_t *allocateSpace(intptr_t Size, unsigned Alignment);
-    
-    //------------------------------------------------------------------
-    /// Allocate space for executable code, and add it to the 
-    /// m_spaceBlocks map
-    ///
-    /// @param[in] Size
-    ///     The size of the area.
-    ///
-    /// @param[in] Alignment
-    ///     The required alignment of the area.
-    ///
-    /// @param[in] SectionID
-    ///     A unique identifier for the section.
-    ///
-    /// @return
-    ///     Allocated space.
-    //------------------------------------------------------------------
-    virtual uint8_t *allocateCodeSection(uintptr_t Size, unsigned Alignment,
-                                         unsigned SectionID);
-    
-    //------------------------------------------------------------------
-    /// Allocate space for data, and add it to the m_spaceBlocks map
-    ///
-    /// @param[in] Size
-    ///     The size of the area.
-    ///
-    /// @param[in] Alignment
-    ///     The required alignment of the area.
-    ///
-    /// @param[in] SectionID
-    ///     A unique identifier for the section.
-    ///
-    /// @return
-    ///     Allocated space.
-    //------------------------------------------------------------------
-    virtual uint8_t *allocateDataSection(uintptr_t Size, unsigned Alignment,
-                                         unsigned SectionID);
-
-    //------------------------------------------------------------------
-    /// Allocate space for a global variable, and add it to the
-    /// m_spaceBlocks map
-    ///
-    /// @param[in] Size
-    ///     The size of the variable.
-    ///
-    /// @param[in] Alignment
-    ///     The required alignment of the variable.
-    ///
-    /// @return
-    ///     Allocated space for the global.
-    //------------------------------------------------------------------
-    virtual uint8_t *allocateGlobal(uintptr_t Size, 
-                                    unsigned Alignment);
-
-    //------------------------------------------------------------------
-    /// Passthrough interface stub
-    //------------------------------------------------------------------
-    virtual void deallocateFunctionBody(void *Body);
-
-    //------------------------------------------------------------------
-    /// Passthrough interface stub
-    //------------------------------------------------------------------
-    virtual uint8_t* startExceptionTable(const llvm::Function* F,
-                                         uintptr_t &ActualSize);
-
-    //------------------------------------------------------------------
-    /// Complete the exception table for a function, and add it to the
-    /// m_exception_tables map
-    ///
-    /// @param[in] F
-    ///     The function whose exception table is being written.
-    ///
-    /// @param[in] TableStart
-    ///     The first byte of the exception table.
-    ///
-    /// @param[in] TableEnd
-    ///     The last byte of the exception table.
-    ///
-    /// @param[in] FrameRegister
-    ///     I don't know what this does, but it's passed through.
-    //------------------------------------------------------------------
-    virtual void endExceptionTable(const llvm::Function *F, 
-                                   uint8_t *TableStart,
-                                   uint8_t *TableEnd, 
-                                   uint8_t* FrameRegister);
-
-    //------------------------------------------------------------------
-    /// Passthrough interface stub
-    //------------------------------------------------------------------
-    virtual void deallocateExceptionTable(void *ET);
-
-    //------------------------------------------------------------------
-    /// Passthrough interface stub
-    //------------------------------------------------------------------
-    virtual size_t GetDefaultCodeSlabSize() {
-        return m_default_mm_ap->GetDefaultCodeSlabSize();
-    }
-
-    //------------------------------------------------------------------
-    /// Passthrough interface stub
-    //------------------------------------------------------------------
-    virtual size_t GetDefaultDataSlabSize() {
-        return m_default_mm_ap->GetDefaultDataSlabSize();
-    }
-
-    virtual size_t GetDefaultStubSlabSize() {
-        return m_default_mm_ap->GetDefaultStubSlabSize();
-    }
-
-    //------------------------------------------------------------------
-    /// Passthrough interface stub
-    //------------------------------------------------------------------
-    virtual unsigned GetNumCodeSlabs() {
-        return m_default_mm_ap->GetNumCodeSlabs();
-    }
-
-    //------------------------------------------------------------------
-    /// Passthrough interface stub
-    //------------------------------------------------------------------
-    virtual unsigned GetNumDataSlabs() {
-        return m_default_mm_ap->GetNumDataSlabs();
-    }
-
-    //------------------------------------------------------------------
-    /// Passthrough interface stub
-    //------------------------------------------------------------------
-    virtual unsigned GetNumStubSlabs() {
-        return m_default_mm_ap->GetNumStubSlabs();
-    }
-
-    //------------------------------------------------------------------
-    /// [Convenience method for ClangExpressionParser] Look up the object in
-    /// m_address_map that contains a given address, find where it was
-    /// copied to, and return the remote address at the same offset into
-    /// the copied entity
-    ///
-    /// @param[in] local_address
-    ///     The address in the debugger.
-    ///
-    /// @return
-    ///     The address in the target process.
-    //------------------------------------------------------------------
-    lldb::addr_t
-    GetRemoteAddressForLocal (lldb::addr_t local_address);
-    
-    //------------------------------------------------------------------
-    /// [Convenience method for ClangExpressionParser] Look up the object in
-    /// m_address_map that contains a given address, find where it was
-    /// copied to, and return its address range in the target process
-    ///
-    /// @param[in] local_address
-    ///     The address in the debugger.
-    ///
-    /// @return
-    ///     The range of the containing object in the target process.
-    //------------------------------------------------------------------
-    typedef std::pair <lldb::addr_t, uintptr_t> AddrRange;
-    AddrRange
-    GetRemoteRangeForLocal (lldb::addr_t local_address);
-    
-    //------------------------------------------------------------------
-    /// [Convenience method for ClangExpressionParser] Commit all allocations
-    /// to the process and record where they were stored.
-    ///
-    /// @param[in] process
-    ///     The process to allocate memory in.
-    ///
-    /// @return
-    ///     True <=> all allocations were performed successfully.
-    ///     This method will attempt to free allocated memory if the
-    ///     operation fails.
-    //------------------------------------------------------------------
-    bool
-    CommitAllocations (Process &process);
-    
-    //------------------------------------------------------------------
-    /// [Convenience method for ClangExpressionParser] Report all committed
-    /// allocations to the execution engine.
-    ///
-    /// @param[in] engine
-    ///     The execution engine to notify.
-    //------------------------------------------------------------------
-    void
-    ReportAllocations (llvm::ExecutionEngine &engine);
-    
-    //------------------------------------------------------------------
-    /// [Convenience method for ClangExpressionParser] Write the contents
-    /// of all allocations to the process. 
-    ///
-    /// @param[in] local_address
-    ///     The process containing the allocations.
-    ///
-    /// @return
-    ///     True <=> all allocations were performed successfully.
-    //------------------------------------------------------------------
-    bool
-    WriteData (Process &process);
-private:
-    std::auto_ptr<JITMemoryManager> m_default_mm_ap;    ///< The memory allocator to use in actually creating space.  All calls are passed through to it.
-    
-    lldb::LogSP m_log; ///< The log to use when printing log messages.  May be NULL.
-
-    //----------------------------------------------------------------------
-    /// @class Allocation RecordingMemoryManager.h "lldb/Expression/RecordingMemoryManager.h"
-    /// @brief A record of a region that has been allocated by the JIT.
-    ///
-    /// The RecordingMemoryManager makes records of all regions that need copying;
-    /// upon requests, it allocates and 
-    //----------------------------------------------------------------------
-    struct Allocation
-    {
-        lldb::addr_t    m_remote_allocation;///< The (unaligned) base for the remote allocation
-        lldb::addr_t    m_remote_start;     ///< The base address of the remote allocation
-        uintptr_t       m_local_start;      ///< The base address of the local allocation
-        uintptr_t       m_size;             ///< The size of the allocation
-        unsigned        m_section_id;       ///< The ID of the section
-        unsigned        m_alignment;        ///< The required alignment for the allocation
-        bool            m_executable;       ///< True <=> the allocation must be executable in the target
-        bool            m_allocated;        ///< True <=> the allocation has been propagated to the target
-
-        static const unsigned eSectionIDNone = (unsigned)-1;
-        
-        //------------------------------------------------------------------
-        /// Constructor
-        //------------------------------------------------------------------
-        Allocation () :
-            m_remote_allocation(0),
-            m_remote_start(0),
-            m_local_start(0),
-            m_size(0),
-            m_section_id(eSectionIDNone),
-            m_alignment(0),
-            m_executable(false),
-            m_allocated(false)
-        {
-        }
-        
-        void dump (lldb::LogSP log);
-    };
-
-    typedef std::vector<Allocation> AllocationList;
-    AllocationList                  m_allocations;  ///< The base address of the remote allocation
-};
-
-} // namespace lldb_private
-
-#endif  // lldb_RecordingMemoryManager_h_

Modified: lldb/branches/lldb-platform-work/include/lldb/Host/File.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Host/File.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Host/File.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Host/File.h Thu Jun  6 19:06:43 2013
@@ -41,17 +41,20 @@ public:
         eOpenOptionCanCreateNewOnly     = (1u << 6)     // Can create file only if it doesn't already exist
     };
     
+    static mode_t
+    ConvertOpenOptionsForPOSIXOpen (uint32_t open_options);
+    
     enum Permissions
     {
-        ePermissionsUserRead        = (1u << 0),
-        ePermissionsUserWrite       = (1u << 1),
-        ePermissionsUserExecute     = (1u << 2),
-        ePermissionsGroupRead       = (1u << 3),
+        ePermissionsUserRead        = (1u << 8),
+        ePermissionsUserWrite       = (1u << 7),
+        ePermissionsUserExecute     = (1u << 6),
+        ePermissionsGroupRead       = (1u << 5),
         ePermissionsGroupWrite      = (1u << 4),
-        ePermissionsGroupExecute    = (1u << 5),
-        ePermissionsWorldRead       = (1u << 6),
-        ePermissionsWorldWrite      = (1u << 7),
-        ePermissionsWorldExecute    = (1u << 8),
+        ePermissionsGroupExecute    = (1u << 3),
+        ePermissionsWorldRead       = (1u << 2),
+        ePermissionsWorldWrite      = (1u << 1),
+        ePermissionsWorldExecute    = (1u << 0),
 
         ePermissionsUserRW      = (ePermissionsUserRead    | ePermissionsUserWrite    | 0                        ),
         ePermissionsUserRX      = (ePermissionsUserRead    | 0                        | ePermissionsUserExecute  ),
@@ -303,17 +306,19 @@ public:
     /// @see File::Read (void *, size_t, off_t &)
     /// @see File::Write (const void *, size_t, off_t &)
     ///
-    /// @param[in/out] offset
+    /// @param[in] offset
     ///     The offset to seek to within the file relative to the 
-    ///     beginning of the file which gets filled in the the resulting
-    ///     absolute file offset.
+    ///     beginning of the file.
+    ///
+    /// @param[in] error_ptr
+    ///     A pointer to a lldb_private::Error object that will be
+    ///     filled in if non-NULL.
     ///
     /// @return
-    ///     An error object that indicates success or the reason for 
-    ///     failure.
+    ///     The resulting seek offset, or -1 on error.
     //------------------------------------------------------------------
-    Error
-    SeekFromStart (off_t& offset);
+    off_t
+    SeekFromStart (off_t offset, Error *error_ptr = NULL);
     
     //------------------------------------------------------------------
     /// Seek to an offset relative to the current file position.
@@ -324,17 +329,19 @@ public:
     /// @see File::Read (void *, size_t, off_t &)
     /// @see File::Write (const void *, size_t, off_t &)
     ///
-    /// @param[in/out] offset
+    /// @param[in] offset
     ///     The offset to seek to within the file relative to the 
-    ///     current file position. On return this parameter gets filled 
-    ///     in the the resulting absolute file offset.
+    ///     current file position.
+    ///
+    /// @param[in] error_ptr
+    ///     A pointer to a lldb_private::Error object that will be
+    ///     filled in if non-NULL.
     ///
     /// @return
-    ///     An error object that indicates success or the reason for 
-    ///     failure.
+    ///     The resulting seek offset, or -1 on error.
     //------------------------------------------------------------------
-    Error
-    SeekFromCurrent (off_t& offset);
+    off_t
+    SeekFromCurrent (off_t offset, Error *error_ptr = NULL);
     
     //------------------------------------------------------------------
     /// Seek to an offset relative to the end of the file.
@@ -350,12 +357,15 @@ public:
     ///     end of the file which gets filled in the the resulting
     ///     absolute file offset.
     ///
+    /// @param[in] error_ptr
+    ///     A pointer to a lldb_private::Error object that will be
+    ///     filled in if non-NULL.
+    ///
     /// @return
-    ///     An error object that indicates success or the reason for 
-    ///     failure.
+    ///     The resulting seek offset, or -1 on error.
     //------------------------------------------------------------------
-    Error
-    SeekFromEnd (off_t& offset);
+    off_t
+    SeekFromEnd (off_t offset, Error *error_ptr = NULL);
 
     //------------------------------------------------------------------
     /// Read bytes from a file from the specified file offset.
@@ -399,6 +409,10 @@ public:
     ///     bytes. This offset gets incremented by the number of bytes
     ///     that were read.
     ///
+    /// @param[in] null_terminate
+    ///     Ensure that the data that is read is terminated with a NULL
+    ///     character so that the data can be used as a C string.
+    ///
     /// @param[out] data_buffer_sp
     ///     A data buffer to create and fill in that will contain any
     ///     data that is read from the file. This buffer will be reset
@@ -409,7 +423,10 @@ public:
     ///     failure.
     //------------------------------------------------------------------
     Error
-    Read (size_t &num_bytes, off_t &offset, lldb::DataBufferSP &data_buffer_sp);
+    Read (size_t &num_bytes,
+          off_t &offset,
+          bool null_terminate,
+          lldb::DataBufferSP &data_buffer_sp);
 
     //------------------------------------------------------------------
     /// Write bytes to a file at the specified file offset.
@@ -458,6 +475,19 @@ public:
     //------------------------------------------------------------------
     Error
     Sync ();
+    
+    //------------------------------------------------------------------
+    /// Get the permissions for a this file.
+    ///
+    /// @return
+    ///     Bits logical OR'ed together from the permission bits defined
+    ///     in lldb_private::File::Permissions.
+    //------------------------------------------------------------------
+    uint32_t
+    GetPermissions(Error &error) const;
+    
+    static uint32_t
+    GetPermissions (const char *path, Error &error);
 
     //------------------------------------------------------------------
     /// Output printf formatted output to the stream.
@@ -471,10 +501,10 @@ public:
     ///     Variable arguments that are needed for the printf style
     ///     format string \a format.
     //------------------------------------------------------------------
-    int
+    size_t
     Printf (const char *format, ...)  __attribute__ ((format (printf, 2, 3)));
     
-    int
+    size_t
     PrintfVarArg(const char *format, va_list args);
 
 protected:

Modified: lldb/branches/lldb-platform-work/include/lldb/Host/FileSpec.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Host/FileSpec.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Host/FileSpec.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Host/FileSpec.h Thu Jun  6 19:06:43 2013
@@ -330,6 +330,29 @@ public:
     const ConstString &
     GetFilename () const;
 
+    //------------------------------------------------------------------
+    /// Returns true if the filespec represents an implementation source
+    /// file (files with a ".c", ".cpp", ".m", ".mm" (many more)
+    /// extension).
+    ///
+    /// @return
+    ///     \b true if the filespec represents an implementation source
+    ///     file, \b false otherwise.
+    //------------------------------------------------------------------
+    bool
+    IsSourceImplementationFile () const;
+
+    //------------------------------------------------------------------
+    /// Returns true if the filespec represents path that is relative
+    /// path to the current working directory.
+    ///
+    /// @return
+    ///     \b true if the filespec represents a current working
+    ///     directory relative path, \b false otherwise.
+    //------------------------------------------------------------------
+    bool
+    IsRelativeToCurrentWorkingDirectory () const;
+    
     TimeValue
     GetModificationTime () const;
 
@@ -360,19 +383,15 @@ public:
     //------------------------------------------------------------------
     /// Extract the full path to the file.
     ///
-    /// Extract the directory and path into a std::string. This is
-    /// needed as the directory and path are stored in separate string
-    /// values.
-    ///
-    /// @param[out] path
-    ///     The buffer in which to place the extracted full path.
+    /// Extract the directory and path into a std::string, which is returned.
     ///
     /// @return
-    ///     Returns the number of characters that make up this path.
+    ///     Returns a std::string with the directory and filename 
+    ///     concatenated.
     //------------------------------------------------------------------
-    size_t
-    GetPath (std::string& path) const;
-    
+    std::string
+    GetPath () const;
+
     //------------------------------------------------------------------
     /// Extract the extension of the file.
     ///
@@ -404,6 +423,36 @@ public:
     FileType
     GetFileType () const;
 
+    bool
+    IsDirectory () const
+    {
+        return GetFileType() == FileSpec::eFileTypeDirectory;
+    }
+
+    bool
+    IsPipe () const
+    {
+        return GetFileType() == FileSpec::eFileTypePipe;
+    }
+
+    bool
+    IsRegularFile () const
+    {
+        return GetFileType() == FileSpec::eFileTypeRegular;
+    }
+
+    bool
+    IsSocket () const
+    {
+        return GetFileType() == FileSpec::eFileTypeSocket;
+    }
+
+    bool
+    IsSymbolicLink () const
+    {
+        return GetFileType() == FileSpec::eFileTypeSymbolicLink;
+    }
+
     //------------------------------------------------------------------
     /// Get the memory cost of this object.
     ///
@@ -483,6 +532,21 @@ public:
     size_t
     ReadFileContents (off_t file_offset, void *dst, size_t dst_len, Error *error_ptr) const;
 
+    
+    //------------------------------------------------------------------
+    /// Read the entire contents of a file as data that can be used
+    /// as a C string.
+    ///
+    /// Read the entire contents of a file and ensure that the data
+    /// is NULL terminated so it can be used as a C string.
+    ///
+    /// @return
+    ///     A shared pointer to the data. This shared pointer can
+    ///     contain a NULL DataBuffer pointer, so the contained pointer
+    ///     must be checked prior to using it.
+    //------------------------------------------------------------------
+    lldb::DataBufferSP
+    ReadFileContentsAsCString(Error *error_ptr = NULL);
     //------------------------------------------------------------------
     /// Change the file specificed with a new path.
     ///

Modified: lldb/branches/lldb-platform-work/include/lldb/Host/Host.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Host/Host.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Host/Host.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Host/Host.h Thu Jun  6 19:06:43 2013
@@ -14,6 +14,7 @@
 #include <stdarg.h>
 
 #include <map>
+#include <string>
 
 #include "lldb/lldb-private.h"
 #include "lldb/Core/StringList.h"
@@ -101,6 +102,16 @@ public:
     static lldb::ByteOrder
     GetByteOrder ();
 
+    //------------------------------------------------------------------
+    /// Returns the number of CPUs on this current host.
+    ///
+    /// @return
+    ///     Number of CPUs on this current host, or zero if the number
+    ///     of CPUs can't be determined on this host.
+    //------------------------------------------------------------------
+    static uint32_t
+    GetNumberCPUS ();
+
     static bool
     GetOSVersion (uint32_t &major, 
                   uint32_t &minor, 
@@ -269,11 +280,9 @@ public:
     ///     The thread ID for which we are trying retrieve the name of.
     ///
     /// @return
-    ///     A NULL terminate C string name that is owned by a static
-    ///     global string pool, or NULL if there is no matching thread
-    ///     name. This string does not need to be freed.
+    ///     A std::string containing the thread name.
     //------------------------------------------------------------------
-    static const char *
+    static std::string
     GetThreadName (lldb::pid_t pid, lldb::tid_t tid);
 
     //------------------------------------------------------------------
@@ -292,7 +301,7 @@ public:
     ///     \b true if the thread name was able to be set, \b false
     ///     otherwise.
     //------------------------------------------------------------------
-    static void
+    static bool
     SetThreadName (lldb::pid_t pid, lldb::tid_t tid, const char *name);
 
     //------------------------------------------------------------------
@@ -407,7 +416,12 @@ public:
     static uint32_t
     FindProcesses (const ProcessInstanceInfoMatch &match_info,
                    ProcessInstanceInfoList &proc_infos);
-    
+
+    typedef std::map<lldb::pid_t, bool> TidMap;
+    typedef std::pair<lldb::pid_t, bool> TidPair;
+    static bool
+    FindProcessThreads (const lldb::pid_t pid, TidMap &tids_to_attach);
+
     static bool
     GetProcessInfo (lldb::pid_t pid, ProcessInstanceInfo &proc_info);
     
@@ -423,7 +437,8 @@ public:
                      int *status_ptr,               // Pass NULL if you don't want the process exit status
                      int *signo_ptr,                // Pass NULL if you don't want the signal that caused the process to exit
                      std::string *command_output,   // Pass NULL if you don't want the command output
-                     uint32_t timeout_sec);         // Timeout in seconds to wait for shell program to finish
+                     uint32_t timeout_sec,
+                     const char *shell = "/bin/bash");
     
     static lldb::DataBufferSP
     GetAuxvData (lldb_private::Process *process);
@@ -466,16 +481,26 @@ public:
     static lldb::user_id_t
     OpenFile (const FileSpec& file_spec,
               uint32_t flags,
-              mode_t mode);
+              mode_t mode,
+              Error &error);
     
     static bool
-    CloseFile (lldb::user_id_t fd);
-    
-    static uint32_t
-    WriteFile (lldb::user_id_t fd, uint64_t offset, void* data, size_t data_len);
+    CloseFile (lldb::user_id_t fd,
+               Error &error);
     
-    static uint32_t
-    ReadFile (lldb::user_id_t fd, uint64_t offset, void* data_ptr, size_t len_wanted);
+    static uint64_t
+    WriteFile (lldb::user_id_t fd,
+               uint64_t offset,
+               const void* src,
+               uint64_t src_len,
+               Error &error);
+    
+    static uint64_t
+    ReadFile (lldb::user_id_t fd,
+              uint64_t offset,
+              void* dst,
+              uint64_t dst_len,
+              Error &error);
 
     static lldb::user_id_t
     GetFileSize (const FileSpec& file_spec);

Modified: lldb/branches/lldb-platform-work/include/lldb/Host/Mutex.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Host/Mutex.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Host/Mutex.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Host/Mutex.h Thu Jun  6 19:06:43 2013
@@ -193,6 +193,9 @@ public:
     /// @return
     ///     The error code from \c pthread_mutex_lock().
     //------------------------------------------------------------------
+#ifdef LLDB_CONFIGURATION_DEBUG
+    virtual
+#endif
     int
     Lock();
 
@@ -280,6 +283,27 @@ protected:
     pthread_t m_thread_that_tried;
     std::string m_failure_message;
 };
+
+class LoggingMutex : public Mutex
+{
+public:
+    LoggingMutex() : Mutex(),m_locked(false)  {}
+    LoggingMutex(Mutex::Type type) : Mutex (type),m_locked(false) {}
+    
+    virtual
+    ~LoggingMutex() {}
+    
+    virtual int
+    Lock ();
+    
+    virtual int
+    Unlock ();
+    
+    virtual int
+    TryLock (const char *failure_message = NULL);
+protected:
+    bool m_locked;
+};
 #endif
 
 } // namespace lldb_private

Modified: lldb/branches/lldb-platform-work/include/lldb/Host/Predicate.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Host/Predicate.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Host/Predicate.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Host/Predicate.h Thu Jun  6 19:06:43 2013
@@ -193,6 +193,13 @@ public:
     /// logically set in \a m_value. If any bits are already set in
     /// \a m_value, this function will return without waiting.
     ///
+    /// It is possible for the value to be changed between the time
+    /// the bits are set and the time the waiting thread wakes up.
+    /// If the bits are no longer set when the waiting thread wakes
+    /// up, it will go back into a wait state.  It may be necessary
+    /// for the calling code to use additional thread synchronization
+    /// methods to detect transitory states.
+    ///
     /// @param[in] bits
     ///     The bits we are waiting to be set in \a m_value.
     ///
@@ -236,6 +243,13 @@ public:
     /// logically reset in \a m_value. If all bits are already reset in
     /// \a m_value, this function will return without waiting.
     ///
+    /// It is possible for the value to be changed between the time
+    /// the bits are reset and the time the waiting thread wakes up.
+    /// If the bits are no set when the waiting thread wakes up, it will
+    /// go back into a wait state.  It may be necessary for the calling
+    /// code to use additional thread synchronization methods to detect
+    /// transitory states.
+    ///
     /// @param[in] bits
     ///     The bits we are waiting to be reset in \a m_value.
     ///
@@ -280,6 +294,13 @@ public:
     /// value. If \a m_value is already equal to \a value, this
     /// function will return without waiting.
     ///
+    /// It is possible for the value to be changed between the time
+    /// the value is set and the time the waiting thread wakes up.
+    /// If the value no longer matches the requested value when the
+    /// waiting thread wakes up, it will go back into a wait state.  It
+    /// may be necessary for the calling code to use additional thread
+    /// synchronization methods to detect transitory states.
+    ///
     /// @param[in] value
     ///     The value we want \a m_value to be equal to.
     ///
@@ -320,6 +341,41 @@ public:
         return m_value == value;
     }
 
+    //------------------------------------------------------------------
+    /// Wait for \a m_value to be equal to \a value and then set it to
+    /// a new value.
+    ///
+    /// Waits in a thread safe way for \a m_value to be equal to \a
+    /// value and then sets \a m_value to \a new_value. If \a m_value
+    /// is already equal to \a value, this function will immediately
+    /// set \a m_value to \a new_value and return without waiting.
+    ///
+    /// It is possible for the value to be changed between the time
+    /// the value is set and the time the waiting thread wakes up.
+    /// If the value no longer matches the requested value when the
+    /// waiting thread wakes up, it will go back into a wait state.  It
+    /// may be necessary for the calling code to use additional thread
+    /// synchronization methods to detect transitory states.
+    ///
+    /// @param[in] value
+    ///     The value we want \a m_value to be equal to.
+    ///
+    /// @param[in] new_value
+    ///     The value to which \a m_value will be set if \b true is
+    ///     returned.
+    ///
+    /// @param[in] abstime
+    ///     If non-NULL, the absolute time at which we should stop
+    ///     waiting, else wait an infinite amount of time.
+    ///
+    /// @param[out] timed_out
+    ///     If not null, set to true if we return because of a time out,
+    ///     and false if the value was set.
+    ///
+    /// @return
+    ///     @li \b true if the \a m_value became equal to \a value
+    ///     @li \b false otherwise
+    //------------------------------------------------------------------
     bool
     WaitForValueEqualToAndSetValueTo (T wait_value, T new_value, const TimeValue *abstime = NULL, bool *timed_out = NULL)
     {
@@ -359,6 +415,13 @@ public:
     /// value. If \a m_value is already not equal to \a value, this
     /// function will return without waiting.
     ///
+    /// It is possible for the value to be changed between the time
+    /// the value is set and the time the waiting thread wakes up.
+    /// If the value is equal to the test value when the waiting thread
+    /// wakes up, it will go back into a wait state.  It may be
+    /// necessary for the calling code to use additional thread
+    /// synchronization methods to detect transitory states.
+    ///
     /// @param[in] value
     ///     The value we want \a m_value to not be equal to.
     ///

Modified: lldb/branches/lldb-platform-work/include/lldb/Host/ReadWriteLock.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Host/ReadWriteLock.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Host/ReadWriteLock.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Host/ReadWriteLock.h Thu Jun  6 19:06:43 2013
@@ -40,17 +40,17 @@ public:
         m_rwlock()
     {
         int err = ::pthread_rwlock_init(&m_rwlock, NULL); (void)err;
-#if LLDB_CONFIGURATION_DEBUG
-        assert(err == 0);
-#endif
+//#if LLDB_CONFIGURATION_DEBUG
+//        assert(err == 0);
+//#endif
     }
 
     ~ReadWriteLock ()
     {
         int err = ::pthread_rwlock_destroy (&m_rwlock); (void)err;
-#if LLDB_CONFIGURATION_DEBUG
-        assert(err == 0);
-#endif
+//#if LLDB_CONFIGURATION_DEBUG
+//        assert(err == 0);
+//#endif
     }
 
     bool

Modified: lldb/branches/lldb-platform-work/include/lldb/Host/Symbols.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Host/Symbols.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Host/Symbols.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Host/Symbols.h Thu Jun  6 19:06:43 2013
@@ -24,11 +24,43 @@ namespace lldb_private {
 class Symbols
 {
 public:
+    //----------------------------------------------------------------------
+    // Locate the executable file given a module specification.
+    //
+    // Locating the file should happen only on the local computer or using
+    // the current computers global settings.
+    //----------------------------------------------------------------------
     static FileSpec
     LocateExecutableObjectFile (const ModuleSpec &module_spec);
 
+    //----------------------------------------------------------------------
+    // Locate the symbol file given a module specification.
+    //
+    // Locating the file should happen only on the local computer or using
+    // the current computers global settings.
+    //----------------------------------------------------------------------
     static FileSpec
     LocateExecutableSymbolFile (const ModuleSpec &module_spec);
+        
+    static FileSpec
+    FindSymbolFileInBundle (const FileSpec& dsym_bundle_fspec,
+                            const lldb_private::UUID *uuid,
+                            const ArchSpec *arch);
+    
+    //----------------------------------------------------------------------
+    // Locate the object and symbol file given a module specification.
+    //
+    // Locating the file can try to download the file from a corporate build
+    // respository, or using any other means necessary to locate both the
+    // unstripped object file and the debug symbols.  
+    // The force_lookup argument controls whether the external program is called
+    // unconditionally to find the symbol file, or if the user's settings are
+    // checked to see if they've enabled the external program before calling.
+    // 
+    //----------------------------------------------------------------------
+    static bool
+    DownloadObjectAndSymbolFile (ModuleSpec &module_spec, bool force_lookup = true);
+                                 
 };
 
 } // namespace lldb_private

Modified: lldb/branches/lldb-platform-work/include/lldb/Host/Terminal.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Host/Terminal.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Host/Terminal.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Host/Terminal.h Thu Jun  6 19:06:43 2013
@@ -132,6 +132,9 @@ public:
     //------------------------------------------------------------------
     bool
     IsValid() const;
+    
+    void
+    Clear ();
 
 protected:
 
@@ -170,7 +173,7 @@ protected:
     //------------------------------------------------------------------
     Terminal        m_tty;          ///< A terminal
     int             m_tflags;       ///< Cached tflags information.
-    std::auto_ptr<struct termios> m_termios_ap; ///< Cached terminal state information.
+    std::unique_ptr<struct termios> m_termios_ap; ///< Cached terminal state information.
     lldb::pid_t     m_process_group;///< Cached process group information.
 
 };

Modified: lldb/branches/lldb-platform-work/include/lldb/Host/freebsd/Config.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Host/freebsd/Config.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Host/freebsd/Config.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Host/freebsd/Config.h Thu Jun  6 19:06:43 2013
@@ -19,8 +19,6 @@
 
 #define LLDB_CONFIG_TERMIOS_SUPPORTED 1
 
-#define LLDB_CONFIG_TERMIOS_SUPPORTED 1
-
 #define LLDB_CONFIG_TILDE_RESOLVES_TO_USER 1
 
 //#define LLDB_CONFIG_DLOPEN_RTLD_FIRST_SUPPORTED 1

Modified: lldb/branches/lldb-platform-work/include/lldb/Interpreter/Args.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Interpreter/Args.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Interpreter/Args.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Interpreter/Args.h Thu Jun  6 19:06:43 2013
@@ -30,7 +30,7 @@ namespace lldb_private {
 typedef std::pair<int, std::string> OptionArgValue;
 typedef std::pair<std::string, OptionArgValue> OptionArgPair;
 typedef std::vector<OptionArgPair> OptionArgVector;
-typedef STD_SHARED_PTR(OptionArgVector) OptionArgVectorSP;
+typedef std::shared_ptr<OptionArgVector> OptionArgVectorSP;
 
 struct OptionArgElement
 {
@@ -268,7 +268,7 @@ public:
     //  FIXME: Handle the quote character somehow.
     //------------------------------------------------------------------
     void
-    SetArguments (int argc, const char **argv);
+    SetArguments (size_t argc, const char **argv);
 
     void
     SetArguments (const char **argv);
@@ -342,6 +342,12 @@ public:
     void
     Clear ();
 
+    static const char *
+    StripSpaces (std::string &s,
+                 bool leading = true,
+                 bool trailing = true,
+                 bool return_null_if_empty = true);
+
     static int32_t
     StringToSInt32 (const char *s, int32_t fail_value = 0, int base = 0, bool *success_ptr = NULL);
 
@@ -382,12 +388,15 @@ public:
     }
 
     static lldb::addr_t
-    StringToAddress (const char *s, lldb::addr_t fail_value = LLDB_INVALID_ADDRESS, bool *success_ptr = NULL);
+    StringToAddress (const ExecutionContext *exe_ctx,
+                     const char *s,
+                     lldb::addr_t fail_value,
+                     Error *error);
 
     static bool
     StringToBoolean (const char *s, bool fail_value, bool *success_ptr);
     
-    static int32_t
+    static int64_t
     StringToOptionEnum (const char *s, OptionEnumValueElement *enum_values, int32_t fail_value, Error &error);
 
     static lldb::ScriptLanguage
@@ -396,14 +405,40 @@ public:
     static Error
     StringToFormat (const char *s,
                     lldb::Format &format,
-                    uint32_t *byte_size_ptr); // If non-NULL, then a byte size can precede the format character
+                    size_t *byte_size_ptr); // If non-NULL, then a byte size can precede the format character
 
+    static lldb::Encoding
+    StringToEncoding (const char *s,
+                      lldb::Encoding fail_value = lldb::eEncodingInvalid);
+
+    static uint32_t
+    StringToGenericRegister (const char *s);
+    
     static const char *
     StringToVersion (const char *s, uint32_t &major, uint32_t &minor, uint32_t &update);
 
     static const char *
     GetShellSafeArgument (const char *unsafe_arg, std::string &safe_arg);
 
+    // EncodeEscapeSequences will change the textual representation of common
+    // escape sequences like "\n" (two characters) into a single '\n'. It does
+    // this for all of the supported escaped sequences and for the \0ooo (octal)
+    // and \xXX (hex). The resulting "dst" string will contain the character
+    // versions of all supported escape sequences. The common supported escape
+    // sequences are: "\a", "\b", "\f", "\n", "\r", "\t", "\v", "\'", "\"", "\\".
+
+    static void
+    EncodeEscapeSequences (const char *src, std::string &dst);
+
+    // ExpandEscapeSequences will change a string of possibly non-printable
+    // characters and expand them into text. So '\n' will turn into two chracters
+    // like "\n" which is suitable for human reading. When a character is not
+    // printable and isn't one of the common in escape sequences listed in the
+    // help for EncodeEscapeSequences, then it will be encoded as octal. Printable
+    // characters are left alone.
+    static void
+    ExpandEscapedCharacters (const char *src, std::string &dst);
+
     // This one isn't really relevant to Arguments per se, but we're using the Args as a
     // general strings container, so...
     void

Modified: lldb/branches/lldb-platform-work/include/lldb/Interpreter/CommandCompletions.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Interpreter/CommandCompletions.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Interpreter/CommandCompletions.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Interpreter/CommandCompletions.h Thu Jun  6 19:06:43 2013
@@ -12,6 +12,8 @@
 
 // C Includes
 // C++ Includes
+#include <set>
+
 // Other libraries and framework includes
 // Project includes
 #include "lldb/lldb-private.h"
@@ -47,10 +49,11 @@ public:
         eSettingsNameCompletion   = (1u << 5),
         ePlatformPluginCompletion = (1u << 6),
         eArchitectureCompletion   = (1u << 7),
+        eVariablePathCompletion   = (1u << 8),
         // This item serves two purposes.  It is the last element in the enum,
         // so you can add custom enums starting from here in your Option class.
         // Also if you & in this bit the base code will not process the option.
-        eCustomCompletion         = (1u << 8)  
+        eCustomCompletion         = (1u << 9)
 
     } CommonCompletionTypes;
 
@@ -74,20 +77,20 @@ public:
     //----------------------------------------------------------------------
     static int
     DiskFiles (CommandInterpreter &interpreter,
-                 const char *partial_file_name,
-                 int match_start_point,
-                 int max_return_elements,
-                 SearchFilter *searcher,
-                 bool &word_complete,
-                 StringList &matches);
+               const char *partial_file_name,
+               int match_start_point,
+               int max_return_elements,
+               SearchFilter *searcher,
+               bool &word_complete,
+               StringList &matches);
     static int
     DiskDirectories (CommandInterpreter &interpreter,
-                 const char *partial_file_name,
-                 int match_start_point,
-                 int max_return_elements,
-                 SearchFilter *searcher,
-                 bool &word_complete,
-                 StringList &matches);
+                     const char *partial_file_name,
+                     int match_start_point,
+                     int max_return_elements,
+                     SearchFilter *searcher,
+                     bool &word_complete,
+                     StringList &matches);
     
     static int
     SourceFiles (CommandInterpreter &interpreter,
@@ -143,7 +146,16 @@ public:
                        SearchFilter *searcher,
                        bool &word_complete,
                        lldb_private::StringList &matches);
-    
+
+    static int
+    VariablePath (CommandInterpreter &interpreter,
+                  const char *partial_file_name,
+                  int match_start_point,
+                  int max_return_elements,
+                  SearchFilter *searcher,
+                  bool &word_complete,
+                  lldb_private::StringList &matches);
+
     //----------------------------------------------------------------------
     // The Completer class is a convenient base class for building searchers
     // that go along with the SearchFilter passed to the standard Completer

Modified: lldb/branches/lldb-platform-work/include/lldb/Interpreter/CommandInterpreter.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Interpreter/CommandInterpreter.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Interpreter/CommandInterpreter.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Interpreter/CommandInterpreter.h Thu Jun  6 19:06:43 2013
@@ -26,7 +26,9 @@
 
 namespace lldb_private {
 
-class CommandInterpreter : public Broadcaster
+class CommandInterpreter :
+    public Broadcaster,
+    public Properties
 {
 public:
     typedef std::map<std::string, OptionArgVectorSP> OptionArgMap;
@@ -112,6 +114,9 @@ public:
 
     bool
     RemoveAlias (const char *alias_name);
+    
+    bool
+    GetAliasFullName (const char *cmd, std::string &full_name);
 
     bool
     RemoveUser (const char *alias_name);
@@ -276,7 +281,7 @@ public:
                              const char *command_word,
                              const char *separator,
                              const char *help_text,
-                             uint32_t max_word_len);
+                             size_t max_word_len);
     
     // this mimics OutputFormattedHelpText but it does perform a much simpler
     // formatting, basically ensuring line alignment. This is only good if you have
@@ -285,10 +290,10 @@ public:
     // and have it printed in a reasonable way on screen. If so, use OutputFormattedHelpText 
     void
     OutputHelpText (Stream &stream,
-                             const char *command_word,
-                             const char *separator,
-                             const char *help_text,
-                             uint32_t max_word_len);
+                    const char *command_word,
+                    const char *separator,
+                    const char *help_text,
+                    uint32_t max_word_len);
 
     Debugger &
     GetDebugger ()
@@ -333,10 +338,6 @@ public:
     Initialize ();
 
     void
-    CrossRegisterCommand (const char *dest_cmd, 
-                          const char *object_type);
-
-    void
     SetScriptLanguage (lldb::ScriptLanguage lang);
 
 
@@ -363,7 +364,7 @@ public:
     GetOptionArgumentPosition (const char *in_string);
 
     ScriptInterpreter *
-    GetScriptInterpreter ();
+    GetScriptInterpreter (bool can_create = true);
 
     void
     SkipLLDBInitFiles (bool skip_lldbinit_files)
@@ -389,34 +390,15 @@ public:
     const char *
     FindHistoryString (const char *input_str) const;
 
-
-#ifndef SWIG
-    void
-    AddLogChannel (const char *name, 
-                   const Log::Callbacks &log_callbacks);
-
-    bool
-    GetLogChannelCallbacks (const char *channel, 
-                            Log::Callbacks &log_callbacks);
-
-    bool
-    RemoveLogChannel (const char *name);
-#endif
-
     size_t
     FindLongestCommandWord (CommandObject::CommandMap &dict);
 
     void
     FindCommandsForApropos (const char *word, 
                             StringList &commands_found, 
-                            StringList &commands_help);
-
-    void
-    AproposAllSubCommands (CommandObject *cmd_obj, 
-                           const char *prefix, 
-                           const char *search_word, 
-                           StringList &commands_found, 
-                           StringList &commands_help);
+                            StringList &commands_help,
+                            bool search_builtin_commands,
+                            bool search_user_commands);
                            
     bool
     GetBatchCommandMode () { return m_batch_command_mode; }
@@ -449,6 +431,15 @@ public:
         return "*** Some of your variables have more members than the debugger will show by default. To show all of them, you can either use the --show-all-children option to %s or raise the limit by changing the target.max-children-count setting.\n";
     }
     
+    //------------------------------------------------------------------
+    // Properties
+    //------------------------------------------------------------------
+    bool
+    GetExpandRegexAliases () const;
+    
+    bool
+    GetPromptOnQuit () const;
+
 protected:
     friend class Debugger;
 
@@ -474,7 +465,7 @@ private:
     OptionArgMap m_alias_options;               // Stores any options (with or without arguments) that go with any alias.
     std::vector<std::string> m_command_history;
     std::string m_repeat_command;               // Stores the command that will be executed for an empty command string.
-    std::auto_ptr<ScriptInterpreter> m_script_interpreter_ap;
+    std::unique_ptr<ScriptInterpreter> m_script_interpreter_ap;
     char m_comment_char;
     char m_repeat_char;
     bool m_batch_command_mode;

Modified: lldb/branches/lldb-platform-work/include/lldb/Interpreter/CommandObject.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Interpreter/CommandObject.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Interpreter/CommandObject.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Interpreter/CommandObject.h Thu Jun  6 19:06:43 2013
@@ -20,6 +20,8 @@
 #include "lldb/Interpreter/CommandCompletions.h"
 #include "lldb/Core/StringList.h"
 #include "lldb/Core/Flags.h"
+#include "lldb/Host/Mutex.h"
+#include "lldb/Target/ExecutionContext.h"
 
 namespace lldb_private {
 
@@ -99,7 +101,7 @@ public:
     const char *
     GetHelp ();
 
-    const char *
+    virtual const char *
     GetHelpLong ();
 
     const char *
@@ -122,18 +124,12 @@ public:
 
     void
     SetSyntax (const char *str);
-
-    virtual void
-    AddObject (const char *obj_name) {}
-
-    virtual bool
-    IsCrossRefObject () { return false; }
     
     // override this to return true if you want to enable the user to delete
     // the Command object from the Command dictionary (aliases have their own
     // deletion scheme, so they do not need to care about this)
     virtual bool
-    IsRemovable() { return false; }
+    IsRemovable() const { return false; }
     
     bool
     IsAlias () { return m_is_alias; }
@@ -144,6 +140,42 @@ public:
     virtual bool
     IsMultiwordObject () { return false; }
 
+    virtual lldb::CommandObjectSP
+    GetSubcommandSP (const char *sub_cmd, StringList *matches = NULL)
+    {
+        return lldb::CommandObjectSP();
+    }
+    
+    virtual CommandObject *
+    GetSubcommandObject (const char *sub_cmd, StringList *matches = NULL)
+    {
+        return NULL;
+    }
+    
+    virtual void
+    AproposAllSubCommands (const char *prefix,
+                           const char *search_word,
+                           StringList &commands_found,
+                           StringList &commands_help)
+    {
+    }
+
+    virtual void
+    GenerateHelpText (CommandReturnObject &result)
+    {
+    }
+
+    // this is needed in order to allow the SBCommand class to
+    // transparently try and load subcommands - it will fail on
+    // anything but a multiword command, but it avoids us doing
+    // type checkings and casts
+    virtual bool
+    LoadSubCommand (const char *cmd_name,
+                    const lldb::CommandObjectSP& command_obj)
+    {
+        return false;
+    }
+    
     virtual bool
     WantsRawCommandString() = 0;
 
@@ -188,15 +220,91 @@ public:
     bool
     IsPairType (ArgumentRepetitionType arg_repeat_type);
     
-    enum 
+    enum
     {
-        eFlagProcessMustBeLaunched = (1 << 0),
-        eFlagProcessMustBePaused = (1 << 1)
+        //----------------------------------------------------------------------
+        // eFlagRequiresTarget
+        //
+        // Ensures a valid target is contained in m_exe_ctx prior to executing
+        // the command. If a target doesn't exist or is invalid, the command
+        // will fail and CommandObject::GetInvalidTargetDescription() will be
+        // returned as the error. CommandObject subclasses can override the
+        // virtual function for GetInvalidTargetDescription() to provide custom
+        // strings when needed.
+        //----------------------------------------------------------------------
+        eFlagRequiresTarget         = (1u << 0),
+        //----------------------------------------------------------------------
+        // eFlagRequiresProcess
+        //
+        // Ensures a valid process is contained in m_exe_ctx prior to executing
+        // the command. If a process doesn't exist or is invalid, the command
+        // will fail and CommandObject::GetInvalidProcessDescription() will be
+        // returned as the error. CommandObject subclasses can override the
+        // virtual function for GetInvalidProcessDescription() to provide custom
+        // strings when needed.
+        //----------------------------------------------------------------------
+        eFlagRequiresProcess        = (1u << 1),
+        //----------------------------------------------------------------------
+        // eFlagRequiresThread
+        //
+        // Ensures a valid thread is contained in m_exe_ctx prior to executing
+        // the command. If a thread doesn't exist or is invalid, the command
+        // will fail and CommandObject::GetInvalidThreadDescription() will be
+        // returned as the error. CommandObject subclasses can override the
+        // virtual function for GetInvalidThreadDescription() to provide custom
+        // strings when needed.
+        //----------------------------------------------------------------------
+        eFlagRequiresThread         = (1u << 2),
+        //----------------------------------------------------------------------
+        // eFlagRequiresFrame
+        //
+        // Ensures a valid frame is contained in m_exe_ctx prior to executing
+        // the command. If a frame doesn't exist or is invalid, the command
+        // will fail and CommandObject::GetInvalidFrameDescription() will be
+        // returned as the error. CommandObject subclasses can override the
+        // virtual function for GetInvalidFrameDescription() to provide custom
+        // strings when needed.
+        //----------------------------------------------------------------------
+        eFlagRequiresFrame          = (1u << 3),
+        //----------------------------------------------------------------------
+        // eFlagRequiresRegContext
+        //
+        // Ensures a valid register context (from the selected frame if there
+        // is a frame in m_exe_ctx, or from the selected thread from m_exe_ctx)
+        // is availble from m_exe_ctx prior to executing the command. If a
+        // target doesn't exist or is invalid, the command will fail and
+        // CommandObject::GetInvalidRegContextDescription() will be returned as
+        // the error. CommandObject subclasses can override the virtual function
+        // for GetInvalidRegContextDescription() to provide custom strings when
+        // needed.
+        //----------------------------------------------------------------------
+        eFlagRequiresRegContext     = (1u << 4),
+        //----------------------------------------------------------------------
+        // eFlagTryTargetAPILock
+        //
+        // Attempts to acquire the target lock if a target is selected in the
+        // command interpreter. If the command object fails to acquire the API
+        // lock, the command will fail with an appropriate error message.
+        //----------------------------------------------------------------------
+        eFlagTryTargetAPILock       = (1u << 5),
+        //----------------------------------------------------------------------
+        // eFlagProcessMustBeLaunched
+        //
+        // Verifies that there is a launched process in m_exe_ctx, if there
+        // isn't, the command will fail with an appropriate error message.
+        //----------------------------------------------------------------------
+        eFlagProcessMustBeLaunched  = (1u << 6),
+        //----------------------------------------------------------------------
+        // eFlagProcessMustBePaused
+        //
+        // Verifies that there is a paused process in m_exe_ctx, if there
+        // isn't, the command will fail with an appropriate error message.
+        //----------------------------------------------------------------------
+        eFlagProcessMustBePaused    = (1u << 7)
     };
 
     bool
-    ParseOptions (Args& args,
-                  CommandReturnObject &result);
+    ParseOptions (Args& args, CommandReturnObject &result);
 
     void
     SetCommandName (const char *name);
@@ -295,7 +403,7 @@ public:
     /// total number of matches, and the window the user wants returned.
     ///
     /// @return
-    ///     \btrue if we were in an option, \bfalse otherwise.
+    ///     The number of completions.
     //------------------------------------------------------------------
 
     virtual int
@@ -339,19 +447,6 @@ public:
     }
     
     //------------------------------------------------------------------
-    /// Check the command flags against the interpreter's current execution context.
-    ///
-    /// @param[out] result
-    ///     A command result object, if it is not okay to run the command this will be
-    ///     filled in with a suitable error.
-    ///
-    /// @return
-    ///     \b true if it is okay to run this command, \b false otherwise.
-    //------------------------------------------------------------------
-    bool
-    CheckFlags (CommandReturnObject &result);
-    
-    //------------------------------------------------------------------
     /// Get the command that appropriate for a "repeat" of the current command.
     ///
     /// @param[in] current_command_line
@@ -390,7 +485,56 @@ public:
     Execute (const char *args_string, CommandReturnObject &result) = 0;
 
 protected:
+    virtual const char *
+    GetInvalidTargetDescription()
+    {
+        return "invalid target, create a target using the 'target create' command";
+    }
+
+    virtual const char *
+    GetInvalidProcessDescription()
+    {
+        return "invalid process";
+    }
+
+    virtual const char *
+    GetInvalidThreadDescription()
+    {
+        return "invalid thread";
+    }
+    
+    virtual const char *
+    GetInvalidFrameDescription()
+    {
+        return "invalid frame";
+    }
+    
+    virtual const char *
+    GetInvalidRegContextDescription ()
+    {
+        return "invalid frame, no registers";
+    }
+
+    //------------------------------------------------------------------
+    /// Check the command to make sure anything required by this
+    /// command is available.
+    ///
+    /// @param[out] result
+    ///     A command result object, if it is not okay to run the command
+    ///     this will be filled in with a suitable error.
+    ///
+    /// @return
+    ///     \b true if it is okay to run this command, \b false otherwise.
+    //------------------------------------------------------------------
+    bool
+    CheckRequirements (CommandReturnObject &result);
+    
+    void
+    Cleanup ();
+
     CommandInterpreter &m_interpreter;
+    ExecutionContext m_exe_ctx;
+    Mutex::Locker m_api_locker;
     std::string m_cmd_name;
     std::string m_cmd_help_short;
     std::string m_cmd_help_long;

Removed: lldb/branches/lldb-platform-work/include/lldb/Interpreter/CommandObjectCrossref.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Interpreter/CommandObjectCrossref.h?rev=183467&view=auto
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Interpreter/CommandObjectCrossref.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Interpreter/CommandObjectCrossref.h (removed)
@@ -1,60 +0,0 @@
-//===-- CommandObjectCrossref.h ---------------------------------*- C++ -*-===//
-//
-//                     The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef liblldb_CommandObjectCrossref_h_
-#define liblldb_CommandObjectCrossref_h_
-
-// C Includes
-// C++ Includes
-// Other libraries and framework includes
-// Project includes
-#include "lldb/Interpreter/CommandObject.h"
-#include "lldb/Interpreter/Args.h"
-
-namespace lldb_private {
-
-//-------------------------------------------------------------------------
-// CommandObjectCrossref
-//-------------------------------------------------------------------------
-
-class CommandObjectCrossref : public CommandObjectParsed
-{
-public:
-    CommandObjectCrossref (CommandInterpreter &interpreter,
-                           const char *name,
-                           const char *help = NULL,
-                           const char *syntax = NULL);
-    
-    virtual
-    ~CommandObjectCrossref ();
-
-    void
-    GenerateHelpText (CommandReturnObject &result);
-
-    virtual bool
-    IsCrossRefObject ();
-
-    virtual void
-    AddObject (const char *obj_name);
-
-    const char **
-    GetObjectTypes () const;
-
-protected:
-    virtual bool
-    DoExecute (Args& command,
-             CommandReturnObject &result);
-
-private:
-    Args m_crossref_object_types;
-};
-
-} // namespace lldb_private
-
-#endif  // liblldb_CommandObjectCrossref_h_

Modified: lldb/branches/lldb-platform-work/include/lldb/Interpreter/CommandObjectMultiword.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Interpreter/CommandObjectMultiword.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Interpreter/CommandObjectMultiword.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Interpreter/CommandObjectMultiword.h Thu Jun  6 19:06:43 2013
@@ -42,19 +42,25 @@ public:
     virtual bool
     IsMultiwordObject () { return true; }
 
-    bool
+    virtual bool
     LoadSubCommand (const char *cmd_name, 
                     const lldb::CommandObjectSP& command_obj);
 
-    void
+    virtual void
     GenerateHelpText (CommandReturnObject &result);
 
-    lldb::CommandObjectSP
+    virtual lldb::CommandObjectSP
     GetSubcommandSP (const char *sub_cmd, StringList *matches = NULL);
 
-    CommandObject *
+    virtual CommandObject *
     GetSubcommandObject (const char *sub_cmd, StringList *matches = NULL);
 
+    virtual void
+    AproposAllSubCommands (const char *prefix,
+                           const char *search_word,
+                           StringList &commands_found,
+                           StringList &commands_help);
+
     virtual bool
     WantsRawCommandString() { return false; };
 
@@ -72,9 +78,108 @@ public:
     virtual bool
     Execute (const char *args_string,
              CommandReturnObject &result);
+    
+    virtual bool
+    IsRemovable() const { return m_can_be_removed; }
+    
+    void
+    SetRemovable (bool removable)
+    {
+        m_can_be_removed = removable;
+    }
+    
 protected:
 
     CommandObject::CommandMap m_subcommand_dict;
+    bool m_can_be_removed;
+};
+
+    
+class CommandObjectProxy : public CommandObject
+{
+public:
+    CommandObjectProxy (CommandInterpreter &interpreter,
+                        const char *name,
+                        const char *help = NULL,
+                        const char *syntax = NULL,
+                        uint32_t flags = 0);
+    
+    virtual
+    ~CommandObjectProxy ();
+    
+    // Subclasses must provide a command object that will be transparently
+    // used for this object.
+    virtual CommandObject *
+    GetProxyCommandObject() = 0;
+
+    virtual const char *
+    GetHelpLong ();
+    
+    virtual bool
+    IsRemovable() const;
+
+    virtual bool
+    IsMultiwordObject ();
+    
+    virtual lldb::CommandObjectSP
+    GetSubcommandSP (const char *sub_cmd, StringList *matches = NULL);
+    
+    virtual CommandObject *
+    GetSubcommandObject (const char *sub_cmd, StringList *matches = NULL);
+    
+    virtual void
+    AproposAllSubCommands (const char *prefix,
+                           const char *search_word,
+                           StringList &commands_found,
+                           StringList &commands_help);
+
+    virtual bool
+    LoadSubCommand (const char *cmd_name,
+                    const lldb::CommandObjectSP& command_obj);
+    
+    virtual bool
+    WantsRawCommandString();
+    
+    virtual bool
+    WantsCompletion();
+    
+    virtual Options *
+    GetOptions ();
+    
+
+    virtual int
+    HandleCompletion (Args &input,
+                      int &cursor_index,
+                      int &cursor_char_position,
+                      int match_start_point,
+                      int max_return_elements,
+                      bool &word_complete,
+                      StringList &matches);
+
+    virtual int
+    HandleArgumentCompletion (Args &input,
+                              int &cursor_index,
+                              int &cursor_char_position,
+                              OptionElementVector &opt_element_vector,
+                              int match_start_point,
+                              int max_return_elements,
+                              bool &word_complete,
+                              StringList &matches);
+
+    virtual const char *
+    GetRepeatCommand (Args &current_command_args,
+                      uint32_t index);
+
+    virtual bool
+    Execute (const char *args_string,
+             CommandReturnObject &result);
+
+protected:
+    
+    // These two want to iterate over the subcommand dictionary.
+    friend class CommandInterpreter;
+    friend class CommandObjectSyntax;
+
 };
 
 } // namespace lldb_private

Modified: lldb/branches/lldb-platform-work/include/lldb/Interpreter/CommandObjectRegexCommand.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Interpreter/CommandObjectRegexCommand.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Interpreter/CommandObjectRegexCommand.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Interpreter/CommandObjectRegexCommand.h Thu Jun  6 19:06:43 2013
@@ -33,7 +33,8 @@ public:
                                const char *name, 
                                const char *help, 
                                const char *syntax, 
-                               uint32_t max_matches);
+                               uint32_t max_matches,
+                               uint32_t completion_type_mask = 0);
     
     virtual
     ~CommandObjectRegexCommand ();
@@ -46,6 +47,15 @@ public:
     {
         return !m_entries.empty();
     }
+    
+    virtual int
+    HandleCompletion (Args &input,
+                      int &cursor_index,
+                      int &cursor_char_position,
+                      int match_start_point,
+                      int max_return_elements,
+                      bool &word_complete,
+                      StringList &matches);
 
 protected:
     virtual bool
@@ -59,6 +69,7 @@ protected:
 
     typedef std::list<Entry> EntryCollection;
     const uint32_t m_max_matches;
+    const uint32_t m_completion_type_mask;
     EntryCollection m_entries;
 
 private:

Modified: lldb/branches/lldb-platform-work/include/lldb/Interpreter/CommandReturnObject.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Interpreter/CommandReturnObject.h?rev=183468&r1=183467&r2=183468&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Interpreter/CommandReturnObject.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Interpreter/CommandReturnObject.h Thu Jun  6 19:06:43 2013
@@ -118,25 +118,25 @@ public:
     Clear();
 
     void
-    AppendMessage (const char *in_string, int len = -1);
+    AppendMessage (const char *in_string);
 
     void
     AppendMessageWithFormat (const char *format, ...)  __attribute__ ((format (printf, 2, 3)));
 
     void
-    AppendRawWarning (const char *in_string, int len = -1);
+    AppendRawWarning (const char *in_string);
 
     void
-    AppendWarning (const char *in_string, int len = -1);
+    AppendWarning (const char *in_string);
 
     void
     AppendWarningWithFormat (const char *format, ...)  __attribute__ ((format (printf, 2, 3)));
 
     void
-    AppendError (const char *in_string, int len = -1);
+    AppendError (const char *in_string);
 
     void
-    AppendRawError (const char *in_string, int len = -1);
+    AppendRawError (const char *in_string);
 
     void
     AppendErrorWithFormat (const char *format, ...)  __attribute__ ((format (printf, 2, 3)));

Removed: lldb/branches/lldb-platform-work/include/lldb/Interpreter/NamedOptionValue.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Interpreter/NamedOptionValue.h?rev=183467&view=auto
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Interpreter/NamedOptionValue.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Interpreter/NamedOptionValue.h (removed)
@@ -1,1242 +0,0 @@
-//===-- NamedOptionValue.h --------------------------------------*- C++ -*-===//
-//
-//                     The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef liblldb_NamedOptionValue_h_
-#define liblldb_NamedOptionValue_h_
-
-// C Includes
-// C++ Includes
-#include <vector>
-#include <map>
-
-// Other libraries and framework includes
-// Project includes
-#include "lldb/Core/ConstString.h"
-#include "lldb/Core/UUID.h"
-#include "lldb/Core/FileSpecList.h"
-#include "lldb/Host/FileSpec.h"
-
-namespace lldb_private {
-
-    class OptionValueBoolean;
-    class OptionValueSInt64;
-    class OptionValueUInt64;
-    class OptionValueString;
-    class OptionValueFileSpec;
-    class OptionValueFileSpecList;
-    class OptionValueFormat;
-    class OptionValueUUID;
-    class OptionValueArray;
-    class OptionValueDictionary;
-
-    //---------------------------------------------------------------------
-    // OptionValue
-    //---------------------------------------------------------------------
-    class OptionValue
-    {
-    public:
-        typedef enum {
-            eTypeInvalid = 0,
-            eTypeArray,
-            eTypeBoolean,
-            eTypeDictionary,
-            eTypeEnum,
-            eTypeFileSpec,
-            eTypeFileSpecList,
-            eTypeFormat,
-            eTypeSInt64,
-            eTypeUInt64,
-            eTypeUUID,
-            eTypeString
-        } Type;
-        
-        virtual ~OptionValue ()
-        {
-        }
-        //-----------------------------------------------------------------
-        // Subclasses should override these functions
-        //-----------------------------------------------------------------
-        virtual Type
-        GetType () = 0;
-        
-        virtual void
-        DumpValue (Stream &strm) = 0;
-        
-        virtual Error
-        SetValueFromCString (const char *value) = 0;
-        
-        virtual bool
-        Clear () = 0;
-
-        //-----------------------------------------------------------------
-        // Subclasses should NOT override these functions as they use the
-        // above functions to implement functionality
-        //-----------------------------------------------------------------
-        uint32_t
-        GetTypeAsMask ()
-        {
-            return 1u << GetType();
-        }
-        
-        static uint32_t
-        ConvertTypeToMask (OptionValue::Type type)
-        {
-            return 1u << type;
-        }
-
-        // Get this value as a uint64_t value if it is encoded as a boolean,
-        // uint64_t or int64_t. Other types will cause "fail_value" to be 
-        // returned
-        uint64_t
-        GetUInt64Value (uint64_t fail_value, bool *success_ptr);
-
-        OptionValueBoolean *
-        GetAsBoolean ();
-        
-        OptionValueSInt64 *
-        GetAsSInt64 ();
-        
-        OptionValueUInt64 *
-        GetAsUInt64 ();        
-        
-        OptionValueString *
-        GetAsString ();
-        
-        OptionValueFileSpec *
-        GetAsFileSpec ();
-        
-        OptionValueFileSpecList *
-        GetAsFileSpecList ();
-        
-        OptionValueFormat *
-        GetAsFormat ();
-        
-        OptionValueUUID *
-        GetAsUUID ();
-        
-        OptionValueArray *
-        GetAsArray ();
-        
-        OptionValueDictionary *
-        GetAsDictionary ();
-
-        const char *
-        GetStringValue (const char *fail_value = NULL);
-
-        uint64_t
-        GetUInt64Value (uint64_t fail_value = 0);
-                
-        lldb::Format
-        GetFormatValue (lldb::Format fail_value = lldb::eFormatDefault);
-
-        bool
-        OptionWasSet () const
-        {
-            return m_value_was_set;
-        }
-        
-        void
-        SetOptionWasSet ()
-        {
-            m_value_was_set = true;
-        }
-
-    protected:
-        bool m_value_was_set; // This can be used to see if a value has been set
-                              // by a call to SetValueFromCString(). It is often
-                              // handy to know if an option value was set from
-                              // the command line or as a setting, versus if we
-                              // just have the default value that was already
-                              // populated in the option value.
-        
-    };
-    
-    
-
-    //---------------------------------------------------------------------
-    // OptionValueBoolean
-    //---------------------------------------------------------------------
-    class OptionValueBoolean : public OptionValue
-    {
-    public:
-        OptionValueBoolean (bool current_value, 
-                            bool default_value) :
-            m_current_value (current_value),
-            m_default_value (default_value)
-        {
-        }
-        
-        virtual 
-        ~OptionValueBoolean()
-        {
-        }
-        
-        //---------------------------------------------------------------------
-        // Virtual subclass pure virtual overrides
-        //---------------------------------------------------------------------
-        
-        virtual OptionValue::Type
-        GetType ()
-        {
-            return eTypeBoolean;
-        }
-        
-        virtual void
-        DumpValue (Stream &strm);
-        
-        virtual Error
-        SetValueFromCString (const char *value);
-        
-        virtual bool
-        Clear ()
-        {
-            m_current_value = m_default_value;
-            m_value_was_set = false;
-            return true;
-        }
-        
-        //---------------------------------------------------------------------
-        // Subclass specific functions
-        //---------------------------------------------------------------------
-        
-        //------------------------------------------------------------------
-        /// Convert to bool operator.
-        ///
-        /// This allows code to check a OptionValueBoolean in conditions.
-        ///
-        /// @code
-        /// OptionValueBoolean bool_value(...);
-        /// if (bool_value)
-        /// { ...
-        /// @endcode
-        ///
-        /// @return
-        ///     /b True this object contains a valid namespace decl, \b 
-        ///     false otherwise.
-        //------------------------------------------------------------------
-        operator bool() const
-        {
-            return m_current_value;
-        }
-        
-        const bool &
-        operator = (bool b)
-        {
-            m_current_value = b;
-            return m_current_value;
-        }
-
-        bool
-        GetCurrentValue() const
-        {
-            return m_current_value;
-        }
-        
-        bool
-        GetDefaultValue() const
-        {
-            return m_default_value;
-        }
-        
-        void
-        SetCurrentValue (bool value)
-        {
-            m_current_value = value;
-        }
-        
-        void
-        SetDefaultValue (bool value)
-        {
-            m_default_value = value;
-        }
-        
-    protected:
-        bool m_current_value;
-        bool m_default_value;
-    };
-    
-    //---------------------------------------------------------------------
-    // OptionValueSInt64
-    //---------------------------------------------------------------------
-    class OptionValueSInt64 : public OptionValue
-    {
-    public:
-        OptionValueSInt64 () :
-            m_current_value (0),
-            m_default_value (0)
-        {
-        }
-        
-        OptionValueSInt64 (int64_t current_value, 
-                           int64_t default_value) :
-            m_current_value (current_value),
-            m_default_value (default_value)
-        {
-        }
-        
-        virtual 
-        ~OptionValueSInt64()
-        {
-        }
-        
-        //---------------------------------------------------------------------
-        // Virtual subclass pure virtual overrides
-        //---------------------------------------------------------------------
-        
-        virtual OptionValue::Type
-        GetType ()
-        {
-            return eTypeSInt64;
-        }
-        
-        virtual void
-        DumpValue (Stream &strm);
-        
-        virtual Error
-        SetValueFromCString (const char *value);
-        
-        virtual bool
-        Clear ()
-        {
-            m_current_value = m_default_value;
-            m_value_was_set = false;
-            return true;
-        }
-        
-        //---------------------------------------------------------------------
-        // Subclass specific functions
-        //---------------------------------------------------------------------
-        
-        const int64_t &
-        operator = (int64_t value)
-        {
-            m_current_value = value;
-            return m_current_value;
-        }
-
-        int64_t
-        GetCurrentValue() const
-        {
-            return m_current_value;
-        }
-        
-        int64_t
-        GetDefaultValue() const
-        {
-            return m_default_value;
-        }
-        
-        void
-        SetCurrentValue (int64_t value)
-        {
-            m_current_value = value;
-        }
-        
-        void
-        SetDefaultValue (int64_t value)
-        {
-            m_default_value = value;
-        }
-        
-    protected:
-        int64_t m_current_value;
-        int64_t m_default_value;
-    };
-    
-    //---------------------------------------------------------------------
-    // OptionValueUInt64
-    //---------------------------------------------------------------------
-    class OptionValueUInt64 : public OptionValue
-    {
-    public:
-        OptionValueUInt64 () :
-            m_current_value (0),
-            m_default_value (0)
-        {
-        }
-
-        OptionValueUInt64 (uint64_t current_value, 
-                           uint64_t default_value) :
-            m_current_value (current_value),
-            m_default_value (default_value)
-        {
-        }
-        
-        virtual 
-        ~OptionValueUInt64()
-        {
-        }
-        
-        //---------------------------------------------------------------------
-        // Decode a uint64_t from "value_cstr" return a OptionValueUInt64 object
-        // inside of a lldb::OptionValueSP object if all goes well. If the 
-        // string isn't a uint64_t value or any other error occurs, return an 
-        // empty lldb::OptionValueSP and fill error in with the correct stuff.
-        //---------------------------------------------------------------------
-        static lldb::OptionValueSP
-        Create (const char *value_cstr, Error &error);
-        //---------------------------------------------------------------------
-        // Virtual subclass pure virtual overrides
-        //---------------------------------------------------------------------
-        
-        virtual OptionValue::Type
-        GetType ()
-        {
-            return eTypeUInt64;
-        }
-        
-        virtual void
-        DumpValue (Stream &strm);
-        
-        virtual Error
-        SetValueFromCString (const char *value);
-        
-        virtual bool
-        Clear ()
-        {
-            m_current_value = m_default_value;
-            m_value_was_set = false;
-            return true;
-        }
-        
-        //---------------------------------------------------------------------
-        // Subclass specific functions
-        //---------------------------------------------------------------------
-        
-        const uint64_t &
-        operator = (uint64_t value)
-        {
-            m_current_value = value;
-            return m_current_value;
-        }
-
-        operator uint64_t () const
-        {
-            return m_current_value;
-        }
-
-        uint64_t
-        GetCurrentValue() const
-        {
-            return m_current_value;
-        }
-        
-        uint64_t
-        GetDefaultValue() const
-        {
-            return m_default_value;
-        }
-        
-        void
-        SetCurrentValue (uint64_t value)
-        {
-            m_current_value = value;
-        }
-        
-        void
-        SetDefaultValue (uint64_t value)
-        {
-            m_default_value = value;
-        }
-        
-    protected:
-        uint64_t m_current_value;
-        uint64_t m_default_value;
-    };
-
-    //---------------------------------------------------------------------
-    // OptionValueString
-    //---------------------------------------------------------------------
-    class OptionValueString : public OptionValue
-    {
-    public:
-        OptionValueString () :
-            m_current_value (),
-            m_default_value ()
-        {
-        }
-
-        OptionValueString (const char *current_value, 
-                           const char *default_value = NULL) :
-            m_current_value (),
-            m_default_value ()
-        {
-            if  (current_value && current_value[0])
-                m_current_value.assign (current_value);
-            if  (default_value && default_value[0])
-                m_default_value.assign (default_value);
-        }
-        
-        virtual 
-        ~OptionValueString()
-        {
-        }
-        
-        //---------------------------------------------------------------------
-        // Virtual subclass pure virtual overrides
-        //---------------------------------------------------------------------
-        
-        virtual OptionValue::Type
-        GetType ()
-        {
-            return eTypeString;
-        }
-        
-        virtual void
-        DumpValue (Stream &strm);
-        
-        virtual Error
-        SetValueFromCString (const char *value);
-
-        virtual bool
-        Clear ()
-        {
-            m_current_value = m_default_value;
-            m_value_was_set = false;
-            return true;
-        }
-        
-        //---------------------------------------------------------------------
-        // Subclass specific functions
-        //---------------------------------------------------------------------
-        
-        const char *
-        operator = (const char *value)
-        {
-            if (value && value[0])
-                m_current_value.assign (value);
-            else
-                m_current_value.clear();
-            return m_current_value.c_str();
-        }
-
-        const char *
-        GetCurrentValue() const
-        {
-            return m_current_value.c_str();
-        }
-        
-        bool
-        IsCurrentValueEmpty () const
-        {
-            return m_current_value.empty();
-        }
-        
-        const char *
-        GetDefaultValue() const
-        {
-            return m_default_value.c_str();
-        }
-
-        bool
-        IsDefaultValueEmpty () const
-        {
-            return m_default_value.empty();
-        }
-        
-        void
-        SetCurrentValue (const char *value)
-        {
-            if (value && value[0])
-                m_current_value.assign (value);
-            else
-                m_current_value.clear();
-        }
-
-        void
-        AppendToCurrentValue (const char *value)
-        {
-            if (value && value[0])
-                m_current_value.append (value);
-        }
-
-        void
-        SetDefaultValue (const char *value)
-        {
-            if (value && value[0])
-                m_default_value.assign (value);
-            else
-                m_default_value.clear();
-        }
-        
-    protected:
-        std::string m_current_value;
-        std::string m_default_value;
-    };
-
-    //---------------------------------------------------------------------
-    // OptionValueFileSpec
-    //---------------------------------------------------------------------
-    class OptionValueFileSpec : public OptionValue
-    {
-    public:
-        OptionValueFileSpec () :
-            m_current_value (),
-            m_default_value ()
-        {
-        }
-        
-        OptionValueFileSpec (const FileSpec &current_value) :
-            m_current_value (current_value),
-            m_default_value ()
-        {
-        }
-        
-        OptionValueFileSpec (const FileSpec &current_value, 
-                             const FileSpec &default_value) :
-            m_current_value (current_value),
-            m_default_value (default_value)
-        {
-        }
-        
-        virtual 
-        ~OptionValueFileSpec()
-        {
-        }
-        
-        //---------------------------------------------------------------------
-        // Virtual subclass pure virtual overrides
-        //---------------------------------------------------------------------
-        
-        virtual OptionValue::Type
-        GetType ()
-        {
-            return eTypeFileSpec;
-        }
-        
-        virtual void
-        DumpValue (Stream &strm);
-        
-        virtual Error
-        SetValueFromCString (const char *value);
-        
-        virtual bool
-        Clear ()
-        {
-            m_current_value = m_default_value;
-            m_value_was_set = false;
-            return true;
-        }
-        
-        //---------------------------------------------------------------------
-        // Subclass specific functions
-        //---------------------------------------------------------------------
-        
-        FileSpec &
-        GetCurrentValue()
-        {
-            return m_current_value;
-        }
-
-        const FileSpec &
-        GetCurrentValue() const
-        {
-            return m_current_value;
-        }
-
-        const FileSpec &
-        GetDefaultValue() const
-        {
-            return m_default_value;
-        }
-        
-        void
-        SetCurrentValue (const FileSpec &value)
-        {
-            m_current_value = value;
-        }
-        
-        void
-        SetDefaultValue (const FileSpec &value)
-        {
-            m_default_value = value;
-        }
-        
-    protected:
-        FileSpec m_current_value;
-        FileSpec m_default_value;
-    };
-
-    //---------------------------------------------------------------------
-    // OptionValueFileSpecList
-    //---------------------------------------------------------------------
-    class OptionValueFileSpecList : public OptionValue
-    {
-    public:
-        OptionValueFileSpecList () :
-            m_current_value ()
-        {
-        }
-        
-        OptionValueFileSpecList (const FileSpecList &current_value) :
-            m_current_value (current_value)
-        {
-        }
-        
-        
-        virtual 
-        ~OptionValueFileSpecList()
-        {
-        }
-        
-        //---------------------------------------------------------------------
-        // Virtual subclass pure virtual overrides
-        //---------------------------------------------------------------------
-        
-        virtual OptionValue::Type
-        GetType ()
-        {
-            return eTypeFileSpecList;
-        }
-        
-        virtual void
-        DumpValue (Stream &strm);
-        
-        virtual Error
-        SetValueFromCString (const char *value);
-        
-        virtual bool
-        Clear ()
-        {
-            m_current_value.Clear();
-            m_value_was_set = false;
-            return true;
-        }
-        
-        //---------------------------------------------------------------------
-        // Subclass specific functions
-        //---------------------------------------------------------------------
-        
-        FileSpecList &
-        GetCurrentValue()
-        {
-            return m_current_value;
-        }
-        
-        const FileSpecList &
-        GetCurrentValue() const
-        {
-            return m_current_value;
-        }
-        
-        void
-        SetCurrentValue (const FileSpecList &value)
-        {
-            m_current_value = value;
-        }
-        
-    protected:
-        FileSpecList m_current_value;
-    };
-
-    //---------------------------------------------------------------------
-    // OptionValueFormat
-    //---------------------------------------------------------------------
-    class OptionValueFormat : public OptionValue
-    {
-    public:
-        OptionValueFormat (lldb::Format current_value, 
-                           lldb::Format default_value) :
-            m_current_value (current_value),
-            m_default_value (default_value)
-        {
-        }
-        
-        virtual 
-        ~OptionValueFormat()
-        {
-        }
-        
-        //---------------------------------------------------------------------
-        // Virtual subclass pure virtual overrides
-        //---------------------------------------------------------------------
-        
-        virtual OptionValue::Type
-        GetType ()
-        {
-            return eTypeFormat;
-        }
-        
-        virtual void
-        DumpValue (Stream &strm);
-        
-        virtual Error
-        SetValueFromCString (const char *value);
-        
-        virtual bool
-        Clear ()
-        {
-            m_current_value = m_default_value;
-            m_value_was_set = false;
-            return true;
-        }
-        
-        //---------------------------------------------------------------------
-        // Subclass specific functions
-        //---------------------------------------------------------------------
-        
-        lldb::Format
-        GetCurrentValue() const
-        {
-            return m_current_value;
-        }
-        
-        lldb::Format 
-        GetDefaultValue() const
-        {
-            return m_default_value;
-        }
-        
-        void
-        SetCurrentValue (lldb::Format value)
-        {
-            m_current_value = value;
-        }
-        
-        void
-        SetDefaultValue (lldb::Format value)
-        {
-            m_default_value = value;
-        }
-        
-    protected:
-        lldb::Format m_current_value;
-        lldb::Format m_default_value;
-    };
-    
-    
-    
-    //---------------------------------------------------------------------
-    // OptionValueUUID
-    //---------------------------------------------------------------------
-    class OptionValueUUID : public OptionValue
-    {
-    public:
-        OptionValueUUID () :
-            m_uuid ()
-        {
-        }
-        
-        OptionValueUUID (const UUID &uuid) :
-            m_uuid (uuid)
-        {
-        }
-        
-        virtual 
-        ~OptionValueUUID()
-        {
-        }
-        
-        //---------------------------------------------------------------------
-        // Virtual subclass pure virtual overrides
-        //---------------------------------------------------------------------
-        
-        virtual OptionValue::Type
-        GetType ()
-        {
-            return eTypeFileSpec;
-        }
-        
-        virtual void
-        DumpValue (Stream &strm);
-        
-        virtual Error
-        SetValueFromCString (const char *value);
-        
-        virtual bool
-        Clear ()
-        {
-            m_uuid.Clear();
-            m_value_was_set = false;
-            return true;
-        }
-        
-        //---------------------------------------------------------------------
-        // Subclass specific functions
-        //---------------------------------------------------------------------
-        
-        UUID &
-        GetCurrentValue()
-        {
-            return m_uuid;
-        }
-        
-        const UUID &
-        GetCurrentValue() const
-        {
-            return m_uuid;
-        }
-        
-        void
-        SetCurrentValue (const UUID &value)
-        {
-            m_uuid = value;
-        }
-        
-    protected:
-        UUID m_uuid;
-    };
-
-    //---------------------------------------------------------------------
-    // OptionValueArray
-    //---------------------------------------------------------------------
-    class OptionValueArray : public OptionValue
-    {
-    public:
-        OptionValueArray (uint32_t type_mask = UINT32_MAX) :
-            m_type_mask (type_mask),
-            m_values ()
-        {
-        }
-        
-        virtual 
-        ~OptionValueArray()
-        {
-        }
-        
-        //---------------------------------------------------------------------
-        // Virtual subclass pure virtual overrides
-        //---------------------------------------------------------------------
-        
-        virtual OptionValue::Type
-        GetType ()
-        {
-            return eTypeArray;
-        }
-        
-        virtual void
-        DumpValue (Stream &strm);
-        
-        virtual Error
-        SetValueFromCString (const char *value);
-        
-        virtual bool
-        Clear ()
-        {
-            m_values.clear();
-            m_value_was_set = false;
-            return true;
-        }
-        
-        //---------------------------------------------------------------------
-        // Subclass specific functions
-        //---------------------------------------------------------------------
-
-        uint32_t
-        GetSize () const
-        {
-            return m_values.size();
-        }
-
-        lldb::OptionValueSP
-        operator[](uint32_t idx) const
-        {
-            lldb::OptionValueSP value_sp;
-            if (idx < m_values.size())
-                value_sp = m_values[idx];
-            return value_sp;
-        }
-
-        lldb::OptionValueSP
-        GetValueAtIndex (uint32_t idx) const
-        {
-            lldb::OptionValueSP value_sp;
-            if (idx < m_values.size())
-                value_sp = m_values[idx];
-            return value_sp;
-        }
-        
-        bool
-        AppendValue (const lldb::OptionValueSP &value_sp)
-        {
-            // Make sure the value_sp object is allowed to contain
-            // values of the type passed in...
-            if (value_sp && (m_type_mask & value_sp->GetTypeAsMask()))
-            {
-                m_values.push_back(value_sp);
-                return true;
-            }
-            return false;
-        }
-        
-        bool
-        InsertValue (uint32_t idx, const lldb::OptionValueSP &value_sp)
-        {
-            // Make sure the value_sp object is allowed to contain
-            // values of the type passed in...
-            if (value_sp && (m_type_mask & value_sp->GetTypeAsMask()))
-            {
-                if (idx < m_values.size())
-                    m_values.insert(m_values.begin() + idx, value_sp);
-                else
-                    m_values.push_back(value_sp);
-                return true;
-            }
-            return false;
-        }
-
-        bool
-        ReplaceValue (uint32_t idx, const lldb::OptionValueSP &value_sp)
-        {
-            // Make sure the value_sp object is allowed to contain
-            // values of the type passed in...
-            if (value_sp && (m_type_mask & value_sp->GetTypeAsMask()))
-            {
-                if (idx < m_values.size())
-                {
-                    m_values[idx] = value_sp;
-                    return true;
-                }
-            }
-            return false;
-        }
-
-        bool
-        DeleteValue (uint32_t idx)
-        {
-            if (idx < m_values.size())
-            {
-                m_values.erase (m_values.begin() + idx);
-                return true;
-            }
-            return false;
-        }
-        
-    protected:
-        typedef std::vector<lldb::OptionValueSP> collection;
-                
-        uint32_t m_type_mask;
-        collection m_values;
-    };
-
-    
-    
-    //---------------------------------------------------------------------
-    // OptionValueDictionary
-    //---------------------------------------------------------------------
-    class OptionValueDictionary : public OptionValue
-    {
-    public:
-        OptionValueDictionary (uint32_t type_mask = UINT32_MAX) :
-            m_type_mask (type_mask),
-            m_values ()
-        {
-        }
-        
-        virtual 
-        ~OptionValueDictionary()
-        {
-        }
-        
-        //---------------------------------------------------------------------
-        // Virtual subclass pure virtual overrides
-        //---------------------------------------------------------------------
-        
-        virtual OptionValue::Type
-        GetType ()
-        {
-            return eTypeDictionary;
-        }
-        
-        virtual void
-        DumpValue (Stream &strm);
-        
-        virtual Error
-        SetValueFromCString (const char *value);
-        
-        virtual bool
-        Clear ()
-        {
-            m_values.clear();
-            m_value_was_set = false;
-            return true;
-        }
-        
-        //---------------------------------------------------------------------
-        // Subclass specific functions
-        //---------------------------------------------------------------------
-        
-        uint32_t
-        GetNumValues() const
-        {
-            return m_values.size();
-        }
-        
-        lldb::OptionValueSP
-        GetValueForKey (const ConstString &key) const;
-        
-        //---------------------------------------------------------------------
-        // String value getters and setters
-        //---------------------------------------------------------------------
-        const char *
-        GetStringValueForKey (const ConstString &key);
-
-        bool
-        SetStringValueForKey (const ConstString &key, 
-                              const char *value,
-                              bool can_replace = true);
-
-        
-        bool
-        SetValueForKey (const ConstString &key, 
-                        const lldb::OptionValueSP &value_sp, 
-                        bool can_replace = true);
-        
-        bool
-        DeleteValueForKey (const ConstString &key);
-        
-    protected:
-        typedef std::map<ConstString, lldb::OptionValueSP> collection;
-        uint32_t m_type_mask;
-        collection m_values;
-    };
-    
-
-    
-    //---------------------------------------------------------------------
-    // OptionValueCollection
-    //
-    // The option value collection is a class that must be subclassed in
-    // order to provide a collection of named OptionValue objects. The
-    // collection is immutable (use OptionValueDictionary for mutable key
-    // value pair collection). This allows classes to have some member
-    // variables that are OptionValue subclasses, and still provide access
-    // to setting and modifying these values from textual commands:
-    //
-    //    
-    //    class Car : public OptionValueCollection 
-    //    {
-    //    public:
-    //        
-    //        Car () : OptionValueCollection (NULL, "car"),
-    //             m_is_running_name ("running"),
-    //             m_license_number_name ("license"),
-    //             m_is_running (false, false),
-    //             m_license_number ()
-    //        {
-    //        }
-    //        
-    //        
-    //        bool
-    //        GetIsRunning () const
-    //        {
-    //            return m_is_running.GetCurrentValue();
-    //        }
-    //        
-    //        const char *
-    //        GetLicense () const
-    //        {
-    //            return m_license_number.GetCurrentValue();
-    //        }
-    //        
-    //        virtual uint32_t
-    //        GetNumValues() const
-    //        {
-    //            return 2;
-    //        }
-    //        
-    //        virtual ConstString
-    //        GetKeyAtIndex (uint32_t idx) const
-    //        {
-    //            switch (idx)
-    //            {
-    //                case 0: return m_is_running_name;
-    //                case 1: return m_license_number_name;
-    //            }
-    //            return ConstString();
-    //        }
-    //        
-    //        virtual OptionValue*
-    //        GetValueForKey (const ConstString &key)
-    //        {
-    //            if (key == m_is_running_name)
-    //                return &m_is_running;
-    //            else if (key == m_license_number_name)
-    //                return &m_license_number;
-    //            return NULL;
-    //        }
-    //        
-    //    protected:
-    //        ConstString m_is_running_name;
-    //        ConstString m_license_number_name;
-    //        OptionValueBoolean m_is_running;
-    //        OptionValueString m_license_number;
-    //        
-    //    };
-    //
-    // As we can see above, this allows the Car class to have direct access
-    // to its member variables settings m_is_running and m_license_number,
-    // yet it allows them to also be available by name to our command
-    // interpreter.
-    //---------------------------------------------------------------------
-    class OptionValueCollection
-    {
-    public:
-        OptionValueCollection (OptionValueCollection *parent, const ConstString &name) :
-            m_parent (parent),
-            m_name (name)
-        {
-        }
-
-        OptionValueCollection (OptionValueCollection *parent, const char *name) :
-            m_parent (parent),
-            m_name (name)
-        {
-        }
-
-        virtual 
-        ~OptionValueCollection()
-        {
-        }
-        
-        
-        OptionValueCollection *
-        GetParent ()
-        {
-            return m_parent;
-        }
-        
-        const OptionValueCollection *
-        GetParent () const
-        {
-            return m_parent;
-        }
-        
-        const ConstString &
-        GetName () const
-        {
-            return m_name;
-        }
-
-        void
-        GetQualifiedName (Stream &strm);
-
-        /