<rdar://problem/13069948>
authorGreg Clayton <gclayton@apple.com>
Fri, 25 Jan 2013 18:06:21 +0000 (18:06 +0000)
committerGreg Clayton <gclayton@apple.com>
Fri, 25 Jan 2013 18:06:21 +0000 (18:06 +0000)
commitc7bece56faa5eef1c3d141d0c0b0b68b28a9aed2
tree9a0132fc3b0bb4f38d06a0f352ee75ac57994771
parentd0ed6c249dbd6bd488b6491b536a387548c00f7e
<rdar://problem/13069948>

Major fixed to allow reading files that are over 4GB. The main problems were that the DataExtractor was using 32 bit offsets as a data cursor, and since we mmap all of our object files we could run into cases where if we had a very large core file that was over 4GB, we were running into the 4GB boundary.

So I defined a new "lldb::offset_t" which should be used for all file offsets.

After making this change, I enabled warnings for data loss and for enexpected implicit conversions temporarily and found a ton of things that I fixed.

Any functions that take an index internally, should use "size_t" for any indexes and also should return "size_t" for any sizes of collections.

llvm-svn: 173463
248 files changed:
lldb/examples/python/operating_system.py
lldb/include/lldb/API/SBData.h
lldb/include/lldb/Breakpoint/Breakpoint.h
lldb/include/lldb/Breakpoint/BreakpointIDList.h
lldb/include/lldb/Breakpoint/BreakpointList.h
lldb/include/lldb/Breakpoint/BreakpointLocationCollection.h
lldb/include/lldb/Breakpoint/BreakpointLocationList.h
lldb/include/lldb/Breakpoint/BreakpointSite.h
lldb/include/lldb/Breakpoint/Watchpoint.h
lldb/include/lldb/Core/ArchSpec.h
lldb/include/lldb/Core/CXXFormatterFunctions.h
lldb/include/lldb/Core/DataExtractor.h
lldb/include/lldb/Core/Debugger.h
lldb/include/lldb/Core/Disassembler.h
lldb/include/lldb/Core/FileSpecList.h
lldb/include/lldb/Core/FormatClasses.h
lldb/include/lldb/Core/FormatManager.h
lldb/include/lldb/Core/FormatNavigator.h
lldb/include/lldb/Core/MappedHash.h
lldb/include/lldb/Core/Module.h
lldb/include/lldb/Core/ModuleList.h
lldb/include/lldb/Core/PluginManager.h
lldb/include/lldb/Core/RegisterValue.h
lldb/include/lldb/Core/Scalar.h
lldb/include/lldb/Core/Section.h
lldb/include/lldb/Core/Stream.h
lldb/include/lldb/Core/StreamAsynchronousIO.h
lldb/include/lldb/Core/StreamBuffer.h
lldb/include/lldb/Core/StreamCallback.h
lldb/include/lldb/Core/StreamFile.h
lldb/include/lldb/Core/StreamString.h
lldb/include/lldb/Core/StreamTee.h
lldb/include/lldb/Core/StringList.h
lldb/include/lldb/Core/VMRange.h
lldb/include/lldb/Core/Value.h
lldb/include/lldb/Core/ValueObject.h
lldb/include/lldb/Core/ValueObjectCast.h
lldb/include/lldb/Core/ValueObjectChild.h
lldb/include/lldb/Core/ValueObjectConstResult.h
lldb/include/lldb/Core/ValueObjectConstResultChild.h
lldb/include/lldb/Core/ValueObjectConstResultImpl.h
lldb/include/lldb/Core/ValueObjectDynamicValue.h
lldb/include/lldb/Core/ValueObjectList.h
lldb/include/lldb/Core/ValueObjectMemory.h
lldb/include/lldb/Core/ValueObjectRegister.h
lldb/include/lldb/Core/ValueObjectSyntheticFilter.h
lldb/include/lldb/Core/ValueObjectVariable.h
lldb/include/lldb/Core/dwarf.h
lldb/include/lldb/Expression/ClangFunction.h
lldb/include/lldb/Expression/DWARFExpression.h
lldb/include/lldb/Host/File.h
lldb/include/lldb/Interpreter/Args.h
lldb/include/lldb/Interpreter/CommandInterpreter.h
lldb/include/lldb/Interpreter/CommandObject.h
lldb/include/lldb/Interpreter/CommandReturnObject.h
lldb/include/lldb/Interpreter/OptionValueArray.h
lldb/include/lldb/Interpreter/OptionValueDictionary.h
lldb/include/lldb/Interpreter/ScriptInterpreter.h
lldb/include/lldb/Interpreter/ScriptInterpreterPython.h
lldb/include/lldb/Symbol/Block.h
lldb/include/lldb/Symbol/ClangASTContext.h
lldb/include/lldb/Symbol/ObjectFile.h
lldb/include/lldb/Symbol/Symbol.h
lldb/include/lldb/Symbol/SymbolContext.h
lldb/include/lldb/Symbol/SymbolVendor.h
lldb/include/lldb/Symbol/Symtab.h
lldb/include/lldb/Symbol/Variable.h
lldb/include/lldb/Symbol/VariableList.h
lldb/include/lldb/Target/Platform.h
lldb/include/lldb/Target/Process.h
lldb/include/lldb/Target/RegisterContext.h
lldb/include/lldb/lldb-defines.h
lldb/include/lldb/lldb-types.h
lldb/scripts/Python/interface/SBData.i
lldb/source/API/SBData.cpp
lldb/source/Breakpoint/Breakpoint.cpp
lldb/source/Breakpoint/BreakpointIDList.cpp
lldb/source/Breakpoint/BreakpointList.cpp
lldb/source/Breakpoint/BreakpointLocationCollection.cpp
lldb/source/Breakpoint/BreakpointLocationList.cpp
lldb/source/Breakpoint/BreakpointResolverFileLine.cpp
lldb/source/Breakpoint/BreakpointResolverName.cpp
lldb/source/Breakpoint/BreakpointSite.cpp
lldb/source/Breakpoint/Watchpoint.cpp
lldb/source/Commands/CommandCompletions.cpp
lldb/source/Commands/CommandObjectApropos.cpp
lldb/source/Commands/CommandObjectArgs.cpp
lldb/source/Commands/CommandObjectBreakpoint.cpp
lldb/source/Commands/CommandObjectCommands.cpp
lldb/source/Commands/CommandObjectExpression.cpp
lldb/source/Commands/CommandObjectFrame.cpp
lldb/source/Commands/CommandObjectHelp.cpp
lldb/source/Commands/CommandObjectMemory.cpp
lldb/source/Commands/CommandObjectMultiword.cpp
lldb/source/Commands/CommandObjectPlatform.cpp
lldb/source/Commands/CommandObjectProcess.cpp
lldb/source/Commands/CommandObjectRegister.cpp
lldb/source/Commands/CommandObjectSource.cpp
lldb/source/Commands/CommandObjectSyntax.cpp
lldb/source/Commands/CommandObjectTarget.cpp
lldb/source/Commands/CommandObjectThread.cpp
lldb/source/Commands/CommandObjectWatchpoint.cpp
lldb/source/Core/Address.cpp
lldb/source/Core/ArchSpec.cpp
lldb/source/Core/CXXFormatterFunctions.cpp
lldb/source/Core/ConstString.cpp
lldb/source/Core/DataBufferMemoryMap.cpp
lldb/source/Core/DataExtractor.cpp
lldb/source/Core/Debugger.cpp
lldb/source/Core/Disassembler.cpp
lldb/source/Core/EmulateInstruction.cpp
lldb/source/Core/Error.cpp
lldb/source/Core/FileSpecList.cpp
lldb/source/Core/FormatClasses.cpp
lldb/source/Core/FormatManager.cpp
lldb/source/Core/Module.cpp
lldb/source/Core/ModuleList.cpp
lldb/source/Core/PluginManager.cpp
lldb/source/Core/RegisterValue.cpp
lldb/source/Core/Scalar.cpp
lldb/source/Core/SearchFilter.cpp
lldb/source/Core/Section.cpp
lldb/source/Core/SourceManager.cpp
lldb/source/Core/Stream.cpp
lldb/source/Core/StreamAsynchronousIO.cpp
lldb/source/Core/StreamCallback.cpp
lldb/source/Core/StreamFile.cpp
lldb/source/Core/StreamString.cpp
lldb/source/Core/StringList.cpp
lldb/source/Core/UUID.cpp
lldb/source/Core/VMRange.cpp
lldb/source/Core/Value.cpp
lldb/source/Core/ValueObject.cpp
lldb/source/Core/ValueObjectCast.cpp
lldb/source/Core/ValueObjectChild.cpp
lldb/source/Core/ValueObjectConstResult.cpp
lldb/source/Core/ValueObjectConstResultChild.cpp
lldb/source/Core/ValueObjectConstResultImpl.cpp
lldb/source/Core/ValueObjectDynamicValue.cpp
lldb/source/Core/ValueObjectList.cpp
lldb/source/Core/ValueObjectMemory.cpp
lldb/source/Core/ValueObjectRegister.cpp
lldb/source/Core/ValueObjectSyntheticFilter.cpp
lldb/source/Core/ValueObjectVariable.cpp
lldb/source/Expression/ClangASTSource.cpp
lldb/source/Expression/ClangExpressionParser.cpp
lldb/source/Expression/ClangFunction.cpp
lldb/source/Expression/DWARFExpression.cpp
lldb/source/Expression/IRInterpreter.cpp
lldb/source/Host/common/File.cpp
lldb/source/Host/common/FileSpec.cpp
lldb/source/Host/macosx/Host.mm
lldb/source/Host/macosx/Symbols.cpp
lldb/source/Interpreter/Args.cpp
lldb/source/Interpreter/CommandInterpreter.cpp
lldb/source/Interpreter/CommandObject.cpp
lldb/source/Interpreter/CommandReturnObject.cpp
lldb/source/Interpreter/PythonDataObjects.cpp
lldb/source/Interpreter/ScriptInterpreterPython.cpp
lldb/source/Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.cpp
lldb/source/Plugins/ABI/MacOSX-i386/ABIMacOSX_i386.cpp
lldb/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.cpp
lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp
lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.h
lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp
lldb/source/Plugins/DynamicLoader/POSIX-DYLD/AuxVector.cpp
lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.cpp
lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.h
lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp
lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp
lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.cpp
lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp
lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.h
lldb/source/Plugins/ObjectContainer/Universal-Mach-O/ObjectContainerUniversalMachO.cpp
lldb/source/Plugins/ObjectFile/ELF/ELFHeader.cpp
lldb/source/Plugins/ObjectFile/ELF/ELFHeader.h
lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.h
lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.h
lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.h
lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp
lldb/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp
lldb/source/Plugins/Process/MacOSX-Kernel/ThreadKDP.cpp
lldb/source/Plugins/Process/Utility/RegisterContextDarwin_arm.cpp
lldb/source/Plugins/Process/Utility/RegisterContextDarwin_arm.h
lldb/source/Plugins/Process/Utility/RegisterContextDarwin_i386.cpp
lldb/source/Plugins/Process/Utility/RegisterContextDarwin_i386.h
lldb/source/Plugins/Process/Utility/RegisterContextDarwin_x86_64.cpp
lldb/source/Plugins/Process/Utility/RegisterContextDarwin_x86_64.h
lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp
lldb/source/Plugins/Process/Utility/RegisterContextLLDB.h
lldb/source/Plugins/Process/Utility/RegisterContextMacOSXFrameBackchain.cpp
lldb/source/Plugins/Process/Utility/RegisterContextMacOSXFrameBackchain.h
lldb/source/Plugins/Process/Utility/RegisterContextMemory.cpp
lldb/source/Plugins/Process/Utility/RegisterContextMemory.h
lldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp
lldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.h
lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
lldb/source/Plugins/SymbolFile/DWARF/DWARFAbbreviationDeclaration.cpp
lldb/source/Plugins/SymbolFile/DWARF/DWARFAbbreviationDeclaration.h
lldb/source/Plugins/SymbolFile/DWARF/DWARFAttribute.h
lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp
lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.h
lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugAbbrev.cpp
lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugAbbrev.h
lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugArangeSet.cpp
lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugArangeSet.h
lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugAranges.cpp
lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugAranges.h
lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp
lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.h
lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.h
lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp
lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.h
lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugMacinfo.cpp
lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugMacinfo.h
lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugMacinfoEntry.cpp
lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugMacinfoEntry.h
lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugPubnames.cpp
lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugPubnamesSet.cpp
lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugPubnamesSet.h
lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugRanges.cpp
lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugRanges.h
lldb/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp
lldb/source/Plugins/SymbolFile/DWARF/DWARFFormValue.h
lldb/source/Plugins/SymbolFile/DWARF/DWARFLocationDescription.cpp
lldb/source/Plugins/SymbolFile/DWARF/DWARFLocationList.cpp
lldb/source/Plugins/SymbolFile/DWARF/DWARFLocationList.h
lldb/source/Plugins/SymbolFile/DWARF/HashedNameToDIE.h
lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
lldb/source/Symbol/ClangASTContext.cpp
lldb/source/Symbol/ClangASTType.cpp
lldb/source/Symbol/DWARFCallFrameInfo.cpp
lldb/source/Symbol/Symbol.cpp
lldb/source/Symbol/SymbolContext.cpp
lldb/source/Symbol/SymbolVendor.cpp
lldb/source/Symbol/Symtab.cpp
lldb/source/Symbol/VariableList.cpp
lldb/source/Target/Process.cpp
lldb/source/Target/Target.cpp
lldb/source/Utility/StringExtractor.cpp
lldb/source/Utility/StringExtractor.h
lldb/tools/debugserver/source/DNBDataRef.cpp