[Lldb-commits] [lldb] r173463 - in /lldb/trunk: examples/python/ include/lldb/ include/lldb/API/ include/lldb/Breakpoint/ include/lldb/Core/ include/lldb/Expression/ include/lldb/Host/ include/lldb/Interpreter/ include/lldb/Symbol/ include/lldb/Target/ scripts/Python/interface/ source/API/ source/Breakpoint/ source/Commands/ source/Core/ source/Expression/ source/Host/common/ source/Host/macosx/ source/Interpreter/ source/Plugins/ABI/MacOSX-arm/ source/Plugins/ABI/MacOSX-i386/ source/Plugins/ABI/SysV-x86_64/ source/Plu...
Greg Clayton
gclayton at apple.com
Fri Jan 25 10:06:23 PST 2013
Author: gclayton
Date: Fri Jan 25 12:06:21 2013
New Revision: 173463
URL: http://llvm.org/viewvc/llvm-project?rev=173463&view=rev
Log:
<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.
Modified:
lldb/trunk/examples/python/operating_system.py
lldb/trunk/include/lldb/API/SBData.h
lldb/trunk/include/lldb/Breakpoint/Breakpoint.h
lldb/trunk/include/lldb/Breakpoint/BreakpointIDList.h
lldb/trunk/include/lldb/Breakpoint/BreakpointList.h
lldb/trunk/include/lldb/Breakpoint/BreakpointLocationCollection.h
lldb/trunk/include/lldb/Breakpoint/BreakpointLocationList.h
lldb/trunk/include/lldb/Breakpoint/BreakpointSite.h
lldb/trunk/include/lldb/Breakpoint/Watchpoint.h
lldb/trunk/include/lldb/Core/ArchSpec.h
lldb/trunk/include/lldb/Core/CXXFormatterFunctions.h
lldb/trunk/include/lldb/Core/DataExtractor.h
lldb/trunk/include/lldb/Core/Debugger.h
lldb/trunk/include/lldb/Core/Disassembler.h
lldb/trunk/include/lldb/Core/FileSpecList.h
lldb/trunk/include/lldb/Core/FormatClasses.h
lldb/trunk/include/lldb/Core/FormatManager.h
lldb/trunk/include/lldb/Core/FormatNavigator.h
lldb/trunk/include/lldb/Core/MappedHash.h
lldb/trunk/include/lldb/Core/Module.h
lldb/trunk/include/lldb/Core/ModuleList.h
lldb/trunk/include/lldb/Core/PluginManager.h
lldb/trunk/include/lldb/Core/RegisterValue.h
lldb/trunk/include/lldb/Core/Scalar.h
lldb/trunk/include/lldb/Core/Section.h
lldb/trunk/include/lldb/Core/Stream.h
lldb/trunk/include/lldb/Core/StreamAsynchronousIO.h
lldb/trunk/include/lldb/Core/StreamBuffer.h
lldb/trunk/include/lldb/Core/StreamCallback.h
lldb/trunk/include/lldb/Core/StreamFile.h
lldb/trunk/include/lldb/Core/StreamString.h
lldb/trunk/include/lldb/Core/StreamTee.h
lldb/trunk/include/lldb/Core/StringList.h
lldb/trunk/include/lldb/Core/VMRange.h
lldb/trunk/include/lldb/Core/Value.h
lldb/trunk/include/lldb/Core/ValueObject.h
lldb/trunk/include/lldb/Core/ValueObjectCast.h
lldb/trunk/include/lldb/Core/ValueObjectChild.h
lldb/trunk/include/lldb/Core/ValueObjectConstResult.h
lldb/trunk/include/lldb/Core/ValueObjectConstResultChild.h
lldb/trunk/include/lldb/Core/ValueObjectConstResultImpl.h
lldb/trunk/include/lldb/Core/ValueObjectDynamicValue.h
lldb/trunk/include/lldb/Core/ValueObjectList.h
lldb/trunk/include/lldb/Core/ValueObjectMemory.h
lldb/trunk/include/lldb/Core/ValueObjectRegister.h
lldb/trunk/include/lldb/Core/ValueObjectSyntheticFilter.h
lldb/trunk/include/lldb/Core/ValueObjectVariable.h
lldb/trunk/include/lldb/Core/dwarf.h
lldb/trunk/include/lldb/Expression/ClangFunction.h
lldb/trunk/include/lldb/Expression/DWARFExpression.h
lldb/trunk/include/lldb/Host/File.h
lldb/trunk/include/lldb/Interpreter/Args.h
lldb/trunk/include/lldb/Interpreter/CommandInterpreter.h
lldb/trunk/include/lldb/Interpreter/CommandObject.h
lldb/trunk/include/lldb/Interpreter/CommandReturnObject.h
lldb/trunk/include/lldb/Interpreter/OptionValueArray.h
lldb/trunk/include/lldb/Interpreter/OptionValueDictionary.h
lldb/trunk/include/lldb/Interpreter/ScriptInterpreter.h
lldb/trunk/include/lldb/Interpreter/ScriptInterpreterPython.h
lldb/trunk/include/lldb/Symbol/Block.h
lldb/trunk/include/lldb/Symbol/ClangASTContext.h
lldb/trunk/include/lldb/Symbol/ObjectFile.h
lldb/trunk/include/lldb/Symbol/Symbol.h
lldb/trunk/include/lldb/Symbol/SymbolContext.h
lldb/trunk/include/lldb/Symbol/SymbolVendor.h
lldb/trunk/include/lldb/Symbol/Symtab.h
lldb/trunk/include/lldb/Symbol/Variable.h
lldb/trunk/include/lldb/Symbol/VariableList.h
lldb/trunk/include/lldb/Target/Platform.h
lldb/trunk/include/lldb/Target/Process.h
lldb/trunk/include/lldb/Target/RegisterContext.h
lldb/trunk/include/lldb/lldb-defines.h
lldb/trunk/include/lldb/lldb-types.h
lldb/trunk/scripts/Python/interface/SBData.i
lldb/trunk/source/API/SBData.cpp
lldb/trunk/source/Breakpoint/Breakpoint.cpp
lldb/trunk/source/Breakpoint/BreakpointIDList.cpp
lldb/trunk/source/Breakpoint/BreakpointList.cpp
lldb/trunk/source/Breakpoint/BreakpointLocationCollection.cpp
lldb/trunk/source/Breakpoint/BreakpointLocationList.cpp
lldb/trunk/source/Breakpoint/BreakpointResolverFileLine.cpp
lldb/trunk/source/Breakpoint/BreakpointResolverName.cpp
lldb/trunk/source/Breakpoint/BreakpointSite.cpp
lldb/trunk/source/Breakpoint/Watchpoint.cpp
lldb/trunk/source/Commands/CommandCompletions.cpp
lldb/trunk/source/Commands/CommandObjectApropos.cpp
lldb/trunk/source/Commands/CommandObjectArgs.cpp
lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp
lldb/trunk/source/Commands/CommandObjectCommands.cpp
lldb/trunk/source/Commands/CommandObjectExpression.cpp
lldb/trunk/source/Commands/CommandObjectFrame.cpp
lldb/trunk/source/Commands/CommandObjectHelp.cpp
lldb/trunk/source/Commands/CommandObjectMemory.cpp
lldb/trunk/source/Commands/CommandObjectMultiword.cpp
lldb/trunk/source/Commands/CommandObjectPlatform.cpp
lldb/trunk/source/Commands/CommandObjectProcess.cpp
lldb/trunk/source/Commands/CommandObjectRegister.cpp
lldb/trunk/source/Commands/CommandObjectSource.cpp
lldb/trunk/source/Commands/CommandObjectSyntax.cpp
lldb/trunk/source/Commands/CommandObjectTarget.cpp
lldb/trunk/source/Commands/CommandObjectThread.cpp
lldb/trunk/source/Commands/CommandObjectWatchpoint.cpp
lldb/trunk/source/Core/Address.cpp
lldb/trunk/source/Core/ArchSpec.cpp
lldb/trunk/source/Core/CXXFormatterFunctions.cpp
lldb/trunk/source/Core/ConstString.cpp
lldb/trunk/source/Core/DataBufferMemoryMap.cpp
lldb/trunk/source/Core/DataExtractor.cpp
lldb/trunk/source/Core/Debugger.cpp
lldb/trunk/source/Core/Disassembler.cpp
lldb/trunk/source/Core/EmulateInstruction.cpp
lldb/trunk/source/Core/Error.cpp
lldb/trunk/source/Core/FileSpecList.cpp
lldb/trunk/source/Core/FormatClasses.cpp
lldb/trunk/source/Core/FormatManager.cpp
lldb/trunk/source/Core/Module.cpp
lldb/trunk/source/Core/ModuleList.cpp
lldb/trunk/source/Core/PluginManager.cpp
lldb/trunk/source/Core/RegisterValue.cpp
lldb/trunk/source/Core/Scalar.cpp
lldb/trunk/source/Core/SearchFilter.cpp
lldb/trunk/source/Core/Section.cpp
lldb/trunk/source/Core/SourceManager.cpp
lldb/trunk/source/Core/Stream.cpp
lldb/trunk/source/Core/StreamAsynchronousIO.cpp
lldb/trunk/source/Core/StreamCallback.cpp
lldb/trunk/source/Core/StreamFile.cpp
lldb/trunk/source/Core/StreamString.cpp
lldb/trunk/source/Core/StringList.cpp
lldb/trunk/source/Core/UUID.cpp
lldb/trunk/source/Core/VMRange.cpp
lldb/trunk/source/Core/Value.cpp
lldb/trunk/source/Core/ValueObject.cpp
lldb/trunk/source/Core/ValueObjectCast.cpp
lldb/trunk/source/Core/ValueObjectChild.cpp
lldb/trunk/source/Core/ValueObjectConstResult.cpp
lldb/trunk/source/Core/ValueObjectConstResultChild.cpp
lldb/trunk/source/Core/ValueObjectConstResultImpl.cpp
lldb/trunk/source/Core/ValueObjectDynamicValue.cpp
lldb/trunk/source/Core/ValueObjectList.cpp
lldb/trunk/source/Core/ValueObjectMemory.cpp
lldb/trunk/source/Core/ValueObjectRegister.cpp
lldb/trunk/source/Core/ValueObjectSyntheticFilter.cpp
lldb/trunk/source/Core/ValueObjectVariable.cpp
lldb/trunk/source/Expression/ClangASTSource.cpp
lldb/trunk/source/Expression/ClangExpressionParser.cpp
lldb/trunk/source/Expression/ClangFunction.cpp
lldb/trunk/source/Expression/DWARFExpression.cpp
lldb/trunk/source/Expression/IRInterpreter.cpp
lldb/trunk/source/Host/common/File.cpp
lldb/trunk/source/Host/common/FileSpec.cpp
lldb/trunk/source/Host/macosx/Host.mm
lldb/trunk/source/Host/macosx/Symbols.cpp
lldb/trunk/source/Interpreter/Args.cpp
lldb/trunk/source/Interpreter/CommandInterpreter.cpp
lldb/trunk/source/Interpreter/CommandObject.cpp
lldb/trunk/source/Interpreter/CommandReturnObject.cpp
lldb/trunk/source/Interpreter/PythonDataObjects.cpp
lldb/trunk/source/Interpreter/ScriptInterpreterPython.cpp
lldb/trunk/source/Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.cpp
lldb/trunk/source/Plugins/ABI/MacOSX-i386/ABIMacOSX_i386.cpp
lldb/trunk/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.cpp
lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp
lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.h
lldb/trunk/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp
lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/AuxVector.cpp
lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.cpp
lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.h
lldb/trunk/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp
lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp
lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.cpp
lldb/trunk/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp
lldb/trunk/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.h
lldb/trunk/source/Plugins/ObjectContainer/Universal-Mach-O/ObjectContainerUniversalMachO.cpp
lldb/trunk/source/Plugins/ObjectFile/ELF/ELFHeader.cpp
lldb/trunk/source/Plugins/ObjectFile/ELF/ELFHeader.h
lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.h
lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.h
lldb/trunk/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
lldb/trunk/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.h
lldb/trunk/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp
lldb/trunk/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp
lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ThreadKDP.cpp
lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_arm.cpp
lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_arm.h
lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_i386.cpp
lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_i386.h
lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_x86_64.cpp
lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_x86_64.h
lldb/trunk/source/Plugins/Process/Utility/RegisterContextLLDB.cpp
lldb/trunk/source/Plugins/Process/Utility/RegisterContextLLDB.h
lldb/trunk/source/Plugins/Process/Utility/RegisterContextMacOSXFrameBackchain.cpp
lldb/trunk/source/Plugins/Process/Utility/RegisterContextMacOSXFrameBackchain.h
lldb/trunk/source/Plugins/Process/Utility/RegisterContextMemory.cpp
lldb/trunk/source/Plugins/Process/Utility/RegisterContextMemory.h
lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp
lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.h
lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFAbbreviationDeclaration.cpp
lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFAbbreviationDeclaration.h
lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFAttribute.h
lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp
lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.h
lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugAbbrev.cpp
lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugAbbrev.h
lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugArangeSet.cpp
lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugArangeSet.h
lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugAranges.cpp
lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugAranges.h
lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp
lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.h
lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.h
lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp
lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.h
lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugMacinfo.cpp
lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugMacinfo.h
lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugMacinfoEntry.cpp
lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugMacinfoEntry.h
lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugPubnames.cpp
lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugPubnamesSet.cpp
lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugPubnamesSet.h
lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugRanges.cpp
lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugRanges.h
lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp
lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFFormValue.h
lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFLocationDescription.cpp
lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFLocationList.cpp
lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFLocationList.h
lldb/trunk/source/Plugins/SymbolFile/DWARF/HashedNameToDIE.h
lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
lldb/trunk/source/Symbol/ClangASTContext.cpp
lldb/trunk/source/Symbol/ClangASTType.cpp
lldb/trunk/source/Symbol/DWARFCallFrameInfo.cpp
lldb/trunk/source/Symbol/Symbol.cpp
lldb/trunk/source/Symbol/SymbolContext.cpp
lldb/trunk/source/Symbol/SymbolVendor.cpp
lldb/trunk/source/Symbol/Symtab.cpp
lldb/trunk/source/Symbol/VariableList.cpp
lldb/trunk/source/Target/Process.cpp
lldb/trunk/source/Target/Target.cpp
lldb/trunk/source/Utility/StringExtractor.cpp
lldb/trunk/source/Utility/StringExtractor.h
lldb/trunk/tools/debugserver/source/DNBDataRef.cpp
Modified: lldb/trunk/examples/python/operating_system.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/examples/python/operating_system.py?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/examples/python/operating_system.py (original)
+++ lldb/trunk/examples/python/operating_system.py Fri Jan 25 12:06:21 2013
@@ -25,8 +25,9 @@
return self.process.target
def create_thread(self, tid, context):
+ print 'tid type is: ' + str(type(tid))
if tid == 0x444444444:
- thread_info = { 'tid' : 0x444444444, 'name' : 'four' , 'queue' : 'queue4', 'state' : 'stopped', 'stop_reason' : 'none' }
+ thread_info = { 'tid' : tid, 'name' : 'four' , 'queue' : 'queue4', 'state' : 'stopped', 'stop_reason' : 'none' }
self.threads.append(thread_info)
return thread_info
return None
Modified: lldb/trunk/include/lldb/API/SBData.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBData.h?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBData.h (original)
+++ lldb/trunk/include/lldb/API/SBData.h Fri Jan 25 12:06:21 2013
@@ -49,47 +49,47 @@
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/trunk/include/lldb/Breakpoint/Breakpoint.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Breakpoint/Breakpoint.h?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Breakpoint/Breakpoint.h (original)
+++ lldb/trunk/include/lldb/Breakpoint/Breakpoint.h Fri Jan 25 12:06:21 2013
@@ -136,7 +136,7 @@
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 @@
/// 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.
Modified: lldb/trunk/include/lldb/Breakpoint/BreakpointIDList.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Breakpoint/BreakpointIDList.h?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Breakpoint/BreakpointIDList.h (original)
+++ lldb/trunk/include/lldb/Breakpoint/BreakpointIDList.h Fri Jan 25 12:06:21 2013
@@ -41,10 +41,10 @@
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 @@
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/trunk/include/lldb/Breakpoint/BreakpointList.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Breakpoint/BreakpointList.h?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Breakpoint/BreakpointList.h (original)
+++ lldb/trunk/include/lldb/Breakpoint/BreakpointList.h Fri Jan 25 12:06:21 2013
@@ -92,7 +92,7 @@
/// 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 @@
/// 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/trunk/include/lldb/Breakpoint/BreakpointLocationCollection.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Breakpoint/BreakpointLocationCollection.h?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Breakpoint/BreakpointLocationCollection.h (original)
+++ lldb/trunk/include/lldb/Breakpoint/BreakpointLocationCollection.h Fri Jan 25 12:06:21 2013
@@ -101,7 +101,7 @@
/// 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 @@
/// 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.
Modified: lldb/trunk/include/lldb/Breakpoint/BreakpointLocationList.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Breakpoint/BreakpointLocationList.h?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Breakpoint/BreakpointLocationList.h (original)
+++ lldb/trunk/include/lldb/Breakpoint/BreakpointLocationList.h Fri Jan 25 12:06:21 2013
@@ -119,7 +119,7 @@
/// 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 @@
/// 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/trunk/include/lldb/Breakpoint/BreakpointSite.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Breakpoint/BreakpointSite.h?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Breakpoint/BreakpointSite.h (original)
+++ lldb/trunk/include/lldb/Breakpoint/BreakpointSite.h Fri Jan 25 12:06:21 2013
@@ -83,7 +83,7 @@
//------------------------------------------------------------------
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 @@
/// @return
/// The number of owners.
//------------------------------------------------------------------
- uint32_t
+ size_t
GetNumberOfOwners ();
//------------------------------------------------------------------
@@ -183,7 +183,7 @@
/// 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
@@ -244,7 +244,7 @@
/// @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 +265,6 @@
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/trunk/include/lldb/Breakpoint/Watchpoint.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Breakpoint/Watchpoint.h?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Breakpoint/Watchpoint.h (original)
+++ lldb/trunk/include/lldb/Breakpoint/Watchpoint.h Fri Jan 25 12:06:21 2013
@@ -76,7 +76,7 @@
DISALLOW_COPY_AND_ASSIGN (WatchpointEventData);
};
- Watchpoint (Target& target, lldb::addr_t addr, size_t size, const ClangASTType *type, bool hardware = true);
+ Watchpoint (Target& target, lldb::addr_t addr, uint32_t size, const ClangASTType *type, bool hardware = true);
~Watchpoint ();
void
Modified: lldb/trunk/include/lldb/Core/ArchSpec.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/ArchSpec.h?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/ArchSpec.h (original)
+++ lldb/trunk/include/lldb/Core/ArchSpec.h Fri Jan 25 12:06:21 2013
@@ -159,7 +159,7 @@
const ArchSpec&
operator= (const ArchSpec& rhs);
- static uint32_t
+ static size_t
AutoComplete (const char *name,
StringList &matches);
Modified: lldb/trunk/include/lldb/Core/CXXFormatterFunctions.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/CXXFormatterFunctions.h?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/CXXFormatterFunctions.h (original)
+++ lldb/trunk/include/lldb/Core/CXXFormatterFunctions.h Fri Jan 25 12:06:21 2013
@@ -135,11 +135,11 @@
public:
NSArrayMSyntheticFrontEnd (lldb::ValueObjectSP valobj_sp);
- virtual uint32_t
+ virtual size_t
CalculateNumChildren ();
virtual lldb::ValueObjectSP
- GetChildAtIndex (uint32_t idx);
+ GetChildAtIndex (size_t idx);
virtual bool
Update();
@@ -166,11 +166,11 @@
public:
NSArrayISyntheticFrontEnd (lldb::ValueObjectSP valobj_sp);
- virtual uint32_t
+ virtual size_t
CalculateNumChildren ();
virtual lldb::ValueObjectSP
- GetChildAtIndex (uint32_t idx);
+ GetChildAtIndex (size_t idx);
virtual bool
Update();
@@ -186,7 +186,7 @@
private:
ExecutionContextRef m_exe_ctx_ref;
uint8_t m_ptr_size;
- uint64_t m_items;
+ size_t m_items;
lldb::addr_t m_data_ptr;
ClangASTType m_id_type;
std::vector<lldb::ValueObjectSP> m_children;
@@ -197,11 +197,11 @@
public:
NSArrayCodeRunningSyntheticFrontEnd (lldb::ValueObjectSP valobj_sp);
- virtual uint32_t
+ virtual size_t
CalculateNumChildren ();
virtual lldb::ValueObjectSP
- GetChildAtIndex (uint32_t idx);
+ GetChildAtIndex (size_t idx);
virtual bool
Update();
@@ -242,11 +242,11 @@
public:
NSDictionaryISyntheticFrontEnd (lldb::ValueObjectSP valobj_sp);
- virtual uint32_t
+ virtual size_t
CalculateNumChildren ();
virtual lldb::ValueObjectSP
- GetChildAtIndex (uint32_t idx);
+ GetChildAtIndex (size_t idx);
virtual bool
Update();
@@ -298,11 +298,11 @@
public:
NSDictionaryMSyntheticFrontEnd (lldb::ValueObjectSP valobj_sp);
- virtual uint32_t
+ virtual size_t
CalculateNumChildren ();
virtual lldb::ValueObjectSP
- GetChildAtIndex (uint32_t idx);
+ GetChildAtIndex (size_t idx);
virtual bool
Update();
@@ -328,11 +328,11 @@
public:
NSDictionaryCodeRunningSyntheticFrontEnd (lldb::ValueObjectSP valobj_sp);
- virtual uint32_t
+ virtual size_t
CalculateNumChildren ();
virtual lldb::ValueObjectSP
- GetChildAtIndex (uint32_t idx);
+ GetChildAtIndex (size_t idx);
virtual bool
Update();
Modified: lldb/trunk/include/lldb/Core/DataExtractor.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/DataExtractor.h?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/DataExtractor.h (original)
+++ lldb/trunk/include/lldb/Core/DataExtractor.h Fri Jan 25 12:06:21 2013
@@ -86,7 +86,7 @@
/// @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 @@
/// @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 @@
/// @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 @@
/// @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 @@
/// @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 @@
/// 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 @@
/// 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 @@
/// 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 @@
/// @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 @@
/// @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 @@
/// 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,7 @@
/// 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;
//------------------------------------------------------------------
/// Copy \a dst_len bytes from \a *offset_ptr and ensure the copied
@@ -475,11 +475,11 @@
/// 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 +538,13 @@
/// 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 +575,11 @@
/// 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 +605,7 @@
/// 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 +634,10 @@
/// 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 +665,7 @@
/// 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 +704,10 @@
/// 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 +746,10 @@
/// 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 +770,7 @@
/// 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 +802,10 @@
/// 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 +813,13 @@
}
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 +846,7 @@
/// 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 +865,7 @@
/// 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 +893,7 @@
/// 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 +912,7 @@
/// 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 +940,7 @@
/// 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 +959,7 @@
/// 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 +987,7 @@
/// 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 +1008,7 @@
/// 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 +1029,7 @@
/// 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 +1052,7 @@
/// NULL otherwise.
//------------------------------------------------------------------
const char *
- PeekCStr (uint32_t offset) const;
+ PeekCStr (lldb::offset_t offset) const;
//------------------------------------------------------------------
/// Peek at a bytes at \a offset.
@@ -1056,7 +1066,7 @@
/// otherwise.
//------------------------------------------------------------------
const uint8_t*
- PeekData (uint32_t offset, uint32_t length) const;
+ PeekData (lldb::offset_t offset, lldb::offset_t length) const;
//------------------------------------------------------------------
/// Set the address byte size.
@@ -1068,7 +1078,7 @@
/// 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 +1104,8 @@
/// @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 +1133,8 @@
/// @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 +1161,8 @@
/// @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 +1198,7 @@
// 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 +1208,7 @@
/// object, \b false otherwise.
//------------------------------------------------------------------
bool
- ValidOffset (uint32_t offset) const
+ ValidOffset (lldb::offset_t offset) const
{
return offset < GetByteSize();
}
@@ -1211,7 +1221,7 @@
/// 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;
size_t
Copy (DataExtractor& dest_data) const;
@@ -1220,7 +1230,7 @@
Append (DataExtractor& rhs);
bool
- Append (void* bytes, uint32_t length);
+ Append (void* bytes, lldb::offset_t length);
protected:
//------------------------------------------------------------------
@@ -1229,7 +1239,7 @@
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
};
Modified: lldb/trunk/include/lldb/Core/Debugger.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/Debugger.h?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/Debugger.h (original)
+++ lldb/trunk/include/lldb/Core/Debugger.h Fri Jan 25 12:06:21 2013
@@ -227,11 +227,11 @@
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,
Modified: lldb/trunk/include/lldb/Core/Disassembler.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/Disassembler.h?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/Disassembler.h (original)
+++ lldb/trunk/include/lldb/Core/Disassembler.h Fri Jan 25 12:06:21 2013
@@ -88,8 +88,8 @@
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.
@@ -166,7 +166,7 @@
GetMaxOpcocdeByteSize () const;
lldb::InstructionSP
- GetInstructionAtIndex (uint32_t idx) const;
+ GetInstructionAtIndex (size_t idx) const;
uint32_t
GetIndexOfNextBranchInstruction(uint32_t start) const;
@@ -218,7 +218,7 @@
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);
@@ -350,8 +350,8 @@
virtual size_t
DecodeInstructions (const Address &base_addr,
const DataExtractor& data,
- uint32_t data_offset,
- uint32_t num_instructions,
+ lldb::offset_t data_offset,
+ size_t num_instructions,
bool append) = 0;
InstructionList &
Modified: lldb/trunk/include/lldb/Core/FileSpecList.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/FileSpecList.h?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/FileSpecList.h (original)
+++ lldb/trunk/include/lldb/Core/FileSpecList.h Fri Jan 25 12:06:21 2013
@@ -123,8 +123,8 @@
/// 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 @@
/// returned.
//------------------------------------------------------------------
const FileSpec &
- GetFileSpecAtIndex (uint32_t idx) const;
+ GetFileSpecAtIndex (size_t idx) const;
//------------------------------------------------------------------
/// Get file specification pointer at index.
@@ -159,7 +159,7 @@
/// 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.
@@ -182,11 +182,11 @@
/// @return
/// The number of files in the file spec list.
//------------------------------------------------------------------
- uint32_t
+ size_t
GetSize () const;
bool
- Insert (uint32_t idx, const FileSpec &file)
+ Insert (size_t idx, const FileSpec &file)
{
if (idx < m_files.size())
{
@@ -202,7 +202,7 @@
}
bool
- Replace (uint32_t idx, const FileSpec &file)
+ Replace (size_t idx, const FileSpec &file)
{
if (idx < m_files.size())
{
@@ -213,7 +213,7 @@
}
bool
- Remove (uint32_t idx)
+ Remove (size_t idx)
{
if (idx < m_files.size())
{
Modified: lldb/trunk/include/lldb/Core/FormatClasses.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/FormatClasses.h?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/FormatClasses.h (original)
+++ lldb/trunk/include/lldb/Core/FormatClasses.h Fri Jan 25 12:06:21 2013
@@ -237,11 +237,11 @@
{
}
- virtual uint32_t
+ virtual size_t
CalculateNumChildren () = 0;
virtual lldb::ValueObjectSP
- GetChildAtIndex (uint32_t idx) = 0;
+ GetChildAtIndex (size_t idx) = 0;
virtual uint32_t
GetIndexOfChildWithName (const ConstString &name) = 0;
@@ -479,14 +479,14 @@
m_expression_paths.clear();
}
- int
+ size_t
GetCount() const
{
return m_expression_paths.size();
}
const char*
- GetExpressionPathAtIndex(int i) const
+ GetExpressionPathAtIndex(size_t i) const
{
return m_expression_paths[i].c_str();
}
@@ -556,14 +556,14 @@
{
}
- virtual uint32_t
+ virtual size_t
CalculateNumChildren()
{
return filter->GetCount();
}
virtual lldb::ValueObjectSP
- GetChildAtIndex (uint32_t idx)
+ GetChildAtIndex (size_t idx)
{
if (idx >= filter->GetCount())
return lldb::ValueObjectSP();
@@ -720,7 +720,7 @@
virtual
~FrontEnd();
- virtual uint32_t
+ virtual size_t
CalculateNumChildren()
{
if (!m_wrapper_sp || m_interpreter == NULL)
@@ -729,7 +729,7 @@
}
virtual lldb::ValueObjectSP
- GetChildAtIndex (uint32_t idx);
+ GetChildAtIndex (size_t idx);
virtual bool
Update()
@@ -911,7 +911,7 @@
}
int
- GetRealIndexForIndex(int i);
+ GetRealIndexForIndex(size_t i);
bool
IsScripted()
@@ -939,7 +939,7 @@
{
}
- virtual uint32_t
+ virtual size_t
CalculateNumChildren()
{
return filter->GetCount();
@@ -952,7 +952,7 @@
}
virtual lldb::ValueObjectSP
- GetChildAtIndex (uint32_t idx)
+ GetChildAtIndex (size_t idx)
{
if (idx >= filter->GetCount())
return lldb::ValueObjectSP();
Modified: lldb/trunk/include/lldb/Core/FormatManager.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/FormatManager.h?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/FormatManager.h (original)
+++ lldb/trunk/include/lldb/Core/FormatManager.h Fri Jan 25 12:06:21 2013
@@ -150,7 +150,7 @@
#endif
lldb::TypeNameSpecifierImplSP
- GetTypeNameSpecifierForSummaryAtIndex (uint32_t index)
+ GetTypeNameSpecifierForSummaryAtIndex (size_t index)
{
if (index < m_summary_nav->GetCount())
return m_summary_nav->GetTypeNameSpecifierAtIndex(index);
@@ -159,7 +159,7 @@
}
SummaryNavigator::MapValueType
- GetSummaryAtIndex (uint32_t index)
+ GetSummaryAtIndex (size_t index)
{
if (index < m_summary_nav->GetCount())
return m_summary_nav->GetAtIndex(index);
@@ -168,7 +168,7 @@
}
FilterNavigator::MapValueType
- GetFilterAtIndex (uint32_t index)
+ GetFilterAtIndex (size_t index)
{
if (index < m_filter_nav->GetCount())
return m_filter_nav->GetAtIndex(index);
@@ -177,7 +177,7 @@
}
lldb::TypeNameSpecifierImplSP
- GetTypeNameSpecifierForFilterAtIndex (uint32_t index)
+ GetTypeNameSpecifierForFilterAtIndex (size_t index)
{
if (index < m_filter_nav->GetCount())
return m_filter_nav->GetTypeNameSpecifierAtIndex(index);
@@ -199,7 +199,7 @@
}
SynthNavigator::MapValueType
- GetSyntheticAtIndex (uint32_t index)
+ GetSyntheticAtIndex (size_t index)
{
if (index < m_synth_nav->GetCount())
return m_synth_nav->GetAtIndex(index);
@@ -208,7 +208,7 @@
}
lldb::TypeNameSpecifierImplSP
- GetTypeNameSpecifierForSyntheticAtIndex (uint32_t index)
+ GetTypeNameSpecifierForSyntheticAtIndex (size_t index)
{
if (index < m_synth_nav->GetCount())
return m_synth_nav->GetTypeNameSpecifierAtIndex(index);
@@ -486,7 +486,7 @@
LoopThrough (CallbackType callback, void* param);
lldb::TypeCategoryImplSP
- GetAtIndex (uint32_t);
+ GetAtIndex (size_t index);
bool
AnyMatches (ConstString type_name,
@@ -495,7 +495,7 @@
const char** matching_category = NULL,
TypeCategoryImpl::FormatCategoryItems* matching_type = NULL);
- uint32_t
+ size_t
GetCount ()
{
return m_map.size();
@@ -615,14 +615,14 @@
return m_categories_map.Clear();
}
- uint32_t
+ size_t
GetCategoriesCount ()
{
return m_categories_map.GetCount();
}
lldb::TypeCategoryImplSP
- GetCategoryAtIndex (uint32_t index)
+ GetCategoryAtIndex (size_t index)
{
return m_categories_map.GetAtIndex(index);
}
Modified: lldb/trunk/include/lldb/Core/FormatNavigator.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/FormatNavigator.h?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/FormatNavigator.h (original)
+++ lldb/trunk/include/lldb/Core/FormatNavigator.h Fri Jan 25 12:06:21 2013
@@ -185,14 +185,14 @@
}
}
- uint32_t
+ size_t
GetCount ()
{
return m_map.size();
}
ValueSP
- GetValueAtIndex (uint32_t index)
+ GetValueAtIndex (size_t index)
{
Mutex::Locker locker(m_map_mutex);
MapIterator iter = m_map.begin();
@@ -208,7 +208,7 @@
}
KeyType
- GetKeyAtIndex (uint32_t index)
+ GetKeyAtIndex (size_t index)
{
Mutex::Locker locker(m_map_mutex);
MapIterator iter = m_map.begin();
@@ -316,13 +316,13 @@
}
MapValueType
- GetAtIndex (uint32_t index)
+ GetAtIndex (size_t index)
{
return m_format_map.GetValueAtIndex(index);
}
lldb::TypeNameSpecifierImplSP
- GetTypeNameSpecifierAtIndex (uint32_t index)
+ GetTypeNameSpecifierAtIndex (size_t index)
{
return GetTypeNameSpecifierAtIndex_Impl(index, (KeyType*)NULL);
}
@@ -339,7 +339,7 @@
m_format_map.LoopThrough(callback,param);
}
- uint32_t
+ size_t
GetCount ()
{
return m_format_map.GetCount();
@@ -405,7 +405,7 @@
}
lldb::TypeNameSpecifierImplSP
- GetTypeNameSpecifierAtIndex_Impl (uint32_t index, ConstString *dummy)
+ GetTypeNameSpecifierAtIndex_Impl (size_t index, ConstString *dummy)
{
ConstString key = m_format_map.GetKeyAtIndex(index);
if (key)
@@ -416,7 +416,7 @@
}
lldb::TypeNameSpecifierImplSP
- GetTypeNameSpecifierAtIndex_Impl (uint32_t index, lldb::RegularExpressionSP *dummy)
+ GetTypeNameSpecifierAtIndex_Impl (size_t index, lldb::RegularExpressionSP *dummy)
{
lldb::RegularExpressionSP regex = m_format_map.GetKeyAtIndex(index);
if (regex.get() == NULL)
Modified: lldb/trunk/include/lldb/Core/MappedHash.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/MappedHash.h?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/MappedHash.h (original)
+++ lldb/trunk/include/lldb/Core/MappedHash.h Fri Jan 25 12:06:21 2013
@@ -36,7 +36,7 @@
}
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 @@
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 @@
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 @@
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 @@
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
@@ -379,8 +379,8 @@
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 @@
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 @@
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/trunk/include/lldb/Core/Module.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/Module.h?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/Module.h (original)
+++ lldb/trunk/include/lldb/Core/Module.h Fri Jan 25 12:06:21 2013
@@ -247,7 +247,7 @@
/// @return
/// The number of matches added to \a sc_list.
//------------------------------------------------------------------
- uint32_t
+ size_t
FindCompileUnits (const FileSpec &path,
bool append,
SymbolContextList &sc_list);
@@ -284,7 +284,7 @@
/// @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,
@@ -315,7 +315,7 @@
/// @return
/// The number of matches added to \a sc_list.
//------------------------------------------------------------------
- uint32_t
+ size_t
FindFunctions (const RegularExpression& regex,
bool symbols_ok,
bool inlines_ok,
@@ -348,11 +348,11 @@
/// @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);
//------------------------------------------------------------------
@@ -377,10 +377,10 @@
/// @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);
//------------------------------------------------------------------
@@ -424,11 +424,11 @@
/// @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
@@ -458,11 +458,11 @@
/// @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);
//------------------------------------------------------------------
@@ -570,11 +570,11 @@
/// 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;
@@ -963,12 +963,12 @@
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/trunk/include/lldb/Core/ModuleList.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/ModuleList.h?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/ModuleList.h (original)
+++ lldb/trunk/include/lldb/Core/ModuleList.h Fri Jan 25 12:06:21 2013
@@ -165,7 +165,7 @@
return m_modules_mutex;
}
- uint32_t
+ size_t
GetIndexForModule (const Module *module) const;
//------------------------------------------------------------------
@@ -181,7 +181,7 @@
/// @see ModuleList::GetSize()
//------------------------------------------------------------------
lldb::ModuleSP
- GetModuleAtIndex (uint32_t idx) const;
+ GetModuleAtIndex (size_t idx) const;
//------------------------------------------------------------------
/// Get the module shared pointer for the module at index \a idx without
@@ -198,7 +198,7 @@
/// @see ModuleList::GetSize()
//------------------------------------------------------------------
lldb::ModuleSP
- GetModuleAtIndexUnlocked (uint32_t idx) const;
+ GetModuleAtIndexUnlocked (size_t idx) const;
//------------------------------------------------------------------
/// Get the module pointer for the module at index \a idx.
@@ -213,7 +213,7 @@
/// @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
@@ -230,7 +230,7 @@
/// @see ModuleList::GetSize()
//------------------------------------------------------------------
Module*
- GetModulePointerAtIndexUnlocked (uint32_t idx) const;
+ GetModulePointerAtIndexUnlocked (size_t idx) const;
//------------------------------------------------------------------
/// Find compile units by partial or full path.
@@ -253,7 +253,7 @@
/// @return
/// The number of matches added to \a sc_list.
//------------------------------------------------------------------
- uint32_t
+ size_t
FindCompileUnits (const FileSpec &path,
bool append,
SymbolContextList &sc_list) const;
@@ -261,7 +261,7 @@
//------------------------------------------------------------------
/// @see Module::FindFunctions ()
//------------------------------------------------------------------
- uint32_t
+ size_t
FindFunctions (const ConstString &name,
uint32_t name_type_mask,
bool include_symbols,
@@ -292,10 +292,10 @@
/// @return
/// The number of matches added to \a variable_list.
//------------------------------------------------------------------
- uint32_t
+ size_t
FindGlobalVariables (const ConstString &name,
bool append,
- uint32_t max_matches,
+ size_t max_matches,
VariableList& variable_list) const;
//------------------------------------------------------------------
@@ -320,10 +320,10 @@
/// @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) const;
//------------------------------------------------------------------
@@ -422,11 +422,11 @@
/// @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,
+ size_t max_matches,
TypeList& types) const;
bool
@@ -503,7 +503,7 @@
FindSharedModules (const ModuleSpec &module_spec,
ModuleList &matching_module_list);
- static uint32_t
+ static size_t
RemoveOrphanSharedModules (bool mandatory);
static bool
Modified: lldb/trunk/include/lldb/Core/PluginManager.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/PluginManager.h?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/PluginManager.h (original)
+++ lldb/trunk/include/lldb/Core/PluginManager.h Fri Jan 25 12:06:21 2013
@@ -216,7 +216,7 @@
static const char *
GetPlatformPluginDescriptionAtIndex (uint32_t idx);
- static uint32_t
+ static size_t
AutoCompletePlatformName (const char *partial_name,
StringList &matches);
//------------------------------------------------------------------
Modified: lldb/trunk/include/lldb/Core/RegisterValue.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/RegisterValue.h?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/RegisterValue.h (original)
+++ lldb/trunk/include/lldb/Core/RegisterValue.h Fri Jan 25 12:06:21 2013
@@ -345,7 +345,7 @@
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.
Modified: lldb/trunk/include/lldb/Core/Scalar.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/Scalar.h?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/Scalar.h (original)
+++ lldb/trunk/include/lldb/Core/Scalar.h Fri Jan 25 12:06:21 2013
@@ -73,9 +73,9 @@
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;
@@ -219,7 +219,7 @@
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);
static bool
UIntValueIsValidForSize (uint64_t uval64, size_t total_byte_size)
@@ -249,6 +249,16 @@
}
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;
Modified: lldb/trunk/include/lldb/Core/Section.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/Section.h?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/Section.h (original)
+++ lldb/trunk/include/lldb/Core/Section.h Fri Jan 25 12:06:21 2013
@@ -34,13 +34,13 @@
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,7 +56,7 @@
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;
@@ -82,7 +82,7 @@
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);
Modified: lldb/trunk/include/lldb/Core/Stream.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/Stream.h?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/Stream.h (original)
+++ lldb/trunk/include/lldb/Core/Stream.h Fri Jan 25 12:06:21 2013
@@ -87,13 +87,13 @@
/// @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 @@
/// @return
/// The number of bytes that were appended to the stream.
//------------------------------------------------------------------
- int
+ size_t
PrintfAsRawHex8 (const char *format, ...) __attribute__ ((format (printf, 2, 3)));
//------------------------------------------------------------------
@@ -142,59 +142,59 @@
/// @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);
// Append \a src_len bytes from \a src to the stream as hex characters
// (two ascii characters per byte of input data)
- int
+ size_t
PutBytesAsRawHex8 (const void *src,
size_t src_len,
lldb::ByteOrder src_byte_order = lldb::eByteOrderInvalid,
lldb::ByteOrder dst_byte_order = lldb::eByteOrderInvalid);
// Append \a src_len bytes from \a s to the stream as binary data.
- int
+ 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);
//------------------------------------------------------------------
@@ -359,7 +359,7 @@
/// 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.
@@ -383,7 +383,7 @@
/// 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.
@@ -393,13 +393,13 @@
/// @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();
//------------------------------------------------------------------
@@ -409,7 +409,7 @@
/// 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;
//------------------------------------------------------------------
@@ -478,7 +478,7 @@
/// A C string to print following the indentation. If NULL, just
/// output the indentation characters.
//------------------------------------------------------------------
- int
+ size_t
Indent(const char *s = NULL);
//------------------------------------------------------------------
@@ -520,10 +520,10 @@
/// 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);
//------------------------------------------------------------------
@@ -549,7 +549,7 @@
/// address and pointer values.
//------------------------------------------------------------------
void
- SetAddressByteSize (uint8_t addr_size);
+ SetAddressByteSize (uint32_t addr_size);
//------------------------------------------------------------------
/// Set the current indentation level.
@@ -572,7 +572,7 @@
/// @param[in] format
/// The optional printf format that can be overridden.
//------------------------------------------------------------------
- int
+ size_t
PutSLEB128 (int64_t uval);
//------------------------------------------------------------------
@@ -587,7 +587,7 @@
/// @param[in] format
/// The optional printf format that can be overridden.
//------------------------------------------------------------------
- int
+ size_t
PutULEB128 (uint64_t uval);
static void
@@ -597,12 +597,12 @@
//------------------------------------------------------------------
// 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/trunk/include/lldb/Core/StreamAsynchronousIO.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/StreamAsynchronousIO.h?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/StreamAsynchronousIO.h (original)
+++ lldb/trunk/include/lldb/Core/StreamAsynchronousIO.h Fri Jan 25 12:06:21 2013
@@ -28,7 +28,7 @@
virtual void
Flush ();
- virtual int
+ virtual size_t
Write (const void *src, size_t src_len);
Modified: lldb/trunk/include/lldb/Core/StreamBuffer.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/StreamBuffer.h?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/StreamBuffer.h (original)
+++ lldb/trunk/include/lldb/Core/StreamBuffer.h Fri Jan 25 12:06:21 2013
@@ -47,7 +47,7 @@
// Nothing to do when flushing a buffer based stream...
}
- virtual int
+ virtual size_t
Write (const void *s, size_t length)
{
if (s && length)
Modified: lldb/trunk/include/lldb/Core/StreamCallback.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/StreamCallback.h?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/StreamCallback.h (original)
+++ lldb/trunk/include/lldb/Core/StreamCallback.h Fri Jan 25 12:06:21 2013
@@ -29,7 +29,7 @@
virtual void
Flush ();
- virtual int
+ virtual size_t
Write (const void *src, size_t src_len);
Modified: lldb/trunk/include/lldb/Core/StreamFile.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/StreamFile.h?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/StreamFile.h (original)
+++ lldb/trunk/include/lldb/Core/StreamFile.h Fri Jan 25 12:06:21 2013
@@ -57,7 +57,7 @@
virtual void
Flush ();
- virtual int
+ virtual size_t
Write (const void *s, size_t length);
protected:
Modified: lldb/trunk/include/lldb/Core/StreamString.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/StreamString.h?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/StreamString.h (original)
+++ lldb/trunk/include/lldb/Core/StreamString.h Fri Jan 25 12:06:21 2013
@@ -31,7 +31,7 @@
virtual void
Flush ();
- virtual int
+ virtual size_t
Write (const void *s, size_t length);
void
Modified: lldb/trunk/include/lldb/Core/StreamTee.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/StreamTee.h?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/StreamTee.h (original)
+++ lldb/trunk/include/lldb/Core/StreamTee.h Fri Jan 25 12:06:21 2013
@@ -93,14 +93,14 @@
}
}
- 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 @@
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/trunk/include/lldb/Core/StringList.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/StringList.h?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/StringList.h (original)
+++ lldb/trunk/include/lldb/Core/StringList.h Fri Jan 25 12:06:21 2013
@@ -48,7 +48,7 @@
bool
ReadFileLines (FileSpec &input_file);
- uint32_t
+ size_t
GetSize () const;
const char *
Modified: lldb/trunk/include/lldb/Core/VMRange.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/VMRange.h?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/VMRange.h (original)
+++ lldb/trunk/include/lldb/Core/VMRange.h Fri Jan 25 12:06:21 2013
@@ -161,7 +161,7 @@
// 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/trunk/include/lldb/Core/Value.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/Value.h?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/Value.h (original)
+++ lldb/trunk/include/lldb/Core/Value.h Fri Jan 25 12:06:21 2013
@@ -213,7 +213,7 @@
}
void
- ResizeData(int len);
+ ResizeData(size_t len);
bool
ValueOf(ExecutionContext *exe_ctx, clang::ASTContext *ast_context);
Modified: lldb/trunk/include/lldb/Core/ValueObject.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/ValueObject.h?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/ValueObject.h (original)
+++ lldb/trunk/include/lldb/Core/ValueObject.h Fri Jan 25 12:06:21 2013
@@ -732,32 +732,32 @@
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<uint32_t> &idxs,
- uint32_t* index_of_error = NULL);
+ GetChildAtIndexPath (const std::initializer_list<size_t> &idxs,
+ size_t* index_of_error = NULL);
lldb::ValueObjectSP
- GetChildAtIndexPath (const std::vector<uint32_t> &idxs,
- uint32_t* index_of_error = NULL);
+ GetChildAtIndexPath (const std::vector<size_t> &idxs,
+ size_t* index_of_error = NULL);
lldb::ValueObjectSP
- GetChildAtIndexPath (const std::initializer_list< std::pair<uint32_t, bool> > &idxs,
- uint32_t* index_of_error = NULL);
+ 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<uint32_t, bool> > &idxs,
- uint32_t* index_of_error = NULL);
+ 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 &
@@ -833,13 +833,13 @@
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);
@@ -1117,13 +1117,13 @@
{
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 locker(m_mutex);
ChildrenIterator iter = m_children.find(idx);
@@ -1132,7 +1132,7 @@
}
ValueObject*
- GetChildAtIndex (uint32_t idx)
+ GetChildAtIndex (size_t idx)
{
Mutex::Locker locker(m_mutex);
ChildrenIterator iter = m_children.find(idx);
@@ -1144,7 +1144,7 @@
}
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 locker(m_mutex);
@@ -1152,12 +1152,12 @@
}
void
- SetChildrenCount (uint32_t count)
+ SetChildrenCount (size_t count)
{
m_children_count = count;
}
- uint32_t
+ size_t
GetChildrenCount ()
{
return m_children_count;
@@ -1172,12 +1172,12 @@
}
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;
};
//------------------------------------------------------------------
@@ -1279,14 +1279,14 @@
// 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);
Modified: lldb/trunk/include/lldb/Core/ValueObjectCast.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/ValueObjectCast.h?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/ValueObjectCast.h (original)
+++ lldb/trunk/include/lldb/Core/ValueObjectCast.h Fri Jan 25 12:06:21 2013
@@ -35,7 +35,7 @@
virtual size_t
GetByteSize();
- virtual uint32_t
+ virtual size_t
CalculateNumChildren();
virtual lldb::ValueType
Modified: lldb/trunk/include/lldb/Core/ValueObjectChild.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/ValueObjectChild.h?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/ValueObjectChild.h (original)
+++ lldb/trunk/include/lldb/Core/ValueObjectChild.h Fri Jan 25 12:06:21 2013
@@ -53,7 +53,7 @@
virtual lldb::ValueType
GetValueType() const;
- virtual uint32_t
+ virtual size_t
CalculateNumChildren();
virtual ConstString
Modified: lldb/trunk/include/lldb/Core/ValueObjectConstResult.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/ValueObjectConstResult.h?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/ValueObjectConstResult.h (original)
+++ lldb/trunk/include/lldb/Core/ValueObjectConstResult.h Fri Jan 25 12:06:21 2013
@@ -47,7 +47,7 @@
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 @@
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,
@@ -78,7 +78,7 @@
virtual lldb::ValueType
GetValueType() const;
- virtual uint32_t
+ virtual size_t
CalculateNumChildren();
virtual ConstString
@@ -101,7 +101,7 @@
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 @@
clang::ASTContext *m_clang_ast; // The clang AST that the clang type comes from
ConstString m_type_name;
- uint32_t m_byte_size;
+ size_t m_byte_size;
ValueObjectConstResultImpl m_impl;
@@ -171,7 +171,7 @@
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 @@
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/trunk/include/lldb/Core/ValueObjectConstResultChild.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/ValueObjectConstResultChild.h?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/ValueObjectConstResultChild.h (original)
+++ lldb/trunk/include/lldb/Core/ValueObjectConstResultChild.h Fri Jan 25 12:06:21 2013
@@ -43,7 +43,7 @@
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/trunk/include/lldb/Core/ValueObjectConstResultImpl.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/ValueObjectConstResultImpl.h?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/ValueObjectConstResultImpl.h (original)
+++ lldb/trunk/include/lldb/Core/ValueObjectConstResultImpl.h Fri Jan 25 12:06:21 2013
@@ -39,7 +39,7 @@
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/trunk/include/lldb/Core/ValueObjectDynamicValue.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/ValueObjectDynamicValue.h?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/ValueObjectDynamicValue.h (original)
+++ lldb/trunk/include/lldb/Core/ValueObjectDynamicValue.h Fri Jan 25 12:06:21 2013
@@ -38,7 +38,7 @@
virtual ConstString
GetQualifiedTypeName();
- virtual uint32_t
+ virtual size_t
CalculateNumChildren();
virtual lldb::ValueType
Modified: lldb/trunk/include/lldb/Core/ValueObjectList.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/ValueObjectList.h?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/ValueObjectList.h (original)
+++ lldb/trunk/include/lldb/Core/ValueObjectList.h Fri Jan 25 12:06:21 2013
@@ -50,20 +50,20 @@
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/trunk/include/lldb/Core/ValueObjectMemory.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/ValueObjectMemory.h?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/ValueObjectMemory.h (original)
+++ lldb/trunk/include/lldb/Core/ValueObjectMemory.h Fri Jan 25 12:06:21 2013
@@ -47,7 +47,7 @@
virtual ConstString
GetTypeName();
- virtual uint32_t
+ virtual size_t
CalculateNumChildren();
virtual lldb::ValueType
Modified: lldb/trunk/include/lldb/Core/ValueObjectRegister.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/ValueObjectRegister.h?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/ValueObjectRegister.h (original)
+++ lldb/trunk/include/lldb/Core/ValueObjectRegister.h Fri Jan 25 12:06:21 2013
@@ -46,11 +46,11 @@
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
@@ -96,16 +96,16 @@
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);
@@ -154,7 +154,7 @@
virtual ConstString
GetTypeName();
- virtual uint32_t
+ virtual size_t
CalculateNumChildren();
virtual bool
Modified: lldb/trunk/include/lldb/Core/ValueObjectSyntheticFilter.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/ValueObjectSyntheticFilter.h?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/ValueObjectSyntheticFilter.h (original)
+++ lldb/trunk/include/lldb/Core/ValueObjectSyntheticFilter.h Fri Jan 25 12:06:21 2013
@@ -42,19 +42,19 @@
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 bool
Modified: lldb/trunk/include/lldb/Core/ValueObjectVariable.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/ValueObjectVariable.h?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/ValueObjectVariable.h (original)
+++ lldb/trunk/include/lldb/Core/ValueObjectVariable.h Fri Jan 25 12:06:21 2013
@@ -40,7 +40,7 @@
virtual ConstString
GetQualifiedTypeName();
- virtual uint32_t
+ virtual size_t
CalculateNumChildren();
virtual lldb::ValueType
Modified: lldb/trunk/include/lldb/Core/dwarf.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/dwarf.h?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/dwarf.h (original)
+++ lldb/trunk/include/lldb/Core/dwarf.h Fri Jan 25 12:06:21 2013
@@ -34,7 +34,6 @@
#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/trunk/include/lldb/Expression/ClangFunction.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Expression/ClangFunction.h?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Expression/ClangFunction.h (original)
+++ lldb/trunk/include/lldb/Expression/ClangFunction.h Fri Jan 25 12:06:21 2013
@@ -132,7 +132,8 @@
/// @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 @@
/// @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)
Modified: lldb/trunk/include/lldb/Expression/DWARFExpression.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Expression/DWARFExpression.h?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Expression/DWARFExpression.h (original)
+++ lldb/trunk/include/lldb/Expression/DWARFExpression.h Fri Jan 25 12:06:21 2013
@@ -59,8 +59,8 @@
/// 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
@@ -184,7 +184,7 @@
/// 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 +212,8 @@
//------------------------------------------------------------------
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 +340,8 @@
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 +403,16 @@
//------------------------------------------------------------------
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/trunk/include/lldb/Host/File.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Host/File.h?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Host/File.h (original)
+++ lldb/trunk/include/lldb/Host/File.h Fri Jan 25 12:06:21 2013
@@ -457,10 +457,10 @@
/// 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/trunk/include/lldb/Interpreter/Args.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/Args.h?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Interpreter/Args.h (original)
+++ lldb/trunk/include/lldb/Interpreter/Args.h Fri Jan 25 12:06:21 2013
@@ -268,7 +268,7 @@
// 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);
@@ -390,7 +390,7 @@
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
@@ -399,7 +399,7 @@
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,
Modified: lldb/trunk/include/lldb/Interpreter/CommandInterpreter.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/CommandInterpreter.h?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Interpreter/CommandInterpreter.h (original)
+++ lldb/trunk/include/lldb/Interpreter/CommandInterpreter.h Fri Jan 25 12:06:21 2013
@@ -278,7 +278,7 @@
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
Modified: lldb/trunk/include/lldb/Interpreter/CommandObject.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/CommandObject.h?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Interpreter/CommandObject.h (original)
+++ lldb/trunk/include/lldb/Interpreter/CommandObject.h Fri Jan 25 12:06:21 2013
@@ -409,7 +409,7 @@
/// 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
Modified: lldb/trunk/include/lldb/Interpreter/CommandReturnObject.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/CommandReturnObject.h?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Interpreter/CommandReturnObject.h (original)
+++ lldb/trunk/include/lldb/Interpreter/CommandReturnObject.h Fri Jan 25 12:06:21 2013
@@ -124,7 +124,7 @@
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);
@@ -136,7 +136,7 @@
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)));
Modified: lldb/trunk/include/lldb/Interpreter/OptionValueArray.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/OptionValueArray.h?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Interpreter/OptionValueArray.h (original)
+++ lldb/trunk/include/lldb/Interpreter/OptionValueArray.h Fri Jan 25 12:06:21 2013
@@ -79,14 +79,14 @@
// Subclass specific functions
//---------------------------------------------------------------------
- uint32_t
+ size_t
GetSize () const
{
return m_values.size();
}
lldb::OptionValueSP
- operator[](uint32_t idx) const
+ operator[](size_t idx) const
{
lldb::OptionValueSP value_sp;
if (idx < m_values.size())
@@ -95,7 +95,7 @@
}
lldb::OptionValueSP
- GetValueAtIndex (uint32_t idx) const
+ GetValueAtIndex (size_t idx) const
{
lldb::OptionValueSP value_sp;
if (idx < m_values.size())
@@ -117,7 +117,7 @@
}
bool
- InsertValue (uint32_t idx, const lldb::OptionValueSP &value_sp)
+ InsertValue (size_t idx, const lldb::OptionValueSP &value_sp)
{
// Make sure the value_sp object is allowed to contain
// values of the type passed in...
@@ -133,7 +133,7 @@
}
bool
- ReplaceValue (uint32_t idx, const lldb::OptionValueSP &value_sp)
+ ReplaceValue (size_t idx, const lldb::OptionValueSP &value_sp)
{
// Make sure the value_sp object is allowed to contain
// values of the type passed in...
@@ -149,7 +149,7 @@
}
bool
- DeleteValue (uint32_t idx)
+ DeleteValue (size_t idx)
{
if (idx < m_values.size())
{
Modified: lldb/trunk/include/lldb/Interpreter/OptionValueDictionary.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/OptionValueDictionary.h?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Interpreter/OptionValueDictionary.h (original)
+++ lldb/trunk/include/lldb/Interpreter/OptionValueDictionary.h Fri Jan 25 12:06:21 2013
@@ -80,7 +80,7 @@
// Subclass specific functions
//---------------------------------------------------------------------
- uint32_t
+ size_t
GetNumValues() const
{
return m_values.size();
Modified: lldb/trunk/include/lldb/Interpreter/ScriptInterpreter.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/ScriptInterpreter.h?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Interpreter/ScriptInterpreter.h (original)
+++ lldb/trunk/include/lldb/Interpreter/ScriptInterpreter.h Fri Jan 25 12:06:21 2013
@@ -340,7 +340,7 @@
return false;
}
- virtual uint32_t
+ virtual size_t
CalculateNumChildren (const lldb::ScriptInterpreterObjectSP& implementor)
{
return 0;
Modified: lldb/trunk/include/lldb/Interpreter/ScriptInterpreterPython.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/ScriptInterpreterPython.h?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Interpreter/ScriptInterpreterPython.h (original)
+++ lldb/trunk/include/lldb/Interpreter/ScriptInterpreterPython.h Fri Jan 25 12:06:21 2013
@@ -98,7 +98,7 @@
lldb::tid_t tid,
lldb::addr_t context);
- virtual uint32_t
+ virtual size_t
CalculateNumChildren (const lldb::ScriptInterpreterObjectSP& implementor);
virtual lldb::ValueObjectSP
Modified: lldb/trunk/include/lldb/Symbol/Block.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/Block.h?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Symbol/Block.h (original)
+++ lldb/trunk/include/lldb/Symbol/Block.h Fri Jan 25 12:06:21 2013
@@ -435,7 +435,7 @@
Block *
FindBlockByID (lldb::user_id_t block_id);
- uint32_t
+ size_t
GetNumRanges () const
{
return m_ranges.GetSize();
Modified: lldb/trunk/include/lldb/Symbol/ClangASTContext.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/ClangASTContext.h?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Symbol/ClangASTContext.h (original)
+++ lldb/trunk/include/lldb/Symbol/ClangASTContext.h Fri Jan 25 12:06:21 2013
@@ -596,19 +596,19 @@
static lldb::clang_type_t
GetDirectBaseClassAtIndex (clang::ASTContext *ast,
lldb::clang_type_t clang_type,
- uint32_t idx,
+ size_t idx,
uint32_t *bit_offset_ptr);
static lldb::clang_type_t
GetVirtualBaseClassAtIndex (clang::ASTContext *ast,
lldb::clang_type_t clang_type,
- uint32_t idx,
+ size_t idx,
uint32_t *bit_offset_ptr);
static lldb::clang_type_t
GetFieldAtIndex (clang::ASTContext *ast,
lldb::clang_type_t clang_type,
- uint32_t idx,
+ size_t idx,
std::string& name,
uint64_t *bit_offset_ptr,
uint32_t *bitfield_bit_size_ptr,
@@ -621,7 +621,7 @@
GetChildClangTypeAtIndex (ExecutionContext *exe_ctx,
const char *parent_name,
lldb::clang_type_t parent_clang_type,
- uint32_t idx,
+ size_t idx,
bool transparent_pointers,
bool omit_empty_base_classes,
bool ignore_array_bounds,
@@ -638,7 +638,7 @@
clang::ASTContext *ast,
const char *parent_name,
lldb::clang_type_t parent_clang_type,
- uint32_t idx,
+ size_t idx,
bool transparent_pointers,
bool omit_empty_base_classes,
bool ignore_array_bounds,
Modified: lldb/trunk/include/lldb/Symbol/ObjectFile.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/ObjectFile.h?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Symbol/ObjectFile.h (original)
+++ lldb/trunk/include/lldb/Symbol/ObjectFile.h Fri Jan 25 12:06:21 2013
@@ -214,7 +214,7 @@
/// architecture (and object for archives). Returns zero if no
/// architecture or object has been selected.
//------------------------------------------------------------------
- virtual size_t
+ virtual uint32_t
GetAddressByteSize () const = 0;
//------------------------------------------------------------------
Modified: lldb/trunk/include/lldb/Symbol/Symbol.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/Symbol.h?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Symbol/Symbol.h (original)
+++ lldb/trunk/include/lldb/Symbol/Symbol.h Fri Jan 25 12:06:21 2013
@@ -37,7 +37,7 @@
bool is_artificial,
const lldb::SectionSP §ion_sp,
lldb::addr_t value,
- uint32_t size,
+ lldb::addr_t size,
uint32_t flags);
Symbol (uint32_t symID,
@@ -209,7 +209,7 @@
GetByteSize () const;
void
- SetByteSize (uint32_t size)
+ SetByteSize (lldb::addr_t size)
{
m_calculated_size = size > 0;
m_addr_range.SetByteSize(size);
Modified: lldb/trunk/include/lldb/Symbol/SymbolContext.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/SymbolContext.h?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Symbol/SymbolContext.h (original)
+++ lldb/trunk/include/lldb/Symbol/SymbolContext.h Fri Jan 25 12:06:21 2013
@@ -459,10 +459,10 @@
/// otherwise.
//------------------------------------------------------------------
bool
- GetContextAtIndex(uint32_t idx, SymbolContext& sc) const;
+ GetContextAtIndex(size_t idx, SymbolContext& sc) const;
bool
- RemoveContextAtIndex (uint32_t idx);
+ RemoveContextAtIndex (size_t idx);
//------------------------------------------------------------------
/// Get accessor for a symbol context list size.
///
Modified: lldb/trunk/include/lldb/Symbol/SymbolVendor.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/SymbolVendor.h?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Symbol/SymbolVendor.h (original)
+++ lldb/trunk/include/lldb/Symbol/SymbolVendor.h Fri Jan 25 12:06:21 2013
@@ -100,20 +100,20 @@
uint32_t resolve_scope,
SymbolContextList& sc_list);
- virtual uint32_t
+ virtual size_t
FindGlobalVariables (const ConstString &name,
const ClangNamespaceDecl *namespace_decl,
bool append,
- uint32_t max_matches,
+ size_t max_matches,
VariableList& variables);
- virtual uint32_t
+ virtual size_t
FindGlobalVariables (const RegularExpression& regex,
bool append,
- uint32_t max_matches,
+ size_t max_matches,
VariableList& variables);
- virtual uint32_t
+ virtual size_t
FindFunctions (const ConstString &name,
const ClangNamespaceDecl *namespace_decl,
uint32_t name_type_mask,
@@ -121,18 +121,18 @@
bool append,
SymbolContextList& sc_list);
- virtual uint32_t
+ virtual size_t
FindFunctions (const RegularExpression& regex,
bool include_inlines,
bool append,
SymbolContextList& sc_list);
- virtual uint32_t
+ virtual size_t
FindTypes (const SymbolContext& sc,
const ConstString &name,
const ClangNamespaceDecl *namespace_decl,
bool append,
- uint32_t max_matches,
+ size_t max_matches,
TypeList& types);
virtual lldb_private::ClangNamespaceDecl
@@ -140,15 +140,15 @@
const ConstString &name,
const ClangNamespaceDecl *parent_namespace_decl);
- virtual uint32_t
+ virtual size_t
GetNumCompileUnits();
virtual bool
- SetCompileUnitAtIndex (uint32_t cu_idx,
+ SetCompileUnitAtIndex (size_t cu_idx,
const lldb::CompUnitSP &cu_sp);
virtual lldb::CompUnitSP
- GetCompileUnitAtIndex(uint32_t idx);
+ GetCompileUnitAtIndex(size_t idx);
TypeList&
GetTypeList()
Modified: lldb/trunk/include/lldb/Symbol/Symtab.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/Symtab.h?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Symbol/Symtab.h (original)
+++ lldb/trunk/include/lldb/Symbol/Symtab.h Fri Jan 25 12:06:21 2013
@@ -41,8 +41,8 @@
Symtab(ObjectFile *objfile);
~Symtab();
- void Reserve (uint32_t count);
- Symbol * Resize (uint32_t count);
+ void Reserve (size_t count);
+ Symbol * Resize (size_t count);
uint32_t AddSymbol(const Symbol& symbol);
size_t GetNumSymbols() const;
void Dump(Stream *s, Target *target, SortOrder sort_type);
@@ -53,8 +53,8 @@
return m_mutex;
}
Symbol * FindSymbolByID (lldb::user_id_t uid) const;
- Symbol * SymbolAtIndex (uint32_t idx);
- const Symbol * SymbolAtIndex (uint32_t idx) const;
+ Symbol * SymbolAtIndex (size_t idx);
+ const Symbol * SymbolAtIndex (size_t idx) const;
Symbol * FindSymbolWithType (lldb::SymbolType symbol_type, Debug symbol_debug_type, Visibility symbol_visibility, uint32_t &start_idx);
uint32_t AppendSymbolIndexesWithType (lldb::SymbolType symbol_type, std::vector<uint32_t>& indexes, uint32_t start_idx = 0, uint32_t end_index = UINT32_MAX) const;
uint32_t AppendSymbolIndexesWithTypeAndFlagsValue (lldb::SymbolType symbol_type, uint32_t flags_value, std::vector<uint32_t>& indexes, uint32_t start_idx = 0, uint32_t end_index = UINT32_MAX) const;
@@ -114,7 +114,7 @@
private:
bool
- CheckSymbolAtIndex (uint32_t idx, Debug symbol_debug_type, Visibility symbol_visibility) const
+ CheckSymbolAtIndex (size_t idx, Debug symbol_debug_type, Visibility symbol_visibility) const
{
switch (symbol_debug_type)
{
Modified: lldb/trunk/include/lldb/Symbol/Variable.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/Variable.h?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Symbol/Variable.h (original)
+++ lldb/trunk/include/lldb/Symbol/Variable.h Fri Jan 25 12:06:21 2013
@@ -144,9 +144,9 @@
m_loc_is_const_data = b;
}
- typedef uint32_t (*GetVariableCallback) (void *baton,
- const char *name,
- VariableList &var_list);
+ typedef size_t (*GetVariableCallback) (void *baton,
+ const char *name,
+ VariableList &var_list);
static Error
Modified: lldb/trunk/include/lldb/Symbol/VariableList.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/VariableList.h?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Symbol/VariableList.h (original)
+++ lldb/trunk/include/lldb/Symbol/VariableList.h Fri Jan 25 12:06:21 2013
@@ -42,10 +42,10 @@
Dump(Stream *s, bool show_context) const;
lldb::VariableSP
- GetVariableAtIndex(uint32_t idx) const;
+ GetVariableAtIndex(size_t idx) const;
lldb::VariableSP
- RemoveVariableAtIndex (uint32_t idx);
+ RemoveVariableAtIndex (size_t idx);
lldb::VariableSP
FindVariable (const ConstString& name);
Modified: lldb/trunk/include/lldb/Target/Platform.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/Platform.h?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/Platform.h (original)
+++ lldb/trunk/include/lldb/Target/Platform.h Fri Jan 25 12:06:21 2013
@@ -480,13 +480,13 @@
}
// Used for column widths
- uint32_t
+ size_t
GetMaxUserIDNameLength() const
{
return m_max_uid_name_len;
}
// Used for column widths
- uint32_t
+ size_t
GetMaxGroupIDNameLength() const
{
return m_max_gid_name_len;
@@ -550,8 +550,8 @@
Mutex m_gid_map_mutex;
IDToNameMap m_uid_map;
IDToNameMap m_gid_map;
- uint32_t m_max_uid_name_len;
- uint32_t m_max_gid_name_len;
+ size_t m_max_uid_name_len;
+ size_t m_max_gid_name_len;
const char *
GetCachedUserName (uint32_t uid)
Modified: lldb/trunk/include/lldb/Target/Process.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/Process.h?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/Process.h (original)
+++ lldb/trunk/include/lldb/Target/Process.h Fri Jan 25 12:06:21 2013
@@ -637,7 +637,7 @@
const FileAction *
GetFileActionForFD (int fd) const
{
- for (uint32_t idx=0, count=m_file_actions.size(); idx < count; ++idx)
+ for (size_t idx=0, count=m_file_actions.size(); idx < count; ++idx)
{
if (m_file_actions[idx].GetFD () == fd)
return &m_file_actions[idx];
@@ -1069,7 +1069,7 @@
m_infos.clear();
}
- uint32_t
+ size_t
GetSize()
{
return m_infos.size();
@@ -1082,7 +1082,7 @@
}
const char *
- GetProcessNameAtIndex (uint32_t idx)
+ GetProcessNameAtIndex (size_t idx)
{
if (idx < m_infos.size())
return m_infos[idx].GetName();
@@ -1090,7 +1090,7 @@
}
size_t
- GetProcessNameLengthAtIndex (uint32_t idx)
+ GetProcessNameLengthAtIndex (size_t idx)
{
if (idx < m_infos.size())
return m_infos[idx].GetNameLength();
@@ -1098,7 +1098,7 @@
}
lldb::pid_t
- GetProcessIDAtIndex (uint32_t idx)
+ GetProcessIDAtIndex (size_t idx)
{
if (idx < m_infos.size())
return m_infos[idx].GetProcessID();
@@ -1106,7 +1106,7 @@
}
bool
- GetInfoAtIndex (uint32_t idx, ProcessInstanceInfo &info)
+ GetInfoAtIndex (size_t idx, ProcessInstanceInfo &info)
{
if (idx < m_infos.size())
{
@@ -1118,7 +1118,7 @@
// You must ensure "idx" is valid before calling this function
const ProcessInstanceInfo &
- GetProcessInfoAtIndex (uint32_t idx) const
+ GetProcessInfoAtIndex (size_t idx) const
{
assert (idx < m_infos.size());
return m_infos[idx];
@@ -2769,7 +2769,7 @@
size_t
WriteScalarToMemory (lldb::addr_t vm_addr,
const Scalar &scalar,
- uint32_t size,
+ size_t size,
Error &error);
size_t
Modified: lldb/trunk/include/lldb/Target/RegisterContext.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/RegisterContext.h?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/RegisterContext.h (original)
+++ lldb/trunk/include/lldb/Target/RegisterContext.h Fri Jan 25 12:06:21 2013
@@ -45,13 +45,13 @@
GetRegisterCount () = 0;
virtual const RegisterInfo *
- GetRegisterInfoAtIndex (uint32_t reg) = 0;
+ GetRegisterInfoAtIndex (size_t reg) = 0;
virtual size_t
GetRegisterSetCount () = 0;
virtual const RegisterSet *
- GetRegisterSet (uint32_t reg_set) = 0;
+ GetRegisterSet (size_t reg_set) = 0;
virtual bool
ReadRegister (const RegisterInfo *reg_info, RegisterValue ®_value) = 0;
Modified: lldb/trunk/include/lldb/lldb-defines.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/lldb-defines.h?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/include/lldb/lldb-defines.h (original)
+++ lldb/trunk/include/lldb/lldb-defines.h Fri Jan 25 12:06:21 2013
@@ -77,6 +77,7 @@
#define LLDB_INVALID_THREAD_ID 0
#define LLDB_INVALID_FRAME_ID UINT32_MAX
#define LLDB_INVALID_SIGNAL_NUMBER INT32_MAX
+#define LLDB_INVALID_OFFSET UINT64_MAX // Must match max of lldb::offset_t
//----------------------------------------------------------------------
/// CPU Type defintions
Modified: lldb/trunk/include/lldb/lldb-types.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/lldb-types.h?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/include/lldb/lldb-types.h (original)
+++ lldb/trunk/include/lldb/lldb-types.h Fri Jan 25 12:06:21 2013
@@ -74,6 +74,7 @@
typedef uint64_t user_id_t;
typedef uint64_t pid_t;
typedef uint64_t tid_t;
+ typedef uint64_t offset_t;
typedef int32_t break_id_t;
typedef int32_t watch_id_t;
typedef void * clang_type_t;
Modified: lldb/trunk/scripts/Python/interface/SBData.i
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/Python/interface/SBData.i?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/scripts/Python/interface/SBData.i (original)
+++ lldb/trunk/scripts/Python/interface/SBData.i Fri Jan 25 12:06:21 2013
@@ -42,50 +42,50 @@
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);
bool
GetDescription (lldb::SBStream &description, lldb::addr_t base_addr);
size_t
ReadRawData (lldb::SBError& error,
- uint32_t offset,
+ lldb::offset_t offset,
void *buf,
size_t size);
Modified: lldb/trunk/source/API/SBData.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBData.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/API/SBData.cpp (original)
+++ lldb/trunk/source/API/SBData.cpp Fri Jan 25 12:06:21 2013
@@ -151,7 +151,7 @@
float
-SBData::GetFloat (lldb::SBError& error, uint32_t offset)
+SBData::GetFloat (lldb::SBError& error, lldb::offset_t offset)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
float value = 0;
@@ -167,13 +167,13 @@
error.SetErrorString("unable to read data");
}
if (log)
- log->Printf ("SBData::GetFloat (error=%p,offset=%d) => "
+ log->Printf ("SBData::GetFloat (error=%p,offset=%" PRIu64 ") => "
"(%f)", error.get(), offset, value);
return value;
}
double
-SBData::GetDouble (lldb::SBError& error, uint32_t offset)
+SBData::GetDouble (lldb::SBError& error, lldb::offset_t offset)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
double value = 0;
@@ -189,13 +189,13 @@
error.SetErrorString("unable to read data");
}
if (log)
- log->Printf ("SBData::GetDouble (error=%p,offset=%d) => "
+ log->Printf ("SBData::GetDouble (error=%p,offset=%" PRIu64 ") => "
"(%f)", error.get(), offset, value);
return value;
}
long double
-SBData::GetLongDouble (lldb::SBError& error, uint32_t offset)
+SBData::GetLongDouble (lldb::SBError& error, lldb::offset_t offset)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
long double value = 0;
@@ -211,13 +211,13 @@
error.SetErrorString("unable to read data");
}
if (log)
- log->Printf ("SBData::GetLongDouble (error=%p,offset=%d) => "
+ log->Printf ("SBData::GetLongDouble (error=%p,offset=%" PRIu64 ") => "
"(%Lf)", error.get(), offset, value);
return value;
}
lldb::addr_t
-SBData::GetAddress (lldb::SBError& error, uint32_t offset)
+SBData::GetAddress (lldb::SBError& error, lldb::offset_t offset)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
lldb::addr_t value = 0;
@@ -233,13 +233,13 @@
error.SetErrorString("unable to read data");
}
if (log)
- log->Printf ("SBData::GetAddress (error=%p,offset=%d) => "
+ log->Printf ("SBData::GetAddress (error=%p,offset=%" PRIu64 ") => "
"(%p)", error.get(), offset, (void*)value);
return value;
}
uint8_t
-SBData::GetUnsignedInt8 (lldb::SBError& error, uint32_t offset)
+SBData::GetUnsignedInt8 (lldb::SBError& error, lldb::offset_t offset)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
uint8_t value = 0;
@@ -255,13 +255,13 @@
error.SetErrorString("unable to read data");
}
if (log)
- log->Printf ("SBData::GetUnsignedInt8 (error=%p,offset=%d) => "
+ log->Printf ("SBData::GetUnsignedInt8 (error=%p,offset=%" PRIu64 ") => "
"(%c)", error.get(), offset, value);
return value;
}
uint16_t
-SBData::GetUnsignedInt16 (lldb::SBError& error, uint32_t offset)
+SBData::GetUnsignedInt16 (lldb::SBError& error, lldb::offset_t offset)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
uint16_t value = 0;
@@ -277,13 +277,13 @@
error.SetErrorString("unable to read data");
}
if (log)
- log->Printf ("SBData::GetUnsignedInt16 (error=%p,offset=%d) => "
+ log->Printf ("SBData::GetUnsignedInt16 (error=%p,offset=%" PRIu64 ") => "
"(%hd)", error.get(), offset, value);
return value;
}
uint32_t
-SBData::GetUnsignedInt32 (lldb::SBError& error, uint32_t offset)
+SBData::GetUnsignedInt32 (lldb::SBError& error, lldb::offset_t offset)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
uint32_t value = 0;
@@ -299,13 +299,13 @@
error.SetErrorString("unable to read data");
}
if (log)
- log->Printf ("SBData::GetUnsignedInt32 (error=%p,offset=%d) => "
+ log->Printf ("SBData::GetUnsignedInt32 (error=%p,offset=%" PRIu64 ") => "
"(%d)", error.get(), offset, value);
return value;
}
uint64_t
-SBData::GetUnsignedInt64 (lldb::SBError& error, uint32_t offset)
+SBData::GetUnsignedInt64 (lldb::SBError& error, lldb::offset_t offset)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
uint64_t value = 0;
@@ -321,13 +321,13 @@
error.SetErrorString("unable to read data");
}
if (log)
- log->Printf ("SBData::GetUnsignedInt64 (error=%p,offset=%d) => "
+ log->Printf ("SBData::GetUnsignedInt64 (error=%p,offset=%" PRIu64 ") => "
"(%" PRId64 ")", error.get(), offset, value);
return value;
}
int8_t
-SBData::GetSignedInt8 (lldb::SBError& error, uint32_t offset)
+SBData::GetSignedInt8 (lldb::SBError& error, lldb::offset_t offset)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
int8_t value = 0;
@@ -343,13 +343,13 @@
error.SetErrorString("unable to read data");
}
if (log)
- log->Printf ("SBData::GetSignedInt8 (error=%p,offset=%d) => "
+ log->Printf ("SBData::GetSignedInt8 (error=%p,offset=%" PRIu64 ") => "
"(%c)", error.get(), offset, value);
return value;
}
int16_t
-SBData::GetSignedInt16 (lldb::SBError& error, uint32_t offset)
+SBData::GetSignedInt16 (lldb::SBError& error, lldb::offset_t offset)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
int16_t value = 0;
@@ -365,13 +365,13 @@
error.SetErrorString("unable to read data");
}
if (log)
- log->Printf ("SBData::GetSignedInt16 (error=%p,offset=%d) => "
+ log->Printf ("SBData::GetSignedInt16 (error=%p,offset=%" PRIu64 ") => "
"(%hd)", error.get(), offset, value);
return value;
}
int32_t
-SBData::GetSignedInt32 (lldb::SBError& error, uint32_t offset)
+SBData::GetSignedInt32 (lldb::SBError& error, lldb::offset_t offset)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
int32_t value = 0;
@@ -387,13 +387,13 @@
error.SetErrorString("unable to read data");
}
if (log)
- log->Printf ("SBData::GetSignedInt32 (error=%p,offset=%d) => "
+ log->Printf ("SBData::GetSignedInt32 (error=%p,offset=%" PRIu64 ") => "
"(%d)", error.get(), offset, value);
return value;
}
int64_t
-SBData::GetSignedInt64 (lldb::SBError& error, uint32_t offset)
+SBData::GetSignedInt64 (lldb::SBError& error, lldb::offset_t offset)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
int64_t value = 0;
@@ -409,13 +409,13 @@
error.SetErrorString("unable to read data");
}
if (log)
- log->Printf ("SBData::GetSignedInt64 (error=%p,offset=%d) => "
+ log->Printf ("SBData::GetSignedInt64 (error=%p,offset=%" PRIu64 ") => "
"(%" PRId64 ")", error.get(), offset, value);
return value;
}
const char*
-SBData::GetString (lldb::SBError& error, uint32_t offset)
+SBData::GetString (lldb::SBError& error, lldb::offset_t offset)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
const char* value = 0;
@@ -431,7 +431,7 @@
error.SetErrorString("unable to read data");
}
if (log)
- log->Printf ("SBData::GetString (error=%p,offset=%d) => "
+ log->Printf ("SBData::GetString (error=%p,offset=%" PRIu64 ") => "
"(%p)", error.get(), offset, value);
return value;
}
@@ -461,7 +461,7 @@
size_t
SBData::ReadRawData (lldb::SBError& error,
- uint32_t offset,
+ lldb::offset_t offset,
void *buf,
size_t size)
{
@@ -479,7 +479,7 @@
error.SetErrorString("unable to read data");
}
if (log)
- log->Printf ("SBData::ReadRawData (error=%p,offset=%d,buf=%p,size=%lu) => "
+ log->Printf ("SBData::ReadRawData (error=%p,offset=%" PRIu64 ",buf=%p,size=%lu) => "
"(%p)", error.get(), offset, buf, size, ok);
return ok ? size : 0;
}
Modified: lldb/trunk/source/Breakpoint/Breakpoint.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Breakpoint/Breakpoint.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Breakpoint/Breakpoint.cpp (original)
+++ lldb/trunk/source/Breakpoint/Breakpoint.cpp Fri Jan 25 12:06:21 2013
@@ -108,7 +108,7 @@
}
BreakpointLocationSP
-Breakpoint::GetLocationAtIndex (uint32_t index)
+Breakpoint::GetLocationAtIndex (size_t index)
{
return m_locations.GetByIndex(index);
}
@@ -760,7 +760,7 @@
return bp_sp;
}
-uint32_t
+size_t
Breakpoint::BreakpointEventData::GetNumBreakpointLocationsFromEvent (const EventSP &event_sp)
{
const BreakpointEventData *data = GetEventDataFromEvent (event_sp.get());
Modified: lldb/trunk/source/Breakpoint/BreakpointIDList.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Breakpoint/BreakpointIDList.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Breakpoint/BreakpointIDList.cpp (original)
+++ lldb/trunk/source/Breakpoint/BreakpointIDList.cpp Fri Jan 25 12:06:21 2013
@@ -38,7 +38,7 @@
}
BreakpointID &
-BreakpointIDList::GetBreakpointIDAtIndex (uint32_t index)
+BreakpointIDList::GetBreakpointIDAtIndex (size_t index)
{
if (index < m_breakpoint_ids.size())
return m_breakpoint_ids[index];
@@ -47,7 +47,7 @@
}
bool
-BreakpointIDList::RemoveBreakpointIDAtIndex (uint32_t index)
+BreakpointIDList::RemoveBreakpointIDAtIndex (size_t index)
{
if (index >= m_breakpoint_ids.size())
return false;
@@ -89,10 +89,8 @@
}
bool
-BreakpointIDList::FindBreakpointID (BreakpointID &bp_id, uint32_t *position)
+BreakpointIDList::FindBreakpointID (BreakpointID &bp_id, size_t *position)
{
- BreakpointIDArray::iterator tmp_pos;
-
for (size_t i = 0; i < m_breakpoint_ids.size(); ++i)
{
BreakpointID tmp_id = m_breakpoint_ids[i];
@@ -108,7 +106,7 @@
}
bool
-BreakpointIDList::FindBreakpointID (const char *bp_id_str, uint32_t *position)
+BreakpointIDList::FindBreakpointID (const char *bp_id_str, size_t *position)
{
BreakpointID temp_bp_id;
break_id_t bp_id;
@@ -124,7 +122,7 @@
}
void
-BreakpointIDList::InsertStringArray (const char **string_array, uint32_t array_size, CommandReturnObject &result)
+BreakpointIDList::InsertStringArray (const char **string_array, size_t array_size, CommandReturnObject &result)
{
if (string_array == NULL)
return;
@@ -174,8 +172,8 @@
bool is_range = false;
current_arg = old_args.GetArgumentAtIndex (i);
- uint32_t range_start_len = 0;
- uint32_t range_end_pos = 0;
+ size_t range_start_len = 0;
+ size_t range_end_pos = 0;
if (BreakpointIDList::StringContainsIDRangeExpression (current_arg, &range_start_len, &range_end_pos))
{
is_range = true;
@@ -350,8 +348,8 @@
bool
BreakpointIDList::StringContainsIDRangeExpression (const char *in_string,
- uint32_t *range_start_len,
- uint32_t *range_end_pos)
+ size_t *range_start_len,
+ size_t *range_end_pos)
{
bool is_range_expression = false;
std::string arg_str = in_string;
@@ -368,7 +366,7 @@
for (int i = 0; i < specifiers_size && !is_range_expression; ++i)
{
const char *specifier_str = BreakpointID::g_range_specifiers[i];
- int len = strlen (specifier_str);
+ size_t len = strlen (specifier_str);
idx = arg_str.find (BreakpointID::g_range_specifiers[i]);
if (idx != std::string::npos)
{
Modified: lldb/trunk/source/Breakpoint/BreakpointList.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Breakpoint/BreakpointList.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Breakpoint/BreakpointList.cpp (original)
+++ lldb/trunk/source/Breakpoint/BreakpointList.cpp Fri Jan 25 12:06:21 2013
@@ -172,13 +172,13 @@
BreakpointSP
-BreakpointList::GetBreakpointAtIndex (uint32_t i)
+BreakpointList::GetBreakpointAtIndex (size_t i)
{
Mutex::Locker locker(m_mutex);
BreakpointSP stop_sp;
bp_collection::iterator end = m_breakpoints.end();
bp_collection::iterator pos;
- uint32_t curr_i = 0;
+ size_t curr_i = 0;
for (pos = m_breakpoints.begin(), curr_i = 0; pos != end; ++pos, ++curr_i)
{
if (curr_i == i)
@@ -188,13 +188,13 @@
}
const BreakpointSP
-BreakpointList::GetBreakpointAtIndex (uint32_t i) const
+BreakpointList::GetBreakpointAtIndex (size_t i) const
{
Mutex::Locker locker(m_mutex);
BreakpointSP stop_sp;
bp_collection::const_iterator end = m_breakpoints.end();
bp_collection::const_iterator pos;
- uint32_t curr_i = 0;
+ size_t curr_i = 0;
for (pos = m_breakpoints.begin(), curr_i = 0; pos != end; ++pos, ++curr_i)
{
if (curr_i == i)
Modified: lldb/trunk/source/Breakpoint/BreakpointLocationCollection.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Breakpoint/BreakpointLocationCollection.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Breakpoint/BreakpointLocationCollection.cpp (original)
+++ lldb/trunk/source/Breakpoint/BreakpointLocationCollection.cpp Fri Jan 25 12:06:21 2013
@@ -115,7 +115,7 @@
}
BreakpointLocationSP
-BreakpointLocationCollection::GetByIndex (uint32_t i)
+BreakpointLocationCollection::GetByIndex (size_t i)
{
BreakpointLocationSP stop_sp;
if (i < m_break_loc_collection.size())
@@ -125,7 +125,7 @@
}
const BreakpointLocationSP
-BreakpointLocationCollection::GetByIndex (uint32_t i) const
+BreakpointLocationCollection::GetByIndex (size_t i) const
{
BreakpointLocationSP stop_sp;
if (i < m_break_loc_collection.size())
Modified: lldb/trunk/source/Breakpoint/BreakpointLocationList.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Breakpoint/BreakpointLocationList.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Breakpoint/BreakpointLocationList.cpp (original)
+++ lldb/trunk/source/Breakpoint/BreakpointLocationList.cpp Fri Jan 25 12:06:21 2013
@@ -138,7 +138,7 @@
BreakpointLocationSP
-BreakpointLocationList::GetByIndex (uint32_t i)
+BreakpointLocationList::GetByIndex (size_t i)
{
Mutex::Locker locker (m_mutex);
BreakpointLocationSP bp_loc_sp;
@@ -149,7 +149,7 @@
}
const BreakpointLocationSP
-BreakpointLocationList::GetByIndex (uint32_t i) const
+BreakpointLocationList::GetByIndex (size_t i) const
{
Mutex::Locker locker (m_mutex);
BreakpointLocationSP bp_loc_sp;
Modified: lldb/trunk/source/Breakpoint/BreakpointResolverFileLine.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Breakpoint/BreakpointResolverFileLine.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Breakpoint/BreakpointResolverFileLine.cpp (original)
+++ lldb/trunk/source/Breakpoint/BreakpointResolverFileLine.cpp Fri Jan 25 12:06:21 2013
@@ -73,8 +73,8 @@
// So we go through the match list and pull out the sets that have the same file spec in their line_entry
// and treat each set separately.
- uint32_t num_comp_units = context.module_sp->GetNumCompileUnits();
- for (uint32_t i = 0; i < num_comp_units; i++)
+ const size_t num_comp_units = context.module_sp->GetNumCompileUnits();
+ for (size_t i = 0; i < num_comp_units; i++)
{
CompUnitSP cu_sp (context.module_sp->GetCompileUnitAtIndex (i));
if (cu_sp)
Modified: lldb/trunk/source/Breakpoint/BreakpointResolverName.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Breakpoint/BreakpointResolverName.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Breakpoint/BreakpointResolverName.cpp (original)
+++ lldb/trunk/source/Breakpoint/BreakpointResolverName.cpp Fri Jan 25 12:06:21 2013
@@ -170,13 +170,13 @@
size_t num_names = m_func_names.size();
for (int j = 0; j < num_names; j++)
{
- uint32_t num_functions = context.module_sp->FindFunctions (m_func_names[j],
- NULL,
- m_func_name_type_mask,
- include_symbols,
- include_inlines,
- append,
- func_list);
+ size_t num_functions = context.module_sp->FindFunctions (m_func_names[j],
+ NULL,
+ m_func_name_type_mask,
+ include_symbols,
+ include_inlines,
+ append,
+ func_list);
// If the search filter specifies a Compilation Unit, then we don't need to bother to look in plain
// symbols, since all the ones from a set compilation unit will have been found above already.
Modified: lldb/trunk/source/Breakpoint/BreakpointSite.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Breakpoint/BreakpointSite.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Breakpoint/BreakpointSite.cpp (original)
+++ lldb/trunk/source/Breakpoint/BreakpointSite.cpp Fri Jan 25 12:06:21 2013
@@ -25,10 +25,9 @@
BreakpointSiteList *list,
const BreakpointLocationSP& owner,
lldb::addr_t addr,
- lldb::tid_t tid,
bool use_hardware
) :
- StoppointLocation(GetNextID(), addr, tid, use_hardware),
+ StoppointLocation(GetNextID(), addr, 0, use_hardware),
m_type (eSoftware), // Process subclasses need to set this correctly using SetType()
m_saved_opcode(),
m_trap_opcode(),
@@ -118,7 +117,7 @@
}
bool
-BreakpointSite::SetTrapOpcode (const uint8_t *trap_opcode, size_t trap_opcode_size)
+BreakpointSite::SetTrapOpcode (const uint8_t *trap_opcode, uint32_t trap_opcode_size)
{
if (trap_opcode_size > 0 && trap_opcode_size <= sizeof(m_trap_opcode))
{
@@ -160,21 +159,21 @@
m_owners.Add(owner);
}
-uint32_t
+size_t
BreakpointSite::RemoveOwner (lldb::break_id_t break_id, lldb::break_id_t break_loc_id)
{
m_owners.Remove(break_id, break_loc_id);
return m_owners.GetSize();
}
-uint32_t
+size_t
BreakpointSite::GetNumberOfOwners ()
{
return m_owners.GetSize();
}
BreakpointLocationSP
-BreakpointSite::GetOwnerAtIndex (uint32_t index)
+BreakpointSite::GetOwnerAtIndex (size_t index)
{
return m_owners.GetByIndex (index);
}
Modified: lldb/trunk/source/Breakpoint/Watchpoint.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Breakpoint/Watchpoint.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Breakpoint/Watchpoint.cpp (original)
+++ lldb/trunk/source/Breakpoint/Watchpoint.cpp Fri Jan 25 12:06:21 2013
@@ -27,7 +27,7 @@
using namespace lldb;
using namespace lldb_private;
-Watchpoint::Watchpoint (Target& target, lldb::addr_t addr, size_t size, const ClangASTType *type, bool hardware) :
+Watchpoint::Watchpoint (Target& target, lldb::addr_t addr, uint32_t size, const ClangASTType *type, bool hardware) :
StoppointLocation (0, addr, size, hardware),
m_target(target),
m_enabled(false),
Modified: lldb/trunk/source/Commands/CommandCompletions.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandCompletions.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandCompletions.cpp (original)
+++ lldb/trunk/source/Commands/CommandCompletions.cpp Fri Jan 25 12:06:21 2013
@@ -131,7 +131,7 @@
// I'm going to use the "glob" function with GLOB_TILDE for user directory expansion.
// If it is not defined on your host system, you'll need to implement it yourself...
- int partial_name_len = strlen(partial_file_name);
+ size_t partial_name_len = strlen(partial_file_name);
if (partial_name_len >= PATH_MAX)
return matches.GetSize();
Modified: lldb/trunk/source/Commands/CommandObjectApropos.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectApropos.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectApropos.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectApropos.cpp Fri Jan 25 12:06:21 2013
@@ -56,7 +56,7 @@
bool
CommandObjectApropos::DoExecute (Args& args, CommandReturnObject &result)
{
- const int argc = args.GetArgumentCount ();
+ const size_t argc = args.GetArgumentCount ();
if (argc == 1)
{
Modified: lldb/trunk/source/Commands/CommandObjectArgs.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectArgs.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectArgs.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectArgs.cpp Fri Jan 25 12:06:21 2013
@@ -120,7 +120,7 @@
return false;
}
- int num_args = args.GetArgumentCount ();
+ const size_t num_args = args.GetArgumentCount ();
int arg_index;
if (!num_args)
Modified: lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp Fri Jan 25 12:06:21 2013
@@ -396,7 +396,7 @@
case eSetTypeFileAndLine: // Breakpoint by source position
{
FileSpec file;
- uint32_t num_files = m_options.m_filenames.GetSize();
+ const size_t num_files = m_options.m_filenames.GetSize();
if (num_files == 0)
{
if (!GetDefaultFile (target, file, result))
@@ -469,7 +469,7 @@
break;
case eSetTypeSourceRegexp: // Breakpoint by regexp on source text.
{
- int num_files = m_options.m_filenames.GetSize();
+ const size_t num_files = m_options.m_filenames.GetSize();
if (num_files == 0)
{
@@ -1794,7 +1794,7 @@
Breakpoint *breakpoint = target->GetBreakpointByID (cur_bp_id.GetBreakpointID()).get();
if (breakpoint != NULL)
{
- int num_locations = breakpoint->GetNumLocations();
+ const size_t num_locations = breakpoint->GetNumLocations();
if (cur_bp_id.GetLocationID() > num_locations)
{
StreamString id_str;
Modified: lldb/trunk/source/Commands/CommandObjectCommands.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectCommands.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectCommands.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectCommands.cpp Fri Jan 25 12:06:21 2013
@@ -188,7 +188,7 @@
return "";
}
- int
+ virtual int
HandleArgumentCompletion (Args &input,
int &cursor_index,
int &cursor_char_position,
@@ -285,7 +285,7 @@
bool
DoExecute(Args& command, CommandReturnObject &result)
{
- const int argc = command.GetArgumentCount();
+ const size_t argc = command.GetArgumentCount();
if (argc == 1)
{
const char *filename = command.GetArgumentAtIndex(0);
@@ -1289,7 +1289,7 @@
{
}
- int
+ virtual int
HandleArgumentCompletion (Args &input,
int &cursor_index,
int &cursor_char_position,
Modified: lldb/trunk/source/Commands/CommandObjectExpression.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectExpression.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectExpression.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectExpression.cpp Fri Jan 25 12:06:21 2013
@@ -424,7 +424,7 @@
const char *error_cstr = result_valobj_sp->GetError().AsCString();
if (error_cstr && error_cstr[0])
{
- int error_cstr_len = strlen (error_cstr);
+ const size_t error_cstr_len = strlen (error_cstr);
const bool ends_with_newline = error_cstr[error_cstr_len - 1] == '\n';
if (strstr(error_cstr, "error:") != error_cstr)
error_stream->PutCString ("error: ");
Modified: lldb/trunk/source/Commands/CommandObjectFrame.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectFrame.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectFrame.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectFrame.cpp Fri Jan 25 12:06:21 2013
@@ -419,7 +419,7 @@
{
if (m_option_variable.use_regex)
{
- const uint32_t regex_start_index = regex_var_list.GetSize();
+ const size_t regex_start_index = regex_var_list.GetSize();
RegularExpression regex (name_cstr);
if (regex.Compile(name_cstr))
{
@@ -429,7 +429,7 @@
num_matches);
if (num_new_regex_vars > 0)
{
- for (uint32_t regex_idx = regex_start_index, end_index = regex_var_list.GetSize();
+ for (size_t regex_idx = regex_start_index, end_index = regex_var_list.GetSize();
regex_idx < end_index;
++regex_idx)
{
@@ -512,10 +512,10 @@
}
else // No command arg specified. Use variable_list, instead.
{
- const uint32_t num_variables = variable_list->GetSize();
+ const size_t num_variables = variable_list->GetSize();
if (num_variables > 0)
{
- for (uint32_t i=0; i<num_variables; i++)
+ for (size_t i=0; i<num_variables; i++)
{
var_sp = variable_list->GetVariableAtIndex(i);
bool dump_variable = true;
Modified: lldb/trunk/source/Commands/CommandObjectHelp.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectHelp.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectHelp.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectHelp.cpp Fri Jan 25 12:06:21 2013
@@ -64,7 +64,7 @@
{
CommandObject::CommandMap::iterator pos;
CommandObject *cmd_obj;
- const int argc = command.GetArgumentCount ();
+ const size_t argc = command.GetArgumentCount ();
// 'help' doesn't take any arguments, other than command names. If argc is 0, we show the user
// all commands (aliases and user commands if asked for). Otherwise every argument must be the name of a command or a sub-command.
@@ -224,8 +224,8 @@
{
Stream &output_strm = result.GetOutputStream();
output_strm.Printf("Help requested with ambiguous command name, possible completions:\n");
- const uint32_t match_count = matches.GetSize();
- for (uint32_t i = 0; i < match_count; i++)
+ const size_t match_count = matches.GetSize();
+ for (size_t i = 0; i < match_count; i++)
{
output_strm.Printf("\t%s\n", matches.GetStringAtIndex(i));
}
Modified: lldb/trunk/source/Commands/CommandObjectMemory.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectMemory.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectMemory.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectMemory.cpp Fri Jan 25 12:06:21 2013
@@ -742,10 +742,10 @@
{
if (m_memory_options.m_output_as_binary)
{
- int bytes_written = outfile_stream.Write (data_sp->GetBytes(), bytes_read);
+ const size_t bytes_written = outfile_stream.Write (data_sp->GetBytes(), bytes_read);
if (bytes_written > 0)
{
- result.GetOutputStream().Printf ("%i bytes %s to '%s'\n",
+ result.GetOutputStream().Printf ("%zi bytes %s to '%s'\n",
bytes_written,
append ? "appended" : "written",
path);
@@ -835,16 +835,16 @@
assert (output_stream);
- uint32_t bytes_dumped = data.Dump (output_stream,
- 0,
- m_format_options.GetFormat(),
- item_byte_size,
- item_count,
- num_per_line,
- addr,
- 0,
- 0,
- exe_scope);
+ size_t bytes_dumped = data.Dump (output_stream,
+ 0,
+ m_format_options.GetFormat(),
+ item_byte_size,
+ item_count,
+ num_per_line,
+ addr,
+ 0,
+ 0,
+ exe_scope);
m_next_addr = addr + bytes_dumped;
output_stream->EOL();
return true;
@@ -1129,9 +1129,8 @@
uint64_t uval64;
int64_t sval64;
bool success = false;
- const uint32_t num_value_args = command.GetArgumentCount();
- uint32_t i;
- for (i=0; i<num_value_args; ++i)
+ const size_t num_value_args = command.GetArgumentCount();
+ for (size_t i=0; i<num_value_args; ++i)
{
const char *value_str = command.GetArgumentAtIndex(i);
Modified: lldb/trunk/source/Commands/CommandObjectMultiword.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectMultiword.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectMultiword.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectMultiword.cpp Fri Jan 25 12:06:21 2013
@@ -143,7 +143,7 @@
else
{
std::string error_msg;
- int num_subcmd_matches = matches.GetSize();
+ const size_t num_subcmd_matches = matches.GetSize();
if (num_subcmd_matches > 0)
error_msg.assign ("ambiguous command ");
else
@@ -158,14 +158,14 @@
if (num_subcmd_matches > 0)
{
error_msg.append (" Possible completions:");
- for (int i = 0; i < num_subcmd_matches; i++)
+ for (size_t i = 0; i < num_subcmd_matches; i++)
{
error_msg.append ("\n\t");
error_msg.append (matches.GetStringAtIndex (i));
}
}
error_msg.append ("\n");
- result.AppendRawError (error_msg.c_str(), error_msg.size());
+ result.AppendRawError (error_msg.c_str());
result.SetStatus (eReturnStatusFailed);
}
}
Modified: lldb/trunk/source/Commands/CommandObjectPlatform.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectPlatform.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectPlatform.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectPlatform.cpp Fri Jan 25 12:06:21 2013
@@ -386,7 +386,7 @@
if (platform_sp)
{
Error error;
- const uint32_t argc = args.GetArgumentCount();
+ const size_t argc = args.GetArgumentCount();
Target *target = m_exe_ctx.GetTargetPtr();
Module *exe_module = target->GetExecutableModulePointer();
if (exe_module)
Modified: lldb/trunk/source/Commands/CommandObjectProcess.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectProcess.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectProcess.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectProcess.cpp Fri Jan 25 12:06:21 2013
@@ -69,7 +69,7 @@
{
}
- int
+ virtual int
HandleArgumentCompletion (Args &input,
int &cursor_index,
int &cursor_char_position,
@@ -446,10 +446,10 @@
match_info.SetNameMatchType(eNameMatchStartsWith);
}
platform_sp->FindProcesses (match_info, process_infos);
- const uint32_t num_matches = process_infos.GetSize();
+ const size_t num_matches = process_infos.GetSize();
if (num_matches > 0)
{
- for (uint32_t i=0; i<num_matches; ++i)
+ for (size_t i=0; i<num_matches; ++i)
{
matches.AppendString (process_infos.GetProcessNameAtIndex(i),
process_infos.GetProcessNameLengthAtIndex(i));
@@ -773,12 +773,12 @@
StopInfoSP stop_info_sp = sel_thread_sp->GetStopInfo();
if (stop_info_sp && stop_info_sp->GetStopReason() == eStopReasonBreakpoint)
{
- uint64_t bp_site_id = stop_info_sp->GetValue();
+ lldb::break_id_t bp_site_id = (lldb::break_id_t)stop_info_sp->GetValue();
BreakpointSiteSP bp_site_sp(process->GetBreakpointSiteList().FindByID(bp_site_id));
if (bp_site_sp)
{
- uint32_t num_owners = bp_site_sp->GetNumberOfOwners();
- for (uint32_t i = 0; i < num_owners; i++)
+ const size_t num_owners = bp_site_sp->GetNumberOfOwners();
+ for (size_t i = 0; i < num_owners; i++)
{
Breakpoint &bp_ref = bp_site_sp->GetOwnerAtIndex(i)->GetBreakpoint();
if (!bp_ref.IsInternal())
@@ -1134,7 +1134,7 @@
{
Process *process = m_exe_ctx.GetProcessPtr();
- const uint32_t argc = command.GetArgumentCount();
+ const size_t argc = command.GetArgumentCount();
for (uint32_t i=0; i<argc; ++i)
{
@@ -1191,7 +1191,7 @@
{
Process *process = m_exe_ctx.GetProcessPtr();
- const uint32_t argc = command.GetArgumentCount();
+ const size_t argc = command.GetArgumentCount();
for (uint32_t i=0; i<argc; ++i)
{
Modified: lldb/trunk/source/Commands/CommandObjectRegister.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectRegister.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectRegister.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectRegister.cpp Fri Jan 25 12:06:21 2013
@@ -129,7 +129,7 @@
DumpRegisterSet (const ExecutionContext &exe_ctx,
Stream &strm,
RegisterContext *reg_ctx,
- uint32_t set_idx,
+ size_t set_idx,
bool primitive_only=false)
{
uint32_t unavailable_count = 0;
@@ -139,8 +139,8 @@
{
strm.Printf ("%s:\n", reg_set->name);
strm.IndentMore ();
- const uint32_t num_registers = reg_set->num_registers;
- for (uint32_t reg_idx = 0; reg_idx < num_registers; ++reg_idx)
+ const size_t num_registers = reg_set->num_registers;
+ for (size_t reg_idx = 0; reg_idx < num_registers; ++reg_idx)
{
const uint32_t reg = reg_set->registers[reg_idx];
const RegisterInfo *reg_info = reg_ctx->GetRegisterInfoAtIndex(reg);
@@ -173,20 +173,20 @@
const RegisterInfo *reg_info = NULL;
if (command.GetArgumentCount() == 0)
{
- uint32_t set_idx;
+ size_t set_idx;
- uint32_t num_register_sets = 1;
- const uint32_t set_array_size = m_command_options.set_indexes.GetSize();
+ size_t num_register_sets = 1;
+ const size_t set_array_size = m_command_options.set_indexes.GetSize();
if (set_array_size > 0)
{
- for (uint32_t i=0; i<set_array_size; ++i)
+ for (size_t i=0; i<set_array_size; ++i)
{
set_idx = m_command_options.set_indexes[i]->GetUInt64Value (UINT32_MAX, NULL);
if (set_idx != UINT32_MAX)
{
if (!DumpRegisterSet (m_exe_ctx, strm, reg_ctx, set_idx))
{
- result.AppendErrorWithFormat ("invalid register set index: %u\n", set_idx);
+ result.AppendErrorWithFormat ("invalid register set index: %zu\n", set_idx);
result.SetStatus (eReturnStatusFailed);
break;
}
Modified: lldb/trunk/source/Commands/CommandObjectSource.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectSource.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectSource.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectSource.cpp Fri Jan 25 12:06:21 2013
@@ -299,7 +299,7 @@
bool
DoExecute (Args& command, CommandReturnObject &result)
{
- const int argc = command.GetArgumentCount();
+ const size_t argc = command.GetArgumentCount();
if (argc != 0)
{
@@ -320,10 +320,11 @@
bool append = true;
size_t num_matches = 0;
- if (m_options.modules.size() > 0)
+ const size_t num_modules = m_options.modules.size();
+ if (num_modules > 0)
{
ModuleList matching_modules;
- for (unsigned i = 0, e = m_options.modules.size(); i != e; i++)
+ for (size_t i = 0; i < num_modules; ++i)
{
FileSpec module_file_spec(m_options.modules[i].c_str(), false);
if (module_file_spec)
@@ -423,7 +424,7 @@
// This is a little hacky, but the first line table entry for a function points to the "{" that
// starts the function block. It would be nice to actually get the function
// declaration in there too. So back up a bit, but not further than what you're going to display.
- size_t lines_to_back_up = m_options.num_lines >= 10 ? 5 : m_options.num_lines/2;
+ uint32_t lines_to_back_up = m_options.num_lines >= 10 ? 5 : m_options.num_lines/2;
uint32_t line_no;
if (start_line <= lines_to_back_up)
line_no = 1;
@@ -475,8 +476,8 @@
// The target isn't loaded yet, we need to lookup the file address
// in all modules
const ModuleList &module_list = target->GetImages();
- const uint32_t num_modules = module_list.GetSize();
- for (uint32_t i=0; i<num_modules; ++i)
+ const size_t num_modules = module_list.GetSize();
+ for (size_t i=0; i<num_modules; ++i)
{
ModuleSP module_sp (module_list.GetModuleAtIndex(i));
if (module_sp && module_sp->ResolveFileAddress(m_options.address, so_addr))
@@ -621,7 +622,7 @@
if (m_options.modules.size() > 0)
{
ModuleList matching_modules;
- for (unsigned i = 0, e = m_options.modules.size(); i != e; i++)
+ for (size_t i = 0, e = m_options.modules.size(); i < e; ++i)
{
FileSpec module_file_spec(m_options.modules[i].c_str(), false);
if (module_file_spec)
Modified: lldb/trunk/source/Commands/CommandObjectSyntax.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectSyntax.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectSyntax.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectSyntax.cpp Fri Jan 25 12:06:21 2013
@@ -59,7 +59,7 @@
{
CommandObject::CommandMap::iterator pos;
CommandObject *cmd_obj;
- const int argc = command.GetArgumentCount();
+ const size_t argc = command.GetArgumentCount();
if (argc > 0)
{
Modified: lldb/trunk/source/Commands/CommandObjectTarget.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectTarget.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectTarget.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectTarget.cpp Fri Jan 25 12:06:21 2013
@@ -192,7 +192,7 @@
return &m_option_group;
}
- int
+ virtual int
HandleArgumentCompletion (Args &input,
int &cursor_index,
int &cursor_char_position,
@@ -220,7 +220,7 @@
bool
DoExecute (Args& command, CommandReturnObject &result)
{
- const int argc = command.GetArgumentCount();
+ const size_t argc = command.GetArgumentCount();
FileSpec core_file (m_core_file.GetOptionValue().GetCurrentValue());
if (argc == 1 || core_file)
@@ -697,9 +697,9 @@
}
- static uint32_t GetVariableCallback (void *baton,
- const char *name,
- VariableList &variable_list)
+ static size_t GetVariableCallback (void *baton,
+ const char *name,
+ VariableList &variable_list)
{
Target *target = static_cast<Target *>(baton);
if (target)
@@ -782,7 +782,7 @@
ValueObjectList valobj_list;
const char *arg = args.GetArgumentAtIndex(idx);
- uint32_t matches = 0;
+ size_t matches = 0;
bool use_var_name = false;
if (m_option_variable.use_regex)
{
@@ -1019,7 +1019,7 @@
Target *target = m_interpreter.GetDebugger().GetSelectedTarget().get();
if (target)
{
- uint32_t argc = command.GetArgumentCount();
+ const size_t argc = command.GetArgumentCount();
if (argc & 1)
{
result.AppendError ("add requires an even number of arguments\n");
@@ -1027,7 +1027,7 @@
}
else
{
- for (uint32_t i=0; i<argc; i+=2)
+ for (size_t i=0; i<argc; i+=2)
{
const char *from = command.GetArgumentAtIndex(i);
const char *to = command.GetArgumentAtIndex(i+1);
@@ -1156,7 +1156,7 @@
Target *target = m_interpreter.GetDebugger().GetSelectedTarget().get();
if (target)
{
- uint32_t argc = command.GetArgumentCount();
+ size_t argc = command.GetArgumentCount();
// check for at least 3 arguments and an odd nubmer of parameters
if (argc >= 3 && argc & 1)
{
@@ -1670,7 +1670,7 @@
strm.IndentLess ();
}
-static uint32_t
+static size_t
LookupFunctionInModule (CommandInterpreter &interpreter,
Stream &strm,
Module *module,
@@ -1684,7 +1684,7 @@
{
SymbolContextList sc_list;
const bool append = true;
- uint32_t num_matches = 0;
+ size_t num_matches = 0;
if (name_is_regex)
{
RegularExpression function_name_regex (name);
@@ -1709,7 +1709,7 @@
if (num_matches)
{
strm.Indent ();
- strm.Printf("%u match%s found in ", num_matches, num_matches > 1 ? "es" : "");
+ strm.Printf("%zu match%s found in ", num_matches, num_matches > 1 ? "es" : "");
DumpFullpath (strm, &module->GetFileSpec(), 0);
strm.PutCString(":\n");
DumpSymbolContextList (interpreter.GetExecutionContext().GetBestExecutionContextScope(), strm, sc_list, verbose);
@@ -1719,7 +1719,7 @@
return 0;
}
-static uint32_t
+static size_t
LookupTypeInModule (CommandInterpreter &interpreter,
Stream &strm,
Module *module,
@@ -1730,7 +1730,7 @@
{
TypeList type_list;
const uint32_t max_num_matches = UINT32_MAX;
- uint32_t num_matches = 0;
+ size_t num_matches = 0;
bool name_is_fully_qualified = false;
SymbolContext sc;
@@ -1740,7 +1740,7 @@
if (num_matches)
{
strm.Indent ();
- strm.Printf("%u match%s found in ", num_matches, num_matches > 1 ? "es" : "");
+ strm.Printf("%zu match%s found in ", num_matches, num_matches > 1 ? "es" : "");
DumpFullpath (strm, &module->GetFileSpec(), 0);
strm.PutCString(":\n");
const uint32_t num_types = type_list.GetSize();
@@ -1774,7 +1774,7 @@
return 0;
}
-static uint32_t
+static size_t
LookupTypeHere (CommandInterpreter &interpreter,
Stream &strm,
const SymbolContext &sym_ctx,
@@ -1786,7 +1786,7 @@
TypeList type_list;
const uint32_t max_num_matches = UINT32_MAX;
- uint32_t num_matches = 1;
+ size_t num_matches = 1;
bool name_is_fully_qualified = false;
ConstString name(name_cstr);
@@ -1873,9 +1873,9 @@
{
// Check the global list
Mutex::Locker locker(Module::GetAllocationModuleCollectionMutex());
- const uint32_t num_modules = Module::GetNumberAllocatedModules();
+ const size_t num_modules = Module::GetNumberAllocatedModules();
ModuleSP module_sp;
- for (uint32_t image_idx = 0; image_idx<num_modules; ++image_idx)
+ for (size_t image_idx = 0; image_idx<num_modules; ++image_idx)
{
Module *module = Module::GetAllocatedModuleAtIndex(image_idx);
@@ -2145,11 +2145,11 @@
{
// Dump all sections for all modules images
Mutex::Locker modules_locker(target->GetImages().GetMutex());
- const uint32_t num_modules = target->GetImages().GetSize();
+ const size_t num_modules = target->GetImages().GetSize();
if (num_modules > 0)
{
- result.GetOutputStream().Printf("Dumping symbol table for %u modules.\n", num_modules);
- for (uint32_t image_idx = 0; image_idx<num_modules; ++image_idx)
+ result.GetOutputStream().Printf("Dumping symbol table for %zu modules.\n", num_modules);
+ for (size_t image_idx = 0; image_idx<num_modules; ++image_idx)
{
if (num_dumped > 0)
{
@@ -2278,11 +2278,11 @@
if (command.GetArgumentCount() == 0)
{
// Dump all sections for all modules images
- const uint32_t num_modules = target->GetImages().GetSize();
+ const size_t num_modules = target->GetImages().GetSize();
if (num_modules > 0)
{
- result.GetOutputStream().Printf("Dumping sections for %u modules.\n", num_modules);
- for (uint32_t image_idx = 0; image_idx<num_modules; ++image_idx)
+ result.GetOutputStream().Printf("Dumping sections for %zu modules.\n", num_modules);
+ for (size_t image_idx = 0; image_idx<num_modules; ++image_idx)
{
num_dumped++;
DumpModuleSections (m_interpreter, result.GetOutputStream(), target->GetImages().GetModulePointerAtIndex(image_idx));
@@ -2386,10 +2386,10 @@
// Dump all sections for all modules images
const ModuleList &target_modules = target->GetImages();
Mutex::Locker modules_locker (target_modules.GetMutex());
- const uint32_t num_modules = target_modules.GetSize();
+ const size_t num_modules = target_modules.GetSize();
if (num_modules > 0)
{
- result.GetOutputStream().Printf("Dumping debug symbols for %u modules.\n", num_modules);
+ result.GetOutputStream().Printf("Dumping debug symbols for %zu modules.\n", num_modules);
for (uint32_t image_idx = 0; image_idx<num_modules; ++image_idx)
{
if (DumpModuleSymbolVendor (result.GetOutputStream(), target_modules.GetModulePointerAtIndexUnlocked(image_idx)))
@@ -2491,7 +2491,7 @@
const ModuleList &target_modules = target->GetImages();
Mutex::Locker modules_locker(target_modules.GetMutex());
- const uint32_t num_modules = target_modules.GetSize();
+ const size_t num_modules = target_modules.GetSize();
if (num_modules > 0)
{
uint32_t num_dumped = 0;
@@ -2582,7 +2582,7 @@
return &m_option_group;
}
- int
+ virtual int
HandleArgumentCompletion (Args &input,
int &cursor_index,
int &cursor_char_position,
@@ -3037,7 +3037,7 @@
}
else
{
- uint32_t width = 0;
+ unsigned long width = 0;
if (option_arg)
width = strtoul (option_arg, NULL, 0);
m_format_array.push_back(std::make_pair(short_option, width));
@@ -3129,7 +3129,7 @@
ModuleSP module_sp (module_address.GetModule());
if (module_sp)
{
- PrintModule (target, module_sp.get(), UINT32_MAX, 0, strm);
+ PrintModule (target, module_sp.get(), 0, strm);
result.SetStatus (eReturnStatusSuccessFinishResult);
}
else
@@ -3152,7 +3152,7 @@
return result.Succeeded();
}
- uint32_t num_modules = 0;
+ size_t num_modules = 0;
Mutex::Locker locker; // This locker will be locked on the mutex in module_list_ptr if it is non-NULL.
// Otherwise it will lock the AllocationModuleCollectionMutex when accessing
// the global module list directly.
@@ -3214,8 +3214,8 @@
module_sp = module->shared_from_this();
}
- int indent = strm.Printf("[%3u] ", image_idx);
- PrintModule (target, module, image_idx, indent, strm);
+ const size_t indent = strm.Printf("[%3u] ", image_idx);
+ PrintModule (target, module, indent, strm);
}
result.SetStatus (eReturnStatusSuccessFinishResult);
@@ -3244,7 +3244,7 @@
}
void
- PrintModule (Target *target, Module *module, uint32_t idx, int indent, Stream &strm)
+ PrintModule (Target *target, Module *module, int indent, Stream &strm)
{
if (module == NULL)
@@ -3338,7 +3338,7 @@
break;
case 'r':
{
- uint32_t ref_count = 0;
+ size_t ref_count = 0;
ModuleSP module_sp (module->shared_from_this());
if (module_sp)
{
@@ -3346,9 +3346,9 @@
ref_count = module_sp.use_count() - 1;
}
if (width)
- strm.Printf("{%*u}", width, ref_count);
+ strm.Printf("{%*zu}", width, ref_count);
else
- strm.Printf("{%u}", ref_count);
+ strm.Printf("{%zu}", ref_count);
}
break;
@@ -3581,7 +3581,7 @@
if (m_options.m_type == eLookupTypeFunctionOrSymbol)
{
SymbolContextList sc_list;
- uint32_t num_matches;
+ size_t num_matches;
ConstString function_name (m_options.m_str.c_str());
num_matches = target->GetImages().FindFunctions (function_name, eFunctionNameTypeAuto, true, false, true, sc_list);
for (uint32_t idx = 0; idx < num_matches; idx++)
@@ -4038,7 +4038,7 @@
const ModuleList &target_modules = target->GetImages();
Mutex::Locker modules_locker(target_modules.GetMutex());
- const uint32_t num_modules = target_modules.GetSize();
+ const size_t num_modules = target_modules.GetSize();
if (num_modules > 0)
{
for (i = 0; i<num_modules && syntax_error == false; ++i)
@@ -4217,7 +4217,7 @@
{
}
- int
+ virtual int
HandleArgumentCompletion (Args &input,
int &cursor_index,
int &cursor_char_position,
Modified: lldb/trunk/source/Commands/CommandObjectThread.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectThread.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectThread.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectThread.cpp Fri Jan 25 12:06:21 2013
@@ -205,12 +205,12 @@
}
else
{
- uint32_t num_args = command.GetArgumentCount();
+ const size_t num_args = command.GetArgumentCount();
Process *process = m_exe_ctx.GetProcessPtr();
Mutex::Locker locker (process->GetThreadList().GetMutex());
std::vector<ThreadSP> thread_sps;
- for (uint32_t i = 0; i < num_args; i++)
+ for (size_t i = 0; i < num_args; i++)
{
bool success;
Modified: lldb/trunk/source/Commands/CommandObjectWatchpoint.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectWatchpoint.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectWatchpoint.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectWatchpoint.cpp Fri Jan 25 12:06:21 2013
@@ -975,9 +975,9 @@
}
protected:
- static uint32_t GetVariableCallback (void *baton,
- const char *name,
- VariableList &variable_list)
+ static size_t GetVariableCallback (void *baton,
+ const char *name,
+ VariableList &variable_list)
{
Target *target = static_cast<Target *>(baton);
if (target)
Modified: lldb/trunk/source/Core/Address.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Address.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Core/Address.cpp (original)
+++ lldb/trunk/source/Core/Address.cpp Fri Jan 25 12:06:21 2013
@@ -86,7 +86,7 @@
if (GetByteOrderAndAddressSize (exe_scope, address, byte_order, addr_size))
{
DataExtractor data (&buf, sizeof(buf), byte_order, addr_size);
- uint32_t offset = 0;
+ lldb::offset_t offset = 0;
uval64 = data.GetU64(&offset);
}
else
@@ -696,8 +696,8 @@
stop_if_block_is_inlined_function,
&variable_list);
- uint32_t num_variables = variable_list.GetSize();
- for (uint32_t var_idx = 0; var_idx < num_variables; ++var_idx)
+ const size_t num_variables = variable_list.GetSize();
+ for (size_t var_idx = 0; var_idx < num_variables; ++var_idx)
{
Variable *var = variable_list.GetVariableAtIndex (var_idx).get();
if (var && var->LocationIsValidForAddress (*this))
Modified: lldb/trunk/source/Core/ArchSpec.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ArchSpec.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Core/ArchSpec.cpp (original)
+++ lldb/trunk/source/Core/ArchSpec.cpp Fri Jan 25 12:06:21 2013
@@ -118,7 +118,7 @@
};
-uint32_t
+size_t
ArchSpec::AutoComplete (const char *name, StringList &matches)
{
uint32_t i;
@@ -495,11 +495,11 @@
{
char *end = NULL;
errno = 0;
- uint32_t cpu = ::strtoul (triple_cstr, &end, 0);
+ uint32_t cpu = (uint32_t)::strtoul (triple_cstr, &end, 0);
if (errno == 0 && cpu != 0 && end && ((*end == '-') || (*end == '.')))
{
errno = 0;
- uint32_t sub = ::strtoul (end + 1, &end, 0);
+ uint32_t sub = (uint32_t)::strtoul (end + 1, &end, 0);
if (errno == 0 && end && ((*end == '-') || (*end == '.') || (*end == '\0')))
{
if (arch.SetArchitecture (eArchTypeMachO, cpu, sub))
@@ -513,7 +513,7 @@
llvm::StringRef vendor_str(vendor_os.substr(0, dash_pos));
arch.GetTriple().setVendorName(vendor_str);
const size_t vendor_start_pos = dash_pos+1;
- dash_pos = vendor_os.find(vendor_start_pos, '-');
+ dash_pos = vendor_os.find('-', vendor_start_pos);
if (dash_pos == llvm::StringRef::npos)
{
if (vendor_start_pos < vendor_os.size())
Modified: lldb/trunk/source/Core/CXXFormatterFunctions.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/CXXFormatterFunctions.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Core/CXXFormatterFunctions.cpp (original)
+++ lldb/trunk/source/Core/CXXFormatterFunctions.cpp Fri Jan 25 12:06:21 2013
@@ -1092,7 +1092,7 @@
}
}
-uint32_t
+size_t
lldb_private::formatters::NSArrayMSyntheticFrontEnd::CalculateNumChildren ()
{
if (m_data_32)
@@ -1103,7 +1103,7 @@
}
lldb::ValueObjectSP
-lldb_private::formatters::NSArrayMSyntheticFrontEnd::GetChildAtIndex (uint32_t idx)
+lldb_private::formatters::NSArrayMSyntheticFrontEnd::GetChildAtIndex (size_t idx)
{
if (!m_data_32 && !m_data_64)
return lldb::ValueObjectSP();
@@ -1112,7 +1112,7 @@
lldb::addr_t object_at_idx = (m_data_32 ? m_data_32->_data : m_data_64->_data);
object_at_idx += (idx * m_ptr_size);
StreamString idx_name;
- idx_name.Printf("[%d]",idx);
+ idx_name.Printf("[%zu]",idx);
lldb::ValueObjectSP retval_sp = ValueObject::CreateValueObjectFromAddress(idx_name.GetData(),
object_at_idx,
m_exe_ctx_ref,
@@ -1240,7 +1240,7 @@
return idx;
}
-uint32_t
+size_t
lldb_private::formatters::NSArrayISyntheticFrontEnd::CalculateNumChildren ()
{
return m_items;
@@ -1286,7 +1286,7 @@
}
lldb::ValueObjectSP
-lldb_private::formatters::NSArrayISyntheticFrontEnd::GetChildAtIndex (uint32_t idx)
+lldb_private::formatters::NSArrayISyntheticFrontEnd::GetChildAtIndex (size_t idx)
{
if (idx >= CalculateNumChildren())
return lldb::ValueObjectSP();
@@ -1302,7 +1302,7 @@
StreamString expr;
expr.Printf("(id)%" PRIu64,object_at_idx);
StreamString idx_name;
- idx_name.Printf("[%d]",idx);
+ idx_name.Printf("[%zu]",idx);
lldb::ValueObjectSP retval_sp = ValueObject::CreateValueObjectFromExpression(idx_name.GetData(), expr.GetData(), m_exe_ctx_ref);
m_children.push_back(retval_sp);
return retval_sp;
@@ -1353,7 +1353,7 @@
SyntheticChildrenFrontEnd(*valobj_sp.get())
{}
-uint32_t
+size_t
lldb_private::formatters::NSArrayCodeRunningSyntheticFrontEnd::CalculateNumChildren ()
{
uint64_t count = 0;
@@ -1363,10 +1363,10 @@
}
lldb::ValueObjectSP
-lldb_private::formatters::NSArrayCodeRunningSyntheticFrontEnd::GetChildAtIndex (uint32_t idx)
+lldb_private::formatters::NSArrayCodeRunningSyntheticFrontEnd::GetChildAtIndex (size_t idx)
{
StreamString idx_name;
- idx_name.Printf("[%d]",idx);
+ idx_name.Printf("[%zu]",idx);
lldb::ValueObjectSP valobj_sp = CallSelectorOnObject(m_backend,"id","objectAtIndex:",idx);
if (valobj_sp)
valobj_sp->SetName(ConstString(idx_name.GetData()));
@@ -1440,7 +1440,7 @@
SyntheticChildrenFrontEnd(*valobj_sp.get())
{}
-uint32_t
+size_t
lldb_private::formatters::NSDictionaryCodeRunningSyntheticFrontEnd::CalculateNumChildren ()
{
uint64_t count = 0;
@@ -1450,14 +1450,14 @@
}
lldb::ValueObjectSP
-lldb_private::formatters::NSDictionaryCodeRunningSyntheticFrontEnd::GetChildAtIndex (uint32_t idx)
+lldb_private::formatters::NSDictionaryCodeRunningSyntheticFrontEnd::GetChildAtIndex (size_t idx)
{
StreamString idx_name;
- idx_name.Printf("[%d]",idx);
+ idx_name.Printf("[%zu]",idx);
StreamString valobj_expr_path;
m_backend.GetExpressionPath(valobj_expr_path, false);
StreamString key_fetcher_expr;
- key_fetcher_expr.Printf("(id)[(NSArray*)[%s allKeys] objectAtIndex:%d]",valobj_expr_path.GetData(),idx);
+ key_fetcher_expr.Printf("(id)[(NSArray*)[%s allKeys] objectAtIndex:%zu]",valobj_expr_path.GetData(),idx);
StreamString value_fetcher_expr;
value_fetcher_expr.Printf("(id)[%s objectForKey:%s]",valobj_expr_path.GetData(),key_fetcher_expr.GetData());
StreamString object_fetcher_expr;
@@ -1520,7 +1520,7 @@
return idx;
}
-uint32_t
+size_t
lldb_private::formatters::NSDictionaryISyntheticFrontEnd::CalculateNumChildren ()
{
if (!m_data_32 && !m_data_64)
@@ -1581,7 +1581,7 @@
}
lldb::ValueObjectSP
-lldb_private::formatters::NSDictionaryISyntheticFrontEnd::GetChildAtIndex (uint32_t idx)
+lldb_private::formatters::NSDictionaryISyntheticFrontEnd::GetChildAtIndex (size_t idx)
{
uint32_t num_children = CalculateNumChildren();
@@ -1633,7 +1633,7 @@
StreamString expr;
expr.Printf("struct __lldb_autogen_nspair { id key; id value; } _lldb_valgen_item; _lldb_valgen_item.key = (id)%" PRIu64 " ; _lldb_valgen_item.value = (id)%" PRIu64 "; _lldb_valgen_item;",dict_item.key_ptr,dict_item.val_ptr);
StreamString idx_name;
- idx_name.Printf("[%d]",idx);
+ idx_name.Printf("[%zu]",idx);
dict_item.valobj_sp = ValueObject::CreateValueObjectFromExpression(idx_name.GetData(), expr.GetData(), m_exe_ctx_ref);
}
return dict_item.valobj_sp;
@@ -1668,7 +1668,7 @@
return idx;
}
-uint32_t
+size_t
lldb_private::formatters::NSDictionaryMSyntheticFrontEnd::CalculateNumChildren ()
{
if (!m_data_32 && !m_data_64)
@@ -1728,7 +1728,7 @@
}
lldb::ValueObjectSP
-lldb_private::formatters::NSDictionaryMSyntheticFrontEnd::GetChildAtIndex (uint32_t idx)
+lldb_private::formatters::NSDictionaryMSyntheticFrontEnd::GetChildAtIndex (size_t idx)
{
lldb::addr_t m_keys_ptr = (m_data_32 ? m_data_32->_keys_addr : m_data_64->_keys_addr);
lldb::addr_t m_values_ptr = (m_data_32 ? m_data_32->_objs_addr : m_data_64->_objs_addr);
@@ -1783,7 +1783,7 @@
StreamString expr;
expr.Printf("struct __lldb_autogen_nspair { id key; id value; } _lldb_valgen_item; _lldb_valgen_item.key = (id)%" PRIu64 " ; _lldb_valgen_item.value = (id)%" PRIu64 "; _lldb_valgen_item;",dict_item.key_ptr,dict_item.val_ptr);
StreamString idx_name;
- idx_name.Printf("[%d]",idx);
+ idx_name.Printf("[%zu]",idx);
dict_item.valobj_sp = ValueObject::CreateValueObjectFromExpression(idx_name.GetData(), expr.GetData(), m_exe_ctx_ref);
}
return dict_item.valobj_sp;
Modified: lldb/trunk/source/Core/ConstString.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ConstString.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Core/ConstString.cpp (original)
+++ lldb/trunk/source/Core/ConstString.cpp Fri Jan 25 12:06:21 2013
@@ -87,7 +87,7 @@
}
const char *
- GetConstCStringWithLength (const char *cstr, int cstr_len)
+ GetConstCStringWithLength (const char *cstr, size_t cstr_len)
{
if (cstr)
{
@@ -132,11 +132,11 @@
}
const char *
- GetConstTrimmedCStringWithLength (const char *cstr, int cstr_len)
+ GetConstTrimmedCStringWithLength (const char *cstr, size_t cstr_len)
{
if (cstr)
{
- int trimmed_len = std::min<int> (strlen (cstr), cstr_len);
+ const size_t trimmed_len = std::min<size_t> (strlen (cstr), cstr_len);
return GetConstCStringWithLength (cstr, trimmed_len);
}
return NULL;
Modified: lldb/trunk/source/Core/DataBufferMemoryMap.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/DataBufferMemoryMap.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Core/DataBufferMemoryMap.cpp (original)
+++ lldb/trunk/source/Core/DataBufferMemoryMap.cpp Fri Jan 25 12:06:21 2013
@@ -116,8 +116,7 @@
if (error.Success())
{
const bool fd_is_file = true;
- MemoryMapFromFileDescriptor (file.GetDescriptor(), offset, length, writeable, fd_is_file);
- return GetByteSize();
+ return MemoryMapFromFileDescriptor (file.GetDescriptor(), offset, length, writeable, fd_is_file);
}
}
}
Modified: lldb/trunk/source/Core/DataExtractor.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/DataExtractor.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Core/DataExtractor.cpp (original)
+++ lldb/trunk/source/Core/DataExtractor.cpp Fri Jan 25 12:06:21 2013
@@ -38,35 +38,35 @@
using namespace lldb_private;
static inline uint16_t
-ReadInt16(const unsigned char* ptr, unsigned offset)
+ReadInt16(const unsigned char* ptr, offset_t offset)
{
return *(uint16_t *)(ptr + offset);
}
static inline uint32_t
-ReadInt32 (const unsigned char* ptr, unsigned offset)
+ReadInt32 (const unsigned char* ptr, offset_t offset)
{
return *(uint32_t *)(ptr + offset);
}
static inline uint64_t
-ReadInt64(const unsigned char* ptr, unsigned offset)
+ReadInt64(const unsigned char* ptr, offset_t offset)
{
return *(uint64_t *)(ptr + offset);
}
static inline uint16_t
-ReadSwapInt16(const unsigned char* ptr, unsigned offset)
+ReadSwapInt16(const unsigned char* ptr, offset_t offset)
{
return llvm::ByteSwap_16(*(uint16_t *)(ptr + offset));
}
static inline uint32_t
-ReadSwapInt32 (const unsigned char* ptr, unsigned offset)
+ReadSwapInt32 (const unsigned char* ptr, offset_t offset)
{
return llvm::ByteSwap_32(*(uint32_t *)(ptr + offset));
}
static inline uint64_t
-ReadSwapInt64(const unsigned char* ptr, unsigned offset)
+ReadSwapInt64(const unsigned char* ptr, offset_t offset)
{
return llvm::ByteSwap_64(*(uint64_t *)(ptr + offset));
}
@@ -88,7 +88,7 @@
// This constructor allows us to use data that is owned by someone else.
// The data must stay around as long as this object is valid.
//----------------------------------------------------------------------
-DataExtractor::DataExtractor (const void* data, uint32_t length, ByteOrder endian, uint8_t addr_size) :
+DataExtractor::DataExtractor (const void* data, offset_t length, ByteOrder endian, uint32_t addr_size) :
m_start ((uint8_t*)data),
m_end ((uint8_t*)data + length),
m_byte_order(endian),
@@ -104,7 +104,7 @@
// as long as any DataExtractor objects exist that have a reference to
// this data.
//----------------------------------------------------------------------
-DataExtractor::DataExtractor (const DataBufferSP& data_sp, ByteOrder endian, uint8_t addr_size) :
+DataExtractor::DataExtractor (const DataBufferSP& data_sp, ByteOrder endian, uint32_t addr_size) :
m_start (NULL),
m_end (NULL),
m_byte_order(endian),
@@ -121,7 +121,7 @@
// as any object contains a reference to that data. The endian
// swap and address size settings are copied from "data".
//----------------------------------------------------------------------
-DataExtractor::DataExtractor (const DataExtractor& data, uint32_t offset, uint32_t length) :
+DataExtractor::DataExtractor (const DataExtractor& data, offset_t offset, offset_t length) :
m_start(NULL),
m_end(NULL),
m_byte_order(data.m_byte_order),
@@ -130,7 +130,7 @@
{
if (data.ValidOffset(offset))
{
- uint32_t bytes_available = data.GetByteSize() - offset;
+ offset_t bytes_available = data.GetByteSize() - offset;
if (length > bytes_available)
length = bytes_available;
SetData(data, offset, length);
@@ -213,9 +213,9 @@
// into the data that is in this object.
//------------------------------------------------------------------
bool
-DataExtractor::ValidOffsetForDataOfSize (uint32_t offset, uint32_t length) const
+DataExtractor::ValidOffsetForDataOfSize (offset_t offset, offset_t length) const
{
- size_t size = GetByteSize();
+ offset_t size = GetByteSize();
if (offset >= size)
return false; // offset isn't valid
@@ -244,8 +244,8 @@
// reference to that data will be released. Is SWAP is set to true,
// any data extracted will be endian swapped.
//----------------------------------------------------------------------
-uint32_t
-DataExtractor::SetData (const void *bytes, uint32_t length, ByteOrder endian)
+lldb::offset_t
+DataExtractor::SetData (const void *bytes, offset_t length, ByteOrder endian)
{
m_byte_order = endian;
m_data_sp.reset();
@@ -276,8 +276,8 @@
// refers to those bytes. The address size and endian swap settings
// are copied from the current values in "data".
//----------------------------------------------------------------------
-uint32_t
-DataExtractor::SetData (const DataExtractor& data, uint32_t data_offset, uint32_t data_length)
+lldb::offset_t
+DataExtractor::SetData (const DataExtractor& data, offset_t data_offset, offset_t data_length)
{
m_addr_size = data.m_addr_size;
// If "data" contains shared pointer to data, then we can use that
@@ -311,8 +311,8 @@
// around as long as it is needed. The address size and endian swap
// settings will remain unchanged from their current settings.
//----------------------------------------------------------------------
-uint32_t
-DataExtractor::SetData (const DataBufferSP& data_sp, uint32_t data_offset, uint32_t data_length)
+lldb::offset_t
+DataExtractor::SetData (const DataBufferSP& data_sp, offset_t data_offset, offset_t data_length)
{
m_start = m_end = NULL;
@@ -335,7 +335,7 @@
}
}
- uint32_t new_size = GetByteSize();
+ size_t new_size = GetByteSize();
// Don't hold a shared pointer to the data buffer if we don't share
// any valid bytes in the shared buffer.
@@ -352,7 +352,7 @@
// RETURNS the byte that was extracted, or zero on failure.
//----------------------------------------------------------------------
uint8_t
-DataExtractor::GetU8 (uint32_t *offset_ptr) const
+DataExtractor::GetU8 (offset_t *offset_ptr) const
{
uint8_t val = 0;
if ( m_start < m_end )
@@ -373,9 +373,9 @@
// the buffer due to being out of bounds, or unsufficient data.
//----------------------------------------------------------------------
void *
-DataExtractor::GetU8 (uint32_t *offset_ptr, void *dst, uint32_t count) const
+DataExtractor::GetU8 (offset_t *offset_ptr, void *dst, uint32_t count) const
{
- register uint32_t offset = *offset_ptr;
+ lldb::offset_t offset = *offset_ptr;
if ((count > 0) && ValidOffsetForDataOfSize(offset, count) )
{
@@ -396,10 +396,10 @@
// RETURNS the uint16_t that was extracted, or zero on failure.
//----------------------------------------------------------------------
uint16_t
-DataExtractor::GetU16 (uint32_t *offset_ptr) const
+DataExtractor::GetU16 (offset_t *offset_ptr) const
{
uint16_t val = 0;
- register uint32_t offset = *offset_ptr;
+ lldb::offset_t offset = *offset_ptr;
if ( ValidOffsetForDataOfSize(offset, sizeof(val)) )
{
if (m_byte_order != lldb::endian::InlHostByteOrder())
@@ -414,7 +414,7 @@
}
uint16_t
-DataExtractor::GetU16_unchecked (uint32_t *offset_ptr) const
+DataExtractor::GetU16_unchecked (offset_t *offset_ptr) const
{
uint16_t val = (m_byte_order == lldb::endian::InlHostByteOrder()) ?
ReadInt16 (m_start, *offset_ptr) :
@@ -424,7 +424,7 @@
}
uint32_t
-DataExtractor::GetU32_unchecked (uint32_t *offset_ptr) const
+DataExtractor::GetU32_unchecked (offset_t *offset_ptr) const
{
uint32_t val = (m_byte_order == lldb::endian::InlHostByteOrder()) ?
ReadInt32 (m_start, *offset_ptr) :
@@ -434,7 +434,7 @@
}
uint64_t
-DataExtractor::GetU64_unchecked (uint32_t *offset_ptr) const
+DataExtractor::GetU64_unchecked (offset_t *offset_ptr) const
{
uint64_t val = (m_byte_order == lldb::endian::InlHostByteOrder()) ?
ReadInt64 (m_start, *offset_ptr) :
@@ -454,11 +454,11 @@
// in the buffer due to being out of bounds, or unsufficient data.
//----------------------------------------------------------------------
void *
-DataExtractor::GetU16 (uint32_t *offset_ptr, void *void_dst, uint32_t count) const
+DataExtractor::GetU16 (offset_t *offset_ptr, void *void_dst, uint32_t count) const
{
uint16_t *dst = (uint16_t *)void_dst;
const size_t value_size = sizeof(*dst);
- register uint32_t offset = *offset_ptr;
+ lldb::offset_t offset = *offset_ptr;
if ((count > 0) && ValidOffsetForDataOfSize(offset, value_size * count) )
{
@@ -490,10 +490,10 @@
// RETURNS the uint32_t that was extracted, or zero on failure.
//----------------------------------------------------------------------
uint32_t
-DataExtractor::GetU32 (uint32_t *offset_ptr) const
+DataExtractor::GetU32 (offset_t *offset_ptr) const
{
uint32_t val = 0;
- register uint32_t offset = *offset_ptr;
+ lldb::offset_t offset = *offset_ptr;
if ( ValidOffsetForDataOfSize(offset, sizeof(val)) )
{
@@ -518,11 +518,11 @@
// in the buffer due to being out of bounds, or unsufficient data.
//----------------------------------------------------------------------
void *
-DataExtractor::GetU32 (uint32_t *offset_ptr, void *void_dst, uint32_t count) const
+DataExtractor::GetU32 (offset_t *offset_ptr, void *void_dst, uint32_t count) const
{
uint32_t *dst = (uint32_t *)void_dst;
const size_t value_size = sizeof(*dst);
- register uint32_t offset = *offset_ptr;
+ lldb::offset_t offset = *offset_ptr;
if ((count > 0) && ValidOffsetForDataOfSize(offset, value_size * count))
{
@@ -555,10 +555,10 @@
// RETURNS the uint64_t that was extracted, or zero on failure.
//----------------------------------------------------------------------
uint64_t
-DataExtractor::GetU64 (uint32_t *offset_ptr) const
+DataExtractor::GetU64 (offset_t *offset_ptr) const
{
uint64_t val = 0;
- register uint32_t offset = *offset_ptr;
+ lldb::offset_t offset = *offset_ptr;
if ( ValidOffsetForDataOfSize(offset, sizeof(val)) )
{
if (m_byte_order != lldb::endian::InlHostByteOrder())
@@ -580,11 +580,11 @@
// return false and leave the offset pointed to by offset_ptr unchanged.
//----------------------------------------------------------------------
void *
-DataExtractor::GetU64 (uint32_t *offset_ptr, void *void_dst, uint32_t count) const
+DataExtractor::GetU64 (offset_t *offset_ptr, void *void_dst, uint32_t count) const
{
uint64_t *dst = (uint64_t *)void_dst;
const size_t value_size = sizeof(uint64_t);
- register uint32_t offset = *offset_ptr;
+ lldb::offset_t offset = *offset_ptr;
if ((count > 0) && ValidOffsetForDataOfSize(offset, value_size * count))
{
@@ -621,7 +621,7 @@
// RETURNS the integer value that was extracted, or zero on failure.
//----------------------------------------------------------------------
uint32_t
-DataExtractor::GetMaxU32 (uint32_t *offset_ptr, uint32_t byte_size) const
+DataExtractor::GetMaxU32 (offset_t *offset_ptr, size_t byte_size) const
{
switch (byte_size)
{
@@ -629,7 +629,7 @@
case 2: return GetU16(offset_ptr); break;
case 4: return GetU32(offset_ptr); break;
default:
- assert(!"GetMaxU32 unhandled case!");
+ assert("GetMaxU32 unhandled case!" == NULL);
break;
}
return 0;
@@ -646,7 +646,7 @@
// RETURNS the integer value that was extracted, or zero on failure.
//----------------------------------------------------------------------
uint64_t
-DataExtractor::GetMaxU64 (uint32_t *offset_ptr, uint32_t size) const
+DataExtractor::GetMaxU64 (offset_t *offset_ptr, size_t size) const
{
switch (size)
{
@@ -655,14 +655,14 @@
case 4: return GetU32(offset_ptr); break;
case 8: return GetU64(offset_ptr); break;
default:
- assert(!"GetMax64 unhandled case!");
+ assert("GetMax64 unhandled case!" == NULL);
break;
}
return 0;
}
uint64_t
-DataExtractor::GetMaxU64_unchecked (uint32_t *offset_ptr, uint32_t size) const
+DataExtractor::GetMaxU64_unchecked (offset_t *offset_ptr, size_t size) const
{
switch (size)
{
@@ -671,14 +671,14 @@
case 4: return GetU32_unchecked (offset_ptr); break;
case 8: return GetU64_unchecked (offset_ptr); break;
default:
- assert(!"GetMax64 unhandled case!");
+ assert("GetMax64 unhandled case!" == NULL);
break;
}
return 0;
}
int64_t
-DataExtractor::GetMaxS64 (uint32_t *offset_ptr, uint32_t size) const
+DataExtractor::GetMaxS64 (offset_t *offset_ptr, size_t size) const
{
switch (size)
{
@@ -687,14 +687,14 @@
case 4: return (int32_t)GetU32(offset_ptr); break;
case 8: return (int64_t)GetU64(offset_ptr); break;
default:
- assert(!"GetMax64 unhandled case!");
+ assert("GetMax64 unhandled case!" == NULL);
break;
}
return 0;
}
uint64_t
-DataExtractor::GetMaxU64Bitfield (uint32_t *offset_ptr, uint32_t size, uint32_t bitfield_bit_size, uint32_t bitfield_bit_offset) const
+DataExtractor::GetMaxU64Bitfield (offset_t *offset_ptr, size_t size, uint32_t bitfield_bit_size, uint32_t bitfield_bit_offset) const
{
uint64_t uval64 = GetMaxU64 (offset_ptr, size);
if (bitfield_bit_size > 0)
@@ -710,7 +710,7 @@
}
int64_t
-DataExtractor::GetMaxS64Bitfield (uint32_t *offset_ptr, uint32_t size, uint32_t bitfield_bit_size, uint32_t bitfield_bit_offset) const
+DataExtractor::GetMaxS64Bitfield (offset_t *offset_ptr, size_t size, uint32_t bitfield_bit_size, uint32_t bitfield_bit_offset) const
{
int64_t sval64 = GetMaxS64 (offset_ptr, size);
if (bitfield_bit_size > 0)
@@ -728,7 +728,7 @@
float
-DataExtractor::GetFloat (uint32_t *offset_ptr) const
+DataExtractor::GetFloat (offset_t *offset_ptr) const
{
typedef float float_type;
float_type val = 0.0;
@@ -754,7 +754,7 @@
}
double
-DataExtractor::GetDouble (uint32_t *offset_ptr) const
+DataExtractor::GetDouble (offset_t *offset_ptr) const
{
typedef double float_type;
float_type val = 0.0;
@@ -781,7 +781,7 @@
long double
-DataExtractor::GetLongDouble (uint32_t *offset_ptr) const
+DataExtractor::GetLongDouble (offset_t *offset_ptr) const
{
typedef long double float_type;
float_type val = 0.0;
@@ -816,13 +816,13 @@
// RETURNS the address that was extracted, or zero on failure.
//------------------------------------------------------------------
uint64_t
-DataExtractor::GetAddress (uint32_t *offset_ptr) const
+DataExtractor::GetAddress (offset_t *offset_ptr) const
{
return GetMaxU64 (offset_ptr, m_addr_size);
}
uint64_t
-DataExtractor::GetAddress_unchecked (uint32_t *offset_ptr) const
+DataExtractor::GetAddress_unchecked (offset_t *offset_ptr) const
{
return GetMaxU64_unchecked (offset_ptr, m_addr_size);
}
@@ -836,7 +836,7 @@
// RETURNS the pointer that was extracted, or zero on failure.
//------------------------------------------------------------------
uint64_t
-DataExtractor::GetPointer (uint32_t *offset_ptr) const
+DataExtractor::GetPointer (offset_t *offset_ptr) const
{
return GetMaxU64 (offset_ptr, m_addr_size);
}
@@ -849,7 +849,7 @@
//----------------------------------------------------------------------
uint64_t
-DataExtractor::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)//, BSDRelocs *data_relocs) const
+DataExtractor::GetGNUEHPointer (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)//, BSDRelocs *data_relocs) const
{
if (eh_ptr_enc == DW_EH_PE_omit)
return ULLONG_MAX; // Value isn't in the buffer...
@@ -948,7 +948,7 @@
}
size_t
-DataExtractor::ExtractBytes (uint32_t offset, uint32_t length, ByteOrder dst_byte_order, void *dst) const
+DataExtractor::ExtractBytes (offset_t offset, offset_t length, ByteOrder dst_byte_order, void *dst) const
{
const uint8_t *src = PeekData (offset, length);
if (src)
@@ -971,7 +971,7 @@
// and there are "length" bytes available, else NULL is returned.
//----------------------------------------------------------------------
const uint8_t*
-DataExtractor::PeekData (uint32_t offset, uint32_t length) const
+DataExtractor::PeekData (offset_t offset, offset_t length) const
{
if ( length > 0 && ValidOffsetForDataOfSize(offset, length) )
return m_start + offset;
@@ -988,10 +988,10 @@
// or NULL otherwise.
//----------------------------------------------------------------------
const void*
-DataExtractor::GetData (uint32_t *offset_ptr, uint32_t length) const
+DataExtractor::GetData (offset_t *offset_ptr, offset_t length) const
{
const uint8_t* bytes = NULL;
- register uint32_t offset = *offset_ptr;
+ lldb::offset_t offset = *offset_ptr;
if ( length > 0 && ValidOffsetForDataOfSize(offset, length) )
{
bytes = m_start + offset;
@@ -1001,15 +1001,16 @@
}
// Extract data and swap if needed when doing the copy
-uint32_t
-DataExtractor::CopyByteOrderedData (uint32_t src_offset,
- uint32_t src_len,
+lldb::offset_t
+DataExtractor::CopyByteOrderedData (offset_t src_offset,
+ offset_t src_len,
void *dst_void_ptr,
- uint32_t dst_len,
+ offset_t dst_len,
ByteOrder dst_byte_order) const
{
// Validate the source info
- assert (ValidOffsetForDataOfSize(src_offset, src_len));
+ if (!ValidOffsetForDataOfSize(src_offset, src_len))
+ assert (ValidOffsetForDataOfSize(src_offset, src_len));
assert (src_len > 0);
assert (m_byte_order == eByteOrderBig || m_byte_order == eByteOrderLittle);
@@ -1033,7 +1034,7 @@
// We are copying the entire value from src into dst.
// Calculate how many, if any, zeroes we need for the most
// significant bytes if "dst_len" is greater than "src_len"...
- const uint32_t num_zeroes = dst_len - src_len;
+ const size_t num_zeroes = dst_len - src_len;
if (dst_byte_order == eByteOrderBig)
{
// Big endian, so we lead with zeroes...
@@ -1126,7 +1127,7 @@
// updated.
//----------------------------------------------------------------------
const char*
-DataExtractor::GetCStr (uint32_t *offset_ptr) const
+DataExtractor::GetCStr (offset_t *offset_ptr) const
{
const char *s = NULL;
if ( m_start < m_end )
@@ -1153,7 +1154,7 @@
// this object's data, else NULL is returned.
//------------------------------------------------------------------
const char *
-DataExtractor::PeekCStr (uint32_t offset) const
+DataExtractor::PeekCStr (offset_t offset) const
{
if (ValidOffset (offset))
return (const char*)m_start + offset;
@@ -1169,7 +1170,7 @@
// Returned the extracted integer value.
//----------------------------------------------------------------------
uint64_t
-DataExtractor::GetULEB128 (uint32_t *offset_ptr) const
+DataExtractor::GetULEB128 (offset_t *offset_ptr) const
{
const uint8_t *src = m_start + *offset_ptr;
const uint8_t *end = m_end;
@@ -1206,7 +1207,7 @@
// Returned the extracted integer value.
//----------------------------------------------------------------------
int64_t
-DataExtractor::GetSLEB128 (uint32_t *offset_ptr) const
+DataExtractor::GetSLEB128 (offset_t *offset_ptr) const
{
int64_t result = 0;
@@ -1247,7 +1248,7 @@
// Returns the number of bytes consumed during the extraction.
//----------------------------------------------------------------------
uint32_t
-DataExtractor::Skip_LEB128 (uint32_t *offset_ptr) const
+DataExtractor::Skip_LEB128 (offset_t *offset_ptr) const
{
uint32_t bytes_consumed = 0;
if ( m_start < m_end )
@@ -1263,11 +1264,11 @@
return bytes_consumed;
}
-static uint32_t
-DumpAPInt (Stream *s, const DataExtractor &data, uint32_t offset, uint32_t byte_size, bool is_signed, unsigned radix)
+static lldb::offset_t
+DumpAPInt (Stream *s, const DataExtractor &data, lldb::offset_t offset, lldb::offset_t byte_size, bool is_signed, unsigned radix)
{
llvm::SmallVector<uint64_t, 2> uint64_array;
- uint32_t bytes_left = byte_size;
+ lldb::offset_t bytes_left = byte_size;
uint64_t u64;
const lldb::ByteOrder byte_order = data.GetByteOrder();
if (byte_order == lldb::eByteOrderLittle)
@@ -1281,7 +1282,7 @@
}
else
{
- u64 = data.GetMaxU64(&offset, bytes_left);
+ u64 = data.GetMaxU64(&offset, (uint32_t)bytes_left);
bytes_left = 0;
}
uint64_array.push_back(u64);
@@ -1289,8 +1290,8 @@
}
else if (byte_order == lldb::eByteOrderBig)
{
- uint32_t be_offset = offset + byte_size;
- uint32_t temp_offset;
+ lldb::offset_t be_offset = offset + byte_size;
+ lldb::offset_t temp_offset;
while (bytes_left > 0)
{
if (bytes_left >= 8)
@@ -1304,7 +1305,7 @@
{
be_offset -= bytes_left;
temp_offset = be_offset;
- u64 = data.GetMaxU64(&temp_offset, bytes_left);
+ u64 = data.GetMaxU64(&temp_offset, (uint32_t)bytes_left);
bytes_left = 0;
}
uint64_array.push_back(u64);
@@ -1331,13 +1332,13 @@
return offset;
}
-uint32_t
+lldb::offset_t
DataExtractor::Dump (Stream *s,
- uint32_t start_offset,
+ offset_t start_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, // If zero, this is not a bitfield value, if non-zero, the value is a bitfield
uint32_t item_bit_offset, // If "item_bit_size" is non-zero, this is the shift amount to apply to a bitfield
@@ -1352,7 +1353,7 @@
item_byte_size = s->GetAddressByteSize();
}
- uint32_t offset = start_offset;
+ offset_t offset = start_offset;
if (item_format == eFormatInstruction)
{
@@ -1393,7 +1394,7 @@
if ((item_format == eFormatOSType || item_format == eFormatAddressInfo) && item_byte_size > 8)
item_format = eFormatHex;
- uint32_t line_start_offset = start_offset;
+ lldb::offset_t line_start_offset = start_offset;
for (uint32_t count = 0; ValidOffset(offset) && count < item_count; ++count)
{
if ((count % num_per_line) == 0)
@@ -1402,8 +1403,8 @@
{
if (item_format == eFormatBytesWithASCII && offset > line_start_offset)
{
- s->Printf("%*s", (num_per_line - (offset - line_start_offset)) * 3 + 2, "");
- Dump(s, line_start_offset, eFormatCharPrintable, 1, offset - line_start_offset, UINT32_MAX, LLDB_INVALID_ADDRESS, 0, 0);
+ s->Printf("%*s", static_cast<int>((num_per_line - (offset - line_start_offset)) * 3 + 2), "");
+ Dump(s, line_start_offset, eFormatCharPrintable, 1, offset - line_start_offset, LLDB_INVALID_OFFSET, LLDB_INVALID_ADDRESS, 0, 0);
}
s->EOL();
}
@@ -1428,7 +1429,7 @@
s->Printf ("%s", GetMaxU64Bitfield(&offset, item_byte_size, item_bit_size, item_bit_offset) ? "true" : "false");
else
{
- s->Printf("error: unsupported byte size (%u) for boolean format", item_byte_size);
+ s->Printf("error: unsupported byte size (%zu) for boolean format", item_byte_size);
return offset;
}
break;
@@ -1584,7 +1585,7 @@
if (!cstr)
{
s->Printf("NULL");
- offset = UINT32_MAX;
+ offset = LLDB_INVALID_OFFSET;
}
else
{
@@ -1628,7 +1629,7 @@
case eFormatComplexInteger:
{
- uint32_t complex_int_byte_size = item_byte_size / 2;
+ size_t complex_int_byte_size = item_byte_size / 2;
if (complex_int_byte_size <= 8)
{
@@ -1637,7 +1638,7 @@
}
else
{
- s->Printf("error: unsupported byte size (%u) for complex integer format", item_byte_size);
+ s->Printf("error: unsupported byte size (%zu) for complex integer format", item_byte_size);
return offset;
}
}
@@ -1669,7 +1670,7 @@
}
else
{
- s->Printf("error: unsupported byte size (%u) for complex float format", item_byte_size);
+ s->Printf("error: unsupported byte size (%zu) for complex float format", item_byte_size);
return offset;
}
break;
@@ -1682,7 +1683,7 @@
bool wantsuppercase = (item_format == eFormatHexUppercase);
if (item_byte_size <= 8)
{
- s->Printf(wantsuppercase ? "0x%*.*" PRIX64 : "0x%*.*" PRIx64, 2 * item_byte_size, 2 * item_byte_size, GetMaxU64Bitfield(&offset, item_byte_size, item_bit_size, item_bit_offset));
+ s->Printf(wantsuppercase ? "0x%*.*" PRIX64 : "0x%*.*" PRIx64, (int)(2 * item_byte_size), (int)(2 * item_byte_size), GetMaxU64Bitfield(&offset, item_byte_size, item_bit_size, item_bit_offset));
}
else
{
@@ -1727,7 +1728,7 @@
}
else
{
- s->Printf("error: unsupported byte size (%u) for float format", item_byte_size);
+ s->Printf("error: unsupported byte size (%zu) for float format", item_byte_size);
return offset;
}
ss.flush();
@@ -1746,7 +1747,7 @@
case eFormatAddressInfo:
{
addr_t addr = GetMaxU64Bitfield(&offset, item_byte_size, item_bit_size, item_bit_offset);
- s->Printf("0x%*.*" PRIx64, 2 * item_byte_size, 2 * item_byte_size, addr);
+ s->Printf("0x%*.*" PRIx64, (int)(2 * item_byte_size), (int)(2 * item_byte_size), addr);
if (exe_scope)
{
TargetSP target_sp (exe_scope->CalculateTarget());
@@ -1790,7 +1791,7 @@
}
else
{
- s->Printf("error: unsupported byte size (%u) for hex float format", item_byte_size);
+ s->Printf("error: unsupported byte size (%zu) for hex float format", item_byte_size);
return offset;
}
break;
@@ -1874,8 +1875,8 @@
if (item_format == eFormatBytesWithASCII && offset > line_start_offset)
{
- s->Printf("%*s", (num_per_line - (offset - line_start_offset)) * 3 + 2, "");
- Dump(s, line_start_offset, eFormatCharPrintable, 1, offset - line_start_offset, UINT32_MAX, LLDB_INVALID_ADDRESS, 0, 0);
+ s->Printf("%*s", static_cast<int>((num_per_line - (offset - line_start_offset)) * 3 + 2), "");
+ Dump(s, line_start_offset, eFormatCharPrintable, 1, offset - line_start_offset, LLDB_INVALID_OFFSET, LLDB_INVALID_ADDRESS, 0, 0);
}
return offset; // Return the offset at which we ended up
}
@@ -1892,12 +1893,12 @@
// string will be used for the supplied "type". If the stream "s"
// is NULL, then the output will be send to Log().
//----------------------------------------------------------------------
-uint32_t
+lldb::offset_t
DataExtractor::PutToLog
(
Log *log,
- uint32_t start_offset,
- uint32_t length,
+ offset_t start_offset,
+ offset_t length,
uint64_t base_addr,
uint32_t num_per_line,
DataExtractor::Type type,
@@ -1907,8 +1908,8 @@
if (log == NULL)
return start_offset;
- uint32_t offset;
- uint32_t end_offset;
+ offset_t offset;
+ offset_t end_offset;
uint32_t count;
StreamString sstr;
for (offset = start_offset, end_offset = offset + length, count = 0; ValidOffset(offset) && offset < end_offset; ++count)
@@ -1956,7 +1957,7 @@
// Dump out a UUID starting at 'offset' bytes into the buffer
//----------------------------------------------------------------------
void
-DataExtractor::DumpUUID (Stream *s, uint32_t offset) const
+DataExtractor::DumpUUID (Stream *s, offset_t offset) const
{
if (s)
{
@@ -1968,7 +1969,7 @@
}
else
{
- s->Printf("<not enough data for UUID at offset 0x%8.8x>", offset);
+ s->Printf("<not enough data for UUID at offset 0x%8.8" PRIx64 ">", offset);
}
}
}
@@ -2039,7 +2040,7 @@
}
bool
-DataExtractor::Append(void* buf, uint32_t length)
+DataExtractor::Append(void* buf, offset_t length)
{
if (buf == NULL)
return false;
Modified: lldb/trunk/source/Core/Debugger.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Debugger.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Core/Debugger.cpp (original)
+++ lldb/trunk/source/Core/Debugger.cpp Fri Jan 25 12:06:21 2013
@@ -999,7 +999,7 @@
CommandInterpreter::eBroadcastBitAsynchronousErrorData));
}
-uint32_t
+size_t
Debugger::GetNumDebuggers()
{
if (g_shared_debugger_refcount > 0)
@@ -1011,7 +1011,7 @@
}
lldb::DebuggerSP
-Debugger::GetDebuggerAtIndex (uint32_t index)
+Debugger::GetDebuggerAtIndex (size_t index)
{
DebuggerSP debugger_sp;
@@ -1228,7 +1228,7 @@
{
if (log)
log->Printf("[ScanBracketedRange] swapping indices");
- int temp = *index_lower;
+ int64_t temp = *index_lower;
*index_lower = *index_higher;
*index_higher = temp;
}
@@ -1240,7 +1240,7 @@
static ValueObjectSP
ExpandIndexedExpression (ValueObject* valobj,
- uint32_t index,
+ size_t index,
StackFrame* frame,
bool deref_pointer)
{
@@ -2539,8 +2539,7 @@
unsigned long octal_value = ::strtoul (oct_str, NULL, 8);
if (octal_value <= UINT8_MAX)
{
- char octal_char = octal_value;
- s.Write (&octal_char, 1);
+ s.PutChar((char)octal_value);
}
}
break;
@@ -2563,7 +2562,7 @@
unsigned long hex_value = strtoul (hex_str, NULL, 16);
if (hex_value <= UINT8_MAX)
- s.PutChar (hex_value);
+ s.PutChar ((char)hex_value);
}
else
{
Modified: lldb/trunk/source/Core/Disassembler.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Disassembler.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Core/Disassembler.cpp (original)
+++ lldb/trunk/source/Core/Disassembler.cpp Fri Jan 25 12:06:21 2013
@@ -638,7 +638,7 @@
std::string line (buffer);
- int len = line.size();
+ size_t len = line.size();
if (line[len-1] == '\n')
{
line[len-1] = '\0';
@@ -706,7 +706,7 @@
// Check to see if the line contains the end-of-dictionary marker ("}")
std::string line (buffer);
- int len = line.size();
+ size_t len = line.size();
if (line[len-1] == '\n')
{
line[len-1] = '\0';
@@ -776,7 +776,7 @@
}
else
{
- int len = value.size();
+ size_t len = value.size();
if ((value[0] == '"') && (value[len-1] == '"'))
value = value.substr (1, len-2);
value_sp.reset (new OptionValueString (value.c_str(), ""));
@@ -945,7 +945,7 @@
InstructionSP
-InstructionList::GetInstructionAtIndex (uint32_t idx) const
+InstructionList::GetInstructionAtIndex (size_t idx) const
{
InstructionSP inst_sp;
if (idx < m_instructions.size())
@@ -1007,9 +1007,9 @@
{
Address address;
address.SetLoadAddress(load_addr, &target);
- uint32_t num_instructions = m_instructions.size();
+ size_t num_instructions = m_instructions.size();
uint32_t index = UINT32_MAX;
- for (int i = 0; i < num_instructions; i++)
+ for (size_t i = 0; i < num_instructions; i++)
{
if (m_instructions[i]->GetAddress() == address)
{
@@ -1171,7 +1171,7 @@
size_t
PseudoInstruction::Decode (const lldb_private::Disassembler &disassembler,
const lldb_private::DataExtractor &data,
- uint32_t data_offset)
+ lldb::offset_t data_offset)
{
return m_opcode.GetByteSize();
}
Modified: lldb/trunk/source/Core/EmulateInstruction.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/EmulateInstruction.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Core/EmulateInstruction.cpp (original)
+++ lldb/trunk/source/Core/EmulateInstruction.cpp Fri Jan 25 12:06:21 2013
@@ -186,7 +186,7 @@
size_t bytes_read = m_read_mem_callback (this, m_baton, context, addr, buf, byte_size);
if (bytes_read == byte_size)
{
- uint32_t offset = 0;
+ lldb::offset_t offset = 0;
DataExtractor data (buf, byte_size, GetByteOrder(), GetAddressByteSize());
uval64 = data.GetMaxU64 (&offset, byte_size);
success = true;
Modified: lldb/trunk/source/Core/Error.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Error.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Core/Error.cpp (original)
+++ lldb/trunk/source/Core/Error.cpp Fri Jan 25 12:06:21 2013
@@ -356,7 +356,7 @@
// allocated buffer above
va_list copy_args;
va_copy (copy_args, args);
- size_t length = ::vsnprintf (buf.data(), buf.size(), format, args);
+ unsigned length = ::vsnprintf (buf.data(), buf.size(), format, args);
if (length >= buf.size())
{
// The error formatted string didn't fit into our buffer, resize it
Modified: lldb/trunk/source/Core/FileSpecList.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/FileSpecList.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Core/FileSpecList.cpp (original)
+++ lldb/trunk/source/Core/FileSpecList.cpp Fri Jan 25 12:06:21 2013
@@ -106,17 +106,16 @@
// Returns the valid index of the file that matches "file_spec" if
// it is found, else UINT32_MAX is returned.
//------------------------------------------------------------------
-uint32_t
-FileSpecList::FindFileIndex (uint32_t start_idx, const FileSpec &file_spec, bool full) const
+size_t
+FileSpecList::FindFileIndex (size_t start_idx, const FileSpec &file_spec, bool full) const
{
- const uint32_t num_files = m_files.size();
- uint32_t idx;
+ const size_t num_files = m_files.size();
// When looking for files, we will compare only the filename if the
// FILE_SPEC argument is empty
bool compare_filename_only = file_spec.GetDirectory().IsEmpty();
- for (idx = start_idx; idx < num_files; ++idx)
+ for (size_t idx = start_idx; idx < num_files; ++idx)
{
if (compare_filename_only)
{
@@ -139,7 +138,7 @@
// range, then an empty FileSpec object will be returned.
//------------------------------------------------------------------
const FileSpec &
-FileSpecList::GetFileSpecAtIndex(uint32_t idx) const
+FileSpecList::GetFileSpecAtIndex(size_t idx) const
{
if (idx < m_files.size())
@@ -149,7 +148,7 @@
}
const FileSpec *
-FileSpecList::GetFileSpecPointerAtIndex(uint32_t idx) const
+FileSpecList::GetFileSpecPointerAtIndex(size_t idx) const
{
if (idx < m_files.size())
return &m_files[idx];
@@ -179,7 +178,7 @@
//------------------------------------------------------------------
// Return the number of files in the file spec list.
//------------------------------------------------------------------
-uint32_t
+size_t
FileSpecList::GetSize() const
{
return m_files.size();
Modified: lldb/trunk/source/Core/FormatClasses.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/FormatClasses.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Core/FormatClasses.cpp (original)
+++ lldb/trunk/source/Core/FormatClasses.cpp Fri Jan 25 12:06:21 2013
@@ -345,7 +345,7 @@
}
lldb::ValueObjectSP
-TypeSyntheticImpl::FrontEnd::GetChildAtIndex (uint32_t idx)
+TypeSyntheticImpl::FrontEnd::GetChildAtIndex (size_t idx)
{
if (!m_wrapper_sp || !m_interpreter)
return lldb::ValueObjectSP();
@@ -369,7 +369,7 @@
#endif // #ifndef LLDB_DISABLE_PYTHON
int
-SyntheticArrayView::GetRealIndexForIndex(int i)
+SyntheticArrayView::GetRealIndexForIndex(size_t i)
{
if (i >= GetCount())
return -1;
Modified: lldb/trunk/source/Core/FormatManager.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/FormatManager.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Core/FormatManager.cpp (original)
+++ lldb/trunk/source/Core/FormatManager.cpp Fri Jan 25 12:06:21 2013
@@ -615,7 +615,7 @@
}
TypeCategoryImplSP
-CategoryMap::GetAtIndex (uint32_t index)
+CategoryMap::GetAtIndex (size_t index)
{
Mutex::Locker locker(m_map_mutex);
Modified: lldb/trunk/source/Core/Module.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Module.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Core/Module.cpp (original)
+++ lldb/trunk/source/Core/Module.cpp Fri Jan 25 12:06:21 2013
@@ -346,16 +346,15 @@
Module::ParseAllDebugSymbols()
{
Mutex::Locker locker (m_mutex);
- uint32_t num_comp_units = GetNumCompileUnits();
+ size_t num_comp_units = GetNumCompileUnits();
if (num_comp_units == 0)
return;
SymbolContext sc;
sc.module_sp = shared_from_this();
- uint32_t cu_idx;
SymbolVendor *symbols = GetSymbolVendor ();
- for (cu_idx = 0; cu_idx < num_comp_units; cu_idx++)
+ for (size_t cu_idx = 0; cu_idx < num_comp_units; cu_idx++)
{
sc.comp_unit = symbols->GetCompileUnitAtIndex(cu_idx).get();
if (sc.comp_unit)
@@ -365,8 +364,7 @@
symbols->ParseCompileUnitFunctions(sc);
- uint32_t func_idx;
- for (func_idx = 0; (sc.function = sc.comp_unit->GetFunctionAtIndex(func_idx).get()) != NULL; ++func_idx)
+ for (size_t func_idx = 0; (sc.function = sc.comp_unit->GetFunctionAtIndex(func_idx).get()) != NULL; ++func_idx)
{
symbols->ParseFunctionBlocks(sc);
@@ -400,7 +398,7 @@
s->Printf(", Module{%p}", this);
}
-uint32_t
+size_t
Module::GetNumCompileUnits()
{
Mutex::Locker locker (m_mutex);
@@ -412,10 +410,10 @@
}
CompUnitSP
-Module::GetCompileUnitAtIndex (uint32_t index)
+Module::GetCompileUnitAtIndex (size_t index)
{
Mutex::Locker locker (m_mutex);
- uint32_t num_comp_units = GetNumCompileUnits ();
+ size_t num_comp_units = GetNumCompileUnits ();
CompUnitSP cu_sp;
if (index < num_comp_units)
@@ -529,16 +527,24 @@
}
-uint32_t
-Module::FindGlobalVariables(const ConstString &name, const ClangNamespaceDecl *namespace_decl, bool append, uint32_t max_matches, VariableList& variables)
+size_t
+Module::FindGlobalVariables (const ConstString &name,
+ const ClangNamespaceDecl *namespace_decl,
+ bool append,
+ size_t max_matches,
+ VariableList& variables)
{
SymbolVendor *symbols = GetSymbolVendor ();
if (symbols)
return symbols->FindGlobalVariables(name, namespace_decl, append, max_matches, variables);
return 0;
}
-uint32_t
-Module::FindGlobalVariables(const RegularExpression& regex, bool append, uint32_t max_matches, VariableList& variables)
+
+size_t
+Module::FindGlobalVariables (const RegularExpression& regex,
+ bool append,
+ size_t max_matches,
+ VariableList& variables)
{
SymbolVendor *symbols = GetSymbolVendor ();
if (symbols)
@@ -546,7 +552,7 @@
return 0;
}
-uint32_t
+size_t
Module::FindCompileUnits (const FileSpec &path,
bool append,
SymbolContextList &sc_list)
@@ -554,12 +560,12 @@
if (!append)
sc_list.Clear();
- const uint32_t start_size = sc_list.GetSize();
- const uint32_t num_compile_units = GetNumCompileUnits();
+ const size_t start_size = sc_list.GetSize();
+ const size_t num_compile_units = GetNumCompileUnits();
SymbolContext sc;
sc.module_sp = shared_from_this();
const bool compare_directory = path.GetDirectory();
- for (uint32_t i=0; i<num_compile_units; ++i)
+ for (size_t i=0; i<num_compile_units; ++i)
{
sc.comp_unit = GetCompileUnitAtIndex(i).get();
if (sc.comp_unit)
@@ -571,10 +577,10 @@
return sc_list.GetSize() - start_size;
}
-uint32_t
+size_t
Module::FindFunctions (const ConstString &name,
const ClangNamespaceDecl *namespace_decl,
- uint32_t name_type_mask,
+ uint32_t name_type_mask,
bool include_symbols,
bool include_inlines,
bool append,
@@ -583,7 +589,7 @@
if (!append)
sc_list.Clear();
- const uint32_t start_size = sc_list.GetSize();
+ const size_t start_size = sc_list.GetSize();
// Find all the functions (not symbols, but debug information functions...
SymbolVendor *symbols = GetSymbolVendor ();
@@ -601,12 +607,12 @@
{
std::vector<uint32_t> symbol_indexes;
symtab->FindAllSymbolsWithNameAndType (name, eSymbolTypeCode, Symtab::eDebugAny, Symtab::eVisibilityAny, symbol_indexes);
- const uint32_t num_matches = symbol_indexes.size();
+ const size_t num_matches = symbol_indexes.size();
if (num_matches)
{
const bool merge_symbol_into_function = true;
SymbolContext sc(this);
- for (uint32_t i=0; i<num_matches; i++)
+ for (size_t i=0; i<num_matches; i++)
{
sc.symbol = symtab->SymbolAtIndex(symbol_indexes[i]);
sc_list.AppendIfUnique (sc, merge_symbol_into_function);
@@ -618,7 +624,7 @@
return sc_list.GetSize() - start_size;
}
-uint32_t
+size_t
Module::FindFunctions (const RegularExpression& regex,
bool include_symbols,
bool include_inlines,
@@ -628,7 +634,7 @@
if (!append)
sc_list.Clear();
- const uint32_t start_size = sc_list.GetSize();
+ const size_t start_size = sc_list.GetSize();
SymbolVendor *symbols = GetSymbolVendor ();
if (symbols)
@@ -644,12 +650,12 @@
{
std::vector<uint32_t> symbol_indexes;
symtab->AppendSymbolIndexesMatchingRegExAndType (regex, eSymbolTypeCode, Symtab::eDebugAny, Symtab::eVisibilityAny, symbol_indexes);
- const uint32_t num_matches = symbol_indexes.size();
+ const size_t num_matches = symbol_indexes.size();
if (num_matches)
{
const bool merge_symbol_into_function = true;
SymbolContext sc(this);
- for (uint32_t i=0; i<num_matches; i++)
+ for (size_t i=0; i<num_matches; i++)
{
sc.symbol = symtab->SymbolAtIndex(symbol_indexes[i]);
sc_list.AppendIfUnique (sc, merge_symbol_into_function);
@@ -661,12 +667,12 @@
return sc_list.GetSize() - start_size;
}
-uint32_t
+size_t
Module::FindTypes_Impl (const SymbolContext& sc,
const ConstString &name,
const ClangNamespaceDecl *namespace_decl,
bool append,
- uint32_t max_matches,
+ size_t max_matches,
TypeList& types)
{
Timer scoped_timer(__PRETTY_FUNCTION__, __PRETTY_FUNCTION__);
@@ -679,11 +685,11 @@
return 0;
}
-uint32_t
+size_t
Module::FindTypesInNamespace (const SymbolContext& sc,
const ConstString &type_name,
const ClangNamespaceDecl *namespace_decl,
- uint32_t max_matches,
+ size_t max_matches,
TypeList& type_list)
{
const bool append = true;
@@ -696,21 +702,21 @@
bool exact_match)
{
TypeList type_list;
- const uint32_t num_matches = FindTypes (sc, name, exact_match, 1, type_list);
+ const size_t num_matches = FindTypes (sc, name, exact_match, 1, type_list);
if (num_matches)
return type_list.GetTypeAtIndex(0);
return TypeSP();
}
-uint32_t
+size_t
Module::FindTypes (const SymbolContext& sc,
const ConstString &name,
bool exact_match,
- uint32_t max_matches,
+ size_t max_matches,
TypeList& types)
{
- uint32_t num_matches = 0;
+ size_t num_matches = 0;
const char *type_name_cstr = name.GetCString();
std::string type_scope;
std::string type_basename;
@@ -756,17 +762,6 @@
}
-//uint32_t
-//Module::FindTypes(const SymbolContext& sc, const RegularExpression& regex, bool append, uint32_t max_matches, Type::Encoding encoding, const char *udt_name, TypeList& types)
-//{
-// Timer scoped_timer(__PRETTY_FUNCTION__);
-// SymbolVendor *symbols = GetSymbolVendor ();
-// if (symbols)
-// return symbols->FindTypes(sc, regex, append, max_matches, encoding, udt_name, types);
-// return 0;
-//
-//}
-
SymbolVendor*
Module::GetSymbolVendor (bool can_create, lldb_private::Stream *feedback_strm)
{
Modified: lldb/trunk/source/Core/ModuleList.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ModuleList.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Core/ModuleList.cpp (original)
+++ lldb/trunk/source/Core/ModuleList.cpp Fri Jan 25 12:06:21 2013
@@ -296,14 +296,14 @@
}
Module*
-ModuleList::GetModulePointerAtIndex (uint32_t idx) const
+ModuleList::GetModulePointerAtIndex (size_t idx) const
{
Mutex::Locker locker(m_modules_mutex);
return GetModulePointerAtIndexUnlocked(idx);
}
Module*
-ModuleList::GetModulePointerAtIndexUnlocked (uint32_t idx) const
+ModuleList::GetModulePointerAtIndexUnlocked (size_t idx) const
{
if (idx < m_modules.size())
return m_modules[idx].get();
@@ -311,14 +311,14 @@
}
ModuleSP
-ModuleList::GetModuleAtIndex(uint32_t idx) const
+ModuleList::GetModuleAtIndex(size_t idx) const
{
Mutex::Locker locker(m_modules_mutex);
return GetModuleAtIndexUnlocked(idx);
}
ModuleSP
-ModuleList::GetModuleAtIndexUnlocked(uint32_t idx) const
+ModuleList::GetModuleAtIndexUnlocked(size_t idx) const
{
ModuleSP module_sp;
if (idx < m_modules.size())
@@ -326,7 +326,7 @@
return module_sp;
}
-uint32_t
+size_t
ModuleList::FindFunctions (const ConstString &name,
uint32_t name_type_mask,
bool include_symbols,
@@ -347,7 +347,7 @@
return sc_list.GetSize();
}
-uint32_t
+size_t
ModuleList::FindCompileUnits (const FileSpec &path,
bool append,
SymbolContextList &sc_list) const
@@ -365,10 +365,10 @@
return sc_list.GetSize();
}
-uint32_t
+size_t
ModuleList::FindGlobalVariables (const ConstString &name,
bool append,
- uint32_t max_matches,
+ size_t max_matches,
VariableList& variable_list) const
{
size_t initial_size = variable_list.GetSize();
@@ -382,10 +382,10 @@
}
-uint32_t
+size_t
ModuleList::FindGlobalVariables (const RegularExpression& regex,
bool append,
- uint32_t max_matches,
+ size_t max_matches,
VariableList& variable_list) const
{
size_t initial_size = variable_list.GetSize();
@@ -495,12 +495,12 @@
}
-uint32_t
-ModuleList::FindTypes (const SymbolContext& sc, const ConstString &name, bool name_is_fully_qualified, uint32_t max_matches, TypeList& types) const
+size_t
+ModuleList::FindTypes (const SymbolContext& sc, const ConstString &name, bool name_is_fully_qualified, size_t max_matches, TypeList& types) const
{
Mutex::Locker locker(m_modules_mutex);
- uint32_t total_matches = 0;
+ size_t total_matches = 0;
collection::const_iterator pos, end = m_modules.end();
if (sc.module_sp)
{
@@ -689,7 +689,7 @@
return sc_list.GetSize();
}
-uint32_t
+size_t
ModuleList::GetIndexForModule (const Module *module) const
{
if (module)
@@ -737,7 +737,7 @@
return GetSharedModuleList ().FindModules (module_spec, matching_module_list);
}
-uint32_t
+size_t
ModuleList::RemoveOrphanSharedModules (bool mandatory)
{
return GetSharedModuleList ().RemoveOrphans(mandatory);
@@ -781,7 +781,7 @@
const size_t num_matching_modules = shared_module_list.FindModules (module_spec, matching_module_list);
if (num_matching_modules > 0)
{
- for (uint32_t module_idx = 0; module_idx < num_matching_modules; ++module_idx)
+ for (size_t module_idx = 0; module_idx < num_matching_modules; ++module_idx)
{
module_sp = matching_module_list.GetModuleAtIndex(module_idx);
Modified: lldb/trunk/source/Core/PluginManager.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/PluginManager.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Core/PluginManager.cpp (original)
+++ lldb/trunk/source/Core/PluginManager.cpp Fri Jan 25 12:06:21 2013
@@ -1346,7 +1346,7 @@
return NULL;
}
-uint32_t
+size_t
PluginManager::AutoCompletePlatformName (const char *name, StringList &matches)
{
if (name && name[0])
Modified: lldb/trunk/source/Core/RegisterValue.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/RegisterValue.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Core/RegisterValue.cpp (original)
+++ lldb/trunk/source/Core/RegisterValue.cpp Fri Jan 25 12:06:21 2013
@@ -301,7 +301,7 @@
}
Error
-RegisterValue::SetValueFromData (const RegisterInfo *reg_info, DataExtractor &src, uint32_t src_offset, bool partial_data_ok)
+RegisterValue::SetValueFromData (const RegisterInfo *reg_info, DataExtractor &src, lldb::offset_t src_offset, bool partial_data_ok)
{
Error error;
Modified: lldb/trunk/source/Core/Scalar.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Scalar.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Core/Scalar.cpp (original)
+++ lldb/trunk/source/Core/Scalar.cpp Fri Jan 25 12:06:21 2013
@@ -523,11 +523,11 @@
Scalar::Type
Scalar::GetValueTypeForSignedIntegerWithByteSize (size_t byte_size)
{
- if (byte_size <= sizeof(int))
+ if (byte_size <= sizeof(sint_t))
return e_sint;
- if (byte_size <= sizeof(long))
+ if (byte_size <= sizeof(slong_t))
return e_slong;
- if (byte_size <= sizeof(long long))
+ if (byte_size <= sizeof(slonglong_t))
return e_slonglong;
return e_void;
}
@@ -535,11 +535,11 @@
Scalar::Type
Scalar::GetValueTypeForUnsignedIntegerWithByteSize (size_t byte_size)
{
- if (byte_size <= sizeof(unsigned int))
+ if (byte_size <= sizeof(uint_t))
return e_uint;
- if (byte_size <= sizeof(unsigned long))
+ if (byte_size <= sizeof(ulong_t))
return e_ulong;
- if (byte_size <= sizeof(unsigned long long))
+ if (byte_size <= sizeof(ulonglong_t))
return e_ulonglong;
return e_void;
}
@@ -547,11 +547,11 @@
Scalar::Type
Scalar::GetValueTypeForFloatWithByteSize (size_t byte_size)
{
- if (byte_size == sizeof(float))
+ if (byte_size == sizeof(float_t))
return e_float;
- if (byte_size == sizeof(double))
+ if (byte_size == sizeof(double_t))
return e_double;
- if (byte_size == sizeof(long double))
+ if (byte_size == sizeof(long_double_t))
return e_long_double;
return e_void;
}
@@ -601,8 +601,8 @@
switch (type)
{
case e_void:
- case e_sint: m_data.sint = m_data.slong; success = true; break;
- case e_uint: m_data.uint = m_data.slong; success = true; break;
+ case e_sint: m_data.sint = (sint_t)m_data.slong; success = true; break;
+ case e_uint: m_data.uint = (uint_t)m_data.slong; success = true; break;
case e_slong: success = true; break;
case e_ulong: m_data.ulong = m_data.slong; success = true; break;
case e_slonglong: m_data.slonglong = m_data.slong; success = true; break;
@@ -617,8 +617,8 @@
switch (type)
{
case e_void:
- case e_sint: m_data.sint = m_data.ulong; success = true; break;
- case e_uint: m_data.uint = m_data.ulong; success = true; break;
+ case e_sint: m_data.sint = (sint_t)m_data.ulong; success = true; break;
+ case e_uint: m_data.uint = (uint_t)m_data.ulong; success = true; break;
case e_slong: m_data.slong = m_data.ulong; success = true; break;
case e_ulong: success = true; break;
case e_slonglong: m_data.slonglong = m_data.ulong; success = true; break;
@@ -633,8 +633,8 @@
switch (type)
{
case e_void:
- case e_sint: m_data.sint = m_data.slonglong; success = true; break;
- case e_uint: m_data.uint = m_data.slonglong; success = true; break;
+ case e_sint: m_data.sint = (sint_t)m_data.slonglong; success = true; break;
+ case e_uint: m_data.uint = (uint_t)m_data.slonglong; success = true; break;
case e_slong: m_data.slong = m_data.slonglong; success = true; break;
case e_ulong: m_data.ulong = m_data.slonglong; success = true; break;
case e_slonglong: success = true; break;
@@ -649,8 +649,8 @@
switch (type)
{
case e_void:
- case e_sint: m_data.sint = m_data.ulonglong; success = true; break;
- case e_uint: m_data.uint = m_data.ulonglong; success = true; break;
+ case e_sint: m_data.sint = (sint_t)m_data.ulonglong; success = true; break;
+ case e_uint: m_data.uint = (uint_t)m_data.ulonglong; success = true; break;
case e_slong: m_data.slong = m_data.ulonglong; success = true; break;
case e_ulong: m_data.ulong = m_data.ulonglong; success = true; break;
case e_slonglong: m_data.slonglong = m_data.ulonglong; success = true; break;
@@ -665,15 +665,15 @@
switch (type)
{
case e_void:
- case e_sint: m_data.sint = m_data.flt; success = true; break;
- case e_uint: m_data.uint = m_data.flt; success = true; break;
- case e_slong: m_data.slong = m_data.flt; success = true; break;
- case e_ulong: m_data.ulong = m_data.flt; success = true; break;
- case e_slonglong: m_data.slonglong = m_data.flt; success = true; break;
- case e_ulonglong: m_data.ulonglong = m_data.flt; success = true; break;
+ case e_sint: m_data.sint = (sint_t)m_data.flt; success = true; break;
+ case e_uint: m_data.uint = (uint_t)m_data.flt; success = true; break;
+ case e_slong: m_data.slong = (slong_t)m_data.flt; success = true; break;
+ case e_ulong: m_data.ulong = (ulong_t)m_data.flt; success = true; break;
+ case e_slonglong: m_data.slonglong = (slonglong_t)m_data.flt; success = true; break;
+ case e_ulonglong: m_data.ulonglong = (ulonglong_t)m_data.flt; success = true; break;
case e_float: success = true; break;
- case e_double: m_data.dbl = m_data.flt; success = true; break;
- case e_long_double: m_data.ldbl = m_data.flt; success = true; break;
+ case e_double: m_data.dbl = m_data.flt; success = true; break;
+ case e_long_double: m_data.ldbl = m_data.flt; success = true; break;
}
break;
@@ -681,15 +681,15 @@
switch (type)
{
case e_void:
- case e_sint: m_data.sint = m_data.dbl; success = true; break;
- case e_uint: m_data.uint = m_data.dbl; success = true; break;
- case e_slong: m_data.slong = m_data.dbl; success = true; break;
- case e_ulong: m_data.ulong = m_data.dbl; success = true; break;
- case e_slonglong: m_data.slonglong = m_data.dbl; success = true; break;
- case e_ulonglong: m_data.ulonglong = m_data.dbl; success = true; break;
- case e_float: m_data.flt = m_data.dbl; success = true; break;
+ case e_sint: m_data.sint = (sint_t)m_data.dbl; success = true; break;
+ case e_uint: m_data.uint = (uint_t)m_data.dbl; success = true; break;
+ case e_slong: m_data.slong = (slong_t)m_data.dbl; success = true; break;
+ case e_ulong: m_data.ulong = (ulong_t)m_data.dbl; success = true; break;
+ case e_slonglong: m_data.slonglong = (slonglong_t)m_data.dbl; success = true; break;
+ case e_ulonglong: m_data.ulonglong = (ulonglong_t)m_data.dbl; success = true; break;
+ case e_float: m_data.flt = (float_t)m_data.dbl; success = true; break;
case e_double: success = true; break;
- case e_long_double: m_data.ldbl = m_data.dbl; success = true; break;
+ case e_long_double: m_data.ldbl = m_data.dbl; success = true; break;
}
break;
@@ -697,14 +697,14 @@
switch (type)
{
case e_void:
- case e_sint: m_data.sint = m_data.ldbl; success = true; break;
- case e_uint: m_data.uint = m_data.ldbl; success = true; break;
- case e_slong: m_data.slong = m_data.ldbl; success = true; break;
- case e_ulong: m_data.ulong = m_data.ldbl; success = true; break;
- case e_slonglong: m_data.slonglong = m_data.ldbl; success = true; break;
- case e_ulonglong: m_data.ulonglong = m_data.ldbl; success = true; break;
- case e_float: m_data.flt = m_data.ldbl; success = true; break;
- case e_double: m_data.dbl = m_data.ldbl; success = true; break;
+ case e_sint: m_data.sint = (sint_t)m_data.ldbl; success = true; break;
+ case e_uint: m_data.uint = (uint_t)m_data.ldbl; success = true; break;
+ case e_slong: m_data.slong = (slong_t)m_data.ldbl; success = true; break;
+ case e_ulong: m_data.ulong = (ulong_t)m_data.ldbl; success = true; break;
+ case e_slonglong: m_data.slonglong = (slonglong_t)m_data.ldbl; success = true; break;
+ case e_ulonglong: m_data.ulonglong = (ulonglong_t)m_data.ldbl; success = true; break;
+ case e_float: m_data.flt = (float_t)m_data.ldbl; success = true; break;
+ case e_double: m_data.dbl = (double_t)m_data.ldbl; success = true; break;
case e_long_double: success = true; break;
}
break;
@@ -815,29 +815,29 @@
return m_data.ulonglong;
case e_float:
- if (sizeof(m_data.flt) == sizeof(int))
+ if (sizeof(m_data.flt) == sizeof(m_data.uint))
return m_data.uint;
- else if (sizeof(m_data.flt) == sizeof(unsigned long))
+ else if (sizeof(m_data.flt) == sizeof(m_data.ulong))
return m_data.ulong;
- else if (sizeof(m_data.flt) == sizeof(unsigned long long))
+ else if (sizeof(m_data.flt) == sizeof(m_data.ulonglong))
return m_data.ulonglong;
break;
case e_double:
- if (sizeof(m_data.dbl) == sizeof(int))
+ if (sizeof(m_data.dbl) == sizeof(m_data.uint))
return m_data.uint;
- else if (sizeof(m_data.dbl) == sizeof(unsigned long))
+ else if (sizeof(m_data.dbl) == sizeof(m_data.ulong))
return m_data.ulong;
- else if (sizeof(m_data.dbl) == sizeof(unsigned long long))
+ else if (sizeof(m_data.dbl) == sizeof(m_data.ulonglong))
return m_data.ulonglong;
break;
case e_long_double:
- if (sizeof(m_data.ldbl) == sizeof(int))
+ if (sizeof(m_data.ldbl) == sizeof(m_data.uint))
return m_data.uint;
- else if (sizeof(m_data.ldbl) == sizeof(unsigned long))
+ else if (sizeof(m_data.ldbl) == sizeof(m_data.ulong))
return m_data.ulong;
- else if (sizeof(m_data.ldbl) == sizeof(unsigned long long))
+ else if (sizeof(m_data.ldbl) == sizeof(m_data.ulonglong))
return m_data.ulonglong;
break;
}
@@ -1756,7 +1756,7 @@
Error
-Scalar::SetValueFromCString (const char *value_str, Encoding encoding, uint32_t byte_size)
+Scalar::SetValueFromCString (const char *value_str, Encoding encoding, size_t byte_size)
{
Error error;
if (value_str == NULL || value_str[0] == '\0')
@@ -1778,24 +1778,24 @@
if (!success)
error.SetErrorStringWithFormat ("'%s' is not a valid unsigned integer string value", value_str);
else if (!UIntValueIsValidForSize (uval64, byte_size))
- error.SetErrorStringWithFormat ("value 0x%" PRIx64 " is too large to fit in a %u byte unsigned integer value", uval64, byte_size);
+ error.SetErrorStringWithFormat ("value 0x%" PRIx64 " is too large to fit in a %zu byte unsigned integer value", uval64, byte_size);
else
{
m_type = Scalar::GetValueTypeForUnsignedIntegerWithByteSize (byte_size);
switch (m_type)
{
- case e_uint: m_data.uint = uval64; break;
- case e_ulong: m_data.ulong = uval64; break;
- case e_ulonglong: m_data.ulonglong = uval64; break;
+ case e_uint: m_data.uint = (uint_t)uval64; break;
+ case e_ulong: m_data.ulong = (ulong_t)uval64; break;
+ case e_ulonglong: m_data.ulonglong = (ulonglong_t)uval64; break;
default:
- error.SetErrorStringWithFormat ("unsupported unsigned integer byte size: %u", byte_size);
+ error.SetErrorStringWithFormat ("unsupported unsigned integer byte size: %zu", byte_size);
break;
}
}
}
else
{
- error.SetErrorStringWithFormat ("unsupported unsigned integer byte size: %u", byte_size);
+ error.SetErrorStringWithFormat ("unsupported unsigned integer byte size: %zu", byte_size);
return error;
}
break;
@@ -1807,24 +1807,24 @@
if (!success)
error.SetErrorStringWithFormat ("'%s' is not a valid signed integer string value", value_str);
else if (!SIntValueIsValidForSize (sval64, byte_size))
- error.SetErrorStringWithFormat ("value 0x%" PRIx64 " is too large to fit in a %u byte signed integer value", sval64, byte_size);
+ error.SetErrorStringWithFormat ("value 0x%" PRIx64 " is too large to fit in a %zu byte signed integer value", sval64, byte_size);
else
{
m_type = Scalar::GetValueTypeForSignedIntegerWithByteSize (byte_size);
switch (m_type)
{
- case e_sint: m_data.sint = sval64; break;
- case e_slong: m_data.slong = sval64; break;
- case e_slonglong: m_data.slonglong = sval64; break;
+ case e_sint: m_data.sint = (sint_t)sval64; break;
+ case e_slong: m_data.slong = (slong_t)sval64; break;
+ case e_slonglong: m_data.slonglong = (slonglong_t)sval64; break;
default:
- error.SetErrorStringWithFormat ("unsupported signed integer byte size: %u", byte_size);
+ error.SetErrorStringWithFormat ("unsupported signed integer byte size: %zu", byte_size);
break;
}
}
}
else
{
- error.SetErrorStringWithFormat ("unsupported signed integer byte size: %u", byte_size);
+ error.SetErrorStringWithFormat ("unsupported signed integer byte size: %zu", byte_size);
return error;
}
break;
@@ -1853,7 +1853,7 @@
}
else
{
- error.SetErrorStringWithFormat ("unsupported float byte size: %u", byte_size);
+ error.SetErrorStringWithFormat ("unsupported float byte size: %zu", byte_size);
return error;
}
break;
@@ -1935,9 +1935,9 @@
return false;
}
-uint32_t
+size_t
Scalar::GetAsMemoryData (void *dst,
- uint32_t dst_len,
+ size_t dst_len,
lldb::ByteOrder dst_byte_order,
Error &error) const
{
@@ -1952,7 +1952,7 @@
const size_t src_len = data.GetByteSize();
// Prepare a memory buffer that contains some or all of the register value
- const uint32_t bytes_copied = data.CopyByteOrderedData (0, // src offset
+ const size_t bytes_copied = data.CopyByteOrderedData (0, // src offset
src_len, // src length
dst, // dst buffer
dst_len, // dst length
@@ -1978,60 +1978,60 @@
break;
case e_float:
- if (sizeof(m_data.flt) == sizeof(int))
- m_data.sint = SignedBits (m_data.sint, msbit, lsbit);
- else if (sizeof(m_data.flt) == sizeof(unsigned long))
- m_data.slong = SignedBits (m_data.slong, msbit, lsbit);
- else if (sizeof(m_data.flt) == sizeof(unsigned long long))
- m_data.slonglong = SignedBits (m_data.slonglong, msbit, lsbit);
+ if (sizeof(m_data.flt) == sizeof(sint_t))
+ m_data.sint = (sint_t)SignedBits (m_data.sint, msbit, lsbit);
+ else if (sizeof(m_data.flt) == sizeof(ulong_t))
+ m_data.slong = (slong_t)SignedBits (m_data.slong, msbit, lsbit);
+ else if (sizeof(m_data.flt) == sizeof(ulonglong_t))
+ m_data.slonglong = (slonglong_t)SignedBits (m_data.slonglong, msbit, lsbit);
else
return false;
return true;
case e_double:
- if (sizeof(m_data.dbl) == sizeof(int))
+ if (sizeof(m_data.dbl) == sizeof(sint_t))
m_data.sint = SignedBits (m_data.sint, msbit, lsbit);
- else if (sizeof(m_data.dbl) == sizeof(unsigned long))
+ else if (sizeof(m_data.dbl) == sizeof(ulong_t))
m_data.slong = SignedBits (m_data.slong, msbit, lsbit);
- else if (sizeof(m_data.dbl) == sizeof(unsigned long long))
+ else if (sizeof(m_data.dbl) == sizeof(ulonglong_t))
m_data.slonglong = SignedBits (m_data.slonglong, msbit, lsbit);
else
return false;
return true;
case e_long_double:
- if (sizeof(m_data.ldbl) == sizeof(int))
+ if (sizeof(m_data.ldbl) == sizeof(sint_t))
m_data.sint = SignedBits (m_data.sint, msbit, lsbit);
- else if (sizeof(m_data.ldbl) == sizeof(unsigned long))
+ else if (sizeof(m_data.ldbl) == sizeof(ulong_t))
m_data.slong = SignedBits (m_data.slong, msbit, lsbit);
- else if (sizeof(m_data.ldbl) == sizeof(unsigned long long))
+ else if (sizeof(m_data.ldbl) == sizeof(ulonglong_t))
m_data.slonglong = SignedBits (m_data.slonglong, msbit, lsbit);
else
return false;
return true;
case Scalar::e_sint:
- m_data.sint = SignedBits (m_data.sint, msbit, lsbit);
+ m_data.sint = (sint_t)SignedBits (m_data.sint, msbit, lsbit);
return true;
case Scalar::e_uint:
- m_data.uint = UnsignedBits (m_data.uint, msbit, lsbit);
+ m_data.uint = (uint_t)UnsignedBits (m_data.uint, msbit, lsbit);
return true;
case Scalar::e_slong:
- m_data.slong = SignedBits (m_data.slong, msbit, lsbit);
+ m_data.slong = (slong_t)SignedBits (m_data.slong, msbit, lsbit);
return true;
case Scalar::e_ulong:
- m_data.ulong = UnsignedBits (m_data.ulong, msbit, lsbit);
+ m_data.ulong = (ulong_t)UnsignedBits (m_data.ulong, msbit, lsbit);
return true;
case Scalar::e_slonglong:
- m_data.slonglong = SignedBits (m_data.slonglong, msbit, lsbit);
+ m_data.slonglong = (slonglong_t)SignedBits (m_data.slonglong, msbit, lsbit);
return true;
case Scalar::e_ulonglong:
- m_data.ulonglong = UnsignedBits (m_data.ulonglong, msbit, lsbit);
+ m_data.ulonglong = (ulonglong_t)UnsignedBits (m_data.ulonglong, msbit, lsbit);
return true;
}
return false;
Modified: lldb/trunk/source/Core/SearchFilter.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/SearchFilter.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Core/SearchFilter.cpp (original)
+++ lldb/trunk/source/Core/SearchFilter.cpp Fri Jan 25 12:06:21 2013
@@ -245,8 +245,8 @@
Searcher::CallbackReturn shouldContinue;
if (context.comp_unit == NULL)
{
- uint32_t num_comp_units = module_sp->GetNumCompileUnits();
- for (uint32_t i = 0; i < num_comp_units; i++)
+ const size_t num_comp_units = module_sp->GetNumCompileUnits();
+ for (size_t i = 0; i < num_comp_units; i++)
{
CompUnitSP cu_sp (module_sp->GetCompileUnitAtIndex (i));
if (cu_sp)
@@ -617,7 +617,7 @@
void
SearchFilterByModuleList::GetDescription (Stream *s)
{
- uint32_t num_modules = m_module_spec_list.GetSize();
+ size_t num_modules = m_module_spec_list.GetSize();
if (num_modules == 1)
{
s->Printf (", module = ");
@@ -634,8 +634,8 @@
}
else
{
- s->Printf (", modules(%u) = ", num_modules);
- for (uint32_t i = 0; i < num_modules; i++)
+ s->Printf (", modules(%zu) = ", num_modules);
+ for (size_t i = 0; i < num_modules; i++)
{
if (s->GetVerbose())
{
@@ -812,7 +812,7 @@
void
SearchFilterByModuleListAndCU::GetDescription (Stream *s)
{
- uint32_t num_modules = m_module_spec_list.GetSize();
+ size_t num_modules = m_module_spec_list.GetSize();
if (num_modules == 1)
{
s->Printf (", module = ");
@@ -829,8 +829,8 @@
}
else if (num_modules > 0)
{
- s->Printf (", modules(%d) = ", num_modules);
- for (uint32_t i = 0; i < num_modules; i++)
+ s->Printf (", modules(%zd) = ", num_modules);
+ for (size_t i = 0; i < num_modules; i++)
{
if (s->GetVerbose())
{
Modified: lldb/trunk/source/Core/Section.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Section.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Core/Section.cpp (original)
+++ lldb/trunk/source/Core/Section.cpp Fri Jan 25 12:06:21 2013
@@ -162,10 +162,10 @@
bool
Section::ResolveContainedAddress (addr_t offset, Address &so_addr) const
{
- const uint32_t num_children = m_children.GetSize();
+ const size_t num_children = m_children.GetSize();
if (num_children > 0)
{
- for (uint32_t i=0; i<num_children; i++)
+ for (size_t i=0; i<num_children; i++)
{
Section* child_section = m_children.GetSectionAtIndex (i).get();
@@ -395,17 +395,17 @@
{
}
-uint32_t
+size_t
SectionList::AddSection (const lldb::SectionSP& section_sp)
{
assert (section_sp.get());
- uint32_t section_index = m_sections.size();
+ size_t section_index = m_sections.size();
m_sections.push_back(section_sp);
InvalidateRangeCache();
return section_index;
}
-uint32_t
+size_t
SectionList::FindSectionIndex (const Section* sect)
{
iterator sect_iter;
@@ -422,10 +422,10 @@
return UINT32_MAX;
}
-uint32_t
+size_t
SectionList::AddUniqueSection (const lldb::SectionSP& sect_sp)
{
- uint32_t sect_idx = FindSectionIndex (sect_sp.get());
+ size_t sect_idx = FindSectionIndex (sect_sp.get());
if (sect_idx == UINT32_MAX)
sect_idx = AddSection (sect_sp);
return sect_idx;
@@ -470,7 +470,7 @@
}
SectionSP
-SectionList::GetSectionAtIndex (uint32_t idx) const
+SectionList::GetSectionAtIndex (size_t idx) const
{
SectionSP sect_sp;
if (idx < m_sections.size())
@@ -530,11 +530,11 @@
SectionSP
-SectionList::FindSectionByType (SectionType sect_type, bool check_children, uint32_t start_idx) const
+SectionList::FindSectionByType (SectionType sect_type, bool check_children, size_t start_idx) const
{
SectionSP sect_sp;
- uint32_t num_sections = m_sections.size();
- for (uint32_t idx = start_idx; idx < num_sections; ++idx)
+ size_t num_sections = m_sections.size();
+ for (size_t idx = start_idx; idx < num_sections; ++idx)
{
if (m_sections[idx]->GetType() == sect_type)
{
Modified: lldb/trunk/source/Core/SourceManager.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/SourceManager.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Core/SourceManager.cpp (original)
+++ lldb/trunk/source/Core/SourceManager.cpp Fri Jan 25 12:06:21 2013
@@ -284,13 +284,18 @@
if (executable_ptr)
{
SymbolContextList sc_list;
- uint32_t num_matches;
ConstString main_name("main");
bool symbols_okay = false; // Force it to be a debug symbol.
bool inlines_okay = true;
bool append = false;
- num_matches = executable_ptr->FindFunctions (main_name, NULL, lldb::eFunctionNameTypeBase, inlines_okay, symbols_okay, append, sc_list);
- for (uint32_t idx = 0; idx < num_matches; idx++)
+ size_t num_matches = executable_ptr->FindFunctions (main_name,
+ NULL,
+ lldb::eFunctionNameTypeBase,
+ inlines_okay,
+ symbols_okay,
+ append,
+ sc_list);
+ for (size_t idx = 0; idx < num_matches; idx++)
{
SymbolContext sc;
sc_list.GetContextAtIndex(idx, sc);
@@ -584,14 +589,14 @@
else
{
// Some lines have been populated, start where we last left off
- assert(!"Not implemented yet");
+ assert("Not implemented yet" == NULL);
}
}
else
{
// Calculate all line offsets up to "line"
- assert(!"Not implemented yet");
+ assert("Not implemented yet" == NULL);
}
return false;
}
@@ -602,8 +607,8 @@
if (!LineIsValid(line_no))
return false;
- uint32_t start_offset = GetLineOffset (line_no);
- uint32_t end_offset = GetLineOffset (line_no + 1);
+ size_t start_offset = GetLineOffset (line_no);
+ size_t end_offset = GetLineOffset (line_no + 1);
if (end_offset == UINT32_MAX)
{
end_offset = m_data_sp->GetByteSize();
Modified: lldb/trunk/source/Core/Stream.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Stream.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Core/Stream.cpp (original)
+++ lldb/trunk/source/Core/Stream.cpp Fri Jan 25 12:06:21 2013
@@ -64,10 +64,10 @@
// Put an SLEB128 "uval" out to the stream using the printf format
// in "format".
//------------------------------------------------------------------
-int
+size_t
Stream::PutSLEB128 (int64_t sval)
{
- int bytes_written = 0;
+ size_t bytes_written = 0;
if (m_flags.Test(eBinary))
{
bool more = true;
@@ -98,10 +98,10 @@
// Put an ULEB128 "uval" out to the stream using the printf format
// in "format".
//------------------------------------------------------------------
-int
+size_t
Stream::PutULEB128 (uint64_t uval)
{
- int bytes_written = 0;
+ size_t bytes_written = 0;
if (m_flags.Test(eBinary))
{
do
@@ -127,10 +127,10 @@
//------------------------------------------------------------------
// Print a raw NULL terminated C string to the stream.
//------------------------------------------------------------------
-int
+size_t
Stream::PutCString (const char *cstr)
{
- int cstr_len = strlen(cstr);
+ size_t cstr_len = strlen(cstr);
// when in binary mode, emit the NULL terminator
if (m_flags.Test(eBinary))
++cstr_len;
@@ -152,7 +152,7 @@
// and suffix strings.
//------------------------------------------------------------------
void
-Stream::Address (uint64_t addr, int addr_size, const char *prefix, const char *suffix)
+Stream::Address (uint64_t addr, uint32_t addr_size, const char *prefix, const char *suffix)
{
if (prefix == NULL)
prefix = "";
@@ -168,7 +168,7 @@
// and suffix strings.
//------------------------------------------------------------------
void
-Stream::AddressRange(uint64_t lo_addr, uint64_t hi_addr, int addr_size, const char *prefix, const char *suffix)
+Stream::AddressRange(uint64_t lo_addr, uint64_t hi_addr, uint32_t addr_size, const char *prefix, const char *suffix)
{
if (prefix && prefix[0])
PutCString (prefix);
@@ -179,7 +179,7 @@
}
-int
+size_t
Stream::PutChar (char ch)
{
return Write (&ch, 1);
@@ -189,7 +189,7 @@
//------------------------------------------------------------------
// Print some formatted output to the stream.
//------------------------------------------------------------------
-int
+size_t
Stream::Printf (const char *format, ...)
{
va_list args;
@@ -202,7 +202,7 @@
//------------------------------------------------------------------
// Print some formatted output to the stream.
//------------------------------------------------------------------
-int
+size_t
Stream::PrintfVarArg (const char *format, va_list args)
{
char str[1024];
@@ -210,7 +210,7 @@
va_copy (args_copy, args);
- int bytes_written = 0;
+ size_t bytes_written = 0;
// Try and format our string into a fixed buffer first and see if it fits
size_t length = ::vsnprintf (str, sizeof(str), format, args);
if (length < sizeof(str))
@@ -244,7 +244,7 @@
//------------------------------------------------------------------
// Print and End of Line character to the stream
//------------------------------------------------------------------
-int
+size_t
Stream::EOL()
{
return PutChar ('\n');
@@ -254,7 +254,7 @@
// Indent the current line using the current indentation level and
// print an optional string following the idenatation spaces.
//------------------------------------------------------------------
-int
+size_t
Stream::Indent(const char *s)
{
return Printf ("%*.*s%s", m_indent_level, m_indent_level, "", s ? s : "");
@@ -412,7 +412,7 @@
//------------------------------------------------------------------
// Get the address size in bytes
//------------------------------------------------------------------
-uint8_t
+uint32_t
Stream::GetAddressByteSize() const
{
return m_addr_size;
@@ -422,7 +422,7 @@
// Set the address size in bytes
//------------------------------------------------------------------
void
-Stream::SetAddressByteSize(uint8_t addr_size)
+Stream::SetAddressByteSize(uint32_t addr_size)
{
m_addr_size = addr_size;
}
@@ -473,7 +473,7 @@
return m_byte_order;
}
-int
+size_t
Stream::PrintfAsRawHex8 (const char *format, ...)
{
va_list args;
@@ -482,7 +482,7 @@
va_copy (args, args_copy); // Copy this so we
char str[1024];
- int bytes_written = 0;
+ size_t bytes_written = 0;
// Try and format our string into a fixed buffer first and see if it fits
size_t length = ::vsnprintf (str, sizeof(str), format, args);
if (length < sizeof(str))
@@ -511,19 +511,19 @@
return bytes_written;
}
-int
+size_t
Stream::PutNHex8 (size_t n, uint8_t uvalue)
{
- int bytes_written = 0;
+ size_t bytes_written = 0;
for (size_t i=0; i<n; ++i)
bytes_written += _PutHex8 (uvalue, m_flags.Test(eAddPrefix));
return bytes_written;
}
-int
+size_t
Stream::_PutHex8 (uint8_t uvalue, bool add_prefix)
{
- int bytes_written = 0;
+ size_t bytes_written = 0;
if (m_flags.Test(eBinary))
{
bytes_written = Write (&uvalue, 1);
@@ -542,76 +542,76 @@
return bytes_written;
}
-int
+size_t
Stream::PutHex8 (uint8_t uvalue)
{
return _PutHex8 (uvalue, m_flags.Test(eAddPrefix));
}
-int
+size_t
Stream::PutHex16 (uint16_t uvalue, ByteOrder byte_order)
{
if (byte_order == eByteOrderInvalid)
byte_order = m_byte_order;
bool add_prefix = m_flags.Test(eAddPrefix);
- int bytes_written = 0;
+ size_t bytes_written = 0;
if (byte_order == eByteOrderLittle)
{
for (size_t byte = 0; byte < sizeof(uvalue); ++byte, add_prefix = false)
- bytes_written += _PutHex8 (uvalue >> (byte * 8), add_prefix);
+ bytes_written += _PutHex8 ((uint8_t)(uvalue >> (byte * 8)), add_prefix);
}
else
{
for (size_t byte = sizeof(uvalue)-1; byte < sizeof(uvalue); --byte, add_prefix = false)
- bytes_written += _PutHex8 (uvalue >> (byte * 8), add_prefix);
+ bytes_written += _PutHex8 ((uint8_t)(uvalue >> (byte * 8)), add_prefix);
}
return bytes_written;
}
-int
+size_t
Stream::PutHex32(uint32_t uvalue, ByteOrder byte_order)
{
if (byte_order == eByteOrderInvalid)
byte_order = m_byte_order;
bool add_prefix = m_flags.Test(eAddPrefix);
- int bytes_written = 0;
+ size_t bytes_written = 0;
if (byte_order == eByteOrderLittle)
{
for (size_t byte = 0; byte < sizeof(uvalue); ++byte, add_prefix = false)
- bytes_written += _PutHex8 (uvalue >> (byte * 8), add_prefix);
+ bytes_written += _PutHex8 ((uint8_t)(uvalue >> (byte * 8)), add_prefix);
}
else
{
for (size_t byte = sizeof(uvalue)-1; byte < sizeof(uvalue); --byte, add_prefix = false)
- bytes_written += _PutHex8 (uvalue >> (byte * 8), add_prefix);
+ bytes_written += _PutHex8 ((uint8_t)(uvalue >> (byte * 8)), add_prefix);
}
return bytes_written;
}
-int
+size_t
Stream::PutHex64(uint64_t uvalue, ByteOrder byte_order)
{
if (byte_order == eByteOrderInvalid)
byte_order = m_byte_order;
bool add_prefix = m_flags.Test(eAddPrefix);
- int bytes_written = 0;
+ size_t bytes_written = 0;
if (byte_order == eByteOrderLittle)
{
for (size_t byte = 0; byte < sizeof(uvalue); ++byte, add_prefix = false)
- bytes_written += _PutHex8 (uvalue >> (byte * 8), add_prefix);
+ bytes_written += _PutHex8 ((uint8_t)(uvalue >> (byte * 8)), add_prefix);
}
else
{
for (size_t byte = sizeof(uvalue)-1; byte < sizeof(uvalue); --byte, add_prefix = false)
- bytes_written += _PutHex8 (uvalue >> (byte * 8), add_prefix);
+ bytes_written += _PutHex8 ((uint8_t)(uvalue >> (byte * 8)), add_prefix);
}
return bytes_written;
}
-int
+size_t
Stream::PutMaxHex64
(
uint64_t uvalue,
@@ -621,21 +621,21 @@
{
switch (byte_size)
{
- case 1: return PutHex8 (uvalue);
- case 2: return PutHex16 (uvalue);
- case 4: return PutHex32 (uvalue);
+ case 1: return PutHex8 ((uint8_t)uvalue);
+ case 2: return PutHex16 ((uint16_t)uvalue);
+ case 4: return PutHex32 ((uint32_t)uvalue);
case 8: return PutHex64 (uvalue);
}
return 0;
}
-int
+size_t
Stream::PutPointer (void *ptr)
{
return PutRawBytes (&ptr, sizeof(ptr), lldb::endian::InlHostByteOrder(), lldb::endian::InlHostByteOrder());
}
-int
+size_t
Stream::PutFloat(float f, ByteOrder byte_order)
{
if (byte_order == eByteOrderInvalid)
@@ -644,7 +644,7 @@
return PutRawBytes (&f, sizeof(f), lldb::endian::InlHostByteOrder(), byte_order);
}
-int
+size_t
Stream::PutDouble(double d, ByteOrder byte_order)
{
if (byte_order == eByteOrderInvalid)
@@ -653,7 +653,7 @@
return PutRawBytes (&d, sizeof(d), lldb::endian::InlHostByteOrder(), byte_order);
}
-int
+size_t
Stream::PutLongDouble(long double ld, ByteOrder byte_order)
{
if (byte_order == eByteOrderInvalid)
@@ -662,7 +662,7 @@
return PutRawBytes (&ld, sizeof(ld), lldb::endian::InlHostByteOrder(), byte_order);
}
-int
+size_t
Stream::PutRawBytes (const void *s, size_t src_len, ByteOrder src_byte_order, ByteOrder dst_byte_order)
{
if (src_byte_order == eByteOrderInvalid)
@@ -671,7 +671,7 @@
if (dst_byte_order == eByteOrderInvalid)
dst_byte_order = m_byte_order;
- int bytes_written = 0;
+ size_t bytes_written = 0;
const uint8_t *src = (const uint8_t *)s;
bool binary_was_set = m_flags.Test (eBinary);
if (!binary_was_set)
@@ -692,7 +692,7 @@
return bytes_written;
}
-int
+size_t
Stream::PutBytesAsRawHex8 (const void *s, size_t src_len, ByteOrder src_byte_order, ByteOrder dst_byte_order)
{
if (src_byte_order == eByteOrderInvalid)
@@ -701,7 +701,7 @@
if (dst_byte_order == eByteOrderInvalid)
dst_byte_order = m_byte_order;
- int bytes_written = 0;
+ size_t bytes_written = 0;
const uint8_t *src = (const uint8_t *)s;
bool binary_is_set = m_flags.Test(eBinary);
m_flags.Clear(eBinary);
@@ -721,10 +721,10 @@
return bytes_written;
}
-int
+size_t
Stream::PutCStringAsRawHex8 (const char *s)
{
- int bytes_written = 0;
+ size_t bytes_written = 0;
bool binary_is_set = m_flags.Test(eBinary);
m_flags.Clear(eBinary);
do
Modified: lldb/trunk/source/Core/StreamAsynchronousIO.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/StreamAsynchronousIO.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Core/StreamAsynchronousIO.cpp (original)
+++ lldb/trunk/source/Core/StreamAsynchronousIO.cpp Fri Jan 25 12:06:21 2013
@@ -44,7 +44,7 @@
}
}
-int
+size_t
StreamAsynchronousIO::Write (const void *s, size_t length)
{
m_accumulated_data.Write (s, length);
Modified: lldb/trunk/source/Core/StreamCallback.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/StreamCallback.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Core/StreamCallback.cpp (original)
+++ lldb/trunk/source/Core/StreamCallback.cpp Fri Jan 25 12:06:21 2013
@@ -55,7 +55,7 @@
out_stream.Clear();
}
-int
+size_t
StreamCallback::Write (const void *s, size_t length)
{
lldb::tid_t cur_tid = Host::GetCurrentThreadID();
Modified: lldb/trunk/source/Core/StreamFile.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/StreamFile.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Core/StreamFile.cpp (original)
+++ lldb/trunk/source/Core/StreamFile.cpp Fri Jan 25 12:06:21 2013
@@ -64,7 +64,7 @@
m_file.Flush();
}
-int
+size_t
StreamFile::Write (const void *s, size_t length)
{
m_file.Write (s, length);
Modified: lldb/trunk/source/Core/StreamString.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/StreamString.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Core/StreamString.cpp (original)
+++ lldb/trunk/source/Core/StreamString.cpp Fri Jan 25 12:06:21 2013
@@ -34,7 +34,7 @@
// Nothing to do when flushing a buffer based stream...
}
-int
+size_t
StreamString::Write (const void *s, size_t length)
{
m_packet.append ((char *)s, length);
Modified: lldb/trunk/source/Core/StringList.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/StringList.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Core/StringList.cpp (original)
+++ lldb/trunk/source/Core/StringList.cpp Fri Jan 25 12:06:21 2013
@@ -75,9 +75,9 @@
void
StringList::AppendList (StringList strings)
{
- uint32_t len = strings.GetSize();
+ size_t len = strings.GetSize();
- for (uint32_t i = 0; i < len; ++i)
+ for (size_t i = 0; i < len; ++i)
m_strings.push_back (strings.GetStringAtIndex(i));
}
@@ -87,7 +87,7 @@
return input_file.ReadFileLines (m_strings);
}
-uint32_t
+size_t
StringList::GetSize () const
{
return m_strings.size();
@@ -104,7 +104,7 @@
void
StringList::Join (const char *separator, Stream &strm)
{
- uint32_t size = GetSize();
+ size_t size = GetSize();
if (size == 0)
return;
@@ -127,8 +127,8 @@
StringList::LongestCommonPrefix (std::string &common_prefix)
{
//arg_sstr_collection::iterator pos, end = m_args.end();
- int pos = 0;
- int end = m_strings.size();
+ size_t pos = 0;
+ size_t end = m_strings.size();
if (pos == end)
common_prefix.clear();
Modified: lldb/trunk/source/Core/UUID.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/UUID.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Core/UUID.cpp (original)
+++ lldb/trunk/source/Core/UUID.cpp Fri Jan 25 12:06:21 2013
@@ -178,7 +178,7 @@
while (isspace(*p))
++p;
- const uint32_t uuid_byte_idx = UUID::DecodeUUIDBytesFromCString (p, m_uuid, &p);
+ const size_t uuid_byte_idx = UUID::DecodeUUIDBytesFromCString (p, m_uuid, &p);
// If we successfully decoded a UUID, return the amount of characters that
// were consumed
Modified: lldb/trunk/source/Core/VMRange.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/VMRange.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Core/VMRange.cpp (original)
+++ lldb/trunk/source/Core/VMRange.cpp Fri Jan 25 12:06:21 2013
@@ -40,7 +40,7 @@
return false;
}
-uint32_t
+size_t
VMRange::FindRangeIndexThatContainsValue (const VMRange::collection& coll, lldb::addr_t value)
{
ValueInRangeUnaryPredicate in_range_predicate(value);
Modified: lldb/trunk/source/Core/Value.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Value.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Core/Value.cpp (original)
+++ lldb/trunk/source/Core/Value.cpp Fri Jan 25 12:06:21 2013
@@ -144,7 +144,7 @@
}
void
-Value::ResizeData(int len)
+Value::ResizeData(size_t len)
{
m_value_type = eValueTypeHostAddress;
m_data_buffer.SetByteSize(len);
@@ -560,7 +560,7 @@
}
// If we got here, we need to read the value from memory
- uint32_t byte_size = GetValueByteSize (ast_context, &error);
+ size_t byte_size = GetValueByteSize (ast_context, &error);
// Bail if we encountered any errors getting the byte size
if (error.Fail())
Modified: lldb/trunk/source/Core/ValueObject.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ValueObject.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Core/ValueObject.cpp (original)
+++ lldb/trunk/source/Core/ValueObject.cpp Fri Jan 25 12:06:21 2013
@@ -510,7 +510,7 @@
}
ValueObjectSP
-ValueObject::GetChildAtIndex (uint32_t idx, bool can_create)
+ValueObject::GetChildAtIndex (size_t idx, bool can_create)
{
ValueObjectSP child_sp;
// We may need to update our value if we are dynamic
@@ -534,13 +534,13 @@
}
ValueObjectSP
-ValueObject::GetChildAtIndexPath (const std::initializer_list<uint32_t>& idxs,
- uint32_t* index_of_error)
+ValueObject::GetChildAtIndexPath (const std::initializer_list<size_t>& idxs,
+ size_t* index_of_error)
{
if (idxs.size() == 0)
return GetSP();
ValueObjectSP root(GetSP());
- for (uint32_t idx : idxs)
+ for (size_t idx : idxs)
{
root = root->GetChildAtIndex(idx, true);
if (!root)
@@ -554,13 +554,13 @@
}
ValueObjectSP
-ValueObject::GetChildAtIndexPath (const std::initializer_list< std::pair<uint32_t, bool> >& idxs,
- uint32_t* index_of_error)
+ValueObject::GetChildAtIndexPath (const std::initializer_list< std::pair<size_t, bool> >& idxs,
+ size_t* index_of_error)
{
if (idxs.size() == 0)
return GetSP();
ValueObjectSP root(GetSP());
- for (std::pair<uint32_t, bool> idx : idxs)
+ for (std::pair<size_t, bool> idx : idxs)
{
root = root->GetChildAtIndex(idx.first, idx.second);
if (!root)
@@ -574,13 +574,13 @@
}
lldb::ValueObjectSP
-ValueObject::GetChildAtIndexPath (const std::vector<uint32_t> &idxs,
- uint32_t* index_of_error)
+ValueObject::GetChildAtIndexPath (const std::vector<size_t> &idxs,
+ size_t* index_of_error)
{
if (idxs.size() == 0)
return GetSP();
ValueObjectSP root(GetSP());
- for (uint32_t idx : idxs)
+ for (size_t idx : idxs)
{
root = root->GetChildAtIndex(idx, true);
if (!root)
@@ -594,13 +594,13 @@
}
lldb::ValueObjectSP
-ValueObject::GetChildAtIndexPath (const std::vector< std::pair<uint32_t, bool> > &idxs,
- uint32_t* index_of_error)
+ValueObject::GetChildAtIndexPath (const std::vector< std::pair<size_t, bool> > &idxs,
+ size_t* index_of_error)
{
if (idxs.size() == 0)
return GetSP();
ValueObjectSP root(GetSP());
- for (std::pair<uint32_t, bool> idx : idxs)
+ for (std::pair<size_t, bool> idx : idxs)
{
root = root->GetChildAtIndex(idx.first, idx.second);
if (!root)
@@ -613,7 +613,7 @@
return root;
}
-uint32_t
+size_t
ValueObject::GetIndexOfChildWithName (const ConstString &name)
{
bool omit_empty_base_classes = true;
@@ -668,7 +668,7 @@
}
-uint32_t
+size_t
ValueObject::GetNumChildren ()
{
UpdateValueIfNeeded();
@@ -703,7 +703,7 @@
// Should only be called by ValueObject::GetNumChildren()
void
-ValueObject::SetNumChildren (uint32_t num_children)
+ValueObject::SetNumChildren (size_t num_children)
{
m_children_count_valid = true;
m_children.SetChildrenCount(num_children);
@@ -716,7 +716,7 @@
}
ValueObject *
-ValueObject::CreateChildAtIndex (uint32_t idx, bool synthetic_array_member, int32_t synthetic_index)
+ValueObject::CreateChildAtIndex (size_t idx, bool synthetic_array_member, int32_t synthetic_index)
{
ValueObject *valobj = NULL;
@@ -1474,10 +1474,10 @@
if ((custom_format == eFormatBytes) ||
(custom_format == eFormatBytesWithASCII))
{
- uint32_t count = GetNumChildren();
+ const size_t count = GetNumChildren();
s << '[';
- for (uint32_t low = 0; low < count; low++)
+ for (size_t low = 0; low < count; low++)
{
if (low)
@@ -1510,12 +1510,12 @@
(custom_format == eFormatVectorOfUInt64) ||
(custom_format == eFormatVectorOfUInt8)) // arrays of bytes, bytes with ASCII or any vector format should be printed directly
{
- uint32_t count = GetNumChildren();
+ const size_t count = GetNumChildren();
Format format = FormatManager::GetSingleItemFormat(custom_format);
s << '[';
- for (uint32_t low = 0; low < count; low++)
+ for (size_t low = 0; low < count; low++)
{
if (low)
@@ -1564,8 +1564,8 @@
bool var_success = false;
{
- const char * return_value;
- std::string alloc_mem;
+ const char *cstr = NULL;
+ StreamString strm;
if (custom_format != eFormatInvalid)
SetFormat(custom_format);
@@ -1573,59 +1573,49 @@
switch(val_obj_display)
{
case eValueObjectRepresentationStyleValue:
- return_value = GetValueAsCString();
+ cstr = GetValueAsCString();
break;
case eValueObjectRepresentationStyleSummary:
- return_value = GetSummaryAsCString();
+ cstr = GetSummaryAsCString();
break;
case eValueObjectRepresentationStyleLanguageSpecific:
- return_value = GetObjectDescription();
+ cstr = GetObjectDescription();
break;
case eValueObjectRepresentationStyleLocation:
- return_value = GetLocationAsCString();
+ cstr = GetLocationAsCString();
break;
case eValueObjectRepresentationStyleChildrenCount:
- {
- alloc_mem.resize(512);
- return_value = &alloc_mem[0];
- int count = GetNumChildren();
- snprintf((char*)return_value, 512, "%d", count);
- }
+ strm.Printf("%zu", GetNumChildren());
+ cstr = strm.GetString().c_str();
break;
case eValueObjectRepresentationStyleType:
- return_value = GetTypeName().AsCString();
+ cstr = GetTypeName().AsCString();
break;
}
- if (!return_value)
+ if (!cstr)
{
if (val_obj_display == eValueObjectRepresentationStyleValue)
- return_value = GetSummaryAsCString();
+ cstr = GetSummaryAsCString();
else if (val_obj_display == eValueObjectRepresentationStyleSummary)
{
if (ClangASTContext::IsAggregateType (GetClangType()) == true)
{
- // this thing has no value, and it seems to have no summary
- // some combination of unitialized data and other factors can also
- // raise this condition, so let's print a nice generic description
- {
- alloc_mem.resize(684);
- return_value = &alloc_mem[0];
- snprintf((char*)return_value, 684, "%s @ %s", GetTypeName().AsCString(), GetLocationAsCString());
- }
+ strm.Printf("%s @ %s", GetTypeName().AsCString(), GetLocationAsCString());
+ cstr = strm.GetString().c_str();
}
else
- return_value = GetValueAsCString();
+ cstr = GetValueAsCString();
}
}
- if (return_value)
- s.PutCString(return_value);
+ if (cstr)
+ s.PutCString(cstr);
else
{
if (m_error.Fail())
@@ -1706,7 +1696,7 @@
case Value::eValueTypeLoadAddress:
case Value::eValueTypeFileAddress:
{
- uint32_t data_offset = 0;
+ lldb::offset_t data_offset = 0;
address = m_data.GetPointer(&data_offset);
}
break;
@@ -1913,7 +1903,7 @@
}
ValueObjectSP
-ValueObject::GetSyntheticArrayMember (int32_t index, bool can_create)
+ValueObject::GetSyntheticArrayMember (size_t index, bool can_create)
{
if (IsArrayType())
return GetSyntheticArrayMemberFromArray(index, can_create);
@@ -1926,13 +1916,13 @@
}
ValueObjectSP
-ValueObject::GetSyntheticArrayMemberFromPointer (int32_t index, bool can_create)
+ValueObject::GetSyntheticArrayMemberFromPointer (size_t index, bool can_create)
{
ValueObjectSP synthetic_child_sp;
if (IsPointerType ())
{
char index_str[64];
- snprintf(index_str, sizeof(index_str), "[%i]", index);
+ snprintf(index_str, sizeof(index_str), "[%zu]", index);
ConstString index_const_str(index_str);
// Check if we have already created a synthetic array member in this
// valid object. If we have we will re-use it.
@@ -1969,13 +1959,13 @@
// there are more items in "item_array".
ValueObjectSP
-ValueObject::GetSyntheticArrayMemberFromArray (int32_t index, bool can_create)
+ValueObject::GetSyntheticArrayMemberFromArray (size_t index, bool can_create)
{
ValueObjectSP synthetic_child_sp;
if (IsArrayType ())
{
char index_str[64];
- snprintf(index_str, sizeof(index_str), "[%i]", index);
+ snprintf(index_str, sizeof(index_str), "[%zu]", index);
ConstString index_const_str(index_str);
// Check if we have already created a synthetic array member in this
// valid object. If we have we will re-use it.
@@ -3057,8 +3047,8 @@
}
else // expand this into list
{
- int max_index = root->GetNumChildren() - 1;
- for (int index = 0; index < max_index; index++)
+ const size_t max_index = root->GetNumChildren() - 1;
+ for (size_t index = 0; index < max_index; index++)
{
ValueObjectSP child =
root->GetChildAtIndex(index, true);
@@ -3094,8 +3084,8 @@
{
if (root_clang_type_info.Test(ClangASTContext::eTypeIsArray))
{
- int max_index = root->GetNumChildren() - 1;
- for (int index = 0; index < max_index; index++)
+ const size_t max_index = root->GetNumChildren() - 1;
+ for (size_t index = 0; index < max_index; index++)
{
ValueObjectSP child =
root->GetChildAtIndex(index, true);
@@ -3467,7 +3457,7 @@
ValueObjectSP synth_valobj_sp = valobj->GetSyntheticValue (options.m_use_synthetic);
synth_valobj = (synth_valobj_sp ? synth_valobj_sp.get() : valobj);
- uint32_t num_children = synth_valobj->GetNumChildren();
+ size_t num_children = synth_valobj->GetNumChildren();
bool print_dotdotdot = false;
if (num_children)
{
@@ -3483,7 +3473,7 @@
s.IndentMore();
}
- uint32_t max_num_children = valobj->GetTargetSP()->GetMaximumNumberOfChildrenToDisplay();
+ const size_t max_num_children = valobj->GetTargetSP()->GetMaximumNumberOfChildrenToDisplay();
if (num_children > max_num_children && !options.m_ignore_cap)
{
@@ -3495,7 +3485,7 @@
child_options.SetFormat(options.m_format).SetSummary().SetRootValueObjectName();
child_options.SetScopeChecked(true)
.SetOmitSummaryDepth(child_options.m_omit_summary_depth > 1 ? child_options.m_omit_summary_depth - 1 : 0);
- for (uint32_t idx=0; idx<num_children; ++idx)
+ for (size_t idx=0; idx<num_children; ++idx)
{
ValueObjectSP child_sp(synth_valobj->GetChildAtIndex(idx, true));
if (child_sp.get())
Modified: lldb/trunk/source/Core/ValueObjectCast.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ValueObjectCast.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Core/ValueObjectCast.cpp (original)
+++ lldb/trunk/source/Core/ValueObjectCast.cpp Fri Jan 25 12:06:21 2013
@@ -67,7 +67,7 @@
return m_cast_type.GetOpaqueQualType();
}
-uint32_t
+size_t
ValueObjectCast::CalculateNumChildren()
{
return ClangASTContext::GetNumChildren (GetClangAST (), GetClangType(), true);
Modified: lldb/trunk/source/Core/ValueObjectChild.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ValueObjectChild.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Core/ValueObjectChild.cpp (original)
+++ lldb/trunk/source/Core/ValueObjectChild.cpp Fri Jan 25 12:06:21 2013
@@ -62,7 +62,7 @@
return m_parent->GetValueType();
}
-uint32_t
+size_t
ValueObjectChild::CalculateNumChildren()
{
return ClangASTContext::GetNumChildren (GetClangAST (), GetClangType(), true);
Modified: lldb/trunk/source/Core/ValueObjectConstResult.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ValueObjectConstResult.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Core/ValueObjectConstResult.cpp (original)
+++ lldb/trunk/source/Core/ValueObjectConstResult.cpp Fri Jan 25 12:06:21 2013
@@ -124,7 +124,7 @@
const ConstString &name,
const lldb::DataBufferSP &data_sp,
lldb::ByteOrder data_byte_order,
- uint8_t data_addr_size,
+ uint32_t data_addr_size,
lldb::addr_t address
)
{
@@ -155,7 +155,7 @@
const ConstString &name,
const lldb::DataBufferSP &data_sp,
lldb::ByteOrder data_byte_order,
- uint8_t data_addr_size,
+ uint32_t data_addr_size,
lldb::addr_t address
) :
ValueObject (exe_scope),
@@ -185,7 +185,7 @@
const ConstString &name,
lldb::addr_t address,
AddressType address_type,
- uint8_t addr_byte_size
+ uint32_t addr_byte_size
)
{
return (new ValueObjectConstResult (exe_scope,
@@ -205,7 +205,7 @@
const ConstString &name,
lldb::addr_t address,
AddressType address_type,
- uint8_t addr_byte_size
+ uint32_t addr_byte_size
) :
ValueObject (exe_scope),
m_clang_ast (clang_ast),
@@ -300,7 +300,7 @@
m_byte_size = size;
}
-uint32_t
+size_t
ValueObjectConstResult::CalculateNumChildren()
{
return ClangASTContext::GetNumChildren (GetClangAST (), GetClangType(), true);
@@ -363,7 +363,7 @@
}
ValueObject *
-ValueObjectConstResult::CreateChildAtIndex (uint32_t idx, bool synthetic_array_member, int32_t synthetic_index)
+ValueObjectConstResult::CreateChildAtIndex (size_t idx, bool synthetic_array_member, int32_t synthetic_index)
{
return m_impl.CreateChildAtIndex(idx, synthetic_array_member, synthetic_index);
}
Modified: lldb/trunk/source/Core/ValueObjectConstResultChild.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ValueObjectConstResultChild.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Core/ValueObjectConstResultChild.cpp (original)
+++ lldb/trunk/source/Core/ValueObjectConstResultChild.cpp Fri Jan 25 12:06:21 2013
@@ -68,7 +68,7 @@
}
ValueObject *
-ValueObjectConstResultChild::CreateChildAtIndex (uint32_t idx, bool synthetic_array_member, int32_t synthetic_index)
+ValueObjectConstResultChild::CreateChildAtIndex (size_t idx, bool synthetic_array_member, int32_t synthetic_index)
{
return m_impl.CreateChildAtIndex(idx, synthetic_array_member, synthetic_index);
}
Modified: lldb/trunk/source/Core/ValueObjectConstResultImpl.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ValueObjectConstResultImpl.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Core/ValueObjectConstResultImpl.cpp (original)
+++ lldb/trunk/source/Core/ValueObjectConstResultImpl.cpp Fri Jan 25 12:06:21 2013
@@ -84,7 +84,7 @@
}
ValueObject *
-ValueObjectConstResultImpl::CreateChildAtIndex (uint32_t idx, bool synthetic_array_member, int32_t synthetic_index)
+ValueObjectConstResultImpl::CreateChildAtIndex (size_t idx, bool synthetic_array_member, int32_t synthetic_index)
{
if (m_impl_backend == NULL)
return NULL;
Modified: lldb/trunk/source/Core/ValueObjectDynamicValue.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ValueObjectDynamicValue.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Core/ValueObjectDynamicValue.cpp (original)
+++ lldb/trunk/source/Core/ValueObjectDynamicValue.cpp Fri Jan 25 12:06:21 2013
@@ -87,7 +87,7 @@
return m_parent->GetTypeName();
}
-uint32_t
+size_t
ValueObjectDynamicValue::CalculateNumChildren()
{
const bool success = UpdateValueIfNeeded(false);
Modified: lldb/trunk/source/Core/ValueObjectList.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ValueObjectList.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Core/ValueObjectList.cpp (original)
+++ lldb/trunk/source/Core/ValueObjectList.cpp Fri Jan 25 12:06:21 2013
@@ -61,20 +61,20 @@
}
-uint32_t
+size_t
ValueObjectList::GetSize() const
{
return m_value_objects.size();
}
void
-ValueObjectList::Resize (uint32_t size)
+ValueObjectList::Resize (size_t size)
{
m_value_objects.resize (size);
}
lldb::ValueObjectSP
-ValueObjectList::GetValueObjectAtIndex (uint32_t idx)
+ValueObjectList::GetValueObjectAtIndex (size_t idx)
{
lldb::ValueObjectSP valobj_sp;
if (idx < m_value_objects.size())
@@ -83,7 +83,7 @@
}
lldb::ValueObjectSP
-ValueObjectList::RemoveValueObjectAtIndex (uint32_t idx)
+ValueObjectList::RemoveValueObjectAtIndex (size_t idx)
{
lldb::ValueObjectSP valobj_sp;
if (idx < m_value_objects.size())
@@ -95,7 +95,7 @@
}
void
-ValueObjectList::SetValueObjectAtIndex (uint32_t idx, const ValueObjectSP &valobj_sp)
+ValueObjectList::SetValueObjectAtIndex (size_t idx, const ValueObjectSP &valobj_sp)
{
if (idx >= m_value_objects.size())
m_value_objects.resize (idx + 1);
Modified: lldb/trunk/source/Core/ValueObjectMemory.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ValueObjectMemory.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Core/ValueObjectMemory.cpp (original)
+++ lldb/trunk/source/Core/ValueObjectMemory.cpp Fri Jan 25 12:06:21 2013
@@ -146,7 +146,7 @@
return ClangASTType::GetConstTypeName (GetClangAST(), m_clang_type.GetOpaqueQualType());
}
-uint32_t
+size_t
ValueObjectMemory::CalculateNumChildren()
{
if (m_type_sp)
Modified: lldb/trunk/source/Core/ValueObjectRegister.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ValueObjectRegister.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Core/ValueObjectRegister.cpp (original)
+++ lldb/trunk/source/Core/ValueObjectRegister.cpp Fri Jan 25 12:06:21 2013
@@ -60,7 +60,7 @@
return ConstString();
}
-uint32_t
+size_t
ValueObjectRegisterContext::CalculateNumChildren()
{
return m_reg_ctx_sp->GetRegisterSetCount();
@@ -101,11 +101,11 @@
}
ValueObject *
-ValueObjectRegisterContext::CreateChildAtIndex (uint32_t idx, bool synthetic_array_member, int32_t synthetic_index)
+ValueObjectRegisterContext::CreateChildAtIndex (size_t idx, bool synthetic_array_member, int32_t synthetic_index)
{
ValueObject *new_valobj = NULL;
- const uint32_t num_children = GetNumChildren();
+ const size_t num_children = GetNumChildren();
if (idx < num_children)
{
ExecutionContext exe_ctx(GetExecutionContextRef());
@@ -162,7 +162,7 @@
return ConstString();
}
-uint32_t
+size_t
ValueObjectRegisterSet::CalculateNumChildren()
{
const RegisterSet *reg_set = m_reg_ctx_sp->GetRegisterSet(m_reg_set_idx);
@@ -222,12 +222,12 @@
ValueObject *
-ValueObjectRegisterSet::CreateChildAtIndex (uint32_t idx, bool synthetic_array_member, int32_t synthetic_index)
+ValueObjectRegisterSet::CreateChildAtIndex (size_t idx, bool synthetic_array_member, int32_t synthetic_index)
{
ValueObject *valobj = NULL;
if (m_reg_ctx_sp && m_reg_set)
{
- const uint32_t num_children = GetNumChildren();
+ const size_t num_children = GetNumChildren();
if (idx < num_children)
valobj = new ValueObjectRegister(*this, m_reg_ctx_sp, m_reg_set->registers[idx]);
}
@@ -250,7 +250,7 @@
return ValueObjectSP();
}
-uint32_t
+size_t
ValueObjectRegisterSet::GetIndexOfChildWithName (const ConstString &name)
{
if (m_reg_ctx_sp && m_reg_set)
@@ -341,7 +341,7 @@
return m_type_name;
}
-uint32_t
+size_t
ValueObjectRegister::CalculateNumChildren()
{
return 0;
Modified: lldb/trunk/source/Core/ValueObjectSyntheticFilter.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ValueObjectSyntheticFilter.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Core/ValueObjectSyntheticFilter.cpp (original)
+++ lldb/trunk/source/Core/ValueObjectSyntheticFilter.cpp Fri Jan 25 12:06:21 2013
@@ -27,14 +27,14 @@
SyntheticChildrenFrontEnd(backend)
{}
- uint32_t
+ size_t
CalculateNumChildren()
{
return 0;
}
lldb::ValueObjectSP
- GetChildAtIndex (uint32_t idx)
+ GetChildAtIndex (size_t idx)
{
return lldb::ValueObjectSP();
}
@@ -95,7 +95,7 @@
return m_parent->GetTypeName();
}
-uint32_t
+size_t
ValueObjectSynthetic::CalculateNumChildren()
{
UpdateValueIfNeeded();
@@ -183,7 +183,7 @@
}
lldb::ValueObjectSP
-ValueObjectSynthetic::GetChildAtIndex (uint32_t idx, bool can_create)
+ValueObjectSynthetic::GetChildAtIndex (size_t idx, bool can_create)
{
UpdateValueIfNeeded();
@@ -219,7 +219,7 @@
return GetChildAtIndex(index, can_create);
}
-uint32_t
+size_t
ValueObjectSynthetic::GetIndexOfChildWithName (const ConstString &name)
{
UpdateValueIfNeeded();
Modified: lldb/trunk/source/Core/ValueObjectVariable.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ValueObjectVariable.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Core/ValueObjectVariable.cpp (original)
+++ lldb/trunk/source/Core/ValueObjectVariable.cpp Fri Jan 25 12:06:21 2013
@@ -80,7 +80,7 @@
return ConstString();
}
-uint32_t
+size_t
ValueObjectVariable::CalculateNumChildren()
{
ClangASTType type(GetClangAST(),
Modified: lldb/trunk/source/Expression/ClangASTSource.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/ClangASTSource.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Expression/ClangASTSource.cpp (original)
+++ lldb/trunk/source/Expression/ClangASTSource.cpp Fri Jan 25 12:06:21 2013
@@ -615,9 +615,7 @@
const ModuleList &target_images = m_target->GetImages();
Mutex::Locker modules_locker (target_images.GetMutex());
- for (uint32_t i = 0, e = target_images.GetSize();
- i != e;
- ++i)
+ for (size_t i = 0, e = target_images.GetSize(); i < e; ++i)
{
lldb::ModuleSP image = target_images.GetModuleAtIndexUnlocked(i);
@@ -1602,9 +1600,7 @@
ClangNamespaceDecl null_namespace_decl;
- for (uint32_t i = 0, e = target_images.GetSize();
- i != e;
- ++i)
+ for (size_t i = 0, e = target_images.GetSize(); i < e; ++i)
{
lldb::ModuleSP image = target_images.GetModuleAtIndexUnlocked(i);
Modified: lldb/trunk/source/Expression/ClangExpressionParser.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/ClangExpressionParser.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Expression/ClangExpressionParser.cpp (original)
+++ lldb/trunk/source/Expression/ClangExpressionParser.cpp Fri Jan 25 12:06:21 2013
@@ -809,7 +809,7 @@
InstructionList &instruction_list = disassembler->GetInstructionList();
const uint32_t max_opcode_byte_size = instruction_list.GetMaxOpcocdeByteSize();
- for (uint32_t instruction_index = 0, num_instructions = instruction_list.GetSize();
+ for (size_t instruction_index = 0, num_instructions = instruction_list.GetSize();
instruction_index < num_instructions;
++instruction_index)
{
Modified: lldb/trunk/source/Expression/ClangFunction.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/ClangFunction.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Expression/ClangFunction.cpp (original)
+++ lldb/trunk/source/Expression/ClangFunction.cpp Fri Jan 25 12:06:21 2013
@@ -136,7 +136,7 @@
// to pull the defined arguments out of the function, then add the types from the
// arguments list for the variable arguments.
- uint32_t num_args = UINT32_MAX;
+ size_t num_args = UINT32_MAX;
bool trust_function = false;
// GetArgumentCount returns -1 for an unprototyped function.
if (m_function_ptr)
@@ -338,7 +338,7 @@
// TODO: verify fun_addr needs to be a callable address
Scalar fun_addr (function_address.GetCallableLoadAddress(exe_ctx.GetTargetPtr()));
- int first_offset = m_member_offsets[0];
+ uint64_t first_offset = m_member_offsets[0];
process->WriteScalarToMemory(args_addr_ref + first_offset, fun_addr, process->GetAddressByteSize(), error);
// FIXME: We will need to extend this for Variadic functions.
@@ -356,7 +356,7 @@
{
// FIXME: We should sanity check sizes.
- int offset = m_member_offsets[i+1]; // Clang sizes are in bytes.
+ uint64_t offset = m_member_offsets[i+1]; // Clang sizes are in bytes.
Value *arg_value = arg_values.GetValueAtIndex(i);
// FIXME: For now just do scalars:
Modified: lldb/trunk/source/Expression/DWARFExpression.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/DWARFExpression.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Expression/DWARFExpression.cpp (original)
+++ lldb/trunk/source/Expression/DWARFExpression.cpp Fri Jan 25 12:06:21 2013
@@ -233,7 +233,7 @@
}
-DWARFExpression::DWARFExpression(const DataExtractor& data, uint32_t data_offset, uint32_t data_length) :
+DWARFExpression::DWARFExpression(const DataExtractor& data, lldb::offset_t data_offset, lldb::offset_t data_length) :
m_data(data, data_offset, data_length),
m_reg_kind (eRegisterKindDWARF),
m_loclist_slide(LLDB_INVALID_ADDRESS)
@@ -261,7 +261,7 @@
}
void
-DWARFExpression::CopyOpcodeData (const DataExtractor& data, uint32_t data_offset, uint32_t data_length)
+DWARFExpression::CopyOpcodeData (const DataExtractor& data, lldb::offset_t data_offset, lldb::offset_t data_length)
{
const uint8_t *bytes = data.PeekData(data_offset, data_length);
if (bytes)
@@ -273,21 +273,21 @@
}
void
-DWARFExpression::SetOpcodeData (const DataExtractor& data, uint32_t data_offset, uint32_t data_length)
+DWARFExpression::SetOpcodeData (const DataExtractor& data, lldb::offset_t data_offset, lldb::offset_t data_length)
{
m_data.SetData(data, data_offset, data_length);
}
void
-DWARFExpression::DumpLocation (Stream *s, uint32_t offset, uint32_t length, lldb::DescriptionLevel level, ABI *abi) const
+DWARFExpression::DumpLocation (Stream *s, lldb::offset_t offset, lldb::offset_t length, lldb::DescriptionLevel level, ABI *abi) const
{
if (!m_data.ValidOffsetForDataOfSize(offset, length))
return;
- const uint32_t start_offset = offset;
- const uint32_t end_offset = offset + length;
+ const lldb::offset_t start_offset = offset;
+ const lldb::offset_t end_offset = offset + length;
while (m_data.ValidOffset(offset) && offset < end_offset)
{
- const uint32_t op_offset = offset;
+ const lldb::offset_t op_offset = offset;
const uint8_t op = m_data.GetU8(&offset);
switch (level)
@@ -308,7 +308,7 @@
if (level == lldb::eDescriptionLevelFull)
break;
// Fall through for verbose and print offset and DW_OP prefix..
- s->Printf("0x%8.8x: %s", op_offset, op >= DW_OP_APPLE_uninit ? "DW_OP_APPLE_" : "DW_OP_");
+ s->Printf("0x%8.8" PRIx64 ": %s", op_offset, op >= DW_OP_APPLE_uninit ? "DW_OP_APPLE_" : "DW_OP_");
break;
}
@@ -506,7 +506,7 @@
case DW_OP_regx: // 0x90 1 ULEB128 register
{
- uint64_t reg_num = m_data.GetULEB128(&offset);
+ uint32_t reg_num = m_data.GetULEB128(&offset);
if (abi)
{
RegisterInfo reg_info;
@@ -524,7 +524,7 @@
}
}
}
- s->Printf("DW_OP_regx(%" PRIu64 ")", reg_num); break;
+ s->Printf("DW_OP_regx(%" PRIu32 ")", reg_num); break;
}
break;
case DW_OP_fbreg: // 0x91 1 SLEB128 offset
@@ -551,7 +551,7 @@
}
}
}
- s->Printf("DW_OP_bregx(reg=%u,offset=%" PRIi64 ")", reg_num, reg_offset);
+ s->Printf("DW_OP_bregx(reg=%" PRIu32 ",offset=%" PRIi64 ")", reg_num, reg_offset);
}
break;
case DW_OP_piece: // 0x93 1 ULEB128 size of piece addressed
@@ -664,7 +664,7 @@
if (IsLocationList())
{
// We have a location list
- uint32_t offset = 0;
+ lldb::offset_t offset = 0;
uint32_t count = 0;
addr_t curr_base_addr = location_list_base_addr;
while (m_data.ValidOffset(offset))
@@ -678,7 +678,7 @@
VMRange addr_range(curr_base_addr + begin_addr_offset, curr_base_addr + end_addr_offset);
addr_range.Dump(s, 0, 8);
s->PutChar('{');
- uint32_t location_length = m_data.GetU16(&offset);
+ lldb::offset_t location_length = m_data.GetU16(&offset);
DumpLocation (s, offset, location_length, level, abi);
s->PutChar('}');
offset += location_length;
@@ -782,7 +782,7 @@
//
// if (IsLocationList())
// {
-// uint32_t offset = 0;
+// lldb::offset_t offset = 0;
//
// addr_t loc_list_base_addr = m_loclist_slide.GetLoadAddress(process);
//
@@ -811,10 +811,10 @@
// return false;
//}
-static uint32_t
-GetOpcodeDataSize (const DataExtractor &data, const uint32_t data_offset, const uint8_t op)
+static offset_t
+GetOpcodeDataSize (const DataExtractor &data, const lldb::offset_t data_offset, const uint8_t op)
{
- uint32_t offset = data_offset;
+ lldb::offset_t offset = data_offset;
switch (op)
{
case DW_OP_addr:
@@ -1006,7 +1006,7 @@
default:
break;
}
- return UINT32_MAX;
+ return LLDB_INVALID_OFFSET;
}
bool
@@ -1015,7 +1015,7 @@
error = false;
if (IsLocationList())
return false;
- uint32_t offset = 0;
+ lldb::offset_t offset = 0;
while (m_data.ValidOffset(offset))
{
const uint8_t op = m_data.GetU8(&offset);
@@ -1030,8 +1030,8 @@
}
else
{
- const uint32_t op_arg_size = GetOpcodeDataSize (m_data, offset, op);
- if (op_arg_size == UINT32_MAX)
+ const offset_t op_arg_size = GetOpcodeDataSize (m_data, offset, op);
+ if (op_arg_size == LLDB_INVALID_OFFSET)
{
error = true;
break;
@@ -1047,14 +1047,14 @@
{
if (IsLocationList())
return false;
- uint32_t offset = 0;
+ lldb::offset_t offset = 0;
while (m_data.ValidOffset(offset))
{
const uint8_t op = m_data.GetU8(&offset);
if (op == DW_OP_addr)
{
- const uint8_t addr_byte_size = m_data.GetAddressByteSize();
+ const uint32_t addr_byte_size = m_data.GetAddressByteSize();
// We have to make a copy of the data as we don't know if this
// data is from a read only memory mapped buffer, so we duplicate
// all of the data first, then modify it, and if all goes well,
@@ -1083,8 +1083,8 @@
}
else
{
- const uint32_t op_arg_size = GetOpcodeDataSize (m_data, offset, op);
- if (op_arg_size == UINT32_MAX)
+ const offset_t op_arg_size = GetOpcodeDataSize (m_data, offset, op);
+ if (op_arg_size == LLDB_INVALID_OFFSET)
break;
offset += op_arg_size;
}
@@ -1100,7 +1100,7 @@
if (IsLocationList())
{
- uint32_t offset = 0;
+ lldb::offset_t offset = 0;
if (loclist_base_addr == LLDB_INVALID_ADDRESS)
return false;
@@ -1128,7 +1128,7 @@
}
bool
-DWARFExpression::GetLocation (addr_t base_addr, addr_t pc, uint32_t &offset, uint32_t &length)
+DWARFExpression::GetLocation (addr_t base_addr, addr_t pc, lldb::offset_t &offset, lldb::offset_t &length)
{
offset = 0;
if (!IsLocationList())
@@ -1164,7 +1164,7 @@
}
}
}
- offset = UINT32_MAX;
+ offset = LLDB_INVALID_OFFSET;
length = 0;
return false;
}
@@ -1176,8 +1176,8 @@
addr_t address,
ABI *abi)
{
- uint32_t offset = 0;
- uint32_t length = 0;
+ lldb::offset_t offset = 0;
+ lldb::offset_t length = 0;
if (GetLocation (base_addr, address, offset, length))
{
@@ -1223,7 +1223,7 @@
{
if (IsLocationList())
{
- uint32_t offset = 0;
+ lldb::offset_t offset = 0;
addr_t pc;
StackFrame *frame = NULL;
if (reg_ctx)
@@ -1294,8 +1294,8 @@
ClangExpressionDeclMap *decl_map,
RegisterContext *reg_ctx,
const DataExtractor& opcodes,
- const uint32_t opcodes_offset,
- const uint32_t opcodes_length,
+ const lldb::offset_t opcodes_offset,
+ const lldb::offset_t opcodes_length,
const uint32_t reg_kind,
const Value* initial_value_ptr,
Value& result,
@@ -1318,8 +1318,8 @@
if (initial_value_ptr)
stack.push_back(*initial_value_ptr);
- uint32_t offset = opcodes_offset;
- const uint32_t end_offset = opcodes_offset + opcodes_length;
+ lldb::offset_t offset = opcodes_offset;
+ const lldb::offset_t end_offset = opcodes_offset + opcodes_length;
Value tmp;
uint32_t reg_num;
@@ -1335,7 +1335,7 @@
while (opcodes.ValidOffset(offset) && offset < end_offset)
{
- const uint32_t op_offset = offset;
+ const lldb::offset_t op_offset = offset;
const uint8_t op = opcodes.GetU8(&offset);
if (log && log->GetVerbose())
@@ -1349,7 +1349,7 @@
stack[i].Dump(&new_value);
log->Printf(" %s", new_value.GetData());
}
- log->Printf("0x%8.8x: %s", op_offset, DW_OP_value_to_name(op));
+ log->Printf("0x%8.8" PRIx64 ": %s", op_offset, DW_OP_value_to_name(op));
}
switch (op)
{
@@ -1431,7 +1431,7 @@
if (process->ReadMemory(pointer_addr, &addr_bytes, addr_size, error) == addr_size)
{
DataExtractor addr_data(addr_bytes, sizeof(addr_bytes), process->GetByteOrder(), addr_size);
- uint32_t addr_data_offset = 0;
+ lldb::offset_t addr_data_offset = 0;
stack.back().GetScalar() = addr_data.GetPointer(&addr_data_offset);
stack.back().ClearContext();
}
@@ -1522,7 +1522,7 @@
if (process->ReadMemory(pointer_addr, &addr_bytes, size, error) == size)
{
DataExtractor addr_data(addr_bytes, sizeof(addr_bytes), process->GetByteOrder(), size);
- uint32_t addr_data_offset = 0;
+ lldb::offset_t addr_data_offset = 0;
switch (size)
{
case 1: stack.back().GetScalar() = addr_data.GetU8(&addr_data_offset); break;
@@ -1996,7 +1996,7 @@
}
else
{
- uint32_t uconst_value = opcodes.GetULEB128(&offset);
+ const uint64_t uconst_value = opcodes.GetULEB128(&offset);
// Implicit conversion from a UINT to a Scalar...
stack.back().ResolveValue(exe_ctx, ast_context) += uconst_value;
if (!stack.back().ResolveValue(exe_ctx, ast_context).IsValid())
@@ -2113,7 +2113,7 @@
case DW_OP_skip:
{
int16_t skip_offset = (int16_t)opcodes.GetU16(&offset);
- uint32_t new_offset = offset + skip_offset;
+ lldb::offset_t new_offset = offset + skip_offset;
if (new_offset >= opcodes_offset && new_offset < end_offset)
offset = new_offset;
else
@@ -2143,7 +2143,7 @@
Scalar zero(0);
if (tmp.ResolveValue(exe_ctx, ast_context) != zero)
{
- uint32_t new_offset = offset + bra_offset;
+ lldb::offset_t new_offset = offset + bra_offset;
if (new_offset >= opcodes_offset && new_offset < end_offset)
offset = new_offset;
else
Modified: lldb/trunk/source/Expression/IRInterpreter.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/IRInterpreter.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Expression/IRInterpreter.cpp (original)
+++ lldb/trunk/source/Expression/IRInterpreter.cpp Fri Jan 25 12:06:21 2013
@@ -506,7 +506,7 @@
size_t value_size = m_target_data.getTypeStoreSize(value->getType());
- uint32_t offset = 0;
+ lldb::offset_t offset = 0;
uint64_t u64value = value_extractor->GetMaxU64(&offset, value_size);
return AssignToMatchType(scalar, u64value, value->getType());
@@ -885,7 +885,7 @@
return false;
Type *R_ty = pointer_ptr_ty->getElementType();
- uint32_t offset = 0;
+ lldb::offset_t offset = 0;
lldb::addr_t pointer = P_extractor->GetAddress(&offset);
Memory::Region R = m_memory.Lookup(pointer, R_ty);
@@ -1693,7 +1693,7 @@
DataExtractorSP P_extractor(memory.GetExtractor(P));
DataEncoderSP D_encoder(memory.GetEncoder(D));
- uint32_t offset = 0;
+ lldb::offset_t offset = 0;
lldb::addr_t pointer = P_extractor->GetAddress(&offset);
Memory::Region R = memory.Lookup(pointer, target_ty);
@@ -1806,7 +1806,7 @@
if (!P_extractor || !D_extractor)
return false;
- uint32_t offset = 0;
+ lldb::offset_t offset = 0;
lldb::addr_t pointer = P_extractor->GetAddress(&offset);
Memory::Region R = memory.Lookup(pointer, target_ty);
Modified: lldb/trunk/source/Host/common/File.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/File.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Host/common/File.cpp (original)
+++ lldb/trunk/source/Host/common/File.cpp Fri Jan 25 12:06:21 2013
@@ -625,12 +625,12 @@
//------------------------------------------------------------------
// Print some formatted output to the stream.
//------------------------------------------------------------------
-int
+size_t
File::Printf (const char *format, ...)
{
va_list args;
va_start (args, format);
- int result = PrintfVarArg (format, args);
+ size_t result = PrintfVarArg (format, args);
va_end (args);
return result;
}
@@ -638,10 +638,10 @@
//------------------------------------------------------------------
// Print some formatted output to the stream.
//------------------------------------------------------------------
-int
+size_t
File::PrintfVarArg (const char *format, va_list args)
{
- int result = 0;
+ size_t result = 0;
if (DescriptorIsValid())
{
char *s = NULL;
Modified: lldb/trunk/source/Host/common/FileSpec.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/FileSpec.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Host/common/FileSpec.cpp (original)
+++ lldb/trunk/source/Host/common/FileSpec.cpp Fri Jan 25 12:06:21 2013
@@ -110,7 +110,7 @@
}
else
{
- int user_name_len = first_slash - src_path - 1;
+ size_t user_name_len = first_slash - src_path - 1;
::memcpy (user_home, src_path + 1, user_name_len);
user_home[user_name_len] = '\0';
user_name = user_home;
Modified: lldb/trunk/source/Host/macosx/Host.mm
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/macosx/Host.mm?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Host/macosx/Host.mm (original)
+++ lldb/trunk/source/Host/macosx/Host.mm Fri Jan 25 12:06:21 2013
@@ -1079,7 +1079,7 @@
if (::sysctl (proc_args_mib, 3, arg_data, &arg_data_size , NULL, 0) == 0)
{
DataExtractor data (arg_data, arg_data_size, lldb::endian::InlHostByteOrder(), sizeof(void *));
- uint32_t offset = 0;
+ lldb::offset_t offset = 0;
uint32_t argc = data.GetU32 (&offset);
const char *cstr;
Modified: lldb/trunk/source/Host/macosx/Symbols.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/macosx/Symbols.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Host/macosx/Symbols.cpp (original)
+++ lldb/trunk/source/Host/macosx/Symbols.cpp Fri Jan 25 12:06:21 2013
@@ -58,7 +58,7 @@
const lldb_private::UUID *uuid, // the UUID we are looking for
off_t file_offset,
DataExtractor& data,
- uint32_t data_offset,
+ lldb::offset_t data_offset,
const uint32_t magic
)
{
@@ -116,7 +116,7 @@
for (i=0; i<ncmds; i++)
{
- const uint32_t cmd_offset = data_offset; // Save this data_offset in case parsing of the segment goes awry!
+ const lldb::offset_t cmd_offset = data_offset; // Save this data_offset in case parsing of the segment goes awry!
uint32_t cmd = data.GetU32(&data_offset);
uint32_t cmd_size = data.GetU32(&data_offset);
if (cmd == LoadCommandUUID)
@@ -151,7 +151,7 @@
const lldb_private::UUID *uuid,
off_t file_offset,
DataExtractor& data,
- uint32_t data_offset,
+ lldb::offset_t data_offset,
const uint32_t magic
)
{
@@ -189,7 +189,7 @@
DataExtractor arch_data;
DataBufferSP data_buffer_sp (file_spec.ReadFileContents (file_offset + arch_offset, 0x1000));
arch_data.SetData(data_buffer_sp);
- uint32_t arch_data_offset = 0;
+ lldb::offset_t arch_data_offset = 0;
uint32_t arch_magic = arch_data.GetU32(&arch_data_offset);
switch (arch_magic)
@@ -222,7 +222,7 @@
{
data.SetData(data_buffer_sp);
- uint32_t data_offset = 0;
+ lldb::offset_t data_offset = 0;
uint32_t magic = data.GetU32(&data_offset);
switch (magic)
@@ -701,7 +701,7 @@
g_dsym_for_uuid_exe_exists = dsym_for_uuid_exe_spec.Exists();
if (!g_dsym_for_uuid_exe_exists)
{
- int bufsize;
+ long bufsize;
if ((bufsize = sysconf(_SC_GETPW_R_SIZE_MAX)) != -1)
{
char buffer[bufsize];
Modified: lldb/trunk/source/Interpreter/Args.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/Args.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/Args.cpp (original)
+++ lldb/trunk/source/Interpreter/Args.cpp Fri Jan 25 12:06:21 2013
@@ -98,15 +98,15 @@
void
Args::Dump (Stream *s)
{
- const int argc = m_argv.size();
- for (int i=0; i<argc; ++i)
+ const size_t argc = m_argv.size();
+ for (size_t i=0; i<argc; ++i)
{
s->Indent();
const char *arg_cstr = m_argv[i];
if (arg_cstr)
- s->Printf("argv[%i]=\"%s\"\n", i, arg_cstr);
+ s->Printf("argv[%zi]=\"%s\"\n", i, arg_cstr);
else
- s->Printf("argv[%i]=NULL\n", i);
+ s->Printf("argv[%zi]=NULL\n", i);
}
s->EOL();
}
@@ -115,8 +115,8 @@
Args::GetCommandString (std::string &command) const
{
command.clear();
- int argc = GetArgumentCount();
- for (int i=0; i<argc; ++i)
+ const size_t argc = GetArgumentCount();
+ for (size_t i=0; i<argc; ++i)
{
if (i > 0)
command += ' ';
@@ -129,7 +129,7 @@
Args::GetQuotedCommandString (std::string &command) const
{
command.clear ();
- size_t argc = GetArgumentCount ();
+ const size_t argc = GetArgumentCount();
for (size_t i = 0; i < argc; ++i)
{
if (i > 0)
@@ -571,7 +571,7 @@
}
void
-Args::SetArguments (int argc, const char **argv)
+Args::SetArguments (size_t argc, const char **argv)
{
// m_argv will be rebuilt in UpdateArgvFromArgs() below, so there is
// no need to clear it here.
@@ -723,11 +723,12 @@
if (s && s[0])
{
char *end = NULL;
- int32_t uval = ::strtol (s, &end, base);
+ const long sval = ::strtol (s, &end, base);
if (*end == '\0')
{
- if (success_ptr) *success_ptr = true;
- return uval; // All characters were used, return the result
+ if (success_ptr)
+ *success_ptr = ((sval <= INT32_MAX) && (sval >= INT32_MIN));
+ return (int32_t)sval; // All characters were used, return the result
}
}
if (success_ptr) *success_ptr = false;
@@ -740,11 +741,12 @@
if (s && s[0])
{
char *end = NULL;
- uint32_t uval = ::strtoul (s, &end, base);
+ const unsigned long uval = ::strtoul (s, &end, base);
if (*end == '\0')
{
- if (success_ptr) *success_ptr = true;
- return uval; // All characters were used, return the result
+ if (success_ptr)
+ *success_ptr = (uval <= UINT32_MAX);
+ return (uint32_t)uval; // All characters were used, return the result
}
}
if (success_ptr) *success_ptr = false;
@@ -941,8 +943,7 @@
if (s && s[0])
{
char *pos = NULL;
- uint32_t uval32;
- uval32 = ::strtoul (s, &pos, 0);
+ unsigned long uval32 = ::strtoul (s, &pos, 0);
if (pos == s)
return s;
major = uval32;
@@ -992,7 +993,7 @@
}
-int32_t
+int64_t
Args::StringToOptionEnum (const char *s, OptionEnumValueElement *enum_values, int32_t fail_value, Error &error)
{
if (enum_values)
@@ -1052,7 +1053,7 @@
(
const char *s,
lldb::Format &format,
- uint32_t *byte_size_ptr
+ size_t *byte_size_ptr
)
{
format = eFormatInvalid;
@@ -1674,8 +1675,7 @@
unsigned long octal_value = ::strtoul (oct_str, NULL, 8);
if (octal_value <= UINT8_MAX)
{
- const char octal_char = octal_value;
- dst.append(1, octal_char);
+ dst.append(1, (char)octal_value);
}
}
break;
Modified: lldb/trunk/source/Interpreter/CommandInterpreter.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/CommandInterpreter.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/CommandInterpreter.cpp (original)
+++ lldb/trunk/source/Interpreter/CommandInterpreter.cpp Fri Jan 25 12:06:21 2013
@@ -600,7 +600,7 @@
CommandInterpreter::GetCommandSP (const char *cmd_cstr, bool include_aliases, bool exact, StringList *matches)
{
CommandObject::CommandMap::iterator pos;
- CommandObjectSP ret_val;
+ CommandObjectSP command_sp;
std::string cmd(cmd_cstr);
@@ -608,24 +608,24 @@
{
pos = m_command_dict.find(cmd);
if (pos != m_command_dict.end())
- ret_val = pos->second;
+ command_sp = pos->second;
}
if (include_aliases && HasAliases())
{
pos = m_alias_dict.find(cmd);
if (pos != m_alias_dict.end())
- ret_val = pos->second;
+ command_sp = pos->second;
}
if (HasUserCommands())
{
pos = m_user_dict.find(cmd);
if (pos != m_user_dict.end())
- ret_val = pos->second;
+ command_sp = pos->second;
}
- if (!exact && !ret_val)
+ if (!exact && !command_sp)
{
// We will only get into here if we didn't find any exact matches.
@@ -695,13 +695,13 @@
return user_match_sp;
}
}
- else if (matches && ret_val)
+ else if (matches && command_sp)
{
matches->AppendString (cmd_cstr);
}
- return ret_val;
+ return command_sp;
}
bool
@@ -871,7 +871,7 @@
options_string)));
else
{
- int argc = args.GetArgumentCount();
+ const size_t argc = args.GetArgumentCount();
for (size_t i = 0; i < argc; ++i)
if (strcmp (args.GetArgumentAtIndex (i), "") != 0)
option_arg_vector->push_back
@@ -981,7 +981,7 @@
uint32_t cmd_types)
{
CommandObject::CommandMap::const_iterator pos;
- uint32_t max_len = FindLongestCommandWord (m_command_dict);
+ size_t max_len = FindLongestCommandWord (m_command_dict);
if ( (cmd_types & eCommandTypesBuiltin) == eCommandTypesBuiltin )
{
@@ -1595,21 +1595,15 @@
if (cmd_obj == NULL)
{
- uint32_t num_matches = matches.GetSize();
+ const size_t num_matches = matches.GetSize();
if (matches.GetSize() > 1) {
- std::string error_msg;
- error_msg.assign ("Ambiguous command '");
- error_msg.append(next_word.c_str());
- error_msg.append ("'.");
-
- error_msg.append (" Possible matches:");
+ StreamString error_msg;
+ error_msg.Printf ("Ambiguous command '%s'. Possible matches:\n", next_word.c_str());
for (uint32_t i = 0; i < num_matches; ++i) {
- error_msg.append ("\n\t");
- error_msg.append (matches.GetStringAtIndex(i));
+ error_msg.Printf ("\t%s\n", matches.GetStringAtIndex(i));
}
- error_msg.append ("\n");
- result.AppendRawError (error_msg.c_str(), error_msg.size());
+ result.AppendRawError (error_msg.GetString().c_str());
} else {
// We didn't have only one match, otherwise we wouldn't get here.
assert(num_matches == 0);
@@ -1777,7 +1771,7 @@
error_msg.append (matches.GetStringAtIndex (i));
}
error_msg.append ("\n");
- result.AppendRawError (error_msg.c_str(), error_msg.size());
+ result.AppendRawError (error_msg.c_str());
}
else
result.AppendErrorWithFormat ("Unrecognized command '%s'.\n", command_args.GetArgumentAtIndex (0));
@@ -1957,7 +1951,7 @@
std::string common_prefix;
matches.LongestCommonPrefix (common_prefix);
- int partial_name_len = command_partial_str.size();
+ const size_t partial_name_len = command_partial_str.size();
// If we matched a unique single command, add a space...
// Only do this if the completer told us this was a complete word, however...
@@ -2211,7 +2205,7 @@
}
OptionArgVector *option_arg_vector = option_arg_vector_sp.get();
- int old_size = cmd_args.GetArgumentCount();
+ const size_t old_size = cmd_args.GetArgumentCount();
std::vector<bool> used (old_size + 1, false);
used[0] = true;
@@ -2626,7 +2620,7 @@
const char *word_text,
const char *separator,
const char *help_text,
- uint32_t max_word_len)
+ size_t max_word_len)
{
const uint32_t max_columns = m_debugger.GetTerminalWidth();
@@ -2635,7 +2629,7 @@
strm.IndentMore (indent_size);
StreamString text_strm;
- text_strm.Printf ("%-*s %s %s", max_word_len, word_text, separator, help_text);
+ text_strm.Printf ("%-*s %s %s", (int)max_word_len, word_text, separator, help_text);
size_t len = text_strm.GetSize();
const char *text = text_strm.GetData();
@@ -2655,10 +2649,9 @@
// We need to break it up into multiple lines.
bool first_line = true;
int text_width;
- int start = 0;
- int end = start;
- int final_end = strlen (text);
- int sub_len;
+ size_t start = 0;
+ size_t end = start;
+ const size_t final_end = strlen (text);
while (end < final_end)
{
@@ -2686,7 +2679,7 @@
assert (end > 0);
}
- sub_len = end - start;
+ const size_t sub_len = end - start;
if (start != 0)
strm.EOL();
if (!first_line)
@@ -2814,7 +2807,7 @@
if (input_str[1] == '-')
{
bool success;
- uint32_t idx = Args::StringToUInt32 (input_str+2, 0, 0, &success);
+ size_t idx = Args::StringToUInt32 (input_str+2, 0, 0, &success);
if (!success)
return NULL;
if (idx > m_command_history.size())
Modified: lldb/trunk/source/Interpreter/CommandObject.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/CommandObject.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/CommandObject.cpp (original)
+++ lldb/trunk/source/Interpreter/CommandObject.cpp Fri Jan 25 12:06:21 2013
@@ -351,13 +351,9 @@
{
// A NULL or empty string matches everything.
if (m_match_str == NULL || *m_match_str == '\0')
- return 1;
+ return true;
- size_t found = map_element.first.find (m_match_str, 0);
- if (found == std::string::npos)
- return 0;
- else
- return found == 0;
+ return map_element.first.find (m_match_str, 0) == 0;
}
private:
Modified: lldb/trunk/source/Interpreter/CommandReturnObject.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/CommandReturnObject.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/CommandReturnObject.cpp (original)
+++ lldb/trunk/source/Interpreter/CommandReturnObject.cpp Fri Jan 25 12:06:21 2013
@@ -123,13 +123,10 @@
// don't append "\n" to the end of it.
void
-CommandReturnObject::AppendRawWarning (const char *in_string, int len)
+CommandReturnObject::AppendRawWarning (const char *in_string)
{
- if (!in_string)
- return;
- if (len < 0)
- len = ::strlen (in_string);
- GetErrorStream().Printf("%*.*s", len, len, in_string);
+ if (in_string && in_string[0])
+ GetErrorStream().PutCString(in_string);
}
void
@@ -153,13 +150,10 @@
// don't append "\n" to the end of it.
void
-CommandReturnObject::AppendRawError (const char *in_string, int len)
+CommandReturnObject::AppendRawError (const char *in_string)
{
- if (!in_string)
- return;
- if (len < 0)
- len = ::strlen (in_string);
- GetErrorStream().Printf ("%*.*s", len, len, in_string);
+ if (in_string && in_string[0])
+ GetErrorStream().PutCString(in_string);
}
void
Modified: lldb/trunk/source/Interpreter/PythonDataObjects.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/PythonDataObjects.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/PythonDataObjects.cpp (original)
+++ lldb/trunk/source/Interpreter/PythonDataObjects.cpp Fri Jan 25 12:06:21 2013
@@ -316,8 +316,14 @@
if (m_py_obj && key)
{
PyObject *py_obj = PyDict_GetItem(m_py_obj, key.GetPythonObject());
- if (py_obj && PyInt_Check(py_obj))
- return PyInt_AsLong(py_obj);
+ if (py_obj)
+ {
+ if (PyInt_Check(py_obj))
+ return PyInt_AsLong(py_obj);
+
+ if (PyLong_Check(py_obj))
+ return PyLong_AsLong(py_obj);
+ }
}
return fail_value;
}
Modified: lldb/trunk/source/Interpreter/ScriptInterpreterPython.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/ScriptInterpreterPython.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/ScriptInterpreterPython.cpp (original)
+++ lldb/trunk/source/Interpreter/ScriptInterpreterPython.cpp Fri Jan 25 12:06:21 2013
@@ -2360,7 +2360,7 @@
return NULL;
}
-uint32_t
+size_t
ScriptInterpreterPython::CalculateNumChildren (const lldb::ScriptInterpreterObjectSP& implementor_sp)
{
if (!implementor_sp)
Modified: lldb/trunk/source/Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.cpp (original)
+++ lldb/trunk/source/Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.cpp Fri Jan 25 12:06:21 2013
@@ -548,7 +548,7 @@
{
DataExtractor data;
size_t num_bytes = new_value_sp->GetData(data);
- uint32_t offset = 0;
+ lldb::offset_t offset = 0;
if (num_bytes <= 8)
{
const RegisterInfo *r0_info = reg_ctx->GetRegisterInfoByName("r0", 0);
Modified: lldb/trunk/source/Plugins/ABI/MacOSX-i386/ABIMacOSX_i386.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ABI/MacOSX-i386/ABIMacOSX_i386.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ABI/MacOSX-i386/ABIMacOSX_i386.cpp (original)
+++ lldb/trunk/source/Plugins/ABI/MacOSX-i386/ABIMacOSX_i386.cpp Fri Jan 25 12:06:21 2013
@@ -722,7 +722,7 @@
{
DataExtractor data;
size_t num_bytes = new_value_sp->GetData(data);
- uint32_t offset = 0;
+ lldb::offset_t offset = 0;
if (num_bytes <= 8)
{
const RegisterInfo *eax_info = reg_ctx->GetRegisterInfoByName("eax", 0);
Modified: lldb/trunk/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.cpp (original)
+++ lldb/trunk/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.cpp Fri Jan 25 12:06:21 2013
@@ -588,7 +588,7 @@
DataExtractor data;
size_t num_bytes = new_value_sp->GetData(data);
- uint32_t offset = 0;
+ lldb::offset_t offset = 0;
if (num_bytes <= 8)
{
uint64_t raw_value = data.GetMaxU64(&offset, num_bytes);
@@ -727,7 +727,7 @@
DataExtractor data;
if (xmm0_value.GetData(data))
{
- uint32_t offset = 0;
+ lldb::offset_t offset = 0;
switch (bit_width)
{
default:
Modified: lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp (original)
+++ lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp Fri Jan 25 12:06:21 2013
@@ -68,7 +68,7 @@
virtual size_t
Decode (const lldb_private::Disassembler &disassembler,
const lldb_private::DataExtractor &data,
- uint32_t data_offset)
+ lldb::offset_t data_offset)
{
// All we have to do is read the opcode which can be easy for some
// architetures
@@ -239,7 +239,7 @@
m_comment.assign ("unknown opcode");
inst_size = m_opcode.GetByteSize();
StreamString mnemonic_strm;
- uint32_t offset = 0;
+ lldb::offset_t offset = 0;
switch (inst_size)
{
case 1:
@@ -486,8 +486,8 @@
size_t
DisassemblerLLVMC::DecodeInstructions (const Address &base_addr,
const DataExtractor& data,
- uint32_t data_offset,
- uint32_t num_instructions,
+ lldb::offset_t data_offset,
+ size_t num_instructions,
bool append)
{
if (!append)
Modified: lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.h?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.h (original)
+++ lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.h Fri Jan 25 12:06:21 2013
@@ -50,8 +50,8 @@
size_t
DecodeInstructions (const lldb_private::Address &base_addr,
const lldb_private::DataExtractor& data,
- uint32_t data_offset,
- uint32_t num_instructions,
+ lldb::offset_t data_offset,
+ size_t num_instructions,
bool append);
//------------------------------------------------------------------
Modified: lldb/trunk/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp (original)
+++ lldb/trunk/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp Fri Jan 25 12:06:21 2013
@@ -612,7 +612,7 @@
const size_t bytes_read = m_process->GetTarget().ReadMemory (m_kext_summary_header_addr, prefer_file_cache, buf, count, error);
if (bytes_read == count)
{
- uint32_t offset = 0;
+ lldb::offset_t offset = 0;
m_kext_summary_header.version = data.GetU32(&offset);
if (m_kext_summary_header.version >= 2)
{
@@ -723,7 +723,7 @@
i < image_infos.size() && extractor.ValidOffsetForDataOfSize(kext_summary_offset, m_kext_summary_header.entry_size);
++i, kext_summary_offset += m_kext_summary_header.entry_size)
{
- uint32_t offset = kext_summary_offset;
+ lldb::offset_t offset = kext_summary_offset;
const void *name_data = extractor.GetData(&offset, KERNEL_MODULE_MAX_NAME);
if (name_data == NULL)
break;
Modified: lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp (original)
+++ lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp Fri Jan 25 12:06:21 2013
@@ -279,7 +279,7 @@
Error error;
if (m_process->ReadMemory (shlib_addr, buf, 4, error) == 4)
{
- uint32_t offset = 0;
+ lldb::offset_t offset = 0;
uint32_t magic = data.GetU32 (&offset);
switch (magic)
{
@@ -449,8 +449,8 @@
SectionList *section_list = image_object_file->GetSectionList ();
if (section_list)
{
- uint32_t num_sections = section_list->GetSize();
- for (uint32_t i=0; i<num_sections; ++i)
+ const size_t num_sections = section_list->GetSize();
+ for (size_t i=0; i<num_sections; ++i)
{
SectionSP section_sp (section_list->GetSectionAtIndex (i));
if (section_sp)
@@ -490,8 +490,8 @@
std::vector<uint32_t> inaccessible_segment_indexes;
// We now know the slide amount, so go through all sections
// and update the load addresses with the correct values.
- uint32_t num_segments = info.segments.size();
- for (uint32_t i=0; i<num_segments; ++i)
+ const size_t num_segments = info.segments.size();
+ for (size_t i=0; i<num_segments; ++i)
{
// Only load a segment if it has protections. Things like
// __PAGEZERO don't have any protections, and they shouldn't
@@ -585,8 +585,8 @@
SectionList *section_list = image_object_file->GetSectionList ();
if (section_list)
{
- uint32_t num_segments = info.segments.size();
- for (uint32_t i=0; i<num_segments; ++i)
+ const size_t num_segments = info.segments.size();
+ for (size_t i=0; i<num_segments; ++i)
{
SectionSP section_sp(section_list->FindSectionByName(info.segments[i].name));
if (section_sp)
@@ -715,7 +715,7 @@
uint8_t buf[256];
DataExtractor data (buf, sizeof(buf), byte_order, addr_size);
- uint32_t offset = 0;
+ lldb::offset_t offset = 0;
const size_t count_v2 = sizeof (uint32_t) + // version
sizeof (uint32_t) + // infoArrayCount
@@ -740,7 +740,6 @@
addr_size; // errorSymbol
assert (sizeof (buf) >= count_v11);
- int count;
Error error;
if (m_process->ReadMemory (m_dyld_all_image_infos_addr, buf, 4, error) == 4)
{
@@ -767,10 +766,7 @@
return false;
}
- if (m_dyld_all_image_infos.version >= 11)
- count = count_v11;
- else
- count = count_v2;
+ const size_t count = (m_dyld_all_image_infos.version >= 11) ? count_v11 : count_v2;
const size_t bytes_read = m_process->ReadMemory (m_dyld_all_image_infos_addr, buf, count, error);
if (bytes_read == count)
@@ -1049,7 +1045,7 @@
error);
if (bytes_read == count)
{
- uint32_t info_data_offset = 0;
+ lldb::offset_t info_data_offset = 0;
DataExtractor info_data_ref(info_data.GetBytes(), info_data.GetByteSize(), endian, addr_size);
for (int i = 0; i < image_infos.size() && info_data_ref.ValidOffset(info_data_offset); i++)
{
@@ -1167,7 +1163,7 @@
error);
if (bytes_read == sizeof(llvm::MachO::mach_header))
{
- uint32_t offset = 0;
+ lldb::offset_t offset = 0;
::memset (header, 0, sizeof(llvm::MachO::mach_header));
// Get the magic byte unswapped so we can figure out what we are dealing with
@@ -1229,7 +1225,7 @@
uint32_t
DynamicLoaderMacOSXDYLD::ParseLoadCommands (const DataExtractor& data, DYLDImageInfo& dylib_info, FileSpec *lc_id_dylinker)
{
- uint32_t offset = 0;
+ lldb::offset_t offset = 0;
uint32_t cmd_idx;
Segment segment;
dylib_info.Clear (true);
@@ -1242,7 +1238,7 @@
if (data.ValidOffsetForDataOfSize (offset, sizeof(llvm::MachO::load_command)))
{
llvm::MachO::load_command load_cmd;
- uint32_t load_cmd_offset = offset;
+ lldb::offset_t load_cmd_offset = offset;
load_cmd.cmd = data.GetU32 (&offset);
load_cmd.cmdsize = data.GetU32 (&offset);
switch (load_cmd.cmd)
@@ -1276,7 +1272,7 @@
case llvm::MachO::LoadCommandDynamicLinkerIdent:
if (lc_id_dylinker)
{
- uint32_t name_offset = load_cmd_offset + data.GetU32 (&offset);
+ const lldb::offset_t name_offset = load_cmd_offset + data.GetU32 (&offset);
const char *path = data.PeekCStr (name_offset);
lc_id_dylinker->SetFile (path, true);
}
Modified: lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/AuxVector.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/AuxVector.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/AuxVector.cpp (original)
+++ lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/AuxVector.cpp Fri Jan 25 12:06:21 2013
@@ -26,21 +26,25 @@
static bool
GetMaxU64(DataExtractor &data,
- uint32_t *offset, uint64_t *value, unsigned int byte_size)
-{
- uint32_t saved_offset = *offset;
- *value = data.GetMaxU64(offset, byte_size);
- return *offset != saved_offset;
+ lldb::offset_t *offset_ptr,
+ uint64_t *value,
+ unsigned int byte_size)
+{
+ lldb::offset_t saved_offset = *offset_ptr;
+ *value = data.GetMaxU64(offset_ptr, byte_size);
+ return *offset_ptr != saved_offset;
}
static bool
-ParseAuxvEntry(DataExtractor &data, AuxVector::Entry &entry,
- uint32_t *offset, unsigned int byte_size)
+ParseAuxvEntry(DataExtractor &data,
+ AuxVector::Entry &entry,
+ lldb::offset_t *offset_ptr,
+ unsigned int byte_size)
{
- if (!GetMaxU64(data, offset, &entry.type, byte_size))
+ if (!GetMaxU64(data, offset_ptr, &entry.type, byte_size))
return false;
- if (!GetMaxU64(data, offset, &entry.value, byte_size))
+ if (!GetMaxU64(data, offset_ptr, &entry.value, byte_size))
return false;
return true;
@@ -57,7 +61,7 @@
AuxVector::ParseAuxv(DataExtractor &data)
{
const unsigned int byte_size = m_process->GetAddressByteSize();
- uint32_t offset = 0;
+ lldb::offset_t offset = 0;
for (;;)
{
Modified: lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.cpp (original)
+++ lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.cpp Fri Jan 25 12:06:21 2013
@@ -304,7 +304,7 @@
log->PutCString("DYLDRendezvous:");
log->Printf(" Address: %" PRIx64, GetRendezvousAddress());
- log->Printf(" Version: %d", GetVersion());
+ log->Printf(" Version: %" PRIu64, GetVersion());
log->Printf(" Link : %" PRIx64, GetLinkMapAddress());
log->Printf(" Break : %" PRIx64, GetBreakAddress());
log->Printf(" LDBase : %" PRIx64, GetLDBase());
Modified: lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.h?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.h (original)
+++ lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.h Fri Jan 25 12:06:21 2013
@@ -73,7 +73,7 @@
GetRendezvousAddress() const { return m_rendezvous_addr; }
/// @returns the version of the rendezvous protocol being used.
- int
+ uint64_t
GetVersion() const { return m_current.version; }
/// @returns address in the inferiors address space containing the linked
@@ -92,7 +92,7 @@
GetBreakAddress() const { return m_current.brk; }
/// Returns the current state of the rendezvous structure.
- int
+ uint64_t
GetState() const { return m_current.state; }
/// @returns the base address of the runtime linker in the inferiors address
Modified: lldb/trunk/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp (original)
+++ lldb/trunk/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp Fri Jan 25 12:06:21 2013
@@ -90,10 +90,10 @@
return false;
}
- uint32_t offset_ptr = 0;
- lldb::addr_t vtable_address_point = data.GetAddress (&offset_ptr);
+ lldb::offset_t offset = 0;
+ lldb::addr_t vtable_address_point = data.GetAddress (&offset);
- if (offset_ptr == 0)
+ if (offset == 0)
return false;
// Now find the symbol that contains this address:
@@ -255,8 +255,8 @@
return false;
}
- offset_ptr = 0;
- int64_t offset_to_top = data.GetMaxS64(&offset_ptr, process->GetAddressByteSize());
+ offset = 0;
+ int64_t offset_to_top = data.GetMaxS64(&offset, process->GetAddressByteSize());
// So the dynamic type is a value that starts at offset_to_top
// above the original address.
Modified: lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp (original)
+++ lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp Fri Jan 25 12:06:21 2013
@@ -385,7 +385,7 @@
const uint32_t addr_size = m_process->GetAddressByteSize();
const ByteOrder byte_order = m_process->GetByteOrder();
DataExtractor data (buffer.GetBytes(), buffer.GetByteSize(), byte_order, addr_size);
- uint32_t offset = addr_size; // Skip prototype
+ lldb::offset_t offset = addr_size; // Skip prototype
const uint32_t count = data.GetU32(&offset);
const uint32_t num_buckets = data.GetU32(&offset);
const addr_t buckets_ptr = data.GetPointer(&offset);
Modified: lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp (original)
+++ lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp Fri Jan 25 12:06:21 2013
@@ -1256,7 +1256,7 @@
DataExtractor extractor(objc_class_buf.GetBytes(), objc_class_size, process->GetByteOrder(), process->GetAddressByteSize());
- uint32_t cursor = 0;
+ lldb::offset_t cursor = 0;
m_isa = extractor.GetAddress_unchecked(&cursor); // uintptr_t isa;
m_superclass = extractor.GetAddress_unchecked(&cursor); // Class superclass;
@@ -1315,7 +1315,7 @@
DataExtractor extractor(buffer.GetBytes(), size, process->GetByteOrder(), process->GetAddressByteSize());
- uint32_t cursor = 0;
+ lldb::offset_t cursor = 0;
m_flags = extractor.GetU32_unchecked(&cursor);
m_instanceStart = extractor.GetU32_unchecked(&cursor);
@@ -1386,13 +1386,13 @@
DataExtractor extractor(buffer.GetBytes(), size, process->GetByteOrder(), process->GetAddressByteSize());
- uint32_t cursor = 0;
+ lldb::offset_t cursor = 0;
m_flags = extractor.GetU32_unchecked(&cursor);
m_version = extractor.GetU32_unchecked(&cursor);
- m_ro_ptr = extractor.GetAddress_unchecked(&cursor);
- m_method_list_ptr = extractor.GetAddress_unchecked(&cursor);
- m_properties_ptr = extractor.GetAddress_unchecked(&cursor);
+ m_ro_ptr = extractor.GetAddress_unchecked(&cursor);
+ m_method_list_ptr = extractor.GetAddress_unchecked(&cursor);
+ m_properties_ptr = extractor.GetAddress_unchecked(&cursor);
m_firstSubclass = extractor.GetAddress_unchecked(&cursor);
m_nextSiblingClass = extractor.GetAddress_unchecked(&cursor);
@@ -1422,7 +1422,7 @@
DataExtractor extractor(buffer.GetBytes(), size, process->GetByteOrder(), process->GetAddressByteSize());
- uint32_t cursor = 0;
+ lldb::offset_t cursor = 0;
m_entsize = extractor.GetU32_unchecked(&cursor) & ~(uint32_t)3;
m_count = extractor.GetU32_unchecked(&cursor);
@@ -1465,7 +1465,7 @@
DataExtractor extractor(buffer.GetBytes(), size, process->GetByteOrder(), process->GetAddressByteSize());
- uint32_t cursor = 0;
+ lldb::offset_t cursor = 0;
m_name_ptr = extractor.GetAddress_unchecked(&cursor);
m_types_ptr = extractor.GetAddress_unchecked(&cursor);
@@ -1508,7 +1508,7 @@
DataExtractor extractor(buffer.GetBytes(), size, process->GetByteOrder(), process->GetAddressByteSize());
- uint32_t cursor = 0;
+ lldb::offset_t cursor = 0;
m_entsize = extractor.GetU32_unchecked(&cursor);
m_count = extractor.GetU32_unchecked(&cursor);
@@ -1555,7 +1555,7 @@
DataExtractor extractor(buffer.GetBytes(), size, process->GetByteOrder(), process->GetAddressByteSize());
- uint32_t cursor = 0;
+ lldb::offset_t cursor = 0;
m_offset_ptr = extractor.GetAddress_unchecked(&cursor);
m_name_ptr = extractor.GetAddress_unchecked(&cursor);
@@ -2176,11 +2176,11 @@
DataExtractor isa_extractor(isas_buffer.GetBytes(), isas_allocation_size, process->GetByteOrder(), process->GetAddressByteSize());
- uint32_t offset_ptr = 0;
+ lldb::offset_t offset = 0;
for (size_t index = 0; index < num_isas; ++index)
{
- uint64_t isa = isa_extractor.GetPointer(&offset_ptr);
+ uint64_t isa = isa_extractor.GetPointer(&offset);
const char *name = (const char*)(names_buffer.GetBytes() + (name_size * index));
Modified: lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.cpp (original)
+++ lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.cpp Fri Jan 25 12:06:21 2013
@@ -194,12 +194,12 @@
return;
}
- uint32_t offset_ptr = 0;
- const uint16_t header_size = data.GetU16(&offset_ptr);
- const uint16_t descriptor_size = data.GetU16(&offset_ptr);
- const size_t num_descriptors = data.GetU32(&offset_ptr);
+ lldb::offset_t offset = 0;
+ const uint16_t header_size = data.GetU16(&offset);
+ const uint16_t descriptor_size = data.GetU16(&offset);
+ const size_t num_descriptors = data.GetU32(&offset);
- m_next_region = data.GetPointer(&offset_ptr);
+ m_next_region = data.GetPointer(&offset);
// If the header size is 0, that means we've come in too early before this data is set up.
// Set ourselves as not valid, and continue.
@@ -239,16 +239,16 @@
// The actual code for the vtables will be laid out consecutively, so I also
// compute the start and end of the whole code block.
- offset_ptr = 0;
+ offset = 0;
m_code_start_addr = 0;
m_code_end_addr = 0;
for (int i = 0; i < num_descriptors; i++)
{
- lldb::addr_t start_offset = offset_ptr;
- uint32_t offset = desc_extractor.GetU32 (&offset_ptr);
- uint32_t flags = desc_extractor.GetU32 (&offset_ptr);
- lldb::addr_t code_addr = desc_ptr + start_offset + offset;
+ lldb::addr_t start_offset = offset;
+ uint32_t voffset = desc_extractor.GetU32 (&offset);
+ uint32_t flags = desc_extractor.GetU32 (&offset);
+ lldb::addr_t code_addr = desc_ptr + start_offset + voffset;
m_descriptors.push_back (VTableDescriptor(flags, code_addr));
if (m_code_start_addr == 0 || code_addr < m_code_start_addr)
@@ -256,7 +256,7 @@
if (code_addr > m_code_end_addr)
m_code_end_addr = code_addr;
- offset_ptr = start_offset + descriptor_size;
+ offset = start_offset + descriptor_size;
}
// Finally, a little bird told me that all the vtable code blocks are the same size.
// Let's compute the blocks and if they are all the same add the size to the code end address:
@@ -427,8 +427,8 @@
data,
0,
NULL);
- uint32_t offset_ptr = 0;
- lldb::addr_t region_addr = data.GetPointer(&offset_ptr);
+ lldb::offset_t offset = 0;
+ lldb::addr_t region_addr = data.GetPointer(&offset);
if (region_addr != 0)
vtable_handler->ReadRegions(region_addr);
Modified: lldb/trunk/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp (original)
+++ lldb/trunk/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp Fri Jan 25 12:06:21 2013
@@ -49,8 +49,8 @@
ar_file_size = 0;
}
-uint32_t
-ObjectContainerBSDArchive::Object::Extract (const DataExtractor& data, uint32_t offset)
+lldb::offset_t
+ObjectContainerBSDArchive::Object::Extract (const DataExtractor& data, lldb::offset_t offset)
{
size_t ar_name_len = 0;
std::string str;
@@ -98,7 +98,7 @@
ar_file_size = ar_size - ar_name_len;
return offset;
}
- return LLDB_INVALID_INDEX32;
+ return LLDB_INVALID_OFFSET;
}
ObjectContainerBSDArchive::Archive::Archive
@@ -120,7 +120,7 @@
ObjectContainerBSDArchive::Archive::ParseObjects (DataExtractor &data)
{
std::string str;
- uint32_t offset = 0;
+ lldb::offset_t offset = 0;
str.assign((const char *)data.GetData(&offset, SARMAG), SARMAG);
if (str == ARMAG)
{
@@ -128,9 +128,9 @@
do
{
offset = obj.Extract (data, offset);
- if (offset == LLDB_INVALID_INDEX32)
+ if (offset == LLDB_INVALID_OFFSET)
break;
- uint32_t obj_idx = m_objects.size();
+ size_t obj_idx = m_objects.size();
m_objects.push_back(obj);
// Insert all of the C strings out of order for now...
m_object_name_to_index_map.Append (obj.ar_name.GetCString(), obj_idx);
@@ -147,7 +147,7 @@
ObjectContainerBSDArchive::Object *
ObjectContainerBSDArchive::Archive::FindObject (const ConstString &object_name)
{
- const UniqueCStringMap<uint32_t>::Entry *match = m_object_name_to_index_map.FindFirstValueForName (object_name.GetCString());
+ const ObjectNameToIndexMap::Entry *match = m_object_name_to_index_map.FindFirstValueForName (object_name.GetCString());
if (match)
return &m_objects[match->value];
return NULL;
Modified: lldb/trunk/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.h?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.h (original)
+++ lldb/trunk/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.h Fri Jan 25 12:06:21 2013
@@ -97,8 +97,8 @@
void
Clear();
- uint32_t
- Extract (const lldb_private::DataExtractor& data, uint32_t offset);
+ lldb::offset_t
+ Extract (const lldb_private::DataExtractor& data, lldb::offset_t offset);
lldb_private::ConstString ar_name; // name
uint32_t ar_date; // modification time
@@ -106,8 +106,8 @@
uint16_t ar_gid; // group id
uint16_t ar_mode; // octal file permissions
uint32_t ar_size; // size in bytes
- uint32_t ar_file_offset; // file offset in bytes from the beginning of the file of the object data
- uint32_t ar_file_size; // length of the object data
+ lldb::offset_t ar_file_offset; // file offset in bytes from the beginning of the file of the object data
+ lldb::offset_t ar_file_size; // length of the object data
typedef std::vector<Object> collection;
typedef collection::iterator iterator;
@@ -170,14 +170,14 @@
HasNoExternalReferences() const;
protected:
-
+ typedef lldb_private::UniqueCStringMap<uint32_t> ObjectNameToIndexMap;
//----------------------------------------------------------------------
// Member Variables
//----------------------------------------------------------------------
lldb_private::ArchSpec m_arch;
lldb_private::TimeValue m_time;
Object::collection m_objects;
- lldb_private::UniqueCStringMap<uint32_t> m_object_name_to_index_map;
+ ObjectNameToIndexMap m_object_name_to_index_map;
};
void
Modified: lldb/trunk/source/Plugins/ObjectContainer/Universal-Mach-O/ObjectContainerUniversalMachO.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectContainer/Universal-Mach-O/ObjectContainerUniversalMachO.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ObjectContainer/Universal-Mach-O/ObjectContainerUniversalMachO.cpp (original)
+++ lldb/trunk/source/Plugins/ObjectContainer/Universal-Mach-O/ObjectContainerUniversalMachO.cpp Fri Jan 25 12:06:21 2013
@@ -75,7 +75,7 @@
bool
ObjectContainerUniversalMachO::MagicBytesMatch (const DataExtractor &data)
{
- uint32_t offset = 0;
+ lldb::offset_t offset = 0;
uint32_t magic = data.GetU32(&offset);
return magic == UniversalMagic || magic == UniversalMagicSwapped;
}
@@ -105,7 +105,7 @@
{
// Store the file offset for this universal file as we could have a universal .o file
// in a BSD archive, or be contained in another kind of object.
- uint32_t offset = 0;
+ lldb::offset_t offset = 0;
// Universal mach-o files always have their headers in big endian.
m_data.SetByteOrder (eByteOrderBig);
m_header.magic = m_data.GetU32(&offset);
Modified: lldb/trunk/source/Plugins/ObjectFile/ELF/ELFHeader.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectFile/ELF/ELFHeader.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ObjectFile/ELF/ELFHeader.cpp (original)
+++ lldb/trunk/source/Plugins/ObjectFile/ELF/ELFHeader.cpp Fri Jan 25 12:06:21 2013
@@ -23,20 +23,24 @@
// GetMaxU64 and GetMaxS64 wrap the similarly named methods from DataExtractor
// with error handling code and provide for parsing a sequence of values.
static bool
-GetMaxU64(const lldb_private::DataExtractor &data,
- uint32_t *offset, uint64_t *value, uint32_t byte_size)
+GetMaxU64(const lldb_private::DataExtractor &data,
+ lldb::offset_t *offset,
+ uint64_t *value,
+ uint32_t byte_size)
{
- const uint32_t saved_offset = *offset;
+ const lldb::offset_t saved_offset = *offset;
*value = data.GetMaxU64(offset, byte_size);
return *offset != saved_offset;
}
static bool
GetMaxU64(const lldb_private::DataExtractor &data,
- uint32_t *offset, uint64_t *value, uint32_t byte_size,
+ lldb::offset_t *offset,
+ uint64_t *value,
+ uint32_t byte_size,
uint32_t count)
{
- uint32_t saved_offset = *offset;
+ lldb::offset_t saved_offset = *offset;
for (uint32_t i = 0; i < count; ++i, ++value)
{
@@ -51,19 +55,23 @@
static bool
GetMaxS64(const lldb_private::DataExtractor &data,
- uint32_t *offset, int64_t *value, uint32_t byte_size)
+ lldb::offset_t *offset,
+ int64_t *value,
+ uint32_t byte_size)
{
- const uint32_t saved_offset = *offset;
+ const lldb::offset_t saved_offset = *offset;
*value = data.GetMaxS64(offset, byte_size);
return *offset != saved_offset;
}
static bool
GetMaxS64(const lldb_private::DataExtractor &data,
- uint32_t *offset, int64_t *value, uint32_t byte_size,
+ lldb::offset_t *offset,
+ int64_t *value,
+ uint32_t byte_size,
uint32_t count)
{
- uint32_t saved_offset = *offset;
+ lldb::offset_t saved_offset = *offset;
for (uint32_t i = 0; i < count; ++i, ++value)
{
@@ -95,7 +103,7 @@
}
bool
-ELFHeader::Parse(lldb_private::DataExtractor &data, uint32_t *offset)
+ELFHeader::Parse(lldb_private::DataExtractor &data, lldb::offset_t *offset)
{
// Read e_ident. This provides byte order and address size info.
if (data.GetU8(offset, &e_ident, EI_NIDENT) == NULL)
@@ -190,7 +198,7 @@
bool
ELFSectionHeader::Parse(const lldb_private::DataExtractor &data,
- uint32_t *offset)
+ lldb::offset_t *offset)
{
const unsigned byte_size = data.GetAddressByteSize();
@@ -226,7 +234,7 @@
}
bool
-ELFSymbol::Parse(const lldb_private::DataExtractor &data, uint32_t *offset)
+ELFSymbol::Parse(const lldb_private::DataExtractor &data, lldb::offset_t *offset)
{
const unsigned byte_size = data.GetAddressByteSize();
const bool parsing_32 = byte_size == 4;
@@ -276,7 +284,7 @@
bool
ELFProgramHeader::Parse(const lldb_private::DataExtractor &data,
- uint32_t *offset)
+ lldb::offset_t *offset)
{
const uint32_t byte_size = data.GetAddressByteSize();
const bool parsing_32 = byte_size == 4;
@@ -320,7 +328,7 @@
}
bool
-ELFDynamic::Parse(const lldb_private::DataExtractor &data, uint32_t *offset)
+ELFDynamic::Parse(const lldb_private::DataExtractor &data, lldb::offset_t *offset)
{
const unsigned byte_size = data.GetAddressByteSize();
return GetMaxS64(data, offset, &d_tag, byte_size, 2);
@@ -335,7 +343,7 @@
}
bool
-ELFRel::Parse(const lldb_private::DataExtractor &data, uint32_t *offset)
+ELFRel::Parse(const lldb_private::DataExtractor &data, lldb::offset_t *offset)
{
const unsigned byte_size = data.GetAddressByteSize();
@@ -355,7 +363,7 @@
}
bool
-ELFRela::Parse(const lldb_private::DataExtractor &data, uint32_t *offset)
+ELFRela::Parse(const lldb_private::DataExtractor &data, lldb::offset_t *offset)
{
const unsigned byte_size = data.GetAddressByteSize();
Modified: lldb/trunk/source/Plugins/ObjectFile/ELF/ELFHeader.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectFile/ELF/ELFHeader.h?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ObjectFile/ELF/ELFHeader.h (original)
+++ lldb/trunk/source/Plugins/ObjectFile/ELF/ELFHeader.h Fri Jan 25 12:06:21 2013
@@ -123,7 +123,7 @@
/// True if the ELFSectionHeader was successfully read and false
/// otherwise.
bool
- Parse(lldb_private::DataExtractor &data, uint32_t *offset);
+ Parse(lldb_private::DataExtractor &data, lldb::offset_t *offset);
//--------------------------------------------------------------------------
/// Examines at most EI_NIDENT bytes starting from the given pointer and
@@ -181,7 +181,7 @@
/// True if the ELFSectionHeader was successfully read and false
/// otherwise.
bool
- Parse(const lldb_private::DataExtractor &data, uint32_t *offset);
+ Parse(const lldb_private::DataExtractor &data, lldb::offset_t *offset);
};
//------------------------------------------------------------------------------
@@ -216,7 +216,7 @@
/// True if the ELFProgramHeader was successfully read and false
/// otherwise.
bool
- Parse(const lldb_private::DataExtractor &data, uint32_t *offset);
+ Parse(const lldb_private::DataExtractor &data, lldb::offset_t *offset);
};
//------------------------------------------------------------------------------
@@ -259,7 +259,7 @@
/// @return
/// True if the ELFSymbol was successfully read and false otherwise.
bool
- Parse(const lldb_private::DataExtractor &data, uint32_t *offset);
+ Parse(const lldb_private::DataExtractor &data, lldb::offset_t *offset);
};
//------------------------------------------------------------------------------
@@ -292,7 +292,7 @@
/// True if the ELFDynamic entry was successfully read and false
/// otherwise.
bool
- Parse(const lldb_private::DataExtractor &data, uint32_t *offset);
+ Parse(const lldb_private::DataExtractor &data, lldb::offset_t *offset);
};
//------------------------------------------------------------------------------
@@ -320,7 +320,7 @@
/// @return
/// True if the ELFRel entry was successfully read and false otherwise.
bool
- Parse(const lldb_private::DataExtractor &data, uint32_t *offset);
+ Parse(const lldb_private::DataExtractor &data, lldb::offset_t *offset);
/// Returns the type when the given entry represents a 32-bit relocation.
static unsigned
@@ -379,7 +379,7 @@
/// @return
/// True if the ELFRela entry was successfully read and false otherwise.
bool
- Parse(const lldb_private::DataExtractor &data, uint32_t *offset);
+ Parse(const lldb_private::DataExtractor &data, lldb::offset_t *offset);
/// Returns the type when the given entry represents a 32-bit relocation.
static unsigned
Modified: lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp (original)
+++ lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp Fri Jan 25 12:06:21 2013
@@ -53,7 +53,7 @@
~ELFRelocation();
bool
- Parse(const lldb_private::DataExtractor &data, uint32_t *offset);
+ Parse(const lldb_private::DataExtractor &data, lldb::offset_t *offset);
static unsigned
RelocType32(const ELFRelocation &rel);
@@ -94,7 +94,7 @@
}
bool
-ELFRelocation::Parse(const lldb_private::DataExtractor &data, uint32_t *offset)
+ELFRelocation::Parse(const lldb_private::DataExtractor &data, lldb::offset_t *offset)
{
if (reloc.is<ELFRel*>())
return reloc.get<ELFRel*>()->Parse(data, offset);
@@ -270,28 +270,28 @@
return eByteOrderInvalid;
}
-size_t
+uint32_t
ObjectFileELF::GetAddressByteSize() const
{
return m_data.GetAddressByteSize();
}
-unsigned
+size_t
ObjectFileELF::SectionIndex(const SectionHeaderCollIter &I)
{
- return std::distance(m_section_headers.begin(), I) + 1;
+ return std::distance(m_section_headers.begin(), I) + 1u;
}
-unsigned
+size_t
ObjectFileELF::SectionIndex(const SectionHeaderCollConstIter &I) const
{
- return std::distance(m_section_headers.begin(), I) + 1;
+ return std::distance(m_section_headers.begin(), I) + 1u;
}
bool
ObjectFileELF::ParseHeader()
{
- uint32_t offset = GetOffset();
+ lldb::offset_t offset = GetOffset();
return m_header.Parse(m_data, &offset);
}
@@ -445,8 +445,8 @@
ReadSectionData(dynstr, dynstr_data))
{
ELFDynamic symbol;
- const unsigned section_size = dynsym_data.GetByteSize();
- unsigned offset = 0;
+ const lldb::offset_t section_size = dynsym_data.GetByteSize();
+ lldb::offset_t offset = 0;
// The only type of entries we are concerned with are tagged DT_NEEDED,
// yielding the name of a required library.
@@ -492,7 +492,7 @@
return 0;
uint32_t idx;
- uint32_t offset;
+ lldb::offset_t offset;
for (idx = 0, offset = 0; idx < m_header.e_phnum; ++idx)
{
if (m_program_headers[idx].Parse(data, &offset) == false)
@@ -530,7 +530,7 @@
return 0;
uint32_t idx;
- uint32_t offset;
+ lldb::offset_t offset;
for (idx = 0, offset = 0; idx < m_header.e_shnum; ++idx)
{
if (m_section_headers[idx].Parse(data, &offset) == false)
@@ -698,9 +698,8 @@
const DataExtractor &strtab_data)
{
ELFSymbol symbol;
- uint32_t offset = 0;
- const unsigned num_symbols =
- symtab_data.GetByteSize() / symtab_shdr->sh_entsize;
+ lldb::offset_t offset = 0;
+ const size_t num_symbols = symtab_data.GetByteSize() / symtab_shdr->sh_entsize;
static ConstString text_section_name(".text");
static ConstString init_section_name(".init");
@@ -877,8 +876,8 @@
DataExtractor dynsym_data;
if (ReadSectionData(dynsym, dynsym_data))
{
- const unsigned section_size = dynsym_data.GetByteSize();
- unsigned cursor = 0;
+ const lldb::offset_t section_size = dynsym_data.GetByteSize();
+ lldb::offset_t cursor = 0;
while (cursor < section_size)
{
@@ -956,9 +955,9 @@
{
ELFRelocation rel(rel_type);
ELFSymbol symbol;
- uint32_t offset = 0;
- const unsigned plt_entsize = plt_hdr->sh_entsize;
- const unsigned num_relocations = rel_hdr->sh_size / rel_hdr->sh_entsize;
+ lldb::offset_t offset = 0;
+ const elf_xword plt_entsize = plt_hdr->sh_entsize;
+ const elf_xword num_relocations = rel_hdr->sh_size / rel_hdr->sh_entsize;
typedef unsigned (*reloc_info_fn)(const ELFRelocation &rel);
reloc_info_fn reloc_type;
@@ -985,7 +984,7 @@
if (reloc_type(rel) != slot_type)
continue;
- unsigned symbol_offset = reloc_symbol(rel) * sym_hdr->sh_entsize;
+ lldb::offset_t symbol_offset = reloc_symbol(rel) * sym_hdr->sh_entsize;
uint64_t plt_index = (i + 1) * plt_entsize;
if (!symbol.Parse(symtab_data, &symbol_offset))
@@ -1378,7 +1377,7 @@
// Dump an token value for the ELF section header member sh_flags
//----------------------------------------------------------------------
void
-ObjectFileELF::DumpELFSectionHeader_sh_flags(Stream *s, elf_word sh_flags)
+ObjectFileELF::DumpELFSectionHeader_sh_flags(Stream *s, elf_xword sh_flags)
{
*s << ((sh_flags & SHF_WRITE) ? "WRITE" : " ")
<< (((sh_flags & SHF_WRITE) && (sh_flags & SHF_ALLOC)) ? '+' : ' ')
Modified: lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.h?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.h (original)
+++ lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.h Fri Jan 25 12:06:21 2013
@@ -84,7 +84,7 @@
virtual bool
IsExecutable () const;
- virtual size_t
+ virtual uint32_t
GetAddressByteSize() const;
virtual lldb_private::Symtab *
@@ -168,11 +168,11 @@
lldb_private::Address m_entry_point_address;
/// Returns a 1 based index of the given section header.
- unsigned
+ size_t
SectionIndex(const SectionHeaderCollIter &I);
/// Returns a 1 based index of the given section header.
- unsigned
+ size_t
SectionIndex(const SectionHeaderCollConstIter &I) const;
/// Parses all section headers present in this object file and populates
@@ -282,7 +282,7 @@
static void
DumpELFSectionHeader_sh_flags(lldb_private::Stream *s,
- elf::elf_word sh_flags);
+ elf::elf_xword sh_flags);
//@}
/// ELF dependent module dump routine.
Modified: lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp (original)
+++ lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp Fri Jan 25 12:06:21 2013
@@ -58,7 +58,7 @@
void
SetRegisterDataFrom_LC_THREAD (const DataExtractor &data)
{
- uint32_t offset = 0;
+ lldb::offset_t offset = 0;
SetError (GPRRegSet, Read, -1);
SetError (FPURegSet, Read, -1);
SetError (EXCRegSet, Read, -1);
@@ -166,7 +166,7 @@
void
SetRegisterDataFrom_LC_THREAD (const DataExtractor &data)
{
- uint32_t offset = 0;
+ lldb::offset_t offset = 0;
SetError (GPRRegSet, Read, -1);
SetError (FPURegSet, Read, -1);
SetError (EXCRegSet, Read, -1);
@@ -273,7 +273,7 @@
void
SetRegisterDataFrom_LC_THREAD (const DataExtractor &data)
{
- uint32_t offset = 0;
+ lldb::offset_t offset = 0;
SetError (GPRRegSet, Read, -1);
SetError (FPURegSet, Read, -1);
SetError (EXCRegSet, Read, -1);
@@ -472,7 +472,7 @@
{
DataExtractor data;
data.SetData (data_sp, data_offset, data_length);
- uint32_t offset = 0;
+ lldb::offset_t offset = 0;
uint32_t magic = data.GetU32(&offset);
return MachHeaderSizeFromMagic(magic) != 0;
}
@@ -522,7 +522,7 @@
{
lldb_private::Mutex::Locker locker(module_sp->GetMutex());
bool can_parse = false;
- uint32_t offset = 0;
+ lldb::offset_t offset = 0;
m_data.SetByteOrder (lldb::endian::InlHostByteOrder());
// Leave magic in the original byte order
m_header.magic = m_data.GetU32(&offset);
@@ -612,7 +612,7 @@
return m_header.filetype == HeaderFileTypeExecutable;
}
-size_t
+uint32_t
ObjectFileMachO::GetAddressByteSize () const
{
return m_data.GetAddressByteSize ();
@@ -769,7 +769,7 @@
{
lldb::user_id_t segID = 0;
lldb::user_id_t sectID = 0;
- uint32_t offset = MachHeaderSizeFromMagic(m_header.magic);
+ lldb::offset_t offset = MachHeaderSizeFromMagic(m_header.magic);
uint32_t i;
const bool is_core = GetType() == eTypeCoreFile;
//bool dump_sections = false;
@@ -780,7 +780,7 @@
encryption_info_command encryption_cmd;
for (i=0; i<m_header.ncmds; ++i)
{
- const uint32_t load_cmd_offset = offset;
+ const lldb::offset_t load_cmd_offset = offset;
if (m_data.GetU32(&offset, &encryption_cmd, 2) == NULL)
break;
@@ -805,7 +805,7 @@
struct segment_command_64 load_cmd;
for (i=0; i<m_header.ncmds; ++i)
{
- const uint32_t load_cmd_offset = offset;
+ const lldb::offset_t load_cmd_offset = offset;
if (m_data.GetU32(&offset, &load_cmd, 2) == NULL)
break;
@@ -826,7 +826,7 @@
// get at data that isn't stored in the abstracted Sections.
m_mach_segments.push_back (load_cmd);
- ConstString segment_name (load_cmd.segname, std::min<int>(strlen(load_cmd.segname), sizeof(load_cmd.segname)));
+ ConstString segment_name (load_cmd.segname, std::min<size_t>(strlen(load_cmd.segname), sizeof(load_cmd.segname)));
// Use a segment ID of the segment index shifted left by 8 so they
// never conflict with any of the sections.
SectionSP segment_sp;
@@ -1209,14 +1209,14 @@
struct linkedit_data_command function_starts_load_command = { 0, 0, 0, 0 };
typedef AddressDataArray<lldb::addr_t, bool, 100> FunctionStarts;
FunctionStarts function_starts;
- uint32_t offset = MachHeaderSizeFromMagic(m_header.magic);
+ lldb::offset_t offset = MachHeaderSizeFromMagic(m_header.magic);
uint32_t i;
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_SYMBOLS));
for (i=0; i<m_header.ncmds; ++i)
{
- const uint32_t cmd_offset = offset;
+ const lldb::offset_t cmd_offset = offset;
// Read in the load command and load command size
struct load_command lc;
if (m_data.GetU32(&offset, &lc, 2) == NULL)
@@ -1282,13 +1282,14 @@
ProcessSP process_sp (m_process_wp.lock());
Process *process = process_sp.get();
- const size_t addr_byte_size = m_data.GetAddressByteSize();
+ const uint32_t addr_byte_size = m_data.GetAddressByteSize();
+ const ByteOrder byte_order = m_data.GetByteOrder();
bool bit_width_32 = addr_byte_size == 4;
const size_t nlist_byte_size = bit_width_32 ? sizeof(struct nlist) : sizeof(struct nlist_64);
- DataExtractor nlist_data (NULL, 0, m_data.GetByteOrder(), m_data.GetAddressByteSize());
- DataExtractor strtab_data (NULL, 0, m_data.GetByteOrder(), m_data.GetAddressByteSize());
- DataExtractor function_starts_data (NULL, 0, m_data.GetByteOrder(), m_data.GetAddressByteSize());
+ DataExtractor nlist_data (NULL, 0, byte_order, addr_byte_size);
+ DataExtractor strtab_data (NULL, 0, byte_order, addr_byte_size);
+ DataExtractor function_starts_data (NULL, 0, byte_order, addr_byte_size);
const addr_t nlist_data_byte_size = symtab_load_command.nsyms * nlist_byte_size;
const addr_t strtab_data_byte_size = symtab_load_command.strsize;
@@ -1420,7 +1421,7 @@
{
FunctionStarts::Entry function_start_entry;
function_start_entry.data = false;
- uint32_t function_start_offset = 0;
+ lldb::offset_t function_start_offset = 0;
function_start_entry.addr = text_section_sp->GetFileAddress();
uint64_t delta;
while ((delta = function_starts_data.GetULEB128(&function_start_offset)) > 0)
@@ -1431,11 +1432,11 @@
}
}
- const uint32_t function_starts_count = function_starts.GetSize();
+ const size_t function_starts_count = function_starts.GetSize();
- uint8_t TEXT_eh_frame_sectID = eh_frame_section_sp.get() ? eh_frame_section_sp->GetID() : NListSectionNoSection;
+ const user_id_t TEXT_eh_frame_sectID = eh_frame_section_sp.get() ? eh_frame_section_sp->GetID() : NListSectionNoSection;
- uint32_t nlist_data_offset = 0;
+ lldb::offset_t nlist_data_offset = 0;
uint32_t N_SO_index = UINT32_MAX;
@@ -1457,7 +1458,7 @@
uint32_t sym_idx = 0;
Symbol *sym = NULL;
- uint32_t num_syms = 0;
+ size_t num_syms = 0;
std::string memory_symbol_name;
uint32_t unmapped_local_symbols_found = 0;
@@ -1547,7 +1548,7 @@
if (DataBufferSP dsc_data_sp = dsc_filespec.MemoryMapFileContents(0, sizeof(struct lldb_copy_dyld_cache_header)))
{
- DataExtractor dsc_header_data(dsc_data_sp, m_data.GetByteOrder(), m_data.GetAddressByteSize());
+ DataExtractor dsc_header_data(dsc_data_sp, byte_order, addr_byte_size);
uint32_t offset = offsetof (struct lldb_copy_dyld_cache_header, mappingOffset);
uint32_t mappingOffset = dsc_header_data.GetU32(&offset);
@@ -1566,7 +1567,7 @@
// Map the local symbols
if (DataBufferSP dsc_local_symbols_data_sp = dsc_filespec.MemoryMapFileContents(localSymbolsOffset, localSymbolsSize))
{
- DataExtractor dsc_local_symbols_data(dsc_local_symbols_data_sp, m_data.GetByteOrder(), m_data.GetAddressByteSize());
+ DataExtractor dsc_local_symbols_data(dsc_local_symbols_data_sp, byte_order, addr_byte_size);
offset = 0;
@@ -2382,7 +2383,7 @@
const char *symbol_name_non_abi_mangled = NULL;
SectionSP symbol_section;
- uint32_t symbol_byte_size = 0;
+ lldb::addr_t symbol_byte_size = 0;
bool add_nlist = true;
bool is_debug = ((nlist.n_type & NlistMaskStab) != 0);
bool demangled_is_synthesized = false;
@@ -3191,7 +3192,7 @@
{
const uint32_t symbol_stub_index = symbol_stub_index_offset + stub_idx;
const lldb::addr_t symbol_stub_addr = m_mach_sections[sect_idx].addr + (stub_idx * symbol_stub_byte_size);
- uint32_t symbol_stub_offset = symbol_stub_index * 4;
+ lldb::offset_t symbol_stub_offset = symbol_stub_index * 4;
if (indirect_symbol_index_data.ValidOffsetForDataOfSize(symbol_stub_offset, 4))
{
const uint32_t stub_sym_id = indirect_symbol_index_data.GetU32 (&symbol_stub_offset);
@@ -3299,11 +3300,11 @@
{
lldb_private::Mutex::Locker locker(module_sp->GetMutex());
struct uuid_command load_cmd;
- uint32_t offset = MachHeaderSizeFromMagic(m_header.magic);
+ lldb::offset_t offset = MachHeaderSizeFromMagic(m_header.magic);
uint32_t i;
for (i=0; i<m_header.ncmds; ++i)
{
- const uint32_t cmd_offset = offset;
+ const lldb::offset_t cmd_offset = offset;
if (m_data.GetU32(&offset, &load_cmd, 2) == NULL)
break;
@@ -3346,7 +3347,7 @@
{
lldb_private::Mutex::Locker locker(module_sp->GetMutex());
struct load_command load_cmd;
- uint32_t offset = MachHeaderSizeFromMagic(m_header.magic);
+ lldb::offset_t offset = MachHeaderSizeFromMagic(m_header.magic);
const bool resolve_path = false; // Don't resolve the dependend file paths since they may not reside on this system
uint32_t i;
for (i=0; i<m_header.ncmds; ++i)
@@ -3419,14 +3420,14 @@
{
lldb_private::Mutex::Locker locker(module_sp->GetMutex());
struct load_command load_cmd;
- uint32_t offset = MachHeaderSizeFromMagic(m_header.magic);
+ lldb::offset_t offset = MachHeaderSizeFromMagic(m_header.magic);
uint32_t i;
lldb::addr_t start_address = LLDB_INVALID_ADDRESS;
bool done = false;
for (i=0; i<m_header.ncmds; ++i)
{
- const uint32_t cmd_offset = offset;
+ const lldb::offset_t cmd_offset = offset;
if (m_data.GetU32(&offset, &load_cmd, 2) == NULL)
break;
@@ -3563,7 +3564,7 @@
if (!m_thread_context_offsets_valid)
{
m_thread_context_offsets_valid = true;
- uint32_t offset = MachHeaderSizeFromMagic(m_header.magic);
+ lldb::offset_t offset = MachHeaderSizeFromMagic(m_header.magic);
FileRangeArray::Entry file_range;
thread_command thread_cmd;
for (uint32_t i=0; i<m_header.ncmds; ++i)
@@ -3729,13 +3730,13 @@
{
lldb_private::Mutex::Locker locker(module_sp->GetMutex());
struct dylib_command load_cmd;
- uint32_t offset = MachHeaderSizeFromMagic(m_header.magic);
+ lldb::offset_t offset = MachHeaderSizeFromMagic(m_header.magic);
uint32_t version_cmd = 0;
uint64_t version = 0;
uint32_t i;
for (i=0; i<m_header.ncmds; ++i)
{
- const uint32_t cmd_offset = offset;
+ const lldb::offset_t cmd_offset = offset;
if (m_data.GetU32(&offset, &load_cmd, 2) == NULL)
break;
Modified: lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.h?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.h (original)
+++ lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.h Fri Jan 25 12:06:21 2013
@@ -85,7 +85,7 @@
virtual bool
IsExecutable () const;
- virtual size_t
+ virtual uint32_t
GetAddressByteSize () const;
virtual lldb::AddressClass
Modified: lldb/trunk/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp (original)
+++ lldb/trunk/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp Fri Jan 25 12:06:21 2013
@@ -169,7 +169,7 @@
ObjectFilePECOFF::MagicBytesMatch (DataBufferSP& dataSP)
{
DataExtractor data(dataSP, eByteOrderLittle, 4);
- uint32_t offset = 0;
+ lldb::offset_t offset = 0;
uint16_t magic = data.GetU16 (&offset);
return magic == IMAGE_DOS_SIGNATURE;
}
@@ -206,7 +206,7 @@
lldb_private::Mutex::Locker locker(module_sp->GetMutex());
m_sect_headers.clear();
m_data.SetByteOrder (eByteOrderLittle);
- uint32_t offset = 0;
+ lldb::offset_t offset = 0;
if (ParseDOSHeader())
{
@@ -239,7 +239,7 @@
return (m_coff_header.flags & IMAGE_FILE_DLL) == 0;
}
-size_t
+uint32_t
ObjectFilePECOFF::GetAddressByteSize () const
{
if (m_coff_header_opt.magic == OPT_HEADER_MAGIC_PE32_PLUS)
@@ -271,7 +271,7 @@
ObjectFilePECOFF::ParseDOSHeader ()
{
bool success = false;
- uint32_t offset = 0;
+ lldb::offset_t offset = 0;
success = m_data.ValidOffsetForDataOfSize(0, sizeof(m_dos_header));
if (success)
@@ -326,7 +326,7 @@
// ParserCOFFHeader
//----------------------------------------------------------------------
bool
-ObjectFilePECOFF::ParseCOFFHeader(uint32_t* offset_ptr)
+ObjectFilePECOFF::ParseCOFFHeader(lldb::offset_t *offset_ptr)
{
bool success = m_data.ValidOffsetForDataOfSize (*offset_ptr, sizeof(m_coff_header));
if (success)
@@ -345,10 +345,10 @@
}
bool
-ObjectFilePECOFF::ParseCOFFOptionalHeader(uint32_t* offset_ptr)
+ObjectFilePECOFF::ParseCOFFOptionalHeader(lldb::offset_t *offset_ptr)
{
bool success = false;
- const uint32_t end_offset = *offset_ptr + m_coff_header.hdrsize;
+ const lldb::offset_t end_offset = *offset_ptr + m_coff_header.hdrsize;
if (*offset_ptr < end_offset)
{
success = true;
@@ -429,7 +429,7 @@
DataBufferSP section_header_data_sp(m_file.ReadFileContents (section_header_data_offset, section_header_byte_size));
DataExtractor section_header_data (section_header_data_sp, GetByteOrder(), addr_byte_size);
- uint32_t offset = 0;
+ lldb::offset_t offset = 0;
if (section_header_data.ValidOffsetForDataOfSize (offset, section_header_byte_size))
{
m_sect_headers.resize(nsects);
@@ -462,8 +462,8 @@
{
if (sect.name[0] == '/')
{
- uint32_t stroff = strtoul(§.name[1], NULL, 10);
- uint32_t string_file_offset = m_coff_header.symoff + (m_coff_header.nsyms * 18) + stroff;
+ lldb::offset_t stroff = strtoul(§.name[1], NULL, 10);
+ lldb::offset_t string_file_offset = m_coff_header.symoff + (m_coff_header.nsyms * 18) + stroff;
const char *name = m_data.GetCStr (&string_file_offset);
if (name)
{
@@ -503,7 +503,7 @@
// Include the 4 bytes string table size at the end of the symbols
DataBufferSP symtab_data_sp(m_file.ReadFileContents (m_coff_header.symoff, symbol_data_size + 4));
DataExtractor symtab_data (symtab_data_sp, GetByteOrder(), addr_byte_size);
- uint32_t offset = symbol_data_size;
+ lldb::offset_t offset = symbol_data_size;
const uint32_t strtab_size = symtab_data.GetU32 (&offset);
DataBufferSP strtab_data_sp(m_file.ReadFileContents (m_coff_header.symoff + symbol_data_size + 4, strtab_size));
DataExtractor strtab_data (strtab_data_sp, GetByteOrder(), addr_byte_size);
Modified: lldb/trunk/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.h?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.h (original)
+++ lldb/trunk/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.h Fri Jan 25 12:06:21 2013
@@ -68,7 +68,7 @@
virtual bool
IsExecutable () const;
- virtual size_t
+ virtual uint32_t
GetAddressByteSize () const;
// virtual lldb_private::AddressClass
@@ -212,8 +212,8 @@
} coff_symbol_t;
bool ParseDOSHeader ();
- bool ParseCOFFHeader (uint32_t* offset_ptr);
- bool ParseCOFFOptionalHeader (uint32_t* offset_ptr);
+ bool ParseCOFFHeader (lldb::offset_t *offset_ptr);
+ bool ParseCOFFOptionalHeader (lldb::offset_t *offset_ptr);
bool ParseSectionHeaders (uint32_t offset);
static void DumpDOSHeader(lldb_private::Stream *s, const dos_header_t& header);
Modified: lldb/trunk/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp (original)
+++ lldb/trunk/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp Fri Jan 25 12:06:21 2013
@@ -215,30 +215,33 @@
if (thread_dict)
{
PythonString tid_pystr("tid");
- PythonString name_pystr("name");
- PythonString queue_pystr("queue");
- PythonString state_pystr("state");
- PythonString stop_reason_pystr("stop_reason");
- PythonString reg_data_addr_pystr ("register_data_addr");
-
const tid_t tid = thread_dict.GetItemForKeyAsInteger (tid_pystr, LLDB_INVALID_THREAD_ID);
- const addr_t reg_data_addr = thread_dict.GetItemForKeyAsInteger (reg_data_addr_pystr, LLDB_INVALID_ADDRESS);
- const char *name = thread_dict.GetItemForKeyAsString (name_pystr);
- const char *queue = thread_dict.GetItemForKeyAsString (queue_pystr);
- //const char *state = thread_dict.GetItemForKeyAsString (state_pystr);
- //const char *stop_reason = thread_dict.GetItemForKeyAsString (stop_reason_pystr);
-
- if (old_thread_list_ptr)
- thread_sp = old_thread_list_ptr->FindThreadByID (tid, false);
- if (!thread_sp)
+ if (tid != LLDB_INVALID_THREAD_ID)
{
- if (did_create_ptr)
- *did_create_ptr = true;
- thread_sp.reset (new ThreadMemory (*m_process,
- tid,
- name,
- queue,
- reg_data_addr));
+ PythonString name_pystr("name");
+ PythonString queue_pystr("queue");
+ PythonString state_pystr("state");
+ PythonString stop_reason_pystr("stop_reason");
+ PythonString reg_data_addr_pystr ("register_data_addr");
+
+ const addr_t reg_data_addr = thread_dict.GetItemForKeyAsInteger (reg_data_addr_pystr, LLDB_INVALID_ADDRESS);
+ const char *name = thread_dict.GetItemForKeyAsString (name_pystr);
+ const char *queue = thread_dict.GetItemForKeyAsString (queue_pystr);
+ //const char *state = thread_dict.GetItemForKeyAsString (state_pystr);
+ //const char *stop_reason = thread_dict.GetItemForKeyAsString (stop_reason_pystr);
+
+ if (old_thread_list_ptr)
+ thread_sp = old_thread_list_ptr->FindThreadByID (tid, false);
+ if (!thread_sp)
+ {
+ if (did_create_ptr)
+ *did_create_ptr = true;
+ thread_sp.reset (new ThreadMemory (*m_process,
+ tid,
+ name,
+ queue,
+ reg_data_addr));
+ }
}
}
return thread_sp;
Modified: lldb/trunk/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp (original)
+++ lldb/trunk/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp Fri Jan 25 12:06:21 2013
@@ -122,7 +122,7 @@
{
if (WaitForPacketWithTimeoutMicroSecondsNoLock (reply_packet, GetPacketTimeoutInMicroSeconds ()))
{
- uint32_t offset = 0;
+ lldb::offset_t offset = 0;
const uint8_t reply_command = reply_packet.GetU8 (&offset);
const uint8_t reply_sequence_id = reply_packet.GetU8 (&offset);
if ((reply_command & eCommandTypeMask) == command)
@@ -273,7 +273,7 @@
if (bytes_available >= 8)
{
packet.SetData (&m_bytes[0], bytes_available, m_byte_order);
- uint32_t offset = 0;
+ lldb::offset_t offset = 0;
uint8_t reply_command = packet.GetU8(&offset);
switch (reply_command)
{
@@ -406,7 +406,7 @@
{
// Reset the sequence ID to zero for reattach
ClearKDPSettings ();
- uint32_t offset = 4;
+ lldb::offset_t offset = 4;
m_session_key = reply_packet.GetU32 (&offset);
return true;
}
@@ -440,7 +440,7 @@
DataExtractor reply_packet;
if (SendRequestAndGetReply (command, request_sequence_id, request_packet, reply_packet))
{
- uint32_t offset = 8;
+ lldb::offset_t offset = 8;
m_kdp_version_version = reply_packet.GetU32 (&offset);
m_kdp_version_feature = reply_packet.GetU32 (&offset);
return true;
@@ -568,7 +568,7 @@
DataExtractor reply_packet;
if (SendRequestAndGetReply (command, request_sequence_id, request_packet, reply_packet))
{
- uint32_t offset = 8;
+ lldb::offset_t offset = 8;
m_kdp_hostinfo_cpu_mask = reply_packet.GetU32 (&offset);
m_kdp_hostinfo_cpu_type = reply_packet.GetU32 (&offset);
m_kdp_hostinfo_cpu_subtype = reply_packet.GetU32 (&offset);
@@ -648,7 +648,7 @@
DataExtractor reply_packet;
if (SendRequestAndGetReply (command, request_sequence_id, request_packet, reply_packet))
{
- uint32_t offset = 8;
+ lldb::offset_t offset = 8;
uint32_t kdp_error = reply_packet.GetU32 (&offset);
uint32_t src_len = reply_packet.GetByteSize() - 12;
@@ -696,7 +696,7 @@
DataExtractor reply_packet;
if (SendRequestAndGetReply (command, request_sequence_id, request_packet, reply_packet))
{
- uint32_t offset = 8;
+ lldb::offset_t offset = 8;
uint32_t kdp_error = reply_packet.GetU32 (&offset);
if (kdp_error)
error.SetErrorStringWithFormat ("kdp write memory failed (error %u)", kdp_error);
@@ -730,7 +730,7 @@
if (SendRequestAndGetReply (command, request_sequence_id, request_packet, reply_packet))
{
- uint32_t offset = 8;
+ lldb::offset_t offset = 8;
uint32_t kdp_error = reply_packet.GetU32 (&offset);
if (kdp_error)
error.SetErrorStringWithFormat ("request packet 0x%8.8x failed (error %u)", command_byte, kdp_error);
@@ -799,7 +799,7 @@
}
else
{
- uint32_t offset = 0;
+ lldb::offset_t offset = 0;
const uint8_t first_packet_byte = packet.GetU8 (&offset);
const uint8_t sequence_id = packet.GetU8 (&offset);
const uint16_t length = packet.GetU16 (&offset);
@@ -1152,7 +1152,7 @@
DataExtractor reply_packet;
if (SendRequestAndGetReply (command, request_sequence_id, request_packet, reply_packet))
{
- uint32_t offset = 8;
+ lldb::offset_t offset = 8;
uint32_t kdp_error = reply_packet.GetU32 (&offset);
uint32_t src_len = reply_packet.GetByteSize() - 12;
@@ -1200,7 +1200,7 @@
DataExtractor reply_packet;
if (SendRequestAndGetReply (command, request_sequence_id, request_packet, reply_packet))
{
- uint32_t offset = 8;
+ lldb::offset_t offset = 8;
uint32_t kdp_error = reply_packet.GetU32 (&offset);
if (kdp_error == 0)
return src_len;
@@ -1247,7 +1247,7 @@
DataExtractor reply_packet;
if (SendRequestAndGetReply (command, request_sequence_id, request_packet, reply_packet))
{
- uint32_t offset = 8;
+ lldb::offset_t offset = 8;
uint32_t kdp_error = reply_packet.GetU32 (&offset);
if (kdp_error == 0)
return true;
Modified: lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ThreadKDP.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ThreadKDP.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ThreadKDP.cpp (original)
+++ lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ThreadKDP.cpp Fri Jan 25 12:06:21 2013
@@ -194,7 +194,7 @@
void
ThreadKDP::SetStopInfoFrom_KDP_EXCEPTION (const DataExtractor &exc_reply_packet)
{
- uint32_t offset = 0;
+ lldb::offset_t offset = 0;
uint8_t reply_command = exc_reply_packet.GetU8(&offset);
if (reply_command == CommunicationKDP::KDP_EXCEPTION)
{
Modified: lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_arm.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_arm.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_arm.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_arm.cpp Fri Jan 25 12:06:21 2013
@@ -416,7 +416,7 @@
}
const RegisterInfo *
-RegisterContextDarwin_arm::GetRegisterInfoAtIndex (uint32_t reg)
+RegisterContextDarwin_arm::GetRegisterInfoAtIndex (size_t reg)
{
assert(k_num_register_infos == k_num_registers);
if (reg < k_num_registers)
@@ -464,7 +464,7 @@
}
const RegisterSet *
-RegisterContextDarwin_arm::GetRegisterSet (uint32_t reg_set)
+RegisterContextDarwin_arm::GetRegisterSet (size_t reg_set)
{
if (reg_set < k_num_regsets)
return &g_reg_sets[reg_set];
Modified: lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_arm.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_arm.h?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_arm.h (original)
+++ lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_arm.h Fri Jan 25 12:06:21 2013
@@ -64,13 +64,13 @@
GetRegisterCount ();
virtual const lldb_private::RegisterInfo *
- GetRegisterInfoAtIndex (uint32_t reg);
+ GetRegisterInfoAtIndex (size_t reg);
virtual size_t
GetRegisterSetCount ();
virtual const lldb_private::RegisterSet *
- GetRegisterSet (uint32_t set);
+ GetRegisterSet (size_t set);
virtual bool
ReadRegister (const lldb_private::RegisterInfo *reg_info,
Modified: lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_i386.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_i386.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_i386.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_i386.cpp Fri Jan 25 12:06:21 2013
@@ -298,7 +298,7 @@
}
const RegisterInfo *
-RegisterContextDarwin_i386::GetRegisterInfoAtIndex (uint32_t reg)
+RegisterContextDarwin_i386::GetRegisterInfoAtIndex (size_t reg)
{
assert(k_num_register_infos == k_num_registers);
if (reg < k_num_registers)
@@ -410,7 +410,7 @@
}
const RegisterSet *
-RegisterContextDarwin_i386::GetRegisterSet (uint32_t reg_set)
+RegisterContextDarwin_i386::GetRegisterSet (size_t reg_set)
{
if (reg_set < k_num_regsets)
return &g_reg_sets[reg_set];
Modified: lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_i386.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_i386.h?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_i386.h (original)
+++ lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_i386.h Fri Jan 25 12:06:21 2013
@@ -34,13 +34,13 @@
GetRegisterCount ();
virtual const lldb_private::RegisterInfo *
- GetRegisterInfoAtIndex (uint32_t reg);
+ GetRegisterInfoAtIndex (size_t reg);
virtual size_t
GetRegisterSetCount ();
virtual const lldb_private::RegisterSet *
- GetRegisterSet (uint32_t set);
+ GetRegisterSet (size_t set);
virtual bool
ReadRegister (const lldb_private::RegisterInfo *reg_info, lldb_private::RegisterValue &value);
Modified: lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_x86_64.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_x86_64.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_x86_64.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_x86_64.cpp Fri Jan 25 12:06:21 2013
@@ -336,7 +336,7 @@
const RegisterInfo *
-RegisterContextDarwin_x86_64::GetRegisterInfoAtIndex (uint32_t reg)
+RegisterContextDarwin_x86_64::GetRegisterInfoAtIndex (size_t reg)
{
assert(k_num_register_infos == k_num_registers);
if (reg < k_num_registers)
@@ -457,7 +457,7 @@
}
const RegisterSet *
-RegisterContextDarwin_x86_64::GetRegisterSet (uint32_t reg_set)
+RegisterContextDarwin_x86_64::GetRegisterSet (size_t reg_set)
{
if (reg_set < k_num_regsets)
return &g_reg_sets[reg_set];
Modified: lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_x86_64.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_x86_64.h?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_x86_64.h (original)
+++ lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_x86_64.h Fri Jan 25 12:06:21 2013
@@ -33,13 +33,13 @@
GetRegisterCount ();
virtual const lldb_private::RegisterInfo *
- GetRegisterInfoAtIndex (uint32_t reg);
+ GetRegisterInfoAtIndex (size_t reg);
virtual size_t
GetRegisterSetCount ();
virtual const lldb_private::RegisterSet *
- GetRegisterSet (uint32_t set);
+ GetRegisterSet (size_t set);
virtual bool
ReadRegister (const lldb_private::RegisterInfo *reg_info, lldb_private::RegisterValue &value);
Modified: lldb/trunk/source/Plugins/Process/Utility/RegisterContextLLDB.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterContextLLDB.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/RegisterContextLLDB.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Utility/RegisterContextLLDB.cpp Fri Jan 25 12:06:21 2013
@@ -760,7 +760,7 @@
}
const RegisterInfo *
-RegisterContextLLDB::GetRegisterInfoAtIndex (uint32_t reg)
+RegisterContextLLDB::GetRegisterInfoAtIndex (size_t reg)
{
return m_thread.GetRegisterContext()->GetRegisterInfoAtIndex (reg);
}
@@ -772,7 +772,7 @@
}
const RegisterSet *
-RegisterContextLLDB::GetRegisterSet (uint32_t reg_set)
+RegisterContextLLDB::GetRegisterSet (size_t reg_set)
{
return m_thread.GetRegisterContext()->GetRegisterSet (reg_set);
}
Modified: lldb/trunk/source/Plugins/Process/Utility/RegisterContextLLDB.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterContextLLDB.h?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/RegisterContextLLDB.h (original)
+++ lldb/trunk/source/Plugins/Process/Utility/RegisterContextLLDB.h Fri Jan 25 12:06:21 2013
@@ -46,13 +46,13 @@
GetRegisterCount ();
virtual const lldb_private::RegisterInfo *
- GetRegisterInfoAtIndex (uint32_t reg);
+ GetRegisterInfoAtIndex (size_t reg);
virtual size_t
GetRegisterSetCount ();
virtual const lldb_private::RegisterSet *
- GetRegisterSet (uint32_t reg_set);
+ GetRegisterSet (size_t reg_set);
virtual bool
ReadRegister (const lldb_private::RegisterInfo *reg_info, lldb_private::RegisterValue &value);
Modified: lldb/trunk/source/Plugins/Process/Utility/RegisterContextMacOSXFrameBackchain.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterContextMacOSXFrameBackchain.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/RegisterContextMacOSXFrameBackchain.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Utility/RegisterContextMacOSXFrameBackchain.cpp Fri Jan 25 12:06:21 2013
@@ -59,7 +59,7 @@
}
const RegisterInfo *
-RegisterContextMacOSXFrameBackchain::GetRegisterInfoAtIndex (uint32_t reg)
+RegisterContextMacOSXFrameBackchain::GetRegisterInfoAtIndex (size_t reg)
{
return m_thread.GetRegisterContext()->GetRegisterInfoAtIndex(reg);
}
@@ -73,7 +73,7 @@
const RegisterSet *
-RegisterContextMacOSXFrameBackchain::GetRegisterSet (uint32_t reg_set)
+RegisterContextMacOSXFrameBackchain::GetRegisterSet (size_t reg_set)
{
return m_thread.GetRegisterContext()->GetRegisterSet (reg_set);
}
Modified: lldb/trunk/source/Plugins/Process/Utility/RegisterContextMacOSXFrameBackchain.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterContextMacOSXFrameBackchain.h?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/RegisterContextMacOSXFrameBackchain.h (original)
+++ lldb/trunk/source/Plugins/Process/Utility/RegisterContextMacOSXFrameBackchain.h Fri Jan 25 12:06:21 2013
@@ -42,13 +42,13 @@
GetRegisterCount ();
virtual const lldb_private::RegisterInfo *
- GetRegisterInfoAtIndex (uint32_t reg);
+ GetRegisterInfoAtIndex (size_t reg);
virtual size_t
GetRegisterSetCount ();
virtual const lldb_private::RegisterSet *
- GetRegisterSet (uint32_t reg_set);
+ GetRegisterSet (size_t reg_set);
virtual bool
ReadRegister (const lldb_private::RegisterInfo *reg_info, lldb_private::RegisterValue &value);
Modified: lldb/trunk/source/Plugins/Process/Utility/RegisterContextMemory.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterContextMemory.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/RegisterContextMemory.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Utility/RegisterContextMemory.cpp Fri Jan 25 12:06:21 2013
@@ -80,7 +80,7 @@
}
const RegisterInfo *
-RegisterContextMemory::GetRegisterInfoAtIndex (uint32_t reg)
+RegisterContextMemory::GetRegisterInfoAtIndex (size_t reg)
{
return m_reg_infos.GetRegisterInfoAtIndex (reg);
}
@@ -92,7 +92,7 @@
}
const RegisterSet *
-RegisterContextMemory::GetRegisterSet (uint32_t reg_set)
+RegisterContextMemory::GetRegisterSet (size_t reg_set)
{
return m_reg_infos.GetRegisterSet (reg_set);
}
Modified: lldb/trunk/source/Plugins/Process/Utility/RegisterContextMemory.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterContextMemory.h?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/RegisterContextMemory.h (original)
+++ lldb/trunk/source/Plugins/Process/Utility/RegisterContextMemory.h Fri Jan 25 12:06:21 2013
@@ -46,13 +46,13 @@
GetRegisterCount ();
virtual const lldb_private::RegisterInfo *
- GetRegisterInfoAtIndex (uint32_t reg);
+ GetRegisterInfoAtIndex (size_t reg);
virtual size_t
GetRegisterSetCount ();
virtual const lldb_private::RegisterSet *
- GetRegisterSet (uint32_t reg_set);
+ GetRegisterSet (size_t reg_set);
virtual uint32_t
ConvertRegisterKindToRegisterNumber (uint32_t kind, uint32_t num);
Modified: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp Fri Jan 25 12:06:21 2013
@@ -85,7 +85,7 @@
}
const RegisterInfo *
-GDBRemoteRegisterContext::GetRegisterInfoAtIndex (uint32_t reg)
+GDBRemoteRegisterContext::GetRegisterInfoAtIndex (size_t reg)
{
return m_reg_info.GetRegisterInfoAtIndex (reg);
}
@@ -99,7 +99,7 @@
const RegisterSet *
-GDBRemoteRegisterContext::GetRegisterSet (uint32_t reg_set)
+GDBRemoteRegisterContext::GetRegisterSet (size_t reg_set)
{
return m_reg_info.GetRegisterSet (reg_set);
}
@@ -857,7 +857,7 @@
static ConstString gpr_reg_set ("General Purpose Registers");
static ConstString sfp_reg_set ("Software Floating Point Registers");
static ConstString vfp_reg_set ("Floating Point Registers");
- uint32_t i;
+ size_t i;
if (from_scratch)
{
// Calculate the offsets of the registers
@@ -905,8 +905,8 @@
else
{
// Add composite registers to our primordial registers, then.
- const uint32_t num_composites = llvm::array_lengthof(g_composites);
- const uint32_t num_primordials = GetNumRegisters();
+ const size_t num_composites = llvm::array_lengthof(g_composites);
+ const size_t num_primordials = GetNumRegisters();
RegisterInfo *g_comp_register_infos = g_register_infos + (num_registers - num_composites);
for (i=0; i<num_composites; ++i)
{
Modified: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.h?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.h (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.h Fri Jan 25 12:06:21 2013
@@ -51,7 +51,7 @@
lldb_private::ConstString ®_alt_name,
lldb_private::ConstString &set_name)
{
- const uint32_t reg_num = m_regs.size();
+ const uint32_t reg_num = (uint32_t)m_regs.size();
m_reg_names.push_back (reg_name);
m_reg_alt_names.push_back (reg_alt_name);
reg_info.name = reg_name.AsCString();
@@ -73,7 +73,7 @@
reg_info.invalidate_regs = m_invalidate_regs_map[reg_num].data();
}
m_regs.push_back (reg_info);
- uint32_t set = GetRegisterSetIndexByName (set_name, true);
+ uint32_t set = GetRegisterSetIndexByName (set_name);
assert (set < m_sets.size());
assert (set < m_set_reg_nums.size());
assert (set < m_set_names.size());
@@ -129,20 +129,20 @@
}
uint32_t
- GetRegisterSetIndexByName (lldb_private::ConstString &set_name, bool can_create)
+ GetRegisterSetIndexByName (lldb_private::ConstString &set_name)
{
name_collection::iterator pos, end = m_set_names.end();
for (pos = m_set_names.begin(); pos != end; ++pos)
{
if (*pos == set_name)
- return std::distance (m_set_names.begin(), pos);
+ return static_cast<uint32_t>(std::distance (m_set_names.begin(), pos));
}
m_set_names.push_back(set_name);
m_set_reg_nums.resize(m_set_reg_nums.size()+1);
lldb_private::RegisterSet new_set = { set_name.AsCString(), NULL, 0, NULL };
m_sets.push_back (new_set);
- return m_sets.size() - 1;
+ return static_cast<uint32_t>(m_sets.size() - 1);
}
uint32_t
@@ -152,7 +152,7 @@
for (pos = m_regs.begin(); pos != end; ++pos)
{
if (pos->kinds[kind] == num)
- return std::distance (m_regs.begin(), pos);
+ return static_cast<uint32_t>(std::distance (m_regs.begin(), pos));
}
return LLDB_INVALID_REGNUM;
@@ -217,13 +217,13 @@
GetRegisterCount ();
virtual const lldb_private::RegisterInfo *
- GetRegisterInfoAtIndex (uint32_t reg);
+ GetRegisterInfoAtIndex (size_t reg);
virtual size_t
GetRegisterSetCount ();
virtual const lldb_private::RegisterSet *
- GetRegisterSet (uint32_t reg_set);
+ GetRegisterSet (size_t reg_set);
virtual bool
ReadRegister (const lldb_private::RegisterInfo *reg_info, lldb_private::RegisterValue &value);
Modified: lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp Fri Jan 25 12:06:21 2013
@@ -596,7 +596,7 @@
DataExtractor data4 (buf, sizeof(buf), gdb_remote_arch.GetByteOrder(), 4);
if (DoReadMemory (0xffff0110, buf, 4, error) == 4)
{
- uint32_t offset = 0;
+ lldb::offset_t offset = 0;
kernel_addr = data4.GetU32(&offset);
memory_module_sp = ReadModuleFromMemory (FileSpec("mach_kernel", false), kernel_addr, false, false);
if (!memory_module_sp.get()
@@ -616,7 +616,7 @@
DataExtractor data8 (buf, sizeof(buf), gdb_remote_arch.GetByteOrder(), 8);
if (DoReadMemory (0xffffff8000002010ULL, buf, 8, error) == 8)
{
- uint32_t offset = 0;
+ lldb::offset_t offset = 0;
kernel_addr = data8.GetU64(&offset);
memory_module_sp = ReadModuleFromMemory (FileSpec("mach_kernel", false), kernel_addr, false, false);
if (!memory_module_sp.get()
@@ -3041,7 +3041,7 @@
Error error;
if (ReadMemory (m_dispatch_queue_offsets_addr, memory_buffer, sizeof(dispatch_queue_offsets), error) == sizeof(dispatch_queue_offsets))
{
- uint32_t data_offset = 0;
+ lldb::offset_t data_offset = 0;
if (data.GetU16(&data_offset, &dispatch_queue_offsets.dqo_version, sizeof(dispatch_queue_offsets)/sizeof(uint16_t)))
{
if (ReadMemory (thread_dispatch_qaddr, &memory_buffer, data.GetAddressByteSize(), error) == data.GetAddressByteSize())
Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFAbbreviationDeclaration.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFAbbreviationDeclaration.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFAbbreviationDeclaration.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFAbbreviationDeclaration.cpp Fri Jan 25 12:06:21 2013
@@ -32,13 +32,13 @@
}
bool
-DWARFAbbreviationDeclaration::Extract(const DataExtractor& data, uint32_t* offset_ptr)
+DWARFAbbreviationDeclaration::Extract(const DataExtractor& data, lldb::offset_t* offset_ptr)
{
return Extract(data, offset_ptr, data.GetULEB128(offset_ptr));
}
bool
-DWARFAbbreviationDeclaration::Extract(const DataExtractor& data, uint32_t* offset_ptr, dw_uleb128_t code)
+DWARFAbbreviationDeclaration::Extract(const DataExtractor& data, lldb::offset_t *offset_ptr, dw_uleb128_t code)
{
m_code = code;
m_attributes.clear();
@@ -155,7 +155,7 @@
dw_attr_t attr;
dw_form_t form;
uint32_t i;
- dw_offset_t offset = debug_info_offset;
+ lldb::offset_t offset = debug_info_offset;
for (i = 0; i < num_abbr_decl_attributes; ++i)
{
Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFAbbreviationDeclaration.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFAbbreviationDeclaration.h?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFAbbreviationDeclaration.h (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFAbbreviationDeclaration.h Fri Jan 25 12:06:21 2013
@@ -32,7 +32,7 @@
void SetCode(dw_uleb128_t code) { m_code = code; }
dw_tag_t Tag() const { return m_tag; }
bool HasChildren() const { return m_has_children; }
- uint32_t NumAttributes() const { return m_attributes.size(); }
+ size_t NumAttributes() const { return m_attributes.size(); }
dw_attr_t GetAttrByIndex(uint32_t idx) const { return m_attributes.size() > idx ? m_attributes[idx].get_attr() : 0; }
dw_form_t GetFormByIndex(uint32_t idx) const { return m_attributes.size() > idx ? m_attributes[idx].get_form() : 0; }
bool GetAttrAndFormByIndex(uint32_t idx, dw_attr_t& attr, dw_form_t& form) const
@@ -63,8 +63,8 @@
const DWARFCompileUnit* cu,
const uint32_t strp_min_len);
uint32_t FindAttributeIndex(dw_attr_t attr) const;
- bool Extract(const lldb_private::DataExtractor& data, uint32_t* offset_ptr);
- bool Extract(const lldb_private::DataExtractor& data, uint32_t* offset_ptr, dw_uleb128_t code);
+ bool Extract(const lldb_private::DataExtractor& data, lldb::offset_t *offset_ptr);
+ bool Extract(const lldb_private::DataExtractor& data, lldb::offset_t *offset_ptr, dw_uleb128_t code);
// void Append(BinaryStreamBuf& out_buff) const;
bool IsValid();
void Dump(lldb_private::Stream *s) const;
Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFAttribute.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFAttribute.h?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFAttribute.h (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFAttribute.h Fri Jan 25 12:06:21 2013
@@ -25,12 +25,12 @@
void set_attr(dw_attr_t attr) { m_attr_form = (m_attr_form & 0x0000ffffu) | (attr << 16); }
void set_form(dw_form_t form) { m_attr_form = (m_attr_form & 0xffff0000u) | form; }
dw_attr_t get_attr() const { return m_attr_form >> 16; }
- dw_form_t get_form() const { return m_attr_form; }
+ dw_form_t get_form() const { return (dw_form_t)m_attr_form; }
void get(dw_attr_t& attr, dw_form_t& form) const
{
register uint32_t attr_form = m_attr_form;
attr = attr_form >> 16;
- form = attr_form;
+ form = (dw_form_t)attr_form;
}
bool operator == (const DWARFAttribute& rhs) const { return m_attr_form == rhs.m_attr_form; }
typedef std::vector<DWARFAttribute> collection;
Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp Fri Jan 25 12:06:21 2013
@@ -68,7 +68,7 @@
}
bool
-DWARFCompileUnit::Extract(const DataExtractor &debug_info, uint32_t* offset_ptr)
+DWARFCompileUnit::Extract(const DataExtractor &debug_info, lldb::offset_t *offset_ptr)
{
Clear();
@@ -103,7 +103,7 @@
dw_offset_t
-DWARFCompileUnit::Extract(dw_offset_t offset, const DataExtractor& debug_info_data, const DWARFAbbreviationDeclarationSet* abbrevs)
+DWARFCompileUnit::Extract(lldb::offset_t offset, const DataExtractor& debug_info_data, const DWARFAbbreviationDeclarationSet* abbrevs)
{
Clear();
@@ -167,8 +167,8 @@
// Set the offset to that of the first DIE and calculate the start of the
// next compilation unit header.
- uint32_t offset = GetFirstDIEOffset();
- uint32_t next_cu_offset = GetNextCompileUnitOffset();
+ lldb::offset_t offset = GetFirstDIEOffset();
+ lldb::offset_t next_cu_offset = GetNextCompileUnitOffset();
DWARFDebugInfoEntry die;
// Keep a flat array of the DIE for binary lookup by DIE offset
@@ -273,7 +273,7 @@
// unit header).
if (offset > next_cu_offset)
{
- m_dwarf2Data->GetObjectFile()->GetModule()->ReportWarning ("DWARF compile unit extends beyond its bounds cu 0x%8.8x at 0x%8.8x\n",
+ m_dwarf2Data->GetObjectFile()->GetModule()->ReportWarning ("DWARF compile unit extends beyond its bounds cu 0x%8.8x at 0x%8.8" PRIx64 "\n",
GetOffset(),
offset);
}
Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.h?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.h (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.h Fri Jan 25 12:06:21 2013
@@ -29,8 +29,8 @@
DWARFCompileUnit(SymbolFileDWARF* dwarf2Data);
- bool Extract(const lldb_private::DataExtractor &debug_info, uint32_t* offset_ptr);
- dw_offset_t Extract(dw_offset_t offset, const lldb_private::DataExtractor& debug_info_data, const DWARFAbbreviationDeclarationSet* abbrevs);
+ bool Extract(const lldb_private::DataExtractor &debug_info, lldb::offset_t *offset_ptr);
+ dw_offset_t Extract(lldb::offset_t offset, const lldb_private::DataExtractor& debug_info_data, const DWARFAbbreviationDeclarationSet* abbrevs);
size_t ExtractDIEsIfNeeded (bool cu_die_only);
bool LookupAddress(
const dw_addr_t address,
Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugAbbrev.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugAbbrev.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugAbbrev.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugAbbrev.cpp Fri Jan 25 12:06:21 2013
@@ -30,9 +30,9 @@
// DWARFAbbreviationDeclarationSet::Extract()
//----------------------------------------------------------------------
bool
-DWARFAbbreviationDeclarationSet::Extract(const DataExtractor& data, uint32_t* offset_ptr)
+DWARFAbbreviationDeclarationSet::Extract(const DataExtractor& data, lldb::offset_t *offset_ptr)
{
- const uint32_t begin_offset = *offset_ptr;
+ const lldb::offset_t begin_offset = *offset_ptr;
m_offset = begin_offset;
Clear();
DWARFAbbreviationDeclaration abbrevDeclaration;
@@ -144,7 +144,7 @@
void
DWARFDebugAbbrev::Parse(const DataExtractor& data)
{
- uint32_t offset = 0;
+ lldb::offset_t offset = 0;
while (data.ValidOffset(offset))
{
Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugAbbrev.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugAbbrev.h?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugAbbrev.h (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugAbbrev.h Fri Jan 25 12:06:21 2013
@@ -43,7 +43,7 @@
void Clear();
dw_offset_t GetOffset() const { return m_offset; }
void Dump(lldb_private::Stream *s) const;
- bool Extract(const lldb_private::DataExtractor& data, uint32_t* offset_ptr);
+ bool Extract(const lldb_private::DataExtractor& data, lldb::offset_t *offset_ptr);
//void Encode(BinaryStreamBuf& debug_abbrev_buf) const;
dw_uleb128_t AppendAbbrevDeclSequential(const DWARFAbbreviationDeclaration& abbrevDecl);
Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugArangeSet.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugArangeSet.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugArangeSet.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugArangeSet.cpp Fri Jan 25 12:06:21 2013
@@ -162,7 +162,7 @@
}
bool
-DWARFDebugArangeSet::Extract(const DataExtractor &data, uint32_t* offset_ptr)
+DWARFDebugArangeSet::Extract(const DataExtractor &data, lldb::offset_t *offset_ptr)
{
if (data.ValidOffset(*offset_ptr))
{
Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugArangeSet.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugArangeSet.h?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugArangeSet.h (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugArangeSet.h Fri Jan 25 12:06:21 2013
@@ -41,12 +41,12 @@
void SetHeader(uint16_t version, uint32_t cu_offset, uint8_t addr_size, uint8_t seg_size);
void AddDescriptor(const DWARFDebugArangeSet::Descriptor& range);
void Compact();
- bool Extract(const lldb_private::DataExtractor &data, uint32_t* offset_ptr);
+ bool Extract(const lldb_private::DataExtractor &data, lldb::offset_t *offset_ptr);
void Dump(lldb_private::Stream *s) const;
dw_offset_t GetCompileUnitDIEOffset() const { return m_header.cu_offset; }
dw_offset_t GetOffsetOfNextEntry() const;
dw_offset_t FindAddress(dw_addr_t address) const;
- uint32_t NumDescriptors() const { return m_arange_descriptors.size(); }
+ size_t NumDescriptors() const { return m_arange_descriptors.size(); }
const Header& GetHeader() const { return m_header; }
const Descriptor* GetDescriptor(uint32_t i) const
{
Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugAranges.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugAranges.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugAranges.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugAranges.cpp Fri Jan 25 12:06:21 2013
@@ -60,7 +60,7 @@
{
if (debug_aranges_data.ValidOffset(0))
{
- uint32_t offset = 0;
+ lldb::offset_t offset = 0;
DWARFDebugArangeSet set;
Range range;
Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugAranges.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugAranges.h?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugAranges.h (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugAranges.h Fri Jan 25 12:06:21 2013
@@ -66,7 +66,7 @@
{
return m_aranges.IsEmpty();
}
- uint32_t
+ size_t
GetNumRanges() const
{
return m_aranges.GetSize();
Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp Fri Jan 25 12:06:21 2013
@@ -73,10 +73,9 @@
log->Printf ("DWARFDebugInfo::GetCompileUnitAranges() for \"%s/%s\" by parsing",
m_dwarf2Data->GetObjectFile()->GetFileSpec().GetDirectory().GetCString(),
m_dwarf2Data->GetObjectFile()->GetFileSpec().GetFilename().GetCString());
- const uint32_t num_compile_units = GetNumCompileUnits();
- uint32_t idx;
+ const size_t num_compile_units = GetNumCompileUnits();
const bool clear_dies_if_already_not_parsed = true;
- for (idx = 0; idx < num_compile_units; ++idx)
+ for (size_t idx = 0; idx < num_compile_units; ++idx)
{
DWARFCompileUnit* cu = GetCompileUnitAtIndex(idx);
if (cu)
@@ -148,7 +147,7 @@
{
if (m_dwarf2Data != NULL)
{
- uint32_t offset = 0;
+ lldb::offset_t offset = 0;
const DataExtractor &debug_info_data = m_dwarf2Data->get_debug_info_data();
while (debug_info_data.ValidOffset(offset))
{
@@ -168,7 +167,7 @@
}
}
-uint32_t
+size_t
DWARFDebugInfo::GetNumCompileUnits()
{
ParseCompileUnitHeadersIfNeeded();
@@ -395,7 +394,7 @@
{
if (dwarf2Data)
{
- uint32_t offset = 0;
+ lldb::offset_t offset = 0;
uint32_t depth = 0;
DWARFCompileUnitSP cu(new DWARFCompileUnit(dwarf2Data));
if (cu.get() == NULL)
Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.h?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.h (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.h Fri Jan 25 12:06:21 2013
@@ -45,7 +45,7 @@
DWARFDebugInfoEntry** block_die);
void AddCompileUnit(DWARFCompileUnitSP& cu);
- uint32_t GetNumCompileUnits();
+ size_t GetNumCompileUnits();
bool ContainsCompileUnit (const DWARFCompileUnit *cu) const;
DWARFCompileUnit* GetCompileUnitAtIndex(uint32_t idx);
DWARFCompileUnitSP GetCompileUnit(dw_offset_t cu_offset, uint32_t* idx_ptr = NULL);
Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp Fri Jan 25 12:06:21 2013
@@ -89,7 +89,7 @@
DWARFDebugInfoEntry::Attributes::ExtractFormValueAtIndex (SymbolFileDWARF* dwarf2Data, uint32_t i, DWARFFormValue &form_value) const
{
form_value.SetForm(FormAtIndex(i));
- dw_offset_t offset = DIEOffsetAtIndex(i);
+ lldb::offset_t offset = DIEOffsetAtIndex(i);
return form_value.ExtractValue(dwarf2Data->get_debug_info_data(), &offset, CompileUnitAtIndex(i));
}
@@ -119,7 +119,7 @@
const DataExtractor& debug_info_data,
const DWARFCompileUnit* cu,
const uint8_t *fixed_form_sizes,
- uint32_t* offset_ptr
+ lldb::offset_t *offset_ptr
)
{
m_offset = *offset_ptr;
@@ -134,7 +134,7 @@
if (m_abbr_idx)
{
- uint32_t offset = *offset_ptr;
+ lldb::offset_t offset = *offset_ptr;
const DWARFAbbreviationDeclaration *abbrevDecl = cu->GetAbbreviations()->GetAbbreviationDeclaration(m_abbr_idx);
@@ -273,14 +273,14 @@
(
SymbolFileDWARF* dwarf2Data,
const DWARFCompileUnit* cu,
- uint32_t* offset_ptr
+ lldb::offset_t *offset_ptr
)
{
const DataExtractor& debug_info_data = dwarf2Data->get_debug_info_data();
// const DataExtractor& debug_str_data = dwarf2Data->get_debug_str_data();
const uint32_t cu_end_offset = cu->GetNextCompileUnitOffset();
const uint8_t cu_addr_size = cu->GetAddressByteSize();
- uint32_t offset = *offset_ptr;
+ lldb::offset_t offset = *offset_ptr;
// if (offset >= cu_end_offset)
// Log::Error("DIE at offset 0x%8.8x is beyond the end of the current compile unit (0x%8.8x)", m_offset, cu_end_offset);
if ((offset < cu_end_offset) && debug_info_data.ValidOffset(offset))
@@ -745,12 +745,12 @@
if (dwarf2Data == NULL)
return false;
- dw_addr_t lo_pc = DW_INVALID_ADDRESS;
- dw_addr_t hi_pc = DW_INVALID_ADDRESS;
+ dw_addr_t lo_pc = LLDB_INVALID_ADDRESS;
+ dw_addr_t hi_pc = LLDB_INVALID_ADDRESS;
std::vector<dw_offset_t> die_offsets;
bool set_frame_base_loclist_addr = false;
- dw_offset_t offset;
+ lldb::offset_t offset;
const DWARFAbbreviationDeclaration* abbrevDecl = GetAbbreviationDeclarationPtr(dwarf2Data, cu, offset);
if (abbrevDecl)
@@ -859,7 +859,7 @@
if (loc_list_length > 0)
{
frame_base->SetOpcodeData(debug_loc_data, debug_loc_offset, loc_list_length);
- if (lo_pc != DW_INVALID_ADDRESS)
+ if (lo_pc != LLDB_INVALID_ADDRESS)
{
assert (lo_pc >= cu->GetBaseAddress());
frame_base->SetLocationListSlide(lo_pc - cu->GetBaseAddress());
@@ -882,9 +882,9 @@
if (ranges.IsEmpty())
{
- if (lo_pc != DW_INVALID_ADDRESS)
+ if (lo_pc != LLDB_INVALID_ADDRESS)
{
- if (hi_pc != DW_INVALID_ADDRESS && hi_pc > lo_pc)
+ if (hi_pc != LLDB_INVALID_ADDRESS && hi_pc > lo_pc)
ranges.Append(DWARFDebugRanges::Range (lo_pc, hi_pc - lo_pc));
else
ranges.Append(DWARFDebugRanges::Range (lo_pc, 0));
@@ -934,7 +934,7 @@
) const
{
const DataExtractor& debug_info_data = dwarf2Data->get_debug_info_data();
- uint32_t offset = m_offset;
+ lldb::offset_t offset = m_offset;
if (debug_info_data.ValidOffset(offset))
{
@@ -1028,7 +1028,7 @@
SymbolFileDWARF* dwarf2Data,
const DWARFCompileUnit* cu,
const DataExtractor& debug_info_data,
- uint32_t* offset_ptr,
+ lldb::offset_t *offset_ptr,
Stream &s,
dw_attr_t attr,
dw_form_t form
@@ -1158,7 +1158,7 @@
{
if ( !verbose )
form_value.Dump(s, debug_str_data, cu);
- uint32_t ranges_offset = form_value.Unsigned();
+ lldb::offset_t ranges_offset = form_value.Unsigned();
dw_addr_t base_addr = cu ? cu->GetBaseAddress() : 0;
if (dwarf2Data)
DWARFDebugRanges::Dump(s, dwarf2Data->get_debug_ranges_data(), &ranges_offset, base_addr);
@@ -1190,7 +1190,7 @@
uint32_t curr_depth
) const
{
- uint32_t offset;
+ lldb::offset_t offset;
const DWARFAbbreviationDeclaration* abbrevDecl = GetAbbreviationDeclarationPtr(dwarf2Data, cu, offset);
if (abbrevDecl)
@@ -1287,7 +1287,7 @@
dw_offset_t* end_attr_offset_ptr
) const
{
- uint32_t offset;
+ lldb::offset_t offset;
const DWARFAbbreviationDeclaration* abbrevDecl = GetAbbreviationDeclarationPtr(dwarf2Data, cu, offset);
if (abbrevDecl)
@@ -1438,7 +1438,7 @@
// We have a location list offset as the value that is
// the offset into the .debug_loc section that describes
// the value over it's lifetime
- dw_offset_t debug_loc_offset = form_value.Unsigned();
+ lldb::offset_t debug_loc_offset = form_value.Unsigned();
if (dwarf2Data)
{
assert(dwarf2Data->get_debug_loc_data().GetAddressByteSize() == cu->GetAddressByteSize());
@@ -1553,7 +1553,7 @@
(
SymbolFileDWARF* dwarf2Data,
const DWARFCompileUnit* cu,
- const uint32_t die_offset,
+ const dw_offset_t die_offset,
Stream &s
)
{
@@ -1564,7 +1564,7 @@
}
DWARFDebugInfoEntry die;
- uint32_t offset = die_offset;
+ lldb::offset_t offset = die_offset;
if (die.Extract(dwarf2Data, cu, &offset))
{
if (die.IsNULL())
@@ -1602,7 +1602,7 @@
(
SymbolFileDWARF* dwarf2Data,
const DWARFCompileUnit* cu,
- const uint32_t die_offset,
+ const dw_offset_t die_offset,
Stream &s
)
{
@@ -1613,7 +1613,7 @@
}
DWARFDebugInfoEntry die;
- uint32_t offset = die_offset;
+ lldb::offset_t offset = die_offset;
if (die.Extract(dwarf2Data, cu, &offset))
{
if (die.IsNULL())
@@ -1720,11 +1720,11 @@
{
if (m_tag == DW_TAG_subprogram)
{
- dw_addr_t hi_pc = DW_INVALID_ADDRESS;
- dw_addr_t lo_pc = GetAttributeValueAsUnsigned(dwarf2Data, cu, DW_AT_low_pc, DW_INVALID_ADDRESS);
- if (lo_pc != DW_INVALID_ADDRESS)
- hi_pc = GetAttributeValueAsUnsigned(dwarf2Data, cu, DW_AT_high_pc, DW_INVALID_ADDRESS);
- if (hi_pc != DW_INVALID_ADDRESS)
+ dw_addr_t hi_pc = LLDB_INVALID_ADDRESS;
+ dw_addr_t lo_pc = GetAttributeValueAsUnsigned(dwarf2Data, cu, DW_AT_low_pc, LLDB_INVALID_ADDRESS);
+ if (lo_pc != LLDB_INVALID_ADDRESS)
+ hi_pc = GetAttributeValueAsUnsigned(dwarf2Data, cu, DW_AT_high_pc, LLDB_INVALID_ADDRESS);
+ if (hi_pc != LLDB_INVALID_ADDRESS)
{
/// printf("BuildAddressRangeTable() 0x%8.8x: %30s: [0x%8.8x - 0x%8.8x)\n", m_offset, DW_TAG_value_to_name(tag), lo_pc, hi_pc);
debug_aranges->AppendRange (cu->GetOffset(), lo_pc, hi_pc);
@@ -1761,11 +1761,11 @@
{
if (m_tag == DW_TAG_subprogram)
{
- dw_addr_t hi_pc = DW_INVALID_ADDRESS;
- dw_addr_t lo_pc = GetAttributeValueAsUnsigned(dwarf2Data, cu, DW_AT_low_pc, DW_INVALID_ADDRESS);
- if (lo_pc != DW_INVALID_ADDRESS)
- hi_pc = GetAttributeValueAsUnsigned(dwarf2Data, cu, DW_AT_high_pc, DW_INVALID_ADDRESS);
- if (hi_pc != DW_INVALID_ADDRESS)
+ dw_addr_t hi_pc = LLDB_INVALID_ADDRESS;
+ dw_addr_t lo_pc = GetAttributeValueAsUnsigned(dwarf2Data, cu, DW_AT_low_pc, LLDB_INVALID_ADDRESS);
+ if (lo_pc != LLDB_INVALID_ADDRESS)
+ hi_pc = GetAttributeValueAsUnsigned(dwarf2Data, cu, DW_AT_high_pc, LLDB_INVALID_ADDRESS);
+ if (hi_pc != LLDB_INVALID_ADDRESS)
{
// printf("BuildAddressRangeTable() 0x%8.8x: [0x%16.16" PRIx64 " - 0x%16.16" PRIx64 ")\n", m_offset, lo_pc, hi_pc); // DEBUG ONLY
debug_aranges->AppendRange (GetOffset(), lo_pc, hi_pc);
@@ -2052,11 +2052,11 @@
if (match_addr_range)
{
- dw_addr_t lo_pc = GetAttributeValueAsUnsigned(dwarf2Data, cu, DW_AT_low_pc, DW_INVALID_ADDRESS);
- if (lo_pc != DW_INVALID_ADDRESS)
+ dw_addr_t lo_pc = GetAttributeValueAsUnsigned(dwarf2Data, cu, DW_AT_low_pc, LLDB_INVALID_ADDRESS);
+ if (lo_pc != LLDB_INVALID_ADDRESS)
{
- dw_addr_t hi_pc = GetAttributeValueAsUnsigned(dwarf2Data, cu, DW_AT_high_pc, DW_INVALID_ADDRESS);
- if (hi_pc != DW_INVALID_ADDRESS)
+ dw_addr_t hi_pc = GetAttributeValueAsUnsigned(dwarf2Data, cu, DW_AT_high_pc, LLDB_INVALID_ADDRESS);
+ if (hi_pc != LLDB_INVALID_ADDRESS)
{
// printf("\n0x%8.8x: %30s: address = 0x%8.8x [0x%8.8x - 0x%8.8x) ", m_offset, DW_TAG_value_to_name(tag), address, lo_pc, hi_pc);
if ((lo_pc <= address) && (address < hi_pc))
@@ -2166,7 +2166,7 @@
const DWARFAbbreviationDeclaration*
DWARFDebugInfoEntry::GetAbbreviationDeclarationPtr (SymbolFileDWARF* dwarf2Data,
const DWARFCompileUnit *cu,
- dw_offset_t &offset) const
+ lldb::offset_t &offset) const
{
if (dwarf2Data)
{
Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.h?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.h (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.h Fri Jan 25 12:06:21 2013
@@ -75,7 +75,7 @@
bool ContainsAttribute(dw_attr_t attr) const;
bool RemoveAttribute(dw_attr_t attr);
void Clear() { m_infos.clear(); }
- uint32_t Size() const { return m_infos.size(); }
+ size_t Size() const { return m_infos.size(); }
protected:
struct Info
@@ -145,12 +145,12 @@
const lldb_private::DataExtractor& debug_info_data,
const DWARFCompileUnit* cu,
const uint8_t *fixed_form_sizes,
- dw_offset_t* offset_ptr);
+ lldb::offset_t* offset_ptr);
bool Extract(
SymbolFileDWARF* dwarf2Data,
const DWARFCompileUnit* cu,
- dw_offset_t* offset_ptr);
+ lldb::offset_t* offset_ptr);
bool LookupAddress(
const dw_addr_t address,
@@ -277,7 +277,7 @@
SymbolFileDWARF* dwarf2Data,
const DWARFCompileUnit* cu,
const lldb_private::DataExtractor& debug_info_data,
- uint32_t* offset_ptr,
+ lldb::offset_t *offset_ptr,
lldb_private::Stream &s,
dw_attr_t attr,
dw_form_t form);
@@ -304,7 +304,7 @@
const DWARFAbbreviationDeclaration*
GetAbbreviationDeclarationPtr (SymbolFileDWARF* dwarf2Data,
const DWARFCompileUnit *cu,
- dw_offset_t &offset) const;
+ lldb::offset_t &offset) const;
dw_tag_t
Tag () const
Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp Fri Jan 25 12:06:21 2013
@@ -35,11 +35,11 @@
DWARFDebugLine::Parse(const DataExtractor& debug_line_data)
{
m_lineTableMap.clear();
- dw_offset_t offset = 0;
+ lldb::offset_t offset = 0;
LineTable::shared_ptr line_table_sp(new LineTable);
while (debug_line_data.ValidOffset(offset))
{
- const uint32_t debug_line_offset = offset;
+ const lldb::offset_t debug_line_offset = offset;
if (line_table_sp.get() == NULL)
break;
@@ -135,7 +135,7 @@
{
if (debug_line_data.ValidOffset(debug_line_offset))
{
- uint32_t offset = debug_line_offset;
+ lldb::offset_t offset = debug_line_offset;
log->Printf( "----------------------------------------------------------------------\n"
"debug_line[0x%8.8x]\n"
"----------------------------------------------------------------------\n", debug_line_offset);
@@ -185,7 +185,7 @@
dw_offset_t
DWARFDebugLine::DumpStatementOpcodes(Log *log, const DataExtractor& debug_line_data, const dw_offset_t debug_line_offset, uint32_t flags)
{
- uint32_t offset = debug_line_offset;
+ lldb::offset_t offset = debug_line_offset;
if (debug_line_data.ValidOffset(offset))
{
Prologue prologue;
@@ -200,7 +200,7 @@
else
{
offset = debug_line_offset;
- log->Printf( "0x%8.8x: skipping pad byte %2.2x", offset, debug_line_data.GetU8(&offset));
+ log->Printf( "0x%8.8" PRIx64 ": skipping pad byte %2.2x", offset, debug_line_data.GetU8(&offset));
return offset;
}
@@ -388,7 +388,7 @@
void
DWARFDebugLine::Parse(const DataExtractor& debug_line_data, DWARFDebugLine::State::Callback callback, void* userData)
{
- uint32_t offset = 0;
+ lldb::offset_t offset = 0;
if (debug_line_data.ValidOffset(offset))
{
if (!ParseStatementTable(debug_line_data, &offset, callback, userData))
@@ -401,9 +401,9 @@
// DWARFDebugLine::ParsePrologue
//----------------------------------------------------------------------
bool
-DWARFDebugLine::ParsePrologue(const DataExtractor& debug_line_data, dw_offset_t* offset_ptr, Prologue* prologue)
+DWARFDebugLine::ParsePrologue(const DataExtractor& debug_line_data, lldb::offset_t* offset_ptr, Prologue* prologue)
{
- const uint32_t prologue_offset = *offset_ptr;
+ const lldb::offset_t prologue_offset = *offset_ptr;
//DEBUG_PRINTF("0x%8.8x: ParsePrologue()\n", *offset_ptr);
@@ -416,7 +416,7 @@
return false;
prologue->prologue_length = debug_line_data.GetU32(offset_ptr);
- const dw_offset_t end_prologue_offset = prologue->prologue_length + *offset_ptr;
+ const lldb::offset_t end_prologue_offset = prologue->prologue_length + *offset_ptr;
prologue->min_inst_length = debug_line_data.GetU8(offset_ptr);
prologue->default_is_stmt = debug_line_data.GetU8(offset_ptr);
prologue->line_base = debug_line_data.GetU8(offset_ptr);
@@ -459,8 +459,8 @@
if (*offset_ptr != end_prologue_offset)
{
Host::SystemLog (Host::eSystemLogWarning,
- "warning: parsing line table prologue at 0x%8.8x should have ended at 0x%8.8x but it ended ad 0x%8.8x\n",
- prologue_offset,
+ "warning: parsing line table prologue at 0x%8.8" PRIx64 " should have ended at 0x%8.8" PRIx64 " but it ended ad 0x%8.8" PRIx64 "\n",
+ prologue_offset,
end_prologue_offset,
*offset_ptr);
}
@@ -474,7 +474,7 @@
dw_offset_t stmt_list,
FileSpecList &support_files)
{
- uint32_t offset = stmt_list + 4; // Skip the total length
+ lldb::offset_t offset = stmt_list + 4; // Skip the total length
const char * s;
uint32_t version = debug_line_data.GetU16(&offset);
if (version != 2)
@@ -554,7 +554,7 @@
if (offset != end_prologue_offset)
{
Host::SystemLog (Host::eSystemLogError,
- "warning: parsing line table prologue at 0x%8.8x should have ended at 0x%8.8x but it ended ad 0x%8.8x\n",
+ "warning: parsing line table prologue at 0x%8.8x should have ended at 0x%8.8x but it ended ad 0x%8.8" PRIx64 "\n",
stmt_list,
end_prologue_offset,
offset);
@@ -573,7 +573,7 @@
DWARFDebugLine::ParseStatementTable
(
const DataExtractor& debug_line_data,
- dw_offset_t* offset_ptr,
+ lldb::offset_t* offset_ptr,
DWARFDebugLine::State::Callback callback,
void* userData
)
@@ -613,7 +613,7 @@
{
// Extended Opcodes always start with a zero opcode followed by
// a uleb128 length so you can skip ones you don't know about
- dw_offset_t ext_offset = *offset_ptr;
+ lldb::offset_t ext_offset = *offset_ptr;
dw_uleb128_t len = debug_line_data.GetULEB128(offset_ptr);
dw_offset_t arg_size = len - (*offset_ptr - ext_offset);
@@ -873,7 +873,7 @@
// the prologue and all rows.
//----------------------------------------------------------------------
bool
-DWARFDebugLine::ParseStatementTable(const DataExtractor& debug_line_data, uint32_t* offset_ptr, LineTable* line_table)
+DWARFDebugLine::ParseStatementTable(const DataExtractor& debug_line_data, lldb::offset_t *offset_ptr, LineTable* line_table)
{
return ParseStatementTable(debug_line_data, offset_ptr, ParseStatementTableCallback, line_table);
}
Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.h?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.h (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.h Fri Jan 25 12:06:21 2013
@@ -197,11 +197,11 @@
static bool DumpOpcodes(lldb_private::Log *log, SymbolFileDWARF* dwarf2Data, dw_offset_t line_offset = DW_INVALID_OFFSET, uint32_t dump_flags = 0); // If line_offset is invalid, dump everything
static bool DumpLineTableRows(lldb_private::Log *log, SymbolFileDWARF* dwarf2Data, dw_offset_t line_offset = DW_INVALID_OFFSET); // If line_offset is invalid, dump everything
static bool ParseSupportFiles(const lldb::ModuleSP &module_sp, const lldb_private::DataExtractor& debug_line_data, const char *cu_comp_dir, dw_offset_t stmt_list, lldb_private::FileSpecList &support_files);
- static bool ParsePrologue(const lldb_private::DataExtractor& debug_line_data, dw_offset_t* offset_ptr, Prologue* prologue);
- static bool ParseStatementTable(const lldb_private::DataExtractor& debug_line_data, dw_offset_t* offset_ptr, State::Callback callback, void* userData);
+ static bool ParsePrologue(const lldb_private::DataExtractor& debug_line_data, lldb::offset_t* offset_ptr, Prologue* prologue);
+ static bool ParseStatementTable(const lldb_private::DataExtractor& debug_line_data, lldb::offset_t* offset_ptr, State::Callback callback, void* userData);
static dw_offset_t DumpStatementTable(lldb_private::Log *log, const lldb_private::DataExtractor& debug_line_data, const dw_offset_t line_offset);
static dw_offset_t DumpStatementOpcodes(lldb_private::Log *log, const lldb_private::DataExtractor& debug_line_data, const dw_offset_t line_offset, uint32_t flags);
- static bool ParseStatementTable(const lldb_private::DataExtractor& debug_line_data, uint32_t* offset_ptr, LineTable* line_table);
+ static bool ParseStatementTable(const lldb_private::DataExtractor& debug_line_data, lldb::offset_t *offset_ptr, LineTable* line_table);
static void Parse(const lldb_private::DataExtractor& debug_line_data, DWARFDebugLine::State::Callback callback, void* userData);
// static void AppendLineTableData(const DWARFDebugLine::Prologue* prologue, const DWARFDebugLine::Row::collection& state_coll, const uint32_t addr_size, BinaryStreamBuf &debug_line_data);
Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugMacinfo.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugMacinfo.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugMacinfo.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugMacinfo.cpp Fri Jan 25 12:06:21 2013
@@ -26,7 +26,7 @@
}
void
-DWARFDebugMacinfo::Dump(Stream *s, const DataExtractor& macinfo_data, dw_offset_t offset)
+DWARFDebugMacinfo::Dump(Stream *s, const DataExtractor& macinfo_data, lldb::offset_t offset)
{
DWARFDebugMacinfoEntry maninfo_entry;
if (macinfo_data.GetByteSize() == 0)
@@ -34,7 +34,7 @@
s->PutCString("< EMPTY >\n");
return;
}
- if (offset == DW_INVALID_OFFSET)
+ if (offset == LLDB_INVALID_OFFSET)
{
offset = 0;
while (maninfo_entry.Extract(macinfo_data, &offset))
Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugMacinfo.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugMacinfo.h?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugMacinfo.h (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugMacinfo.h Fri Jan 25 12:06:21 2013
@@ -22,7 +22,7 @@
static void
Dump (lldb_private::Stream *s,
const lldb_private::DataExtractor& macinfo_data,
- dw_offset_t offset = DW_INVALID_OFFSET);
+ lldb::offset_t offset = LLDB_INVALID_OFFSET);
};
Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugMacinfoEntry.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugMacinfoEntry.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugMacinfoEntry.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugMacinfoEntry.cpp Fri Jan 25 12:06:21 2013
@@ -80,7 +80,7 @@
bool
-DWARFDebugMacinfoEntry::Extract(const DataExtractor& mac_info_data, dw_offset_t* offset_ptr)
+DWARFDebugMacinfoEntry::Extract(const DataExtractor& mac_info_data, lldb::offset_t* offset_ptr)
{
if (mac_info_data.ValidOffset(*offset_ptr))
{
Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugMacinfoEntry.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugMacinfoEntry.h?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugMacinfoEntry.h (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugMacinfoEntry.h Fri Jan 25 12:06:21 2013
@@ -39,7 +39,7 @@
bool
Extract(const lldb_private::DataExtractor& mac_info_data,
- dw_offset_t* offset_ptr);
+ lldb::offset_t* offset_ptr);
protected:
Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugPubnames.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugPubnames.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugPubnames.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugPubnames.cpp Fri Jan 25 12:06:21 2013
@@ -40,7 +40,7 @@
if (data.ValidOffset(0))
{
- uint32_t offset = 0;
+ lldb::offset_t offset = 0;
DWARFDebugPubnamesSet set;
while (data.ValidOffset(offset))
Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugPubnamesSet.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugPubnamesSet.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugPubnamesSet.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugPubnamesSet.cpp Fri Jan 25 12:06:21 2013
@@ -78,7 +78,7 @@
bool
-DWARFDebugPubnamesSet::Extract(const DataExtractor& data, uint32_t* offset_ptr)
+DWARFDebugPubnamesSet::Extract(const DataExtractor& data, lldb::offset_t *offset_ptr)
{
if (data.ValidOffset(*offset_ptr))
{
Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugPubnamesSet.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugPubnamesSet.h?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugPubnamesSet.h (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugPubnamesSet.h Fri Jan 25 12:06:21 2013
@@ -70,7 +70,7 @@
uint32_t NumDescriptors() const { return m_descriptors.size(); }
void AddDescriptor(dw_offset_t cu_rel_offset, const char* name);
void Clear();
- bool Extract(const lldb_private::DataExtractor& debug_pubnames_data, uint32_t* offset_ptr);
+ bool Extract(const lldb_private::DataExtractor& debug_pubnames_data, lldb::offset_t *offset_ptr);
void Dump(lldb_private::Log *s) const;
void InitNameIndexes() const;
void Find(const char* name, bool ignore_case, std::vector<dw_offset_t>& die_offset_coll) const;
Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugRanges.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugRanges.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugRanges.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugRanges.cpp Fri Jan 25 12:06:21 2013
@@ -28,7 +28,7 @@
DWARFDebugRanges::Extract(SymbolFileDWARF* dwarf2Data)
{
RangeList range_list;
- dw_offset_t offset = 0;
+ lldb::offset_t offset = 0;
dw_offset_t debug_ranges_offset = offset;
while (Extract(dwarf2Data, &offset, range_list))
{
@@ -82,11 +82,11 @@
//}
bool
-DWARFDebugRanges::Extract(SymbolFileDWARF* dwarf2Data, uint32_t* offset_ptr, RangeList &range_list)
+DWARFDebugRanges::Extract(SymbolFileDWARF* dwarf2Data, lldb::offset_t *offset_ptr, RangeList &range_list)
{
range_list.Clear();
- uint32_t range_offset = *offset_ptr;
+ lldb::offset_t range_offset = *offset_ptr;
const DataExtractor& debug_ranges_data = dwarf2Data->get_debug_ranges_data();
uint32_t addr_size = debug_ranges_data.GetAddressByteSize();
@@ -105,12 +105,12 @@
{
case 2:
if (begin == 0xFFFFull)
- begin = DW_INVALID_ADDRESS;
+ begin = LLDB_INVALID_ADDRESS;
break;
case 4:
if (begin == 0xFFFFFFFFull)
- begin = DW_INVALID_ADDRESS;
+ begin = LLDB_INVALID_ADDRESS;
break;
case 8:
@@ -130,60 +130,9 @@
return range_offset != *offset_ptr;
}
-//
-//dw_addr_t
-//DWARFDebugRanges::RangeList::LowestAddress(const dw_addr_t cu_base_addr) const
-//{
-// dw_addr_t addr = DW_INVALID_ADDRESS;
-// dw_addr_t curr_base_addr = cu_base_addr;
-// if (!ranges.empty())
-// {
-// Range::const_iterator pos = ranges.begin();
-// Range::const_iterator end_pos = ranges.end();
-// for (pos = ranges.begin(); pos != end_pos; ++pos)
-// {
-// if (pos->begin_offset == DW_INVALID_ADDRESS)
-// curr_base_addr = pos->end_offset;
-// else if (curr_base_addr != DW_INVALID_ADDRESS)
-// {
-// dw_addr_t curr_addr = curr_base_addr + pos->begin_offset;
-// if (addr > curr_addr)
-// addr = curr_addr;
-// }
-// }
-// }
-// return addr;
-//}
-//
-//dw_addr_t
-//DWARFDebugRanges::RangeList::HighestAddress(const dw_addr_t cu_base_addr) const
-//{
-// dw_addr_t addr = 0;
-// dw_addr_t curr_base_addr = cu_base_addr;
-// if (!ranges.empty())
-// {
-// Range::const_iterator pos = ranges.begin();
-// Range::const_iterator end_pos = ranges.end();
-// for (pos = ranges.begin(); pos != end_pos; ++pos)
-// {
-// if (pos->begin_offset == DW_INVALID_ADDRESS)
-// curr_base_addr = pos->end_offset;
-// else if (curr_base_addr != DW_INVALID_ADDRESS)
-// {
-// dw_addr_t curr_addr = curr_base_addr + pos->end_offset;
-// if (addr < curr_addr)
-// addr = curr_addr;
-// }
-// }
-// }
-// if (addr != 0)
-// return addr;
-// return DW_INVALID_ADDRESS;
-//}
-//
void
-DWARFDebugRanges::Dump(Stream &s, const DataExtractor& debug_ranges_data, uint32_t* offset_ptr, dw_addr_t cu_base_addr)
+DWARFDebugRanges::Dump(Stream &s, const DataExtractor& debug_ranges_data, lldb::offset_t *offset_ptr, dw_addr_t cu_base_addr)
{
uint32_t addr_size = s.GetAddressByteSize();
bool verbose = s.GetVerbose();
@@ -196,7 +145,7 @@
// Extend 4 byte addresses that consits of 32 bits of 1's to be 64 bits
// of ones
if (begin == 0xFFFFFFFFull && addr_size == 4)
- begin = DW_INVALID_ADDRESS;
+ begin = LLDB_INVALID_ADDRESS;
s.Indent();
if (verbose)
@@ -210,7 +159,7 @@
s.PutCString(" End");
break;
}
- else if (begin == DW_INVALID_ADDRESS)
+ else if (begin == LLDB_INVALID_ADDRESS)
{
// A base address selection entry
base_addr = end;
Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugRanges.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugRanges.h?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugRanges.h (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugRanges.h Fri Jan 25 12:06:21 2013
@@ -26,14 +26,14 @@
DWARFDebugRanges();
~DWARFDebugRanges();
void Extract(SymbolFileDWARF* dwarf2Data);
- static void Dump(lldb_private::Stream &s, const lldb_private::DataExtractor& debug_ranges_data, uint32_t* offset_ptr, dw_addr_t cu_base_addr);
+ static void Dump(lldb_private::Stream &s, const lldb_private::DataExtractor& debug_ranges_data, lldb::offset_t *offset_ptr, dw_addr_t cu_base_addr);
bool FindRanges(dw_offset_t debug_ranges_offset, DWARFDebugRanges::RangeList& range_list) const;
protected:
bool
Extract (SymbolFileDWARF* dwarf2Data,
- uint32_t* offset_ptr,
+ lldb::offset_t *offset_ptr,
RangeList &range_list);
typedef std::map<dw_offset_t, RangeList> range_map;
Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp Fri Jan 25 12:06:21 2013
@@ -114,7 +114,7 @@
}
bool
-DWARFFormValue::ExtractValue(const DataExtractor& data, uint32_t* offset_ptr, const DWARFCompileUnit* cu)
+DWARFFormValue::ExtractValue(const DataExtractor& data, lldb::offset_t* offset_ptr, const DWARFCompileUnit* cu)
{
bool indirect = false;
bool is_block = false;
@@ -178,13 +178,13 @@
}
bool
-DWARFFormValue::SkipValue(const DataExtractor& debug_info_data, uint32_t* offset_ptr, const DWARFCompileUnit* cu) const
+DWARFFormValue::SkipValue(const DataExtractor& debug_info_data, lldb::offset_t *offset_ptr, const DWARFCompileUnit* cu) const
{
return DWARFFormValue::SkipValue(m_form, debug_info_data, offset_ptr, cu);
}
bool
-DWARFFormValue::SkipValue(dw_form_t form, const DataExtractor& debug_info_data, uint32_t* offset_ptr, const DWARFCompileUnit* cu)
+DWARFFormValue::SkipValue(dw_form_t form, const DataExtractor& debug_info_data, lldb::offset_t *offset_ptr, const DWARFCompileUnit* cu)
{
switch (form)
{
Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFFormValue.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFFormValue.h?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFFormValue.h (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFFormValue.h Fri Jan 25 12:06:21 2013
@@ -49,7 +49,9 @@
void SetForm(dw_form_t form) { m_form = form; }
const ValueType& Value() const { return m_value; }
void Dump(lldb_private::Stream &s, const lldb_private::DataExtractor* debug_str_data, const DWARFCompileUnit* cu) const;
- bool ExtractValue(const lldb_private::DataExtractor& data, uint32_t* offset_ptr, const DWARFCompileUnit* cu);
+ bool ExtractValue(const lldb_private::DataExtractor& data,
+ lldb::offset_t* offset_ptr,
+ const DWARFCompileUnit* cu);
bool IsInlinedCStr() const { return (m_value.data != NULL) && m_value.data == (uint8_t*)m_value.value.cstr; }
const uint8_t* BlockData() const;
uint64_t Reference(const DWARFCompileUnit* cu) const;
@@ -60,9 +62,9 @@
int64_t Signed() const { return m_value.value.sval; }
void SetSigned(int64_t sval) { m_value.value.sval = sval; }
const char* AsCString(const lldb_private::DataExtractor* debug_str_data_ptr) const;
- bool SkipValue(const lldb_private::DataExtractor& debug_info_data, uint32_t* offset_ptr, const DWARFCompileUnit* cu) const;
- static bool SkipValue(const dw_form_t form, const lldb_private::DataExtractor& debug_info_data, uint32_t* offset_ptr, const DWARFCompileUnit* cu);
-// static bool TransferValue(dw_form_t form, const lldb_private::DataExtractor& debug_info_data, uint32_t* offset_ptr, const DWARFCompileUnit* cu, BinaryStreamBuf& out_buff);
+ bool SkipValue(const lldb_private::DataExtractor& debug_info_data, lldb::offset_t *offset_ptr, const DWARFCompileUnit* cu) const;
+ static bool SkipValue(const dw_form_t form, const lldb_private::DataExtractor& debug_info_data, lldb::offset_t *offset_ptr, const DWARFCompileUnit* cu);
+// static bool TransferValue(dw_form_t form, const lldb_private::DataExtractor& debug_info_data, lldb::offset_t *offset_ptr, const DWARFCompileUnit* cu, BinaryStreamBuf& out_buff);
// static bool TransferValue(const DWARFFormValue& formValue, const DWARFCompileUnit* cu, BinaryStreamBuf& out_buff);
// static bool PutUnsigned(dw_form_t form, dw_offset_t offset, uint64_t value, BinaryStreamBuf& out_buff, const DWARFCompileUnit* cu, bool fixup_cu_relative_refs);
static bool IsBlockForm(const dw_form_t form);
Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFLocationDescription.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFLocationDescription.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFLocationDescription.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFLocationDescription.cpp Fri Jan 25 12:06:21 2013
@@ -15,7 +15,7 @@
using namespace lldb_private;
-static int print_dwarf_exp_op (Stream &s, const DataExtractor& data, uint32_t* offset_ptr, int address_size, int dwarf_ref_size);
+static int print_dwarf_exp_op (Stream &s, const DataExtractor& data, lldb::offset_t *offset_ptr, int address_size, int dwarf_ref_size);
int
print_dwarf_expression (Stream &s,
@@ -25,7 +25,7 @@
bool location_expression)
{
int op_count = 0;
- uint32_t offset = 0;
+ lldb::offset_t offset = 0;
while (data.ValidOffset(offset))
{
if (location_expression && op_count > 0)
@@ -48,7 +48,7 @@
static int
print_dwarf_exp_op (Stream &s,
const DataExtractor& data,
- uint32_t* offset_ptr,
+ lldb::offset_t *offset_ptr,
int address_size,
int dwarf_ref_size)
{
Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFLocationList.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFLocationList.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFLocationList.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFLocationList.cpp Fri Jan 25 12:06:21 2013
@@ -18,7 +18,7 @@
using namespace lldb_private;
dw_offset_t
-DWARFLocationList::Dump(Stream &s, const DWARFCompileUnit* cu, const DataExtractor& debug_loc_data, dw_offset_t offset)
+DWARFLocationList::Dump(Stream &s, const DWARFCompileUnit* cu, const DataExtractor& debug_loc_data, lldb::offset_t offset)
{
uint64_t start_addr, end_addr;
uint32_t addr_size = DWARFCompileUnit::GetAddressByteSize(cu);
@@ -52,7 +52,7 @@
}
bool
-DWARFLocationList::Extract(const DataExtractor& debug_loc_data, dw_offset_t* offset_ptr, DataExtractor& location_list_data)
+DWARFLocationList::Extract(const DataExtractor& debug_loc_data, lldb::offset_t* offset_ptr, DataExtractor& location_list_data)
{
// Initialize with no data just in case we don't find anything
location_list_data.Clear();
@@ -69,7 +69,7 @@
}
size_t
-DWARFLocationList::Size(const DataExtractor& debug_loc_data, dw_offset_t offset)
+DWARFLocationList::Size(const DataExtractor& debug_loc_data, lldb::offset_t offset)
{
const dw_offset_t debug_loc_offset = offset;
Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFLocationList.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFLocationList.h?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFLocationList.h (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFLocationList.h Fri Jan 25 12:06:21 2013
@@ -19,16 +19,16 @@
Dump (lldb_private::Stream &s,
const DWARFCompileUnit* cu,
const lldb_private::DataExtractor& debug_loc_data,
- dw_offset_t offset);
+ lldb::offset_t offset);
static bool
Extract (const lldb_private::DataExtractor& debug_loc_data,
- dw_offset_t* offset_ptr,
+ lldb::offset_t* offset_ptr,
lldb_private::DataExtractor& location_list_data);
static size_t
Size (const lldb_private::DataExtractor& debug_loc_data,
- dw_offset_t offset);
+ lldb::offset_t offset);
};
#endif // SymbolFileDWARF_DWARFLocationList_h_
Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/HashedNameToDIE.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/HashedNameToDIE.h?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/HashedNameToDIE.h (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/HashedNameToDIE.h Fri Jan 25 12:06:21 2013
@@ -306,8 +306,9 @@
// void
// Dump (std::ostream* ostrm_ptr);
- uint32_t
- Read (const lldb_private::DataExtractor &data, uint32_t offset)
+ lldb::offset_t
+ Read (const lldb_private::DataExtractor &data,
+ lldb::offset_t offset)
{
ClearAtoms ();
@@ -379,8 +380,8 @@
// virtual void
// Dump (std::ostream* ostrm_ptr);
//
- virtual uint32_t
- Read (lldb_private::DataExtractor &data, uint32_t offset)
+ virtual lldb::offset_t
+ Read (lldb_private::DataExtractor &data, lldb::offset_t offset)
{
offset = MappedHash::Header<Prologue>::Read (data, offset);
if (offset != UINT32_MAX)
@@ -392,7 +393,7 @@
bool
Read (const lldb_private::DataExtractor &data,
- uint32_t *offset_ptr,
+ lldb::offset_t *offset_ptr,
DIEInfo &hash_data) const
{
const size_t num_atoms = header_data.atoms.size();
@@ -409,14 +410,14 @@
switch (header_data.atoms[i].type)
{
case eAtomTypeDIEOffset: // DIE offset, check form for encoding
- hash_data.offset = form_value.Reference (header_data.die_base_offset);
+ hash_data.offset = (dw_offset_t)form_value.Reference (header_data.die_base_offset);
break;
case eAtomTypeTag: // DW_TAG value for the DIE
- hash_data.tag = form_value.Unsigned ();
+ hash_data.tag = (dw_tag_t)form_value.Unsigned ();
case eAtomTypeTypeFlags: // Flags from enum TypeFlags
- hash_data.type_flags = form_value.Unsigned ();
+ hash_data.type_flags = (uint32_t)form_value.Unsigned ();
break;
default:
return false;
@@ -559,7 +560,7 @@
virtual Result
GetHashDataForName (const char *name,
- uint32_t* hash_data_offset_ptr,
+ lldb::offset_t* hash_data_offset_ptr,
Pair &pair) const
{
pair.key = m_data.GetU32 (hash_data_offset_ptr);
@@ -580,7 +581,7 @@
}
const uint32_t count = m_data.GetU32 (hash_data_offset_ptr);
- const uint32_t min_total_hash_data_size = count * m_header.header_data.GetMinumumHashDataByteSize();
+ const size_t min_total_hash_data_size = count * m_header.header_data.GetMinumumHashDataByteSize();
if (count > 0 && m_data.ValidOffsetForDataOfSize (*hash_data_offset_ptr, min_total_hash_data_size))
{
// We have at least one HashData entry, and we have enough
@@ -637,7 +638,7 @@
virtual Result
AppendHashDataForRegularExpression (const lldb_private::RegularExpression& regex,
- uint32_t* hash_data_offset_ptr,
+ lldb::offset_t* hash_data_offset_ptr,
Pair &pair) const
{
pair.key = m_data.GetU32 (hash_data_offset_ptr);
@@ -653,7 +654,7 @@
return eResultError;
const uint32_t count = m_data.GetU32 (hash_data_offset_ptr);
- const uint32_t min_total_hash_data_size = count * m_header.header_data.GetMinumumHashDataByteSize();
+ const size_t min_total_hash_data_size = count * m_header.header_data.GetMinumumHashDataByteSize();
if (count > 0 && m_data.ValidOffsetForDataOfSize (*hash_data_offset_ptr, min_total_hash_data_size))
{
const bool match = regex.Execute(strp_cstr);
@@ -712,10 +713,10 @@
Pair pair;
for (uint32_t offset_idx=0; offset_idx<hash_count; ++offset_idx)
{
- uint32_t hash_data_offset = GetHashDataOffset (offset_idx);
+ lldb::offset_t hash_data_offset = GetHashDataOffset (offset_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 = AppendHashDataForRegularExpression (regex, &hash_data_offset, pair);
if (prev_hash_data_offset == hash_data_offset)
break;
@@ -749,7 +750,7 @@
for (uint32_t offset_idx=0; offset_idx<hash_count; ++offset_idx)
{
bool done = false;
- uint32_t hash_data_offset = GetHashDataOffset (offset_idx);
+ lldb::offset_t hash_data_offset = GetHashDataOffset (offset_idx);
while (!done && hash_data_offset != UINT32_MAX)
{
KeyType key = m_data.GetU32 (&hash_data_offset);
Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp Fri Jan 25 12:06:21 2013
@@ -1206,7 +1206,7 @@
SectionSP(),
llvm::OwningPtr<LineSequence>()
};
- uint32_t offset = cu_line_offset;
+ lldb::offset_t offset = cu_line_offset;
DWARFDebugLine::ParseStatementTable(get_debug_line_data(), &offset, ParseDWARFLineTableCallback, &info);
sc.comp_unit->SetLineTable(line_table_ap.release());
return true;
@@ -6858,8 +6858,8 @@
{
const DWARFDebugInfoEntry *function_die = dwarf_cu->GetDIEPtr(sc.function->GetID());
- dw_addr_t func_lo_pc = function_die->GetAttributeValueAsUnsigned (this, dwarf_cu, DW_AT_low_pc, DW_INVALID_ADDRESS);
- if (func_lo_pc != DW_INVALID_ADDRESS)
+ dw_addr_t func_lo_pc = function_die->GetAttributeValueAsUnsigned (this, dwarf_cu, DW_AT_low_pc, LLDB_INVALID_ADDRESS);
+ if (func_lo_pc != LLDB_INVALID_ADDRESS)
{
const size_t num_variables = ParseVariables(sc, dwarf_cu, func_lo_pc, function_die->GetFirstChild(), true, true);
Modified: lldb/trunk/source/Symbol/ClangASTContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/ClangASTContext.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/ClangASTContext.cpp (original)
+++ lldb/trunk/source/Symbol/ClangASTContext.cpp Fri Jan 25 12:06:21 2013
@@ -3372,7 +3372,7 @@
clang_type_t
ClangASTContext::GetDirectBaseClassAtIndex (clang::ASTContext *ast,
clang_type_t clang_type,
- uint32_t idx,
+ size_t idx,
uint32_t *bit_offset_ptr)
{
if (clang_type == NULL)
@@ -3457,7 +3457,7 @@
clang_type_t
ClangASTContext::GetVirtualBaseClassAtIndex (clang::ASTContext *ast,
clang_type_t clang_type,
- uint32_t idx,
+ size_t idx,
uint32_t *bit_offset_ptr)
{
if (clang_type == NULL)
@@ -3516,7 +3516,7 @@
clang_type_t
ClangASTContext::GetFieldAtIndex (clang::ASTContext *ast,
clang_type_t clang_type,
- uint32_t idx,
+ size_t idx,
std::string& name,
uint64_t *bit_offset_ptr,
uint32_t *bitfield_bit_size_ptr,
@@ -3824,7 +3824,7 @@
ExecutionContext *exe_ctx,
const char *parent_name,
clang_type_t parent_clang_type,
- uint32_t idx,
+ size_t idx,
bool transparent_pointers,
bool omit_empty_base_classes,
bool ignore_array_bounds,
@@ -3864,7 +3864,7 @@
ASTContext *ast,
const char *parent_name,
clang_type_t parent_clang_type,
- uint32_t idx,
+ size_t idx,
bool transparent_pointers,
bool omit_empty_base_classes,
bool ignore_array_bounds,
@@ -4168,7 +4168,7 @@
std::pair<uint64_t, unsigned> field_type_info = ast->getTypeInfo(array->getElementType());
char element_name[64];
- ::snprintf (element_name, sizeof (element_name), "[%u]", idx);
+ ::snprintf (element_name, sizeof (element_name), "[%zu]", idx);
child_name.assign(element_name);
assert(field_type_info.first % 8 == 0);
Modified: lldb/trunk/source/Symbol/ClangASTType.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/ClangASTType.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/ClangASTType.cpp (original)
+++ lldb/trunk/source/Symbol/ClangASTType.cpp Fri Jan 25 12:06:21 2013
@@ -808,7 +808,7 @@
const clang::EnumDecl *enum_decl = enum_type->getDecl();
assert(enum_decl);
clang::EnumDecl::enumerator_iterator enum_pos, enum_end_pos;
- uint32_t offset = data_byte_offset;
+ lldb::offset_t offset = data_byte_offset;
const int64_t enum_value = data.GetMaxU64Bitfield(&offset, data_byte_size, bitfield_bit_size, bitfield_bit_offset);
for (enum_pos = enum_decl->enumerator_begin(), enum_end_pos = enum_decl->enumerator_end(); enum_pos != enum_end_pos; ++enum_pos)
{
@@ -1029,7 +1029,7 @@
const clang::EnumDecl *enum_decl = enum_type->getDecl();
assert(enum_decl);
clang::EnumDecl::enumerator_iterator enum_pos, enum_end_pos;
- uint32_t offset = byte_offset;
+ lldb::offset_t offset = byte_offset;
const int64_t enum_value = data.GetMaxU64Bitfield (&offset, byte_size, bitfield_bit_size, bitfield_bit_offset);
for (enum_pos = enum_decl->enumerator_begin(), enum_end_pos = enum_decl->enumerator_end(); enum_pos != enum_end_pos; ++enum_pos)
{
@@ -1160,7 +1160,7 @@
Process *process = exe_ctx->GetProcessPtr();
if (process)
{
- uint32_t offset = data_byte_offset;
+ lldb::offset_t offset = data_byte_offset;
lldb::addr_t pointer_addresss = data.GetMaxU64(&offset, data_byte_size);
std::vector<uint8_t> buf;
if (length > 0)
@@ -1436,7 +1436,7 @@
uint64_t bit_width = ast_context->getTypeSize(qual_type);
uint32_t byte_size = (bit_width + 7 ) / 8;
- uint32_t offset = data_byte_offset;
+ lldb::offset_t offset = data_byte_offset;
switch (encoding)
{
case lldb::eEncodingInvalid:
Modified: lldb/trunk/source/Symbol/DWARFCallFrameInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/DWARFCallFrameInfo.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/DWARFCallFrameInfo.cpp (original)
+++ lldb/trunk/source/Symbol/DWARFCallFrameInfo.cpp Fri Jan 25 12:06:21 2013
@@ -117,13 +117,13 @@
DWARFCallFrameInfo::ParseCIE (const dw_offset_t cie_offset)
{
CIESP cie_sp(new CIE(cie_offset));
- dw_offset_t offset = cie_offset;
+ lldb::offset_t offset = cie_offset;
if (m_cfi_data_initialized == false)
GetCFIData();
const uint32_t length = m_cfi_data.GetU32(&offset);
const dw_offset_t cie_id = m_cfi_data.GetU32(&offset);
const dw_offset_t end_offset = cie_offset + length + 4;
- if (length > 0 && ((!m_is_eh_frame && cie_id == 0xfffffffful) || (m_is_eh_frame && cie_id == 0ul)))
+ if (length > 0 && ((!m_is_eh_frame && cie_id == UINT32_MAX) || (m_is_eh_frame && cie_id == 0ul)))
{
size_t i;
// cie.offset = cie_offset;
@@ -302,7 +302,7 @@
if (m_fde_index_initialized) // if two threads hit the locker
return;
- dw_offset_t offset = 0;
+ lldb::offset_t offset = 0;
if (m_cfi_data_initialized == false)
GetCFIData();
while (m_cfi_data.ValidOffsetForDataOfSize (offset, 8))
@@ -349,9 +349,10 @@
}
bool
-DWARFCallFrameInfo::FDEToUnwindPlan (dw_offset_t offset, Address startaddr, UnwindPlan& unwind_plan)
+DWARFCallFrameInfo::FDEToUnwindPlan (dw_offset_t dwarf_offset, Address startaddr, UnwindPlan& unwind_plan)
{
- dw_offset_t current_entry = offset;
+ lldb::offset_t offset = dwarf_offset;
+ lldb::offset_t current_entry = offset;
if (m_section_sp.get() == NULL || m_section_sp->IsEncrypted())
return false;
Modified: lldb/trunk/source/Symbol/Symbol.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/Symbol.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/Symbol.cpp (original)
+++ lldb/trunk/source/Symbol/Symbol.cpp Fri Jan 25 12:06:21 2013
@@ -52,7 +52,7 @@
bool is_artificial,
const lldb::SectionSP §ion_sp,
addr_t offset,
- uint32_t size,
+ addr_t size,
uint32_t flags
) :
SymbolContextScope (),
Modified: lldb/trunk/source/Symbol/SymbolContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/SymbolContext.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/SymbolContext.cpp (original)
+++ lldb/trunk/source/Symbol/SymbolContext.cpp Fri Jan 25 12:06:21 2013
@@ -1044,7 +1044,7 @@
}
bool
-SymbolContextList::GetContextAtIndex(uint32_t idx, SymbolContext& sc) const
+SymbolContextList::GetContextAtIndex(size_t idx, SymbolContext& sc) const
{
if (idx < m_symbol_contexts.size())
{
@@ -1055,7 +1055,7 @@
}
bool
-SymbolContextList::RemoveContextAtIndex (uint32_t idx)
+SymbolContextList::RemoveContextAtIndex (size_t idx)
{
if (idx < m_symbol_contexts.size())
{
@@ -1075,8 +1075,8 @@
SymbolContextList::NumLineEntriesWithLine (uint32_t line) const
{
uint32_t match_count = 0;
- const uint32_t size = m_symbol_contexts.size();
- for (uint32_t idx = 0; idx<size; ++idx)
+ const size_t size = m_symbol_contexts.size();
+ for (size_t idx = 0; idx<size; ++idx)
{
if (m_symbol_contexts[idx].line_entry.line == line)
++match_count;
@@ -1089,8 +1089,8 @@
lldb::DescriptionLevel level,
Target *target) const
{
- const uint32_t size = m_symbol_contexts.size();
- for (uint32_t idx = 0; idx<size; ++idx)
+ const size_t size = m_symbol_contexts.size();
+ for (size_t idx = 0; idx<size; ++idx)
m_symbol_contexts[idx].GetDescription (s, level, target);
}
Modified: lldb/trunk/source/Symbol/SymbolVendor.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/SymbolVendor.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/SymbolVendor.cpp (original)
+++ lldb/trunk/source/Symbol/SymbolVendor.cpp Fri Jan 25 12:06:21 2013
@@ -39,7 +39,7 @@
// We currently only have one debug symbol parser...
//----------------------------------------------------------------------
SymbolVendorCreateInstance create_callback;
- for (uint32_t idx = 0; (create_callback = PluginManager::GetSymbolVendorCreateCallbackAtIndex(idx)) != NULL; ++idx)
+ for (size_t idx = 0; (create_callback = PluginManager::GetSymbolVendorCreateCallbackAtIndex(idx)) != NULL; ++idx)
{
instance_ap.reset(create_callback(module_sp, feedback_strm));
@@ -102,13 +102,13 @@
}
bool
-SymbolVendor::SetCompileUnitAtIndex (uint32_t idx, const CompUnitSP &cu_sp)
+SymbolVendor::SetCompileUnitAtIndex (size_t idx, const CompUnitSP &cu_sp)
{
ModuleSP module_sp(GetModule());
if (module_sp)
{
lldb_private::Mutex::Locker locker(module_sp->GetMutex());
- const uint32_t num_compile_units = GetNumCompileUnits();
+ const size_t num_compile_units = GetNumCompileUnits();
if (idx < num_compile_units)
{
// Fire off an assertion if this compile unit already exists for now.
@@ -130,7 +130,7 @@
return false;
}
-uint32_t
+size_t
SymbolVendor::GetNumCompileUnits()
{
ModuleSP module_sp(GetModule());
@@ -284,8 +284,8 @@
return 0;
}
-uint32_t
-SymbolVendor::FindGlobalVariables (const ConstString &name, const ClangNamespaceDecl *namespace_decl, bool append, uint32_t max_matches, VariableList& variables)
+size_t
+SymbolVendor::FindGlobalVariables (const ConstString &name, const ClangNamespaceDecl *namespace_decl, bool append, size_t max_matches, VariableList& variables)
{
ModuleSP module_sp(GetModule());
if (module_sp)
@@ -297,8 +297,8 @@
return 0;
}
-uint32_t
-SymbolVendor::FindGlobalVariables (const RegularExpression& regex, bool append, uint32_t max_matches, VariableList& variables)
+size_t
+SymbolVendor::FindGlobalVariables (const RegularExpression& regex, bool append, size_t max_matches, VariableList& variables)
{
ModuleSP module_sp(GetModule());
if (module_sp)
@@ -310,7 +310,7 @@
return 0;
}
-uint32_t
+size_t
SymbolVendor::FindFunctions(const ConstString &name, const ClangNamespaceDecl *namespace_decl, uint32_t name_type_mask, bool include_inlines, bool append, SymbolContextList& sc_list)
{
ModuleSP module_sp(GetModule());
@@ -323,7 +323,7 @@
return 0;
}
-uint32_t
+size_t
SymbolVendor::FindFunctions(const RegularExpression& regex, bool include_inlines, bool append, SymbolContextList& sc_list)
{
ModuleSP module_sp(GetModule());
@@ -337,8 +337,8 @@
}
-uint32_t
-SymbolVendor::FindTypes (const SymbolContext& sc, const ConstString &name, const ClangNamespaceDecl *namespace_decl, bool append, uint32_t max_matches, TypeList& types)
+size_t
+SymbolVendor::FindTypes (const SymbolContext& sc, const ConstString &name, const ClangNamespaceDecl *namespace_decl, bool append, size_t max_matches, TypeList& types)
{
ModuleSP module_sp(GetModule());
if (module_sp)
@@ -409,13 +409,13 @@
}
CompUnitSP
-SymbolVendor::GetCompileUnitAtIndex(uint32_t idx)
+SymbolVendor::GetCompileUnitAtIndex(size_t idx)
{
CompUnitSP cu_sp;
ModuleSP module_sp(GetModule());
if (module_sp)
{
- const uint32_t num_compile_units = GetNumCompileUnits();
+ const size_t num_compile_units = GetNumCompileUnits();
if (idx < num_compile_units)
{
cu_sp = m_compile_units[idx];
Modified: lldb/trunk/source/Symbol/Symtab.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/Symtab.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/Symtab.cpp (original)
+++ lldb/trunk/source/Symbol/Symtab.cpp Fri Jan 25 12:06:21 2013
@@ -38,7 +38,7 @@
}
void
-Symtab::Reserve(uint32_t count)
+Symtab::Reserve(size_t count)
{
// Clients should grab the mutex from this symbol table and lock it manually
// when calling this function to avoid performance issues.
@@ -46,7 +46,7 @@
}
Symbol *
-Symtab::Resize(uint32_t count)
+Symtab::Resize(size_t count)
{
// Clients should grab the mutex from this symbol table and lock it manually
// when calling this function to avoid performance issues.
@@ -150,7 +150,7 @@
std::vector<uint32_t>::const_iterator end = m_addr_indexes.end();
for (pos = m_addr_indexes.begin(); pos != end; ++pos)
{
- uint32_t idx = *pos;
+ size_t idx = *pos;
if (idx < num_symbols)
{
s->Indent();
@@ -180,7 +180,7 @@
DumpSymbolHeader (s);
for (pos = indexes.begin(); pos != end; ++pos)
{
- uint32_t idx = *pos;
+ size_t idx = *pos;
if (idx < num_symbols)
{
s->Indent();
@@ -230,7 +230,7 @@
Symbol *
-Symtab::SymbolAtIndex(uint32_t idx)
+Symtab::SymbolAtIndex(size_t idx)
{
// Clients should grab the mutex from this symbol table and lock it manually
// when calling this function to avoid performance issues.
@@ -241,7 +241,7 @@
const Symbol *
-Symtab::SymbolAtIndex(uint32_t idx) const
+Symtab::SymbolAtIndex(size_t idx) const
{
// Clients should grab the mutex from this symbol table and lock it manually
// when calling this function to avoid performance issues.
@@ -657,7 +657,7 @@
Mutex::Locker locker (m_mutex);
const size_t count = m_symbols.size();
- for (uint32_t idx = start_idx; idx < count; ++idx)
+ for (size_t idx = start_idx; idx < count; ++idx)
{
if (symbol_type == eSymbolTypeAny || m_symbols[idx].GetType() == symbol_type)
{
Modified: lldb/trunk/source/Symbol/VariableList.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/VariableList.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/VariableList.cpp (original)
+++ lldb/trunk/source/Symbol/VariableList.cpp Fri Jan 25 12:06:21 2013
@@ -67,7 +67,7 @@
}
VariableSP
-VariableList::GetVariableAtIndex(uint32_t idx) const
+VariableList::GetVariableAtIndex(size_t idx) const
{
VariableSP var_sp;
if (idx < m_variables.size())
@@ -76,7 +76,7 @@
}
VariableSP
-VariableList::RemoveVariableAtIndex(uint32_t idx)
+VariableList::RemoveVariableAtIndex(size_t idx)
{
VariableSP var_sp;
if (idx < m_variables.size())
Modified: lldb/trunk/source/Target/Process.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Process.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Target/Process.cpp (original)
+++ lldb/trunk/source/Target/Process.cpp Fri Jan 25 12:06:21 2013
@@ -2001,7 +2001,7 @@
}
else
{
- bp_site_sp.reset (new BreakpointSite (&m_breakpoint_site_list, owner, load_addr, LLDB_INVALID_THREAD_ID, use_hardware));
+ bp_site_sp.reset (new BreakpointSite (&m_breakpoint_site_list, owner, load_addr, use_hardware));
if (bp_site_sp)
{
if (EnableBreakpoint (bp_site_sp.get()).Success())
@@ -2520,7 +2520,7 @@
}
size_t
-Process::WriteScalarToMemory (addr_t addr, const Scalar &scalar, uint32_t byte_size, Error &error)
+Process::WriteScalarToMemory (addr_t addr, const Scalar &scalar, size_t byte_size, Error &error)
{
if (byte_size == UINT32_MAX)
byte_size = scalar.GetByteSize();
@@ -2555,7 +2555,7 @@
if (bytes_read == byte_size)
{
DataExtractor data (&uval, sizeof(uval), GetByteOrder(), GetAddressByteSize());
- uint32_t offset = 0;
+ lldb::offset_t offset = 0;
if (byte_size <= 4)
scalar = data.GetMaxU32 (&offset, byte_size);
else
Modified: lldb/trunk/source/Target/Target.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Target.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Target/Target.cpp (original)
+++ lldb/trunk/source/Target/Target.cpp Fri Jan 25 12:06:21 2013
@@ -1418,7 +1418,7 @@
if (bytes_read == byte_size)
{
DataExtractor data (&uval, sizeof(uval), m_arch.GetByteOrder(), m_arch.GetAddressByteSize());
- uint32_t offset = 0;
+ lldb::offset_t offset = 0;
if (byte_size <= 4)
scalar = data.GetMaxU32 (&offset, byte_size);
else
Modified: lldb/trunk/source/Utility/StringExtractor.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Utility/StringExtractor.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Utility/StringExtractor.cpp (original)
+++ lldb/trunk/source/Utility/StringExtractor.cpp Fri Jan 25 12:06:21 2013
@@ -134,7 +134,7 @@
++m_index;
return ch;
}
- m_index = UINT32_MAX;
+ m_index = UINT64_MAX;
return fail_value;
}
@@ -157,7 +157,7 @@
}
}
if (set_eof_on_fail || m_index >= m_packet.size())
- m_index = UINT32_MAX;
+ m_index = UINT64_MAX;
return fail_value;
}
@@ -195,7 +195,7 @@
// Make sure we don't exceed the size of a uint32_t...
if (nibble_count >= (sizeof(uint32_t) * 2))
{
- m_index = UINT32_MAX;
+ m_index = UINT64_MAX;
return fail_value;
}
@@ -227,7 +227,7 @@
// Make sure we don't exceed the size of a uint32_t...
if (nibble_count >= (sizeof(uint32_t) * 2))
{
- m_index = UINT32_MAX;
+ m_index = UINT64_MAX;
return fail_value;
}
@@ -257,7 +257,7 @@
// Make sure we don't exceed the size of a uint64_t...
if (nibble_count >= (sizeof(uint64_t) * 2))
{
- m_index = UINT32_MAX;
+ m_index = UINT64_MAX;
return fail_value;
}
@@ -289,7 +289,7 @@
// Make sure we don't exceed the size of a uint64_t...
if (nibble_count >= (sizeof(uint64_t) * 2))
{
- m_index = UINT32_MAX;
+ m_index = UINT64_MAX;
return fail_value;
}
@@ -341,7 +341,7 @@
// Little Endian
uint32_t shift_amount;
for (i = 0, shift_amount = 0;
- i < byte_size && m_index != UINT32_MAX;
+ i < byte_size && IsGood();
++i, shift_amount += 8)
{
result |= ((uint64_t)GetHexU8() << shift_amount);
@@ -350,14 +350,14 @@
else
{
// Big Endian
- for (i = 0; i < byte_size && m_index != UINT32_MAX; ++i)
+ for (i = 0; i < byte_size && IsGood(); ++i)
{
result <<= 8;
result |= GetHexU8();
}
}
}
- m_index = UINT32_MAX;
+ m_index = UINT64_MAX;
return fail_value;
}
@@ -392,6 +392,6 @@
}
}
}
- m_index = UINT32_MAX;
+ m_index = UINT64_MAX;
return false;
}
Modified: lldb/trunk/source/Utility/StringExtractor.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Utility/StringExtractor.h?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/source/Utility/StringExtractor.h (original)
+++ lldb/trunk/source/Utility/StringExtractor.h Fri Jan 25 12:06:21 2013
@@ -45,10 +45,10 @@
bool
IsGood() const
{
- return m_index != UINT32_MAX;
+ return m_index != UINT64_MAX;
}
- uint32_t
+ uint64_t
GetFilePos () const
{
return m_index;
@@ -79,7 +79,7 @@
return m_packet.empty();
}
- uint32_t
+ size_t
GetBytesLeft ()
{
if (m_index < m_packet.size())
@@ -126,9 +126,9 @@
// For StringExtractor only
//------------------------------------------------------------------
std::string m_packet; // The string in which to extract data.
- uint32_t m_index; // When extracting data from a packet, this index
+ uint64_t m_index; // When extracting data from a packet, this index
// will march along as things get extracted. If set
- // to UINT32_MAX the end of the packet data was
+ // to UINT64_MAX the end of the packet data was
// reached when decoding information
};
Modified: lldb/trunk/tools/debugserver/source/DNBDataRef.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/DNBDataRef.cpp?rev=173463&r1=173462&r2=173463&view=diff
==============================================================================
--- lldb/trunk/tools/debugserver/source/DNBDataRef.cpp (original)
+++ lldb/trunk/tools/debugserver/source/DNBDataRef.cpp Fri Jan 25 12:06:21 2013
@@ -195,105 +195,6 @@
assert(m_ptrSize != 0);
return GetMax64(offset_ptr, m_ptrSize);
}
-
-//----------------------------------------------------------------------
-// GetDwarfEHPtr
-//
-// Used for calls when the value type is specified by a DWARF EH Frame
-// pointer encoding.
-//----------------------------------------------------------------------
-/*
-uint64_t
-DNBDataRef::GetDwarfEHPtr(offset_t *offset_ptr, uint32_t encoding) const
-{
- if (encoding == DW_EH_PE_omit)
- return ULLONG_MAX; // Value isn't in the buffer...
-
- uint64_t baseAddress = 0;
- uint64_t addressValue = 0;
-
- BOOL signExtendValue = NO;
- // Decode the base part or adjust our offset
- switch (encoding & 0x70)
- {
- case DW_EH_PE_pcrel:
- // SetEHPtrBaseAddresses should be called prior to extracting these
- // so the base addresses are cached.
- assert(m_addrPCRelative != INVALID_NUB_ADDRESS);
- signExtendValue = YES;
- baseAddress = *offset_ptr + m_addrPCRelative;
- break;
-
- case DW_EH_PE_textrel:
- // SetEHPtrBaseAddresses should be called prior to extracting these
- // so the base addresses are cached.
- assert(m_addrTEXT != INVALID_NUB_ADDRESS);
- signExtendValue = YES;
- baseAddress = m_addrTEXT;
- break;
-
- case DW_EH_PE_datarel:
- // SetEHPtrBaseAddresses should be called prior to extracting these
- // so the base addresses are cached.
- assert(m_addrDATA != INVALID_NUB_ADDRESS);
- signExtendValue = YES;
- baseAddress = m_addrDATA;
- break;
-
- case DW_EH_PE_funcrel:
- signExtendValue = YES;
- break;
-
- case DW_EH_PE_aligned:
- // SetPointerSize should be called prior to extracting these so the
- // pointer size is cached
- assert(m_ptrSize != 0);
- if (m_ptrSize)
- {
- // Align to a address size boundary first
- uint32_t alignOffset = *offset_ptr % m_ptrSize;
- if (alignOffset)
- offset_ptr += m_ptrSize - alignOffset;
- }
- break;
-
- default:
- break;
- }
-
- // Decode the value part
- switch (encoding & DW_EH_PE_MASK_ENCODING)
- {
- case DW_EH_PE_absptr : addressValue = GetPointer(offset_ptr); break;
- case DW_EH_PE_uleb128 : addressValue = Get_ULEB128(offset_ptr); break;
- case DW_EH_PE_udata2 : addressValue = Get16(offset_ptr); break;
- case DW_EH_PE_udata4 : addressValue = Get32(offset_ptr); break;
- case DW_EH_PE_udata8 : addressValue = Get64(offset_ptr); break;
- case DW_EH_PE_sleb128 : addressValue = Get_SLEB128(offset_ptr); break;
- case DW_EH_PE_sdata2 : addressValue = (int16_t)Get16(offset_ptr); break;
- case DW_EH_PE_sdata4 : addressValue = (int32_t)Get32(offset_ptr); break;
- case DW_EH_PE_sdata8 : addressValue = (int64_t)Get64(offset_ptr); break;
- default:
- // Unhandled encoding type
- assert(encoding);
- break;
- }
-
- // Since we promote everything to 64 bit, we may need to sign extend
- if (signExtendValue && m_ptrSize < sizeof(baseAddress))
- {
- uint64_t sign_bit = 1ull << ((m_ptrSize * 8ull) - 1ull);
- if (sign_bit & addressValue)
- {
- uint64_t mask = ~sign_bit + 1;
- addressValue |= mask;
- }
- }
- return baseAddress + addressValue;
-}
-*/
-
-
//----------------------------------------------------------------------
// GetCStr
//----------------------------------------------------------------------
More information about the lldb-commits
mailing list