[Lldb-commits] [lldb] r331197 - Reflow paragraphs in comments.
Adrian Prantl via lldb-commits
lldb-commits at lists.llvm.org
Mon Apr 30 09:49:06 PDT 2018
Author: adrian
Date: Mon Apr 30 09:49:04 2018
New Revision: 331197
URL: http://llvm.org/viewvc/llvm-project?rev=331197&view=rev
Log:
Reflow paragraphs in comments.
This is intended as a clean up after the big clang-format commit
(r280751), which unfortunately resulted in many of the comment
paragraphs in LLDB being very hard to read.
FYI, the script I used was:
import textwrap
import commands
import os
import sys
import re
tmp = "%s.tmp"%sys.argv[1]
out = open(tmp, "w+")
with open(sys.argv[1], "r") as f:
header = ""
text = ""
comment = re.compile(r'^( *//) ([^ ].*)$')
special = re.compile(r'^((([A-Z]+[: ])|([0-9]+ )).*)|(.*;)$')
for line in f:
match = comment.match(line)
if match and not special.match(match.group(2)):
# skip intentionally short comments.
if not text and len(match.group(2)) < 40:
out.write(line)
continue
if text:
text += " " + match.group(2)
else:
header = match.group(1)
text = match.group(2)
continue
if text:
filled = textwrap.wrap(text, width=(78-len(header)),
break_long_words=False)
for l in filled:
out.write(header+" "+l+'\n')
text = ""
out.write(line)
os.rename(tmp, sys.argv[1])
Differential Revision: https://reviews.llvm.org/D46144
Modified:
lldb/trunk/include/lldb/API/SBAddress.h
lldb/trunk/include/lldb/API/SBBroadcaster.h
lldb/trunk/include/lldb/API/SBCommandInterpreter.h
lldb/trunk/include/lldb/API/SBCommandReturnObject.h
lldb/trunk/include/lldb/API/SBData.h
lldb/trunk/include/lldb/API/SBExpressionOptions.h
lldb/trunk/include/lldb/API/SBFrame.h
lldb/trunk/include/lldb/API/SBInstruction.h
lldb/trunk/include/lldb/API/SBInstructionList.h
lldb/trunk/include/lldb/API/SBProcess.h
lldb/trunk/include/lldb/API/SBStream.h
lldb/trunk/include/lldb/API/SBSymbol.h
lldb/trunk/include/lldb/API/SBTarget.h
lldb/trunk/include/lldb/API/SBValue.h
lldb/trunk/include/lldb/API/SBValueList.h
lldb/trunk/include/lldb/Breakpoint/Breakpoint.h
lldb/trunk/include/lldb/Breakpoint/BreakpointLocation.h
lldb/trunk/include/lldb/Breakpoint/BreakpointLocationCollection.h
lldb/trunk/include/lldb/Breakpoint/BreakpointLocationList.h
lldb/trunk/include/lldb/Breakpoint/BreakpointName.h
lldb/trunk/include/lldb/Breakpoint/BreakpointOptions.h
lldb/trunk/include/lldb/Breakpoint/BreakpointResolver.h
lldb/trunk/include/lldb/Breakpoint/BreakpointResolverAddress.h
lldb/trunk/include/lldb/Breakpoint/BreakpointResolverName.h
lldb/trunk/include/lldb/Breakpoint/BreakpointSite.h
lldb/trunk/include/lldb/Breakpoint/StoppointLocation.h
lldb/trunk/include/lldb/Breakpoint/Watchpoint.h
lldb/trunk/include/lldb/Breakpoint/WatchpointList.h
lldb/trunk/include/lldb/Breakpoint/WatchpointOptions.h
lldb/trunk/include/lldb/Core/Address.h
lldb/trunk/include/lldb/Core/AddressRange.h
lldb/trunk/include/lldb/Core/AddressResolverName.h
lldb/trunk/include/lldb/Core/Broadcaster.h
lldb/trunk/include/lldb/Core/Debugger.h
lldb/trunk/include/lldb/Core/Disassembler.h
lldb/trunk/include/lldb/Core/EmulateInstruction.h
lldb/trunk/include/lldb/Core/FormatEntity.h
lldb/trunk/include/lldb/Core/IOHandler.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/ModuleSpec.h
lldb/trunk/include/lldb/Core/PluginManager.h
lldb/trunk/include/lldb/Core/RangeMap.h
lldb/trunk/include/lldb/Core/RegisterValue.h
lldb/trunk/include/lldb/Core/STLUtils.h
lldb/trunk/include/lldb/Core/Scalar.h
lldb/trunk/include/lldb/Core/SearchFilter.h
lldb/trunk/include/lldb/Core/Section.h
lldb/trunk/include/lldb/Core/SourceManager.h
lldb/trunk/include/lldb/Core/StreamBuffer.h
lldb/trunk/include/lldb/Core/UniqueCStringMap.h
lldb/trunk/include/lldb/Core/UserSettingsController.h
lldb/trunk/include/lldb/Core/Value.h
lldb/trunk/include/lldb/Core/ValueObject.h
lldb/trunk/include/lldb/Core/ValueObjectSyntheticFilter.h
lldb/trunk/include/lldb/DataFormatters/DataVisualization.h
lldb/trunk/include/lldb/DataFormatters/FormatClasses.h
lldb/trunk/include/lldb/DataFormatters/FormatManager.h
lldb/trunk/include/lldb/DataFormatters/FormattersContainer.h
lldb/trunk/include/lldb/DataFormatters/StringPrinter.h
lldb/trunk/include/lldb/DataFormatters/TypeFormat.h
lldb/trunk/include/lldb/DataFormatters/TypeSummary.h
lldb/trunk/include/lldb/DataFormatters/TypeSynthetic.h
lldb/trunk/include/lldb/DataFormatters/TypeValidator.h
lldb/trunk/include/lldb/DataFormatters/ValueObjectPrinter.h
lldb/trunk/include/lldb/Expression/ExpressionSourceCode.h
lldb/trunk/include/lldb/Expression/ExpressionVariable.h
lldb/trunk/include/lldb/Expression/IRMemoryMap.h
lldb/trunk/include/lldb/Expression/LLVMUserExpression.h
lldb/trunk/include/lldb/Expression/UtilityFunction.h
lldb/trunk/include/lldb/Host/Debug.h
lldb/trunk/include/lldb/Host/Editline.h
lldb/trunk/include/lldb/Host/MainLoop.h
lldb/trunk/include/lldb/Host/MainLoopBase.h
lldb/trunk/include/lldb/Host/PosixApi.h
lldb/trunk/include/lldb/Host/Predicate.h
lldb/trunk/include/lldb/Host/Socket.h
lldb/trunk/include/lldb/Host/SocketAddress.h
lldb/trunk/include/lldb/Host/Symbols.h
lldb/trunk/include/lldb/Host/TaskPool.h
lldb/trunk/include/lldb/Host/XML.h
lldb/trunk/include/lldb/Host/common/GetOptInc.h
lldb/trunk/include/lldb/Host/common/NativeBreakpoint.h
lldb/trunk/include/lldb/Host/common/NativeProcessProtocol.h
lldb/trunk/include/lldb/Host/common/NativeRegisterContext.h
lldb/trunk/include/lldb/Host/posix/ConnectionFileDescriptorPosix.h
lldb/trunk/include/lldb/Interpreter/CommandAlias.h
lldb/trunk/include/lldb/Interpreter/CommandCompletions.h
lldb/trunk/include/lldb/Interpreter/CommandInterpreter.h
lldb/trunk/include/lldb/Interpreter/CommandObject.h
lldb/trunk/include/lldb/Interpreter/CommandObjectMultiword.h
lldb/trunk/include/lldb/Interpreter/OptionGroupBoolean.h
lldb/trunk/include/lldb/Interpreter/OptionValue.h
lldb/trunk/include/lldb/Interpreter/OptionValueArray.h
lldb/trunk/include/lldb/Interpreter/OptionValueProperties.h
lldb/trunk/include/lldb/Interpreter/OptionValueUInt64.h
lldb/trunk/include/lldb/Interpreter/Options.h
lldb/trunk/include/lldb/Symbol/Block.h
lldb/trunk/include/lldb/Symbol/ClangASTContext.h
lldb/trunk/include/lldb/Symbol/ClangASTImporter.h
lldb/trunk/include/lldb/Symbol/ClangExternalASTSourceCallbacks.h
lldb/trunk/include/lldb/Symbol/CompactUnwindInfo.h
lldb/trunk/include/lldb/Symbol/CompilerType.h
lldb/trunk/include/lldb/Symbol/DWARFCallFrameInfo.h
lldb/trunk/include/lldb/Symbol/DeclVendor.h
lldb/trunk/include/lldb/Symbol/FuncUnwinders.h
lldb/trunk/include/lldb/Symbol/GoASTContext.h
lldb/trunk/include/lldb/Symbol/ObjectFile.h
lldb/trunk/include/lldb/Symbol/Symbol.h
lldb/trunk/include/lldb/Symbol/SymbolFile.h
lldb/trunk/include/lldb/Symbol/SymbolVendor.h
lldb/trunk/include/lldb/Symbol/Type.h
lldb/trunk/include/lldb/Symbol/TypeSystem.h
lldb/trunk/include/lldb/Symbol/UnwindPlan.h
lldb/trunk/include/lldb/Symbol/UnwindTable.h
lldb/trunk/include/lldb/Symbol/Variable.h
lldb/trunk/include/lldb/Symbol/VariableList.h
lldb/trunk/include/lldb/Target/ABI.h
lldb/trunk/include/lldb/Target/DynamicLoader.h
lldb/trunk/include/lldb/Target/ExecutionContext.h
lldb/trunk/include/lldb/Target/Language.h
lldb/trunk/include/lldb/Target/LanguageRuntime.h
lldb/trunk/include/lldb/Target/Memory.h
lldb/trunk/include/lldb/Target/MemoryRegionInfo.h
lldb/trunk/include/lldb/Target/ObjCLanguageRuntime.h
lldb/trunk/include/lldb/Target/Platform.h
lldb/trunk/include/lldb/Target/Process.h
lldb/trunk/include/lldb/Target/ProcessInfo.h
lldb/trunk/include/lldb/Target/ProcessLaunchInfo.h
lldb/trunk/include/lldb/Target/Queue.h
lldb/trunk/include/lldb/Target/QueueItem.h
lldb/trunk/include/lldb/Target/QueueList.h
lldb/trunk/include/lldb/Target/RegisterCheckpoint.h
lldb/trunk/include/lldb/Target/RegisterContext.h
lldb/trunk/include/lldb/Target/RegisterNumber.h
lldb/trunk/include/lldb/Target/SectionLoadHistory.h
lldb/trunk/include/lldb/Target/SectionLoadList.h
lldb/trunk/include/lldb/Target/StackFrame.h
lldb/trunk/include/lldb/Target/StackID.h
lldb/trunk/include/lldb/Target/StopInfo.h
lldb/trunk/include/lldb/Target/Target.h
lldb/trunk/include/lldb/Target/Thread.h
lldb/trunk/include/lldb/Target/ThreadCollection.h
lldb/trunk/include/lldb/Target/ThreadList.h
lldb/trunk/include/lldb/Target/ThreadPlan.h
lldb/trunk/include/lldb/Target/ThreadPlanCallFunction.h
lldb/trunk/include/lldb/Target/ThreadPlanCallFunctionUsingABI.h
lldb/trunk/include/lldb/Target/ThreadPlanShouldStopHere.h
lldb/trunk/include/lldb/Target/ThreadPlanStepRange.h
lldb/trunk/include/lldb/Target/UnixSignals.h
lldb/trunk/include/lldb/Utility/ArchSpec.h
lldb/trunk/include/lldb/Utility/Args.h
lldb/trunk/include/lldb/Utility/ConstString.h
lldb/trunk/include/lldb/Utility/DataBufferHeap.h
lldb/trunk/include/lldb/Utility/History.h
lldb/trunk/include/lldb/Utility/JSON.h
lldb/trunk/include/lldb/Utility/Log.h
lldb/trunk/include/lldb/Utility/SafeMachO.h
lldb/trunk/include/lldb/Utility/SelectHelper.h
lldb/trunk/include/lldb/Utility/SharedCluster.h
lldb/trunk/include/lldb/Utility/SharingPtr.h
lldb/trunk/include/lldb/Utility/Stream.h
lldb/trunk/include/lldb/Utility/StreamTee.h
lldb/trunk/include/lldb/Utility/StringExtractor.h
lldb/trunk/include/lldb/Utility/StringExtractorGDBRemote.h
lldb/trunk/include/lldb/Utility/StringList.h
lldb/trunk/include/lldb/Utility/Timeout.h
lldb/trunk/include/lldb/lldb-enumerations.h
lldb/trunk/include/lldb/lldb-private-enumerations.h
lldb/trunk/include/lldb/lldb-private-forward.h
lldb/trunk/include/lldb/lldb-private-types.h
lldb/trunk/include/lldb/lldb-types.h
lldb/trunk/include/lldb/lldb-versioning.h
lldb/trunk/source/API/SBAddress.cpp
lldb/trunk/source/API/SBBreakpointName.cpp
lldb/trunk/source/API/SBCommandInterpreter.cpp
lldb/trunk/source/API/SBDebugger.cpp
lldb/trunk/source/API/SBEvent.cpp
lldb/trunk/source/API/SBInstruction.cpp
lldb/trunk/source/API/SBInstructionList.cpp
lldb/trunk/source/API/SBLaunchInfo.cpp
lldb/trunk/source/API/SBModule.cpp
lldb/trunk/source/API/SBModuleSpec.cpp
lldb/trunk/source/API/SBProcess.cpp
lldb/trunk/source/API/SBQueueItem.cpp
lldb/trunk/source/API/SBStream.cpp
lldb/trunk/source/API/SBTarget.cpp
lldb/trunk/source/API/SBThread.cpp
lldb/trunk/source/API/SBThreadPlan.cpp
lldb/trunk/source/API/SBType.cpp
lldb/trunk/source/API/SBTypeCategory.cpp
lldb/trunk/source/API/SBValue.cpp
lldb/trunk/source/API/SystemInitializerFull.cpp
lldb/trunk/source/Breakpoint/Breakpoint.cpp
lldb/trunk/source/Breakpoint/BreakpointID.cpp
lldb/trunk/source/Breakpoint/BreakpointIDList.cpp
lldb/trunk/source/Breakpoint/BreakpointLocation.cpp
lldb/trunk/source/Breakpoint/BreakpointLocationList.cpp
lldb/trunk/source/Breakpoint/BreakpointOptions.cpp
lldb/trunk/source/Breakpoint/BreakpointResolver.cpp
lldb/trunk/source/Breakpoint/BreakpointResolverAddress.cpp
lldb/trunk/source/Breakpoint/BreakpointResolverFileLine.cpp
lldb/trunk/source/Breakpoint/BreakpointResolverName.cpp
lldb/trunk/source/Breakpoint/BreakpointSiteList.cpp
lldb/trunk/source/Breakpoint/Watchpoint.cpp
lldb/trunk/source/Breakpoint/WatchpointList.cpp
lldb/trunk/source/Breakpoint/WatchpointOptions.cpp
lldb/trunk/source/Commands/CommandCompletions.cpp
lldb/trunk/source/Commands/CommandObjectApropos.cpp
lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp
lldb/trunk/source/Commands/CommandObjectBreakpointCommand.cpp
lldb/trunk/source/Commands/CommandObjectCommands.cpp
lldb/trunk/source/Commands/CommandObjectDisassemble.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/CommandObjectQuit.cpp
lldb/trunk/source/Commands/CommandObjectRegister.cpp
lldb/trunk/source/Commands/CommandObjectSettings.cpp
lldb/trunk/source/Commands/CommandObjectSource.cpp
lldb/trunk/source/Commands/CommandObjectTarget.cpp
lldb/trunk/source/Commands/CommandObjectThread.cpp
lldb/trunk/source/Commands/CommandObjectType.cpp
lldb/trunk/source/Commands/CommandObjectWatchpoint.cpp
lldb/trunk/source/Commands/CommandObjectWatchpointCommand.cpp
lldb/trunk/source/Core/Address.cpp
lldb/trunk/source/Core/AddressResolverName.cpp
lldb/trunk/source/Core/Broadcaster.cpp
lldb/trunk/source/Core/Communication.cpp
lldb/trunk/source/Core/Debugger.cpp
lldb/trunk/source/Core/Disassembler.cpp
lldb/trunk/source/Core/DumpDataExtractor.cpp
lldb/trunk/source/Core/DynamicLoader.cpp
lldb/trunk/source/Core/FileLineResolver.cpp
lldb/trunk/source/Core/FileSpecList.cpp
lldb/trunk/source/Core/FormatEntity.cpp
lldb/trunk/source/Core/IOHandler.cpp
lldb/trunk/source/Core/Listener.cpp
lldb/trunk/source/Core/Mangled.cpp
lldb/trunk/source/Core/Module.cpp
lldb/trunk/source/Core/ModuleList.cpp
lldb/trunk/source/Core/Opcode.cpp
lldb/trunk/source/Core/PluginManager.cpp
lldb/trunk/source/Core/RegisterValue.cpp
lldb/trunk/source/Core/Scalar.cpp
lldb/trunk/source/Core/Section.cpp
lldb/trunk/source/Core/SourceManager.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/ValueObjectDynamicValue.cpp
lldb/trunk/source/Core/ValueObjectList.cpp
lldb/trunk/source/Core/ValueObjectMemory.cpp
lldb/trunk/source/Core/ValueObjectSyntheticFilter.cpp
lldb/trunk/source/Core/ValueObjectVariable.cpp
lldb/trunk/source/DataFormatters/FormatManager.cpp
lldb/trunk/source/DataFormatters/StringPrinter.cpp
lldb/trunk/source/DataFormatters/TypeFormat.cpp
lldb/trunk/source/DataFormatters/ValueObjectPrinter.cpp
lldb/trunk/source/DataFormatters/VectorType.cpp
lldb/trunk/source/Expression/DWARFExpression.cpp
lldb/trunk/source/Expression/DiagnosticManager.cpp
lldb/trunk/source/Expression/ExpressionSourceCode.cpp
lldb/trunk/source/Expression/ExpressionVariable.cpp
lldb/trunk/source/Expression/FunctionCaller.cpp
lldb/trunk/source/Expression/IRExecutionUnit.cpp
lldb/trunk/source/Expression/IRInterpreter.cpp
lldb/trunk/source/Expression/IRMemoryMap.cpp
lldb/trunk/source/Expression/LLVMUserExpression.cpp
lldb/trunk/source/Expression/Materializer.cpp
lldb/trunk/source/Expression/REPL.cpp
lldb/trunk/source/Expression/UserExpression.cpp
lldb/trunk/source/Host/android/HostInfoAndroid.cpp
lldb/trunk/source/Host/common/Editline.cpp
lldb/trunk/source/Host/common/File.cpp
lldb/trunk/source/Host/common/Host.cpp
lldb/trunk/source/Host/common/HostInfoBase.cpp
lldb/trunk/source/Host/common/MainLoop.cpp
lldb/trunk/source/Host/common/NativeBreakpointList.cpp
lldb/trunk/source/Host/common/NativeProcessProtocol.cpp
lldb/trunk/source/Host/common/NativeRegisterContext.cpp
lldb/trunk/source/Host/common/PseudoTerminal.cpp
lldb/trunk/source/Host/common/Socket.cpp
lldb/trunk/source/Host/common/SoftwareBreakpoint.cpp
lldb/trunk/source/Host/common/Symbols.cpp
lldb/trunk/source/Host/common/TaskPool.cpp
lldb/trunk/source/Host/common/Terminal.cpp
lldb/trunk/source/Host/common/UDPSocket.cpp
lldb/trunk/source/Host/common/XML.cpp
lldb/trunk/source/Host/freebsd/Host.cpp
lldb/trunk/source/Host/linux/Host.cpp
lldb/trunk/source/Host/linux/HostInfoLinux.cpp
lldb/trunk/source/Host/macosx/Symbols.cpp
lldb/trunk/source/Host/macosx/cfcpp/CFCMutableDictionary.cpp
lldb/trunk/source/Host/macosx/cfcpp/CFCString.cpp
lldb/trunk/source/Host/netbsd/Host.cpp
lldb/trunk/source/Host/posix/ConnectionFileDescriptorPosix.cpp
lldb/trunk/source/Host/posix/HostInfoPosix.cpp
lldb/trunk/source/Host/posix/PipePosix.cpp
lldb/trunk/source/Host/posix/ProcessLauncherPosixFork.cpp
lldb/trunk/source/Host/windows/ConnectionGenericFileWindows.cpp
lldb/trunk/source/Host/windows/EditLineWin.cpp
lldb/trunk/source/Host/windows/Host.cpp
lldb/trunk/source/Host/windows/HostInfoWindows.cpp
lldb/trunk/source/Host/windows/HostProcessWindows.cpp
lldb/trunk/source/Host/windows/PipeWindows.cpp
lldb/trunk/source/Interpreter/CommandAlias.cpp
lldb/trunk/source/Interpreter/CommandInterpreter.cpp
lldb/trunk/source/Interpreter/CommandObject.cpp
lldb/trunk/source/Interpreter/CommandObjectRegexCommand.cpp
lldb/trunk/source/Interpreter/CommandReturnObject.cpp
lldb/trunk/source/Interpreter/OptionArgParser.cpp
lldb/trunk/source/Interpreter/OptionGroupBoolean.cpp
lldb/trunk/source/Interpreter/OptionGroupFormat.cpp
lldb/trunk/source/Interpreter/OptionGroupVariable.cpp
lldb/trunk/source/Interpreter/OptionValue.cpp
lldb/trunk/source/Interpreter/OptionValueDictionary.cpp
lldb/trunk/source/Interpreter/OptionValueFileSpec.cpp
lldb/trunk/source/Interpreter/OptionValueFormatEntity.cpp
lldb/trunk/source/Interpreter/OptionValueProperties.cpp
lldb/trunk/source/Interpreter/OptionValueSInt64.cpp
lldb/trunk/source/Interpreter/Options.cpp
lldb/trunk/source/Interpreter/Property.cpp
lldb/trunk/source/Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.cpp
lldb/trunk/source/Plugins/ABI/MacOSX-arm64/ABIMacOSX_arm64.cpp
lldb/trunk/source/Plugins/ABI/MacOSX-i386/ABIMacOSX_i386.cpp
lldb/trunk/source/Plugins/ABI/SysV-arm/ABISysV_arm.cpp
lldb/trunk/source/Plugins/ABI/SysV-arm64/ABISysV_arm64.cpp
lldb/trunk/source/Plugins/ABI/SysV-hexagon/ABISysV_hexagon.cpp
lldb/trunk/source/Plugins/ABI/SysV-i386/ABISysV_i386.cpp (contents, props changed)
lldb/trunk/source/Plugins/ABI/SysV-mips/ABISysV_mips.cpp
lldb/trunk/source/Plugins/ABI/SysV-mips64/ABISysV_mips64.cpp
lldb/trunk/source/Plugins/ABI/SysV-ppc/ABISysV_ppc.cpp
lldb/trunk/source/Plugins/ABI/SysV-ppc64/ABISysV_ppc64.cpp
lldb/trunk/source/Plugins/ABI/SysV-s390x/ABISysV_s390x.cpp
lldb/trunk/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.cpp
lldb/trunk/source/Plugins/Architecture/Arm/ArchitectureArm.cpp
lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp
lldb/trunk/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
lldb/trunk/source/Plugins/DynamicLoader/Hexagon-DYLD/DynamicLoaderHexagonDYLD.cpp
lldb/trunk/source/Plugins/DynamicLoader/Hexagon-DYLD/HexagonDYLDRendezvous.cpp
lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwin.cpp
lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOS.cpp
lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp
lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.cpp
lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp
lldb/trunk/source/Plugins/DynamicLoader/Static/DynamicLoaderStatic.cpp
lldb/trunk/source/Plugins/ExpressionParser/Clang/ASTResultSynthesizer.cpp
lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp
lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp
lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangFunctionCaller.cpp
lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp
lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp
lldb/trunk/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp
lldb/trunk/source/Plugins/ExpressionParser/Go/GoUserExpression.cpp
lldb/trunk/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp
lldb/trunk/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp
lldb/trunk/source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.cpp
lldb/trunk/source/Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.cpp
lldb/trunk/source/Plugins/Instruction/PPC64/EmulateInstructionPPC64.cpp
lldb/trunk/source/Plugins/InstrumentationRuntime/MainThreadChecker/MainThreadCheckerRuntime.cpp
lldb/trunk/source/Plugins/InstrumentationRuntime/TSan/TSanRuntime.cpp
lldb/trunk/source/Plugins/InstrumentationRuntime/UBSan/UBSanRuntime.cpp
lldb/trunk/source/Plugins/Language/CPlusPlus/BlockPointer.cpp
lldb/trunk/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp
lldb/trunk/source/Plugins/Language/CPlusPlus/CPlusPlusNameParser.cpp
lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxx.cpp
lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxList.cpp
lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxMap.cpp
lldb/trunk/source/Plugins/Language/CPlusPlus/LibStdcppUniquePointer.cpp
lldb/trunk/source/Plugins/Language/ObjC/Cocoa.cpp
lldb/trunk/source/Plugins/Language/ObjC/NSError.cpp
lldb/trunk/source/Plugins/Language/ObjC/NSException.cpp
lldb/trunk/source/Plugins/Language/ObjC/NSString.cpp
lldb/trunk/source/Plugins/Language/ObjC/ObjCLanguage.cpp
lldb/trunk/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp
lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCClassDescriptorV2.cpp
lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.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/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeEncodingParser.cpp
lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleThreadPlanStepThroughObjCTrampoline.cpp
lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptExpressionOpts.cpp
lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp
lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptx86ABIFixups.cpp
lldb/trunk/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp
lldb/trunk/source/Plugins/ObjectContainer/Universal-Mach-O/ObjectContainerUniversalMachO.cpp
lldb/trunk/source/Plugins/ObjectFile/ELF/ELFHeader.cpp
lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
lldb/trunk/source/Plugins/ObjectFile/JIT/ObjectFileJIT.cpp
lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
lldb/trunk/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
lldb/trunk/source/Plugins/OperatingSystem/Go/OperatingSystemGo.cpp
lldb/trunk/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp
lldb/trunk/source/Plugins/Platform/Android/AdbClient.cpp
lldb/trunk/source/Plugins/Platform/Android/PlatformAndroid.cpp
lldb/trunk/source/Plugins/Platform/Android/PlatformAndroidRemoteGDBServer.cpp
lldb/trunk/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp
lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp
lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleSimulator.cpp
lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleTVSimulator.cpp
lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleWatchSimulator.cpp
lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp
lldb/trunk/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp
lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteAppleTV.cpp
lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteAppleWatch.cpp
lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteDarwinDevice.cpp
lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp
lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulator.cpp
lldb/trunk/source/Plugins/Platform/NetBSD/PlatformNetBSD.cpp
lldb/trunk/source/Plugins/Platform/OpenBSD/PlatformOpenBSD.cpp
lldb/trunk/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp
lldb/trunk/source/Plugins/Platform/Windows/PlatformWindows.cpp
lldb/trunk/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp
lldb/trunk/source/Plugins/Process/Darwin/CFString.cpp
lldb/trunk/source/Plugins/Process/Darwin/DarwinProcessLauncher.cpp
lldb/trunk/source/Plugins/Process/Darwin/MachException.cpp
lldb/trunk/source/Plugins/Process/Darwin/NativeProcessDarwin.cpp
lldb/trunk/source/Plugins/Process/Darwin/NativeThreadDarwin.cpp
lldb/trunk/source/Plugins/Process/Darwin/NativeThreadListDarwin.cpp
lldb/trunk/source/Plugins/Process/FreeBSD/FreeBSDThread.cpp
lldb/trunk/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp
lldb/trunk/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp
lldb/trunk/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_mips64.cpp
lldb/trunk/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_powerpc.cpp
lldb/trunk/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_x86.cpp
lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp
lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm.cpp
lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp
lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_mips64.cpp
lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_ppc64le.cpp
lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_s390x.cpp
lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.cpp
lldb/trunk/source/Plugins/Process/Linux/NativeThreadLinux.cpp
lldb/trunk/source/Plugins/Process/Linux/SingleStepCheck.cpp
lldb/trunk/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp
lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ThreadKDP.cpp
lldb/trunk/source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp
lldb/trunk/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.cpp
lldb/trunk/source/Plugins/Process/POSIX/CrashReason.cpp
lldb/trunk/source/Plugins/Process/Utility/DynamicRegisterInfo.cpp
lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_arm.cpp
lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_arm64.cpp
lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_i386.cpp
lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_x86_64.cpp
lldb/trunk/source/Plugins/Process/Utility/RegisterContextLLDB.cpp
lldb/trunk/source/Plugins/Process/Utility/RegisterContextMacOSXFrameBackchain.cpp
lldb/trunk/source/Plugins/Process/Utility/RegisterContextMemory.cpp
lldb/trunk/source/Plugins/Process/Utility/RegisterContextPOSIX_arm.cpp
lldb/trunk/source/Plugins/Process/Utility/RegisterContextPOSIX_arm64.cpp
lldb/trunk/source/Plugins/Process/Utility/RegisterContextPOSIX_mips64.cpp
lldb/trunk/source/Plugins/Process/Utility/RegisterContextPOSIX_powerpc.cpp
lldb/trunk/source/Plugins/Process/Utility/RegisterContextPOSIX_ppc64le.cpp
lldb/trunk/source/Plugins/Process/Utility/RegisterContextPOSIX_s390x.cpp
lldb/trunk/source/Plugins/Process/Utility/RegisterContextPOSIX_x86.cpp
lldb/trunk/source/Plugins/Process/Utility/StopInfoMachException.cpp
lldb/trunk/source/Plugins/Process/Utility/UnwindLLDB.cpp
lldb/trunk/source/Plugins/Process/Utility/UnwindMacOSXFrameBackchain.cpp
lldb/trunk/source/Plugins/Process/Windows/Common/DebuggerThread.cpp
lldb/trunk/source/Plugins/Process/Windows/Common/ProcessWindows.cpp
lldb/trunk/source/Plugins/Process/Windows/Common/x64/RegisterContextWindows_x64.cpp
lldb/trunk/source/Plugins/Process/Windows/Common/x86/RegisterContextWindows_x86.cpp
lldb/trunk/source/Plugins/Process/elf-core/ProcessElfCore.cpp
lldb/trunk/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_mips64.cpp
lldb/trunk/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_x86_64.cpp
lldb/trunk/source/Plugins/Process/elf-core/ThreadElfCore.cpp
lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteClientBase.cpp
lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp
lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp
lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp
lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
lldb/trunk/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp
lldb/trunk/source/Plugins/Process/mach-core/ProcessMachCore.cpp
lldb/trunk/source/Plugins/Process/mach-core/ThreadMachCore.cpp
lldb/trunk/source/Plugins/Process/minidump/MinidumpParser.cpp
lldb/trunk/source/Plugins/Process/minidump/MinidumpTypes.cpp
lldb/trunk/source/Plugins/Process/minidump/ProcessMinidump.cpp
lldb/trunk/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp
lldb/trunk/source/Plugins/ScriptInterpreter/Python/PythonExceptionState.cpp
lldb/trunk/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
lldb/trunk/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.cpp
lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserGo.cpp
lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugAbbrev.cpp
lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugArangeSet.cpp
lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp
lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp
lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugRanges.cpp
lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDeclContext.cpp
lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp
lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp
lldb/trunk/source/Plugins/SymbolFile/DWARF/HashedNameToDIE.cpp
lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
lldb/trunk/source/Plugins/SymbolFile/DWARF/UniqueDWARFASTType.cpp
lldb/trunk/source/Plugins/SymbolFile/PDB/PDBASTParser.cpp
lldb/trunk/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp
lldb/trunk/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.cpp
lldb/trunk/source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp
lldb/trunk/source/Plugins/SymbolVendor/MacOSX/SymbolVendorMacOSX.cpp
lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetItemInfoHandler.cpp
lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetPendingItemsHandler.cpp
lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetQueuesHandler.cpp
lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetThreadItemInfoHandler.cpp
lldb/trunk/source/Plugins/SystemRuntime/MacOSX/SystemRuntimeMacOSX.cpp
lldb/trunk/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp
lldb/trunk/source/Plugins/UnwindAssembly/x86/UnwindAssembly-x86.cpp
lldb/trunk/source/Plugins/UnwindAssembly/x86/x86AssemblyInspectionEngine.cpp
lldb/trunk/source/Symbol/ArmUnwindInfo.cpp
lldb/trunk/source/Symbol/Block.cpp
lldb/trunk/source/Symbol/ClangASTContext.cpp
lldb/trunk/source/Symbol/ClangASTImporter.cpp
lldb/trunk/source/Symbol/CompactUnwindInfo.cpp
lldb/trunk/source/Symbol/CompileUnit.cpp
lldb/trunk/source/Symbol/CompilerType.cpp
lldb/trunk/source/Symbol/DWARFCallFrameInfo.cpp
lldb/trunk/source/Symbol/FuncUnwinders.cpp
lldb/trunk/source/Symbol/Function.cpp
lldb/trunk/source/Symbol/GoASTContext.cpp
lldb/trunk/source/Symbol/LineEntry.cpp
lldb/trunk/source/Symbol/LineTable.cpp
lldb/trunk/source/Symbol/ObjectFile.cpp
lldb/trunk/source/Symbol/Symbol.cpp
lldb/trunk/source/Symbol/SymbolContext.cpp
lldb/trunk/source/Symbol/SymbolFile.cpp
lldb/trunk/source/Symbol/SymbolVendor.cpp
lldb/trunk/source/Symbol/Symtab.cpp
lldb/trunk/source/Symbol/Type.cpp
lldb/trunk/source/Symbol/TypeList.cpp
lldb/trunk/source/Symbol/TypeMap.cpp
lldb/trunk/source/Symbol/UnwindPlan.cpp
lldb/trunk/source/Symbol/UnwindTable.cpp
lldb/trunk/source/Symbol/Variable.cpp
lldb/trunk/source/Target/ABI.cpp
lldb/trunk/source/Target/ExecutionContext.cpp
lldb/trunk/source/Target/Memory.cpp
lldb/trunk/source/Target/ModuleCache.cpp
lldb/trunk/source/Target/ObjCLanguageRuntime.cpp
lldb/trunk/source/Target/Platform.cpp
lldb/trunk/source/Target/Process.cpp
lldb/trunk/source/Target/ProcessInfo.cpp
lldb/trunk/source/Target/ProcessLaunchInfo.cpp
lldb/trunk/source/Target/RegisterContext.cpp
lldb/trunk/source/Target/SectionLoadHistory.cpp
lldb/trunk/source/Target/SectionLoadList.cpp
lldb/trunk/source/Target/StackFrame.cpp
lldb/trunk/source/Target/StackFrameList.cpp
lldb/trunk/source/Target/StackID.cpp
lldb/trunk/source/Target/StopInfo.cpp
lldb/trunk/source/Target/Target.cpp
lldb/trunk/source/Target/TargetList.cpp
lldb/trunk/source/Target/Thread.cpp
lldb/trunk/source/Target/ThreadList.cpp
lldb/trunk/source/Target/ThreadPlan.cpp
lldb/trunk/source/Target/ThreadPlanBase.cpp
lldb/trunk/source/Target/ThreadPlanCallFunction.cpp
lldb/trunk/source/Target/ThreadPlanCallOnFunctionExit.cpp
lldb/trunk/source/Target/ThreadPlanCallUserExpression.cpp
lldb/trunk/source/Target/ThreadPlanPython.cpp
lldb/trunk/source/Target/ThreadPlanRunToAddress.cpp
lldb/trunk/source/Target/ThreadPlanShouldStopHere.cpp
lldb/trunk/source/Target/ThreadPlanStepInRange.cpp
lldb/trunk/source/Target/ThreadPlanStepInstruction.cpp
lldb/trunk/source/Target/ThreadPlanStepOut.cpp
lldb/trunk/source/Target/ThreadPlanStepOverBreakpoint.cpp
lldb/trunk/source/Target/ThreadPlanStepOverRange.cpp
lldb/trunk/source/Target/ThreadPlanStepRange.cpp
lldb/trunk/source/Target/ThreadPlanStepThrough.cpp
lldb/trunk/source/Target/ThreadPlanStepUntil.cpp
lldb/trunk/source/Target/UnixSignals.cpp
lldb/trunk/source/Utility/ArchSpec.cpp
lldb/trunk/source/Utility/Args.cpp
lldb/trunk/source/Utility/ConstString.cpp
lldb/trunk/source/Utility/DataBufferHeap.cpp
lldb/trunk/source/Utility/DataEncoder.cpp
lldb/trunk/source/Utility/DataExtractor.cpp
lldb/trunk/source/Utility/FastDemangle.cpp
lldb/trunk/source/Utility/FileSpec.cpp
lldb/trunk/source/Utility/JSON.cpp
lldb/trunk/source/Utility/Log.cpp
lldb/trunk/source/Utility/RegularExpression.cpp
lldb/trunk/source/Utility/SelectHelper.cpp
lldb/trunk/source/Utility/SharingPtr.cpp
lldb/trunk/source/Utility/Status.cpp
lldb/trunk/source/Utility/Stream.cpp
lldb/trunk/source/Utility/StringExtractor.cpp
lldb/trunk/source/Utility/StringExtractorGDBRemote.cpp
lldb/trunk/source/Utility/StructuredData.cpp
lldb/trunk/source/Utility/UUID.cpp
lldb/trunk/source/Utility/VASprintf.cpp
Modified: lldb/trunk/include/lldb/API/SBAddress.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBAddress.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBAddress.h (original)
+++ lldb/trunk/include/lldb/API/SBAddress.h Mon Apr 30 09:49:04 2018
@@ -54,9 +54,9 @@ public:
lldb::SBSymbolContext GetSymbolContext(uint32_t resolve_scope);
// The following functions grab individual objects for a given address and
- // are less efficient if you want more than one symbol related objects.
- // Use one of the following when you want multiple debug symbol related
- // objects for an address:
+ // are less efficient if you want more than one symbol related objects. Use
+ // one of the following when you want multiple debug symbol related objects
+ // for an address:
// lldb::SBSymbolContext SBAddress::GetSymbolContext (uint32_t
// resolve_scope);
// lldb::SBSymbolContext SBTarget::ResolveSymbolContextForAddress (const
Modified: lldb/trunk/include/lldb/API/SBBroadcaster.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBBroadcaster.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBBroadcaster.h (original)
+++ lldb/trunk/include/lldb/API/SBBroadcaster.h Mon Apr 30 09:49:04 2018
@@ -46,17 +46,17 @@ public:
bool RemoveListener(const lldb::SBListener &listener,
uint32_t event_mask = UINT32_MAX);
- // This comparison is checking if the internal opaque pointer value
- // is equal to that in "rhs".
+ // This comparison is checking if the internal opaque pointer value is equal
+ // to that in "rhs".
bool operator==(const lldb::SBBroadcaster &rhs) const;
- // This comparison is checking if the internal opaque pointer value
- // is not equal to that in "rhs".
+ // This comparison is checking if the internal opaque pointer value is not
+ // equal to that in "rhs".
bool operator!=(const lldb::SBBroadcaster &rhs) const;
- // This comparison is checking if the internal opaque pointer value
- // is less than that in "rhs" so SBBroadcaster objects can be contained
- // in ordered containers.
+ // This comparison is checking if the internal opaque pointer value is less
+ // than that in "rhs" so SBBroadcaster objects can be contained in ordered
+ // containers.
bool operator<(const lldb::SBBroadcaster &rhs) const;
protected:
Modified: lldb/trunk/include/lldb/API/SBCommandInterpreter.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBCommandInterpreter.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBCommandInterpreter.h (original)
+++ lldb/trunk/include/lldb/API/SBCommandInterpreter.h Mon Apr 30 09:49:04 2018
@@ -138,23 +138,20 @@ public:
lldb::SBCommandReturnObject result);
// The pointer based interface is not useful in SWIG, since the cursor &
- // last_char arguments are string pointers INTO current_line
- // and you can't do that in a scripting language interface in general...
+ // last_char arguments are string pointers INTO current_line and you can't do
+ // that in a scripting language interface in general...
// In either case, the way this works is that the you give it a line and
- // cursor position in the line. The function
- // will return the number of completions. The matches list will contain
- // number_of_completions + 1 elements. The first
- // element is the common substring after the cursor position for all the
- // matches. The rest of the elements are the
- // matches. The first element is useful if you are emulating the common shell
- // behavior where the tab completes
- // to the string that is common among all the matches, then you should first
- // check if the first element is non-empty,
+ // cursor position in the line. The function will return the number of
+ // completions. The matches list will contain number_of_completions + 1
+ // elements. The first element is the common substring after the cursor
+ // position for all the matches. The rest of the elements are the matches.
+ // The first element is useful if you are emulating the common shell behavior
+ // where the tab completes to the string that is common among all the
+ // matches, then you should first check if the first element is non-empty,
// and if so just insert it and move the cursor to the end of the insertion.
- // The next tab will return an empty
- // common substring, and a list of choices (if any), at which point you should
- // display the choices and let the user
+ // The next tab will return an empty common substring, and a list of choices
+ // (if any), at which point you should display the choices and let the user
// type further to disambiguate.
int HandleCompletion(const char *current_line, const char *cursor,
@@ -167,9 +164,9 @@ public:
bool WasInterrupted() const;
- // Catch commands before they execute by registering a callback that will
- // get called when the command gets executed. This allows GUI or command
- // line interfaces to intercept a command and stop it from happening
+ // Catch commands before they execute by registering a callback that will get
+ // called when the command gets executed. This allows GUI or command line
+ // interfaces to intercept a command and stop it from happening
bool SetCommandOverrideCallback(const char *command_name,
lldb::CommandOverrideCallback callback,
void *baton);
Modified: lldb/trunk/include/lldb/API/SBCommandReturnObject.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBCommandReturnObject.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBCommandReturnObject.h (original)
+++ lldb/trunk/include/lldb/API/SBCommandReturnObject.h Mon Apr 30 09:49:04 2018
@@ -67,8 +67,7 @@ public:
bool GetDescription(lldb::SBStream &description);
- // deprecated, these two functions do not take
- // ownership of file handle
+ // deprecated, these two functions do not take ownership of file handle
void SetImmediateOutputFile(FILE *fh);
void SetImmediateErrorFile(FILE *fh);
Modified: lldb/trunk/include/lldb/API/SBData.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBData.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBData.h (original)
+++ lldb/trunk/include/lldb/API/SBData.h Mon Apr 30 09:49:04 2018
@@ -71,11 +71,10 @@ public:
lldb::addr_t base_addr = LLDB_INVALID_ADDRESS);
// it would be nice to have SetData(SBError, const void*, size_t) when
- // endianness and address size can be
- // inferred from the existing DataExtractor, but having two SetData()
- // signatures triggers a SWIG bug where
- // the typemap isn't applied before resolving the overload, and thus the right
- // function never gets called
+ // endianness and address size can be inferred from the existing
+ // DataExtractor, but having two SetData() signatures triggers a SWIG bug
+ // where the typemap isn't applied before resolving the overload, and thus
+ // the right function never gets called
void SetData(lldb::SBError &error, const void *buf, size_t size,
lldb::ByteOrder endian, uint8_t addr_size);
@@ -87,9 +86,8 @@ public:
const char *data);
// in the following CreateData*() and SetData*() prototypes, the two
- // parameters array and array_len
- // should not be renamed or rearranged, because doing so will break the SWIG
- // typemap
+ // parameters array and array_len should not be renamed or rearranged,
+ // because doing so will break the SWIG typemap
static lldb::SBData CreateDataFromUInt64Array(lldb::ByteOrder endian,
uint32_t addr_byte_size,
uint64_t *array,
Modified: lldb/trunk/include/lldb/API/SBExpressionOptions.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBExpressionOptions.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBExpressionOptions.h (original)
+++ lldb/trunk/include/lldb/API/SBExpressionOptions.h Mon Apr 30 09:49:04 2018
@@ -51,10 +51,8 @@ public:
uint32_t GetOneThreadTimeoutInMicroSeconds() const;
// Set the timeout for running on one thread, 0 means use the default
- // behavior.
- // If you set this higher than the overall timeout, you'll get an error when
- // you
- // try to run the expression.
+ // behavior. If you set this higher than the overall timeout, you'll get an
+ // error when you try to run the expression.
void SetOneThreadTimeoutInMicroSeconds(uint32_t timeout = 0);
bool GetTryAllThreads() const;
Modified: lldb/trunk/include/lldb/API/SBFrame.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBFrame.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBFrame.h (original)
+++ lldb/trunk/include/lldb/API/SBFrame.h Mon Apr 30 09:49:04 2018
@@ -153,10 +153,10 @@ public:
lldb::DynamicValueType use_dynamic);
// Find a value for a variable expression path like "rect.origin.x" or
- // "pt_ptr->x", "*self", "*this->obj_ptr". The returned value is _not_
- // and expression result and is not a constant object like
- // SBFrame::EvaluateExpression(...) returns, but a child object of
- // the variable value.
+ // "pt_ptr->x", "*self", "*this->obj_ptr". The returned value is _not_ and
+ // expression result and is not a constant object like
+ // SBFrame::EvaluateExpression(...) returns, but a child object of the
+ // variable value.
lldb::SBValue GetValueForVariablePath(const char *var_expr_cstr,
DynamicValueType use_dynamic);
Modified: lldb/trunk/include/lldb/API/SBInstruction.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBInstruction.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBInstruction.h (original)
+++ lldb/trunk/include/lldb/API/SBInstruction.h Mon Apr 30 09:49:04 2018
@@ -16,8 +16,7 @@
#include <stdio.h>
// There's a lot to be fixed here, but need to wait for underlying insn
-// implementation
-// to be revised & settle down first.
+// implementation to be revised & settle down first.
class InstructionImpl;
Modified: lldb/trunk/include/lldb/API/SBInstructionList.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBInstructionList.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBInstructionList.h (original)
+++ lldb/trunk/include/lldb/API/SBInstructionList.h Mon Apr 30 09:49:04 2018
@@ -33,8 +33,8 @@ public:
lldb::SBInstruction GetInstructionAtIndex(uint32_t idx);
// ----------------------------------------------------------------------
- // Returns the number of instructions between the start and end address.
- // If canSetBreakpoint is true then the count will be the number of
+ // Returns the number of instructions between the start and end address. If
+ // canSetBreakpoint is true then the count will be the number of
// instructions on which a breakpoint can be set.
// ----------------------------------------------------------------------
size_t GetInstructionsCount(const SBAddress &start,
Modified: lldb/trunk/include/lldb/API/SBProcess.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBProcess.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBProcess.h (original)
+++ lldb/trunk/include/lldb/API/SBProcess.h Mon Apr 30 09:49:04 2018
@@ -98,10 +98,10 @@ public:
lldb::SBThread GetSelectedThread() const;
//------------------------------------------------------------------
- // Function for lazily creating a thread using the current OS
- // plug-in. This function will be removed in the future when there
- // are APIs to create SBThread objects through the interface and add
- // them to the process through the SBProcess API.
+ // Function for lazily creating a thread using the current OS plug-in. This
+ // function will be removed in the future when there are APIs to create
+ // SBThread objects through the interface and add them to the process through
+ // the SBProcess API.
//------------------------------------------------------------------
lldb::SBThread CreateOSPluginThread(lldb::tid_t tid, lldb::addr_t context);
Modified: lldb/trunk/include/lldb/API/SBStream.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBStream.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBStream.h (original)
+++ lldb/trunk/include/lldb/API/SBStream.h Mon Apr 30 09:49:04 2018
@@ -26,13 +26,12 @@ public:
bool IsValid() const;
- // If this stream is not redirected to a file, it will maintain a local
- // cache for the stream data which can be accessed using this accessor.
+ // If this stream is not redirected to a file, it will maintain a local cache
+ // for the stream data which can be accessed using this accessor.
const char *GetData();
- // If this stream is not redirected to a file, it will maintain a local
- // cache for the stream output whose length can be accessed using this
- // accessor.
+ // If this stream is not redirected to a file, it will maintain a local cache
+ // for the stream output whose length can be accessed using this accessor.
size_t GetSize();
void Printf(const char *format, ...) __attribute__((format(printf, 2, 3)));
@@ -44,8 +43,8 @@ public:
void RedirectToFileDescriptor(int fd, bool transfer_fh_ownership);
// If the stream is redirected to a file, forget about the file and if
- // ownership of the file was transferred to this object, close the file.
- // If the stream is backed by a local cache, clear this cache.
+ // ownership of the file was transferred to this object, close the file. If
+ // the stream is backed by a local cache, clear this cache.
void Clear();
protected:
Modified: lldb/trunk/include/lldb/API/SBSymbol.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBSymbol.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBSymbol.h (original)
+++ lldb/trunk/include/lldb/API/SBSymbol.h Mon Apr 30 09:49:04 2018
@@ -55,8 +55,8 @@ public:
bool GetDescription(lldb::SBStream &description);
//----------------------------------------------------------------------
- // Returns true if the symbol is externally visible in the module that
- // it is defined in
+ // Returns true if the symbol is externally visible in the module that it is
+ // defined in
//----------------------------------------------------------------------
bool IsExternal();
Modified: lldb/trunk/include/lldb/API/SBTarget.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBTarget.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBTarget.h (original)
+++ lldb/trunk/include/lldb/API/SBTarget.h Mon Apr 30 09:49:04 2018
@@ -775,8 +775,7 @@ public:
const void *buf, size_t size);
// The "WithFlavor" is necessary to keep SWIG from getting confused about
- // overloaded arguments when
- // using the buf + size -> Python Object magic.
+ // overloaded arguments when using the buf + size -> Python Object magic.
lldb::SBInstructionList GetInstructionsWithFlavor(lldb::SBAddress base_addr,
const char *flavor_string,
@@ -829,8 +828,8 @@ protected:
friend class SBValue;
//------------------------------------------------------------------
- // Constructors are private, use static Target::Create function to
- // create an instance of this class.
+ // Constructors are private, use static Target::Create function to create an
+ // instance of this class.
//------------------------------------------------------------------
lldb::TargetSP GetSP() const;
Modified: lldb/trunk/include/lldb/API/SBValue.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBValue.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBValue.h (original)
+++ lldb/trunk/include/lldb/API/SBValue.h Mon Apr 30 09:49:04 2018
@@ -134,8 +134,7 @@ public:
lldb::SBType type);
// this has no address! GetAddress() and GetLoadAddress() as well as
- // AddressOf()
- // on the return of this call all return invalid
+ // AddressOf() on the return of this call all return invalid
lldb::SBValue CreateValueFromData(const char *name, lldb::SBData data,
lldb::SBType type);
Modified: lldb/trunk/include/lldb/API/SBValueList.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBValueList.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBValueList.h (original)
+++ lldb/trunk/include/lldb/API/SBValueList.h Mon Apr 30 09:49:04 2018
@@ -43,8 +43,8 @@ public:
const lldb::SBValueList &operator=(const lldb::SBValueList &rhs);
protected:
- // only useful for visualizing the pointer or comparing two SBValueLists
- // to see if they are backed by the same underlying Impl.
+ // only useful for visualizing the pointer or comparing two SBValueLists to
+ // see if they are backed by the same underlying Impl.
void *opaque_ptr();
private:
Modified: lldb/trunk/include/lldb/Breakpoint/Breakpoint.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Breakpoint/Breakpoint.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Breakpoint/Breakpoint.h (original)
+++ lldb/trunk/include/lldb/Breakpoint/Breakpoint.h Mon Apr 30 09:49:04 2018
@@ -214,8 +214,8 @@ public:
void Dump(Stream *s) override;
//------------------------------------------------------------------
- // The next set of methods provide ways to tell the breakpoint to update
- // it's location list - usually done when modules appear or disappear.
+ // The next set of methods provide ways to tell the breakpoint to update it's
+ // location list - usually done when modules appear or disappear.
//------------------------------------------------------------------
//------------------------------------------------------------------
@@ -287,8 +287,8 @@ public:
lldb::ModuleSP new_module_sp);
//------------------------------------------------------------------
- // The next set of methods provide access to the breakpoint locations
- // for this breakpoint.
+ // The next set of methods provide access to the breakpoint locations for
+ // this breakpoint.
//------------------------------------------------------------------
//------------------------------------------------------------------
@@ -744,10 +744,10 @@ protected:
void DecrementIgnoreCount();
// BreakpointLocation::IgnoreCountShouldStop &
- // Breakpoint::IgnoreCountShouldStop can only be called once per stop,
- // and BreakpointLocation::IgnoreCountShouldStop should be tested first, and
- // if it returns false we should
- // continue, otherwise we should test Breakpoint::IgnoreCountShouldStop.
+ // Breakpoint::IgnoreCountShouldStop can only be called once per stop, and
+ // BreakpointLocation::IgnoreCountShouldStop should be tested first, and if
+ // it returns false we should continue, otherwise we should test
+ // Breakpoint::IgnoreCountShouldStop.
bool IgnoreCountShouldStop();
@@ -760,8 +760,7 @@ protected:
private:
// This one should only be used by Target to copy breakpoints from target to
- // target - primarily from the dummy
- // target to prime new targets.
+ // target - primarily from the dummy target to prime new targets.
Breakpoint(Target &new_target, Breakpoint &bp_to_copy_from);
//------------------------------------------------------------------
@@ -782,9 +781,9 @@ private:
BreakpointPreconditionSP m_precondition_sp; // The precondition is a
// breakpoint-level hit filter
// that can be used
- // to skip certain breakpoint hits. For instance, exception breakpoints
- // use this to limit the stop to certain exception classes, while leaving
- // the condition & callback free for user specification.
+ // to skip certain breakpoint hits. For instance, exception breakpoints use
+ // this to limit the stop to certain exception classes, while leaving the
+ // condition & callback free for user specification.
std::unique_ptr<BreakpointOptions>
m_options_up; // Settable breakpoint options
BreakpointLocationList
Modified: lldb/trunk/include/lldb/Breakpoint/BreakpointLocation.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Breakpoint/BreakpointLocation.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Breakpoint/BreakpointLocation.h (original)
+++ lldb/trunk/include/lldb/Breakpoint/BreakpointLocation.h Mon Apr 30 09:49:04 2018
@@ -384,8 +384,7 @@ private:
//------------------------------------------------------------------
// Constructors and Destructors
//
- // Only the Breakpoint can make breakpoint locations, and it owns
- // them.
+ // Only the Breakpoint can make breakpoint locations, and it owns them.
//------------------------------------------------------------------
//------------------------------------------------------------------
Modified: lldb/trunk/include/lldb/Breakpoint/BreakpointLocationCollection.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Breakpoint/BreakpointLocationCollection.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Breakpoint/BreakpointLocationCollection.h (original)
+++ lldb/trunk/include/lldb/Breakpoint/BreakpointLocationCollection.h Mon Apr 30 09:49:04 2018
@@ -178,8 +178,8 @@ public:
protected:
//------------------------------------------------------------------
- // Classes that inherit from BreakpointLocationCollection can see
- // and modify these
+ // Classes that inherit from BreakpointLocationCollection can see and modify
+ // these
//------------------------------------------------------------------
private:
Modified: lldb/trunk/include/lldb/Breakpoint/BreakpointLocationList.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Breakpoint/BreakpointLocationList.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Breakpoint/BreakpointLocationList.h (original)
+++ lldb/trunk/include/lldb/Breakpoint/BreakpointLocationList.h Mon Apr 30 09:49:04 2018
@@ -34,13 +34,11 @@ namespace lldb_private {
//----------------------------------------------------------------------
class BreakpointLocationList {
- // Only Breakpoints can make the location list, or add elements to it.
- // This is not just some random collection of locations. Rather, the act of
- // adding the location
- // to this list sets its ID, and implicitly all the locations have the same
- // breakpoint ID as
- // well. If you need a generic container for breakpoint locations, use
- // BreakpointLocationCollection.
+ // Only Breakpoints can make the location list, or add elements to it. This
+ // is not just some random collection of locations. Rather, the act of
+ // adding the location to this list sets its ID, and implicitly all the
+ // locations have the same breakpoint ID as well. If you need a generic
+ // container for breakpoint locations, use BreakpointLocationCollection.
friend class Breakpoint;
public:
Modified: lldb/trunk/include/lldb/Breakpoint/BreakpointName.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Breakpoint/BreakpointName.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Breakpoint/BreakpointName.h (original)
+++ lldb/trunk/include/lldb/Breakpoint/BreakpointName.h Mon Apr 30 09:49:04 2018
@@ -80,8 +80,8 @@ public:
*this = Permissions();
}
- // Merge the permissions from incoming into this set of permissions.
- // Only merge set permissions, and most restrictive permission wins.
+ // Merge the permissions from incoming into this set of permissions. Only
+ // merge set permissions, and most restrictive permission wins.
void MergeInto(const Permissions &incoming)
{
MergePermission(incoming, listPerm);
Modified: lldb/trunk/include/lldb/Breakpoint/BreakpointOptions.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Breakpoint/BreakpointOptions.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Breakpoint/BreakpointOptions.h (original)
+++ lldb/trunk/include/lldb/Breakpoint/BreakpointOptions.h Mon Apr 30 09:49:04 2018
@@ -156,18 +156,16 @@ public:
// Callbacks
//
// Breakpoint callbacks come in two forms, synchronous and asynchronous.
- // Synchronous callbacks will get
- // run before any of the thread plans are consulted, and if they return false
- // the target will continue
- // "under the radar" of the thread plans. There are a couple of restrictions
- // to synchronous callbacks:
- // 1) They should NOT resume the target themselves. Just return false if you
- // want the target to restart.
- // 2) Breakpoints with synchronous callbacks can't have conditions (or rather,
- // they can have them, but they
- // won't do anything. Ditto with ignore counts, etc... You are supposed
- // to control that all through the
- // callback.
+ // Synchronous callbacks will get run before any of the thread plans are
+ // consulted, and if they return false the target will continue "under the
+ // radar" of the thread plans. There are a couple of restrictions to
+ // synchronous callbacks:
+ // 1) They should NOT resume the target themselves.
+ // Just return false if you want the target to restart.
+ // 2) Breakpoints with synchronous callbacks can't have conditions
+ // (or rather, they can have them, but they won't do anything.
+ // Ditto with ignore counts, etc... You are supposed to control that all
+ // through the callback.
// Asynchronous callbacks get run as part of the "ShouldStop" logic in the
// thread plan. The logic there is:
// a) If the breakpoint is thread specific and not for this thread, continue
@@ -181,12 +179,10 @@ public:
// b) If the ignore count says we shouldn't stop, then ditto.
// c) If the condition says we shouldn't stop, then ditto.
// d) Otherwise, the callback will get run, and if it returns true we will
- // stop, and if false we won't.
+ // stop, and if false we won't.
// The asynchronous callback can run the target itself, but at present that
- // should be the last action the
- // callback does. We will relax this condition at some point, but it will
- // take a bit of plumbing to get
- // that to work.
+ // should be the last action the callback does. We will relax this condition
+ // at some point, but it will take a bit of plumbing to get that to work.
//
//------------------------------------------------------------------
@@ -227,8 +223,8 @@ public:
//------------------------------------------------------------------
void ClearCallback();
- // The rest of these functions are meant to be used only within the breakpoint
- // handling mechanism.
+ // The rest of these functions are meant to be used only within the
+ // breakpoint handling mechanism.
//------------------------------------------------------------------
/// Use this function to invoke the callback for a specific stop.
Modified: lldb/trunk/include/lldb/Breakpoint/BreakpointResolver.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Breakpoint/BreakpointResolver.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Breakpoint/BreakpointResolver.h (original)
+++ lldb/trunk/include/lldb/Breakpoint/BreakpointResolver.h Mon Apr 30 09:49:04 2018
@@ -171,8 +171,8 @@ public:
UnknownResolver
};
- // Translate the Ty to name for serialization,
- // the "+2" is one for size vrs. index, and one for UnknownResolver.
+ // Translate the Ty to name for serialization, the "+2" is one for size vrs.
+ // index, and one for UnknownResolver.
static const char *g_ty_to_name[LastKnownResolverType + 2];
//------------------------------------------------------------------
@@ -199,8 +199,8 @@ public:
protected:
// Used for serializing resolver options:
- // The options in this enum and the strings in the
- // g_option_names must be kept in sync.
+ // The options in this enum and the strings in the g_option_names must be
+ // kept in sync.
enum class OptionNames : uint32_t {
AddressOffset = 0,
ExactMatch,
Modified: lldb/trunk/include/lldb/Breakpoint/BreakpointResolverAddress.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Breakpoint/BreakpointResolverAddress.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Breakpoint/BreakpointResolverAddress.h (original)
+++ lldb/trunk/include/lldb/Breakpoint/BreakpointResolverAddress.h Mon Apr 30 09:49:04 2018
@@ -74,8 +74,7 @@ protected:
FileSpec m_module_filespec; // If this filespec is Valid, and m_addr is an
// offset, then it will be converted
// to a Section+Offset address in this module, whenever that module gets
- // around to
- // being loaded.
+ // around to being loaded.
private:
DISALLOW_COPY_AND_ASSIGN(BreakpointResolverAddress);
};
Modified: lldb/trunk/include/lldb/Breakpoint/BreakpointResolverName.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Breakpoint/BreakpointResolverName.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Breakpoint/BreakpointResolverName.h (original)
+++ lldb/trunk/include/lldb/Breakpoint/BreakpointResolverName.h Mon Apr 30 09:49:04 2018
@@ -48,8 +48,8 @@ public:
uint32_t name_type_mask, lldb::LanguageType language,
lldb::addr_t offset, bool skip_prologue);
- // Creates a function breakpoint by regular expression. Takes over control of
- // the lifespan of func_regex.
+ // Creates a function breakpoint by regular expression. Takes over control
+ // of the lifespan of func_regex.
BreakpointResolverName(Breakpoint *bkpt, RegularExpression &func_regex,
lldb::LanguageType language, lldb::addr_t offset,
bool skip_prologue);
Modified: lldb/trunk/include/lldb/Breakpoint/BreakpointSite.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Breakpoint/BreakpointSite.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Breakpoint/BreakpointSite.h (original)
+++ lldb/trunk/include/lldb/Breakpoint/BreakpointSite.h Mon Apr 30 09:49:04 2018
@@ -241,9 +241,9 @@ public:
private:
friend class Process;
friend class BreakpointLocation;
- // The StopInfoBreakpoint knows when it is processing a hit for a thread for a
- // site, so let it be the
- // one to manage setting the location hit count once and only once.
+ // The StopInfoBreakpoint knows when it is processing a hit for a thread for
+ // a site, so let it be the one to manage setting the location hit count once
+ // and only once.
friend class StopInfoBreakpoint;
void BumpHitCounts();
@@ -264,8 +264,8 @@ private:
bool
m_enabled; ///< Boolean indicating if this breakpoint site enabled or not.
- // Consider adding an optimization where if there is only one
- // owner, we don't store a list. The usual case will be only one owner...
+ // Consider adding an optimization where if there is only one owner, we don't
+ // store a list. The usual case will be only one owner...
BreakpointLocationCollection m_owners; ///< This has the BreakpointLocations
///that share this breakpoint site.
std::recursive_mutex
Modified: lldb/trunk/include/lldb/Breakpoint/StoppointLocation.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Breakpoint/StoppointLocation.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Breakpoint/StoppointLocation.h (original)
+++ lldb/trunk/include/lldb/Breakpoint/StoppointLocation.h Mon Apr 30 09:49:04 2018
@@ -77,8 +77,8 @@ protected:
// breakpoint/watchpoint
uint32_t m_byte_size; // The size in bytes of stop location. e.g. the length
// of the trap opcode for
- // software breakpoints, or the optional length in bytes for
- // hardware breakpoints, or the length of the watchpoint.
+ // software breakpoints, or the optional length in bytes for hardware
+ // breakpoints, or the length of the watchpoint.
uint32_t
m_hit_count; // Number of times this breakpoint/watchpoint has been hit
Modified: lldb/trunk/include/lldb/Breakpoint/Watchpoint.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Breakpoint/Watchpoint.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Breakpoint/Watchpoint.h (original)
+++ lldb/trunk/include/lldb/Breakpoint/Watchpoint.h Mon Apr 30 09:49:04 2018
@@ -71,9 +71,9 @@ public:
bool IsEnabled() const;
- // This doesn't really enable/disable the watchpoint.
- // It is currently just for use in the Process plugin's
- // {Enable,Disable}Watchpoint, which should be used instead.
+ // This doesn't really enable/disable the watchpoint. It is currently just
+ // for use in the Process plugin's {Enable,Disable}Watchpoint, which should
+ // be used instead.
void SetEnabled(bool enabled, bool notify = true);
@@ -197,10 +197,8 @@ private:
uint32_t m_disabled_count; // Keep track of the count that the watchpoint is
// disabled while in ephemeral mode.
// At the end of the ephemeral mode when the watchpoint is to be enabled
- // again,
- // we check the count, if it is more than 1, it means the user-supplied
- // actions
- // actually want the watchpoint to be disabled!
+ // again, we check the count, if it is more than 1, it means the user-
+ // supplied actions actually want the watchpoint to be disabled!
uint32_t m_watch_read : 1, // 1 if we stop when the watched data is read from
m_watch_write : 1, // 1 if we stop when the watched data is written to
m_watch_was_read : 1, // Set to 1 when watchpoint is hit for a read access
Modified: lldb/trunk/include/lldb/Breakpoint/WatchpointList.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Breakpoint/WatchpointList.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Breakpoint/WatchpointList.h (original)
+++ lldb/trunk/include/lldb/Breakpoint/WatchpointList.h Mon Apr 30 09:49:04 2018
@@ -31,9 +31,9 @@ namespace lldb_private {
//----------------------------------------------------------------------
class WatchpointList {
- // Only Target can make the watchpoint list, or add elements to it.
- // This is not just some random collection of watchpoints. Rather, the act of
- // adding the watchpoint to this list sets its ID.
+ // Only Target can make the watchpoint list, or add elements to it. This is
+ // not just some random collection of watchpoints. Rather, the act of adding
+ // the watchpoint to this list sets its ID.
friend class Watchpoint;
friend class Target;
Modified: lldb/trunk/include/lldb/Breakpoint/WatchpointOptions.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Breakpoint/WatchpointOptions.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Breakpoint/WatchpointOptions.h (original)
+++ lldb/trunk/include/lldb/Breakpoint/WatchpointOptions.h Mon Apr 30 09:49:04 2018
@@ -69,15 +69,13 @@ public:
// Callbacks
//
// Watchpoint callbacks come in two forms, synchronous and asynchronous.
- // Synchronous callbacks will get
- // run before any of the thread plans are consulted, and if they return false
- // the target will continue
- // "under the radar" of the thread plans. There are a couple of restrictions
- // to synchronous callbacks:
- // 1) They should NOT resume the target themselves. Just return false if you
- // want the target to restart.
- // 2) Watchpoints with synchronous callbacks can't have conditions (or rather,
- // they can have them, but they
+ // Synchronous callbacks will get run before any of the thread plans are
+ // consulted, and if they return false the target will continue "under the
+ // radar" of the thread plans. There are a couple of restrictions to
+ // synchronous callbacks: 1) They should NOT resume the target themselves.
+ // Just return false if you want the target to restart. 2) Watchpoints with
+ // synchronous callbacks can't have conditions (or rather, they can have
+ // them, but they
// won't do anything. Ditto with ignore counts, etc... You are supposed
// to control that all through the
// callback.
@@ -118,8 +116,8 @@ public:
//------------------------------------------------------------------
void ClearCallback();
- // The rest of these functions are meant to be used only within the watchpoint
- // handling mechanism.
+ // The rest of these functions are meant to be used only within the
+ // watchpoint handling mechanism.
//------------------------------------------------------------------
/// Use this function to invoke the callback for a specific stop.
Modified: lldb/trunk/include/lldb/Core/Address.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/Address.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/Address.h (original)
+++ lldb/trunk/include/lldb/Core/Address.h Mon Apr 30 09:49:04 2018
@@ -531,11 +531,11 @@ public:
bool CalculateSymbolContextLineEntry(LineEntry &line_entry) const;
//------------------------------------------------------------------
- // Returns true if the section should be valid, but isn't because
- // the shared pointer to the section can't be reconstructed from
- // a weak pointer that contains a valid weak reference to a section.
- // Returns false if the section weak pointer has no reference to
- // a section, or if the section is still valid
+ // Returns true if the section should be valid, but isn't because the shared
+ // pointer to the section can't be reconstructed from a weak pointer that
+ // contains a valid weak reference to a section. Returns false if the section
+ // weak pointer has no reference to a section, or if the section is still
+ // valid
//------------------------------------------------------------------
bool SectionWasDeleted() const;
@@ -547,29 +547,27 @@ protected:
lldb::addr_t m_offset; ///< Offset into section if \a m_section_wp is valid...
//------------------------------------------------------------------
- // Returns true if the m_section_wp once had a reference to a valid
- // section shared pointer, but no longer does. This can happen if
- // we have an address from a module that gets unloaded and deleted.
- // This function should only be called if GetSection() returns an
- // empty shared pointer and you want to know if this address used to
- // have a valid section.
+ // Returns true if the m_section_wp once had a reference to a valid section
+ // shared pointer, but no longer does. This can happen if we have an address
+ // from a module that gets unloaded and deleted. This function should only be
+ // called if GetSection() returns an empty shared pointer and you want to
+ // know if this address used to have a valid section.
//------------------------------------------------------------------
bool SectionWasDeletedPrivate() const;
};
//----------------------------------------------------------------------
// NOTE: Be careful using this operator. It can correctly compare two
-// addresses from the same Module correctly. It can't compare two
-// addresses from different modules in any meaningful way, but it will
-// compare the module pointers.
+// addresses from the same Module correctly. It can't compare two addresses
+// from different modules in any meaningful way, but it will compare the module
+// pointers.
//
// To sum things up:
-// - works great for addresses within the same module
-// - it works for addresses across multiple modules, but don't expect the
+// - works great for addresses within the same module - it works for addresses
+// across multiple modules, but don't expect the
// address results to make much sense
//
-// This basically lets Address objects be used in ordered collection
-// classes.
+// This basically lets Address objects be used in ordered collection classes.
//----------------------------------------------------------------------
bool operator<(const Address &lhs, const Address &rhs);
bool operator>(const Address &lhs, const Address &rhs);
Modified: lldb/trunk/include/lldb/Core/AddressRange.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/AddressRange.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/AddressRange.h (original)
+++ lldb/trunk/include/lldb/Core/AddressRange.h Mon Apr 30 09:49:04 2018
@@ -261,8 +261,8 @@ public:
/// The number of bytes that this object occupies in memory.
//------------------------------------------------------------------
size_t MemorySize() const {
- // Noting special for the memory size of a single AddressRange object,
- // it is just the size of itself.
+ // Noting special for the memory size of a single AddressRange object, it
+ // is just the size of itself.
return sizeof(AddressRange);
}
Modified: lldb/trunk/include/lldb/Core/AddressResolverName.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/AddressResolverName.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/AddressResolverName.h (original)
+++ lldb/trunk/include/lldb/Core/AddressResolverName.h Mon Apr 30 09:49:04 2018
@@ -41,8 +41,8 @@ public:
AddressResolverName(const char *func_name,
AddressResolver::MatchType type = Exact);
- // Creates a function breakpoint by regular expression. Takes over control of
- // the lifespan of func_regex.
+ // Creates a function breakpoint by regular expression. Takes over control
+ // of the lifespan of func_regex.
AddressResolverName(RegularExpression &func_regex);
AddressResolverName(const char *class_name, const char *method,
Modified: lldb/trunk/include/lldb/Core/Broadcaster.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/Broadcaster.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/Broadcaster.h (original)
+++ lldb/trunk/include/lldb/Core/Broadcaster.h Mon Apr 30 09:49:04 2018
@@ -59,10 +59,9 @@ public:
uint32_t GetEventBits() const { return m_event_bits; }
- // Tell whether this BroadcastEventSpec is contained in in_spec.
- // That is:
- // (a) the two spec's share the same broadcaster class
- // (b) the event bits of this spec are wholly contained in those of in_spec.
+ // Tell whether this BroadcastEventSpec is contained in in_spec. That is: (a)
+ // the two spec's share the same broadcaster class (b) the event bits of this
+ // spec are wholly contained in those of in_spec.
bool IsContainedIn(BroadcastEventSpec in_spec) const {
if (m_broadcaster_class != in_spec.GetBroadcasterClass())
return false;
@@ -454,8 +453,7 @@ public:
void RestoreBroadcaster() { m_broadcaster_sp->RestoreBroadcaster(); }
// This needs to be filled in if you are going to register the broadcaster
- // with the broadcaster
- // manager and do broadcaster class matching.
+ // with the broadcaster manager and do broadcaster class matching.
// FIXME: Probably should make a ManagedBroadcaster subclass with all the bits
// needed to work
// with the BroadcasterManager, so that it is clearer how to add one.
@@ -465,21 +463,17 @@ public:
protected:
// BroadcasterImpl contains the actual Broadcaster implementation. The
- // Broadcaster makes a BroadcasterImpl
- // which lives as long as it does. The Listeners & the Events hold a weak
- // pointer to the BroadcasterImpl,
- // so that they can survive if a Broadcaster they were listening to is
- // destroyed w/o their being able to
- // unregister from it (which can happen if the Broadcasters & Listeners are
- // being destroyed on separate threads
- // simultaneously.
- // The Broadcaster itself can't be shared out as a weak pointer, because some
- // things that are broadcasters
- // (e.g. the Target and the Process) are shared in their own right.
+ // Broadcaster makes a BroadcasterImpl which lives as long as it does. The
+ // Listeners & the Events hold a weak pointer to the BroadcasterImpl, so that
+ // they can survive if a Broadcaster they were listening to is destroyed w/o
+ // their being able to unregister from it (which can happen if the
+ // Broadcasters & Listeners are being destroyed on separate threads
+ // simultaneously. The Broadcaster itself can't be shared out as a weak
+ // pointer, because some things that are broadcasters (e.g. the Target and
+ // the Process) are shared in their own right.
//
// For the most part, the Broadcaster functions dispatch to the
- // BroadcasterImpl, and are documented in the
- // public Broadcaster API above.
+ // BroadcasterImpl, and are documented in the public Broadcaster API above.
class BroadcasterImpl {
friend class Listener;
Modified: lldb/trunk/include/lldb/Core/Debugger.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/Debugger.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/Debugger.h (original)
+++ lldb/trunk/include/lldb/Core/Debugger.h Mon Apr 30 09:49:04 2018
@@ -156,11 +156,9 @@ public:
lldb::ListenerSP GetListener() { return m_listener_sp; }
// This returns the Debugger's scratch source manager. It won't be able to
- // look up files in debug
- // information, but it can look up files by absolute path and display them to
- // you.
- // To get the target's source manager, call GetSourceManager on the target
- // instead.
+ // look up files in debug information, but it can look up files by absolute
+ // path and display them to you. To get the target's source manager, call
+ // GetSourceManager on the target instead.
SourceManager &GetSourceManager();
lldb::TargetSP GetSelectedTarget() {
@@ -188,9 +186,8 @@ public:
void DispatchInputEndOfFile();
//------------------------------------------------------------------
- // If any of the streams are not set, set them to the in/out/err
- // stream of the top most input reader to ensure they at least have
- // something
+ // If any of the streams are not set, set them to the in/out/err stream of
+ // the top most input reader to ensure they at least have something
//------------------------------------------------------------------
void AdoptTopIOHandlerFilesIfInvalid(lldb::StreamFileSP &in,
lldb::StreamFileSP &out,
@@ -323,9 +320,8 @@ public:
Status RunREPL(lldb::LanguageType language, const char *repl_options);
// This is for use in the command interpreter, when you either want the
- // selected target, or if no target
- // is present you want to prime the dummy target with entities that will be
- // copied over to new targets.
+ // selected target, or if no target is present you want to prime the dummy
+ // target with entities that will be copied over to new targets.
Target *GetSelectedOrDummyTarget(bool prefer_dummy = false);
Target *GetDummyTarget();
@@ -378,8 +374,8 @@ protected:
lldb::BroadcasterManagerSP m_broadcaster_manager_sp; // The debugger acts as a
// broadcaster manager of
// last resort.
- // It needs to get constructed before the target_list or any other
- // member that might want to broadcast through the debugger.
+ // It needs to get constructed before the target_list or any other member
+ // that might want to broadcast through the debugger.
TerminalState m_terminal_state;
TargetList m_target_list;
@@ -418,8 +414,8 @@ protected:
};
private:
- // Use Debugger::CreateInstance() to get a shared pointer to a new
- // debugger object
+ // Use Debugger::CreateInstance() to get a shared pointer to a new debugger
+ // object
Debugger(lldb::LogOutputCallback m_log_callback, void *baton);
DISALLOW_COPY_AND_ASSIGN(Debugger);
Modified: lldb/trunk/include/lldb/Core/Disassembler.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/Disassembler.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/Disassembler.h (original)
+++ lldb/trunk/include/lldb/Core/Disassembler.h Mon Apr 30 09:49:04 2018
@@ -105,8 +105,7 @@ public:
lldb::AddressClass GetAddressClass();
void SetAddress(const Address &addr) {
- // Invalidate the address class to lazily discover
- // it if we need to.
+ // Invalidate the address class to lazily discover it if we need to.
m_address_class = lldb::eAddressClassInvalid;
m_address = addr;
}
@@ -235,11 +234,12 @@ public:
protected:
Address m_address; // The section offset address of this instruction
// We include an address class in the Instruction class to
- // allow the instruction specify the eAddressClassCodeAlternateISA
- // (currently used for thumb), and also to specify data (eAddressClassData).
- // The usual value will be eAddressClassCode, but often when
- // disassembling memory, you might run into data. This can
- // help us to disassemble appropriately.
+ // allow the instruction specify the
+ // eAddressClassCodeAlternateISA (currently used for
+ // thumb), and also to specify data (eAddressClassData).
+ // The usual value will be eAddressClassCode, but often
+ // when disassembling memory, you might run into data.
+ // This can help us to disassemble appropriately.
private:
lldb::AddressClass
m_address_class; // Use GetAddressClass () accessor function!
@@ -365,12 +365,10 @@ public:
};
// FindPlugin should be lax about the flavor string (it is too annoying to
- // have various internal uses of the
- // disassembler fail because the global flavor string gets set wrong.
- // Instead, if you get a flavor string you
+ // have various internal uses of the disassembler fail because the global
+ // flavor string gets set wrong. Instead, if you get a flavor string you
// don't understand, use the default. Folks who care to check can use the
- // FlavorValidForArchSpec method on the
- // disassembler they got back.
+ // FlavorValidForArchSpec method on the disassembler they got back.
static lldb::DisassemblerSP
FindPlugin(const ArchSpec &arch, const char *flavor, const char *plugin_name);
@@ -470,8 +468,8 @@ public:
const char *flavor) = 0;
protected:
- // SourceLine and SourceLinesToDisplay structures are only used in
- // the mixed source and assembly display methods internal to this class.
+ // SourceLine and SourceLinesToDisplay structures are only used in the mixed
+ // source and assembly display methods internal to this class.
struct SourceLine {
FileSpec file;
@@ -494,9 +492,9 @@ protected:
struct SourceLinesToDisplay {
std::vector<SourceLine> lines;
- // index of the "current" source line, if we want to highlight that
- // when displaying the source lines. (as opposed to the surrounding
- // source lines provided to give context)
+ // index of the "current" source line, if we want to highlight that when
+ // displaying the source lines. (as opposed to the surrounding source
+ // lines provided to give context)
size_t current_source_line;
// Whether to print a blank line at the end of the source lines.
@@ -507,8 +505,8 @@ protected:
}
};
- // Get the function's declaration line number, hopefully a line number earlier
- // than the opening curly brace at the start of the function body.
+ // Get the function's declaration line number, hopefully a line number
+ // earlier than the opening curly brace at the start of the function body.
static SourceLine GetFunctionDeclLineEntry(const SymbolContext &sc);
// Add the provided SourceLine to the map of filenames-to-source-lines-seen.
@@ -517,14 +515,13 @@ protected:
std::map<FileSpec, std::set<uint32_t>> &source_lines_seen);
// Given a source line, determine if we should print it when we're doing
- // mixed source & assembly output.
- // We're currently using the target.process.thread.step-avoid-regexp setting
- // (which is used for stepping over inlined STL functions by default) to
- // determine what source lines to avoid showing.
+ // mixed source & assembly output. We're currently using the
+ // target.process.thread.step-avoid-regexp setting (which is used for
+ // stepping over inlined STL functions by default) to determine what source
+ // lines to avoid showing.
//
// Returns true if this source line should be elided (if the source line
- // should
- // not be displayed).
+ // should not be displayed).
static bool
ElideMixedSourceAndDisassemblyLine(const ExecutionContext &exe_ctx,
const SymbolContext &sc, SourceLine &line);
Modified: lldb/trunk/include/lldb/Core/EmulateInstruction.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/EmulateInstruction.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/EmulateInstruction.h (original)
+++ lldb/trunk/include/lldb/Core/EmulateInstruction.h Mon Apr 30 09:49:04 2018
@@ -125,8 +125,8 @@ public:
// prologue
eContextPushRegisterOnStack,
- // Exclusively used when restoring a register off the stack as part of
- // the epilogue
+ // Exclusively used when restoring a register off the stack as part of the
+ // epilogue
eContextPopRegisterOffStack,
// Add or subtract a value from the stack
@@ -135,8 +135,8 @@ public:
// Adjust the frame pointer for the current frame
eContextSetFramePointer,
- // Typically in an epilogue sequence. Copy the frame pointer back
- // into the stack pointer, use SP for CFA calculations again.
+ // Typically in an epilogue sequence. Copy the frame pointer back into the
+ // stack pointer, use SP for CFA calculations again.
eContextRestoreStackPointer,
// Add or subtract a value from a base address register (other than SP)
@@ -159,8 +159,8 @@ public:
// Used when performing an absolute branch where the
eContextAbsoluteBranchRegister,
- // Used when performing a supervisor call to an operating system to
- // provide a service:
+ // Used when performing a supervisor call to an operating system to provide
+ // a service:
eContextSupervisorCall,
// Used when performing a MemU operation to read the PC-relative offset
@@ -360,9 +360,8 @@ public:
const RegisterValue ®_value);
// Type to represent the condition of an instruction. The UINT32 value is
- // reserved for the
- // unconditional case and all other value can be used in an architecture
- // dependent way.
+ // reserved for the unconditional case and all other value can be used in an
+ // architecture dependent way.
typedef uint32_t InstructionCondition;
static const InstructionCondition UnconditionalCondition = UINT32_MAX;
Modified: lldb/trunk/include/lldb/Core/FormatEntity.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/FormatEntity.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/FormatEntity.h (original)
+++ lldb/trunk/include/lldb/Core/FormatEntity.h Mon Apr 30 09:49:04 2018
@@ -218,10 +218,10 @@ public:
//----------------------------------------------------------------------
// Format the current elements into the stream \a s.
//
- // The root element will be stripped off and the format str passed in
- // will be either an empty string (print a description of this object),
- // or contain a . separated series like a domain name that identifies
- // further sub elements to display.
+ // The root element will be stripped off and the format str passed in will be
+ // either an empty string (print a description of this object), or contain a
+ // `.`-separated series like a domain name that identifies further
+ // sub-elements to display.
//----------------------------------------------------------------------
static bool FormatFileSpec(const FileSpec &file, Stream &s,
llvm::StringRef elements,
Modified: lldb/trunk/include/lldb/Core/IOHandler.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/IOHandler.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/IOHandler.h (original)
+++ lldb/trunk/include/lldb/Core/IOHandler.h Mon Apr 30 09:49:04 2018
@@ -63,14 +63,13 @@ public:
virtual ~IOHandler();
- // Each IOHandler gets to run until it is done. It should read data
- // from the "in" and place output into "out" and "err and return
- // when done.
+ // Each IOHandler gets to run until it is done. It should read data from the
+ // "in" and place output into "out" and "err and return when done.
virtual void Run() = 0;
- // Called when an input reader should relinquish its control so another
- // can be pushed onto the IO handler stack, or so the current IO
- // handler can pop itself off the stack
+ // Called when an input reader should relinquish its control so another can
+ // be pushed onto the IO handler stack, or so the current IO handler can pop
+ // itself off the stack
virtual void Cancel() = 0;
@@ -273,8 +272,8 @@ public:
//------------------------------------------------------------------
virtual bool IOHandlerIsInputComplete(IOHandler &io_handler,
StringList &lines) {
- // Impose no requirements for input to be considered
- // complete. subclasses should do something more intelligent.
+ // Impose no requirements for input to be considered complete. subclasses
+ // should do something more intelligent.
return true;
}
@@ -289,8 +288,8 @@ public:
//------------------------------------------------------------------
// Intercept the IOHandler::Interrupt() calls and do something.
//
- // Return true if the interrupt was handled, false if the IOHandler
- // should continue to try handle the interrupt itself.
+ // Return true if the interrupt was handled, false if the IOHandler should
+ // continue to try handle the interrupt itself.
//------------------------------------------------------------------
virtual bool IOHandlerInterrupt(IOHandler &io_handler) { return false; }
@@ -302,8 +301,7 @@ protected:
// IOHandlerDelegateMultiline
//
// A IOHandlerDelegate that handles terminating multi-line input when
-// the last line is equal to "end_line" which is specified in the
-// constructor.
+// the last line is equal to "end_line" which is specified in the constructor.
//----------------------------------------------------------------------
class IOHandlerDelegateMultiline : public IOHandlerDelegate {
public:
@@ -325,9 +323,8 @@ public:
// Determine whether the end of input signal has been entered
const size_t num_lines = lines.GetSize();
if (num_lines > 0 && lines[num_lines - 1] == m_end_line) {
- // Remove the terminal line from "lines" so it doesn't appear in
- // the resulting input and return true to indicate we are done
- // getting lines
+ // Remove the terminal line from "lines" so it doesn't appear in the
+ // resulting input and return true to indicate we are done getting lines
lines.PopBack();
return true;
}
@@ -454,8 +451,7 @@ protected:
};
// The order of base classes is important. Look at the constructor of
-// IOHandlerConfirm
-// to see how.
+// IOHandlerConfirm to see how.
class IOHandlerConfirm : public IOHandlerDelegate, public IOHandlerEditline {
public:
IOHandlerConfirm(Debugger &debugger, llvm::StringRef prompt,
Modified: lldb/trunk/include/lldb/Core/MappedHash.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/MappedHash.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/MappedHash.h (original)
+++ lldb/trunk/include/lldb/Core/MappedHash.h Mon Apr 30 09:49:04 2018
@@ -256,13 +256,12 @@ public:
return false;
}
- // This method must be implemented in any subclasses.
- // The KeyType is user specified and must somehow result in a string
- // value. For example, the KeyType might be a string offset in a string
- // table and subclasses can store their string table as a member of the
- // subclass and return a valie "const char *" given a "key". The value
- // could also be a C string pointer, in which case just returning "key"
- // will suffice.
+ // This method must be implemented in any subclasses. The KeyType is user
+ // specified and must somehow result in a string value. For example, the
+ // KeyType might be a string offset in a string table and subclasses can
+ // store their string table as a member of the subclass and return a valie
+ // "const char *" given a "key". The value could also be a C string
+ // pointer, in which case just returning "key" will suffice.
virtual const char *GetStringForKeyType(KeyType key) const = 0;
virtual bool ReadHashData(uint32_t hash_data_offset,
@@ -270,19 +269,18 @@ public:
// This method must be implemented in any subclasses and it must try to
// read one "Pair" at the offset pointed to by the "hash_data_offset_ptr"
- // parameter. This offset should be updated as bytes are consumed and
- // a value "Result" enum should be returned. If the "name" matches the
- // full name for the "pair.key" (which must be filled in by this call),
- // then the HashData in the pair ("pair.value") should be extracted and
- // filled in and "eResultKeyMatch" should be returned. If "name" doesn't
- // match this string for the key, then "eResultKeyMismatch" should be
- // returned and all data for the current HashData must be consumed or
- // skipped and the "hash_data_offset_ptr" offset needs to be updated to
- // point to the next HashData. If the end of the HashData objects for
- // a given hash value have been reached, then "eResultEndOfHashData"
- // should be returned. If anything else goes wrong during parsing,
- // return "eResultError" and the corresponding "Find()" function will
- // be canceled and return false.
+ // parameter. This offset should be updated as bytes are consumed and a
+ // value "Result" enum should be returned. If the "name" matches the full
+ // name for the "pair.key" (which must be filled in by this call), then the
+ // HashData in the pair ("pair.value") should be extracted and filled in
+ // and "eResultKeyMatch" should be returned. If "name" doesn't match this
+ // string for the key, then "eResultKeyMismatch" should be returned and all
+ // data for the current HashData must be consumed or skipped and the
+ // "hash_data_offset_ptr" offset needs to be updated to point to the next
+ // HashData. If the end of the HashData objects for a given hash value have
+ // been reached, then "eResultEndOfHashData" should be returned. If
+ // anything else goes wrong during parsing, return "eResultError" and the
+ // corresponding "Find()" function will be canceled and return false.
virtual Result GetHashDataForName(llvm::StringRef name,
lldb::offset_t *hash_data_offset_ptr,
Pair &pair) const = 0;
Modified: lldb/trunk/include/lldb/Core/Module.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/Module.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/Module.h (original)
+++ lldb/trunk/include/lldb/Core/Module.h Mon Apr 30 09:49:04 2018
@@ -113,13 +113,12 @@ namespace lldb_private {
class Module : public std::enable_shared_from_this<Module>,
public SymbolContextScope {
public:
- // Static functions that can track the lifetime of module objects.
- // This is handy because we might have Module objects that are in
- // shared pointers that aren't in the global module list (from
- // ModuleList). If this is the case we need to know about it.
- // The modules in the global list maintained by these functions
- // can be viewed using the "target modules list" command using the
- // "--global" (-g for short).
+ // Static functions that can track the lifetime of module objects. This is
+ // handy because we might have Module objects that are in shared pointers
+ // that aren't in the global module list (from ModuleList). If this is the
+ // case we need to know about it. The modules in the global list maintained
+ // by these functions can be viewed using the "target modules list" command
+ // using the "--global" (-g for short).
static size_t GetNumberAllocatedModules();
static Module *GetAllocatedModuleAtIndex(size_t idx);
@@ -936,12 +935,10 @@ public:
TypeSystem *GetTypeSystemForLanguage(lldb::LanguageType language);
// Special error functions that can do printf style formatting that will
- // prepend the message with
- // something appropriate for this module (like the architecture, path and
- // object name (if any)).
- // This centralizes code so that everyone doesn't need to format their error
- // and log messages on
- // their own and keeps the output a bit more consistent.
+ // prepend the message with something appropriate for this module (like the
+ // architecture, path and object name (if any)). This centralizes code so
+ // that everyone doesn't need to format their error and log messages on their
+ // own and keeps the output a bit more consistent.
void LogMessage(Log *log, const char *format, ...)
__attribute__((format(printf, 3, 4)));
@@ -960,15 +957,15 @@ public:
__attribute__((format(printf, 2, 3)));
//------------------------------------------------------------------
- // Return true if the file backing this module has changed since the
- // module was originally created since we saved the initial file
- // modification time when the module first gets created.
+ // Return true if the file backing this module has changed since the module
+ // was originally created since we saved the initial file modification time
+ // when the module first gets created.
//------------------------------------------------------------------
bool FileHasChanged() const;
//------------------------------------------------------------------
- // SymbolVendor, SymbolFile and ObjectFile member objects should
- // lock the module mutex to avoid deadlocks.
+ // SymbolVendor, SymbolFile and ObjectFile member objects should lock the
+ // module mutex to avoid deadlocks.
//------------------------------------------------------------------
std::recursive_mutex &GetMutex() const { return m_mutex; }
Modified: lldb/trunk/include/lldb/Core/ModuleList.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/ModuleList.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/ModuleList.h (original)
+++ lldb/trunk/include/lldb/Core/ModuleList.h Mon Apr 30 09:49:04 2018
@@ -410,9 +410,9 @@ public:
//------------------------------------------------------------------
// Find a module by UUID
//
- // The UUID value for a module is extracted from the ObjectFile and
- // is the MD5 checksum, or a smarter object file equivalent, so
- // finding modules by UUID values is very efficient and accurate.
+ // The UUID value for a module is extracted from the ObjectFile and is the
+ // MD5 checksum, or a smarter object file equivalent, so finding modules by
+ // UUID values is very efficient and accurate.
//------------------------------------------------------------------
lldb::ModuleSP FindModule(const UUID &uuid) const;
Modified: lldb/trunk/include/lldb/Core/ModuleSpec.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/ModuleSpec.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/ModuleSpec.h (original)
+++ lldb/trunk/include/lldb/Core/ModuleSpec.h Mon Apr 30 09:49:04 2018
@@ -341,8 +341,8 @@ public:
m_specs.insert(m_specs.end(), rhs.m_specs.begin(), rhs.m_specs.end());
}
- // The index "i" must be valid and this can't be used in
- // multi-threaded code as no mutex lock is taken.
+ // The index "i" must be valid and this can't be used in multi-threaded code
+ // as no mutex lock is taken.
ModuleSpec &GetModuleSpecRefAtIndex(size_t i) { return m_specs[i]; }
bool GetModuleSpecAtIndex(size_t i, ModuleSpec &module_spec) const {
Modified: lldb/trunk/include/lldb/Core/PluginManager.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/PluginManager.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/PluginManager.h (original)
+++ lldb/trunk/include/lldb/Core/PluginManager.h Mon Apr 30 09:49:04 2018
@@ -477,11 +477,11 @@ public:
const ConstString &name);
//------------------------------------------------------------------
- // Some plug-ins might register a DebuggerInitializeCallback
- // callback when registering the plug-in. After a new Debugger
- // instance is created, this DebuggerInitialize function will get
- // called. This allows plug-ins to install Properties and do any
- // other initialization that requires a debugger instance.
+ // Some plug-ins might register a DebuggerInitializeCallback callback when
+ // registering the plug-in. After a new Debugger instance is created, this
+ // DebuggerInitialize function will get called. This allows plug-ins to
+ // install Properties and do any other initialization that requires a
+ // debugger instance.
//------------------------------------------------------------------
static void DebuggerInitialize(Debugger &debugger);
Modified: lldb/trunk/include/lldb/Core/RangeMap.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/RangeMap.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/RangeMap.h (original)
+++ lldb/trunk/include/lldb/Core/RangeMap.h Mon Apr 30 09:49:04 2018
@@ -27,9 +27,8 @@
namespace lldb_private {
//----------------------------------------------------------------------
-// Templatized classes for dealing with generic ranges and also
-// collections of ranges, or collections of ranges that have associated
-// data.
+// Templatized classes for dealing with generic ranges and also collections of
+// ranges, or collections of ranges that have associated data.
//----------------------------------------------------------------------
//----------------------------------------------------------------------
@@ -214,8 +213,8 @@ public:
else
minimal_ranges.push_back(*pos);
}
- // Use the swap technique in case our new vector is much smaller.
- // We must swap when using the STL because std::vector objects never
+ // Use the swap technique in case our new vector is much smaller. We
+ // must swap when using the STL because std::vector objects never
// release or reduce the memory once it has been allocated/reserved.
m_entries.swap(minimal_ranges);
}
@@ -228,8 +227,8 @@ public:
#endif
if (m_entries.empty())
return fail_value;
- // m_entries must be sorted, so if we aren't empty, we grab the
- // first range's base
+ // m_entries must be sorted, so if we aren't empty, we grab the first
+ // range's base
return m_entries.front().GetRangeBase();
}
@@ -239,8 +238,8 @@ public:
#endif
if (m_entries.empty())
return fail_value;
- // m_entries must be sorted, so if we aren't empty, we grab the
- // last range's end
+ // m_entries must be sorted, so if we aren't empty, we grab the last
+ // range's end
return m_entries.back().GetRangeEnd();
}
@@ -446,8 +445,8 @@ public:
else
minimal_ranges.push_back(*pos);
}
- // Use the swap technique in case our new vector is much smaller.
- // We must swap when using the STL because std::vector objects never
+ // Use the swap technique in case our new vector is much smaller. We
+ // must swap when using the STL because std::vector objects never
// release or reduce the memory once it has been allocated/reserved.
m_entries.swap(minimal_ranges);
}
@@ -460,8 +459,8 @@ public:
#endif
if (m_entries.empty())
return fail_value;
- // m_entries must be sorted, so if we aren't empty, we grab the
- // first range's base
+ // m_entries must be sorted, so if we aren't empty, we grab the first
+ // range's base
return m_entries.front().GetRangeBase();
}
@@ -471,8 +470,8 @@ public:
#endif
if (m_entries.empty())
return fail_value;
- // m_entries must be sorted, so if we aren't empty, we grab the
- // last range's end
+ // m_entries must be sorted, so if we aren't empty, we grab the last
+ // range's end
return m_entries.back().GetRangeEnd();
}
@@ -604,8 +603,8 @@ protected:
//----------------------------------------------------------------------
// A simple range with data class where you get to define the type of
-// the range base "B", the type used for the range byte size "S", and
-// the type for the associated data "T".
+// the range base "B", the type used for the range byte size "S", and the type
+// for the associated data "T".
//----------------------------------------------------------------------
template <typename B, typename S, typename T>
struct RangeData : public Range<B, S> {
@@ -688,8 +687,8 @@ public:
}
}
- // We we can combine at least one entry, then we make a new collection
- // and populate it accordingly, and then swap it into place.
+ // We we can combine at least one entry, then we make a new collection and
+ // populate it accordingly, and then swap it into place.
if (can_combine) {
Collection minimal_ranges;
for (pos = m_entries.begin(), end = m_entries.end(), prev = end;
@@ -699,9 +698,9 @@ public:
else
minimal_ranges.push_back(*pos);
}
- // Use the swap technique in case our new vector is much smaller.
- // We must swap when using the STL because std::vector objects never
- // release or reduce the memory once it has been allocated/reserved.
+ // Use the swap technique in case our new vector is much smaller. We must
+ // swap when using the STL because std::vector objects never release or
+ // reduce the memory once it has been allocated/reserved.
m_entries.swap(minimal_ranges);
}
}
@@ -828,8 +827,8 @@ protected:
Collection m_entries;
};
-// Same as RangeDataArray, but uses std::vector as to not
-// require static storage of N items in the class itself
+// Same as RangeDataArray, but uses std::vector as to not require static
+// storage of N items in the class itself
template <typename B, typename S, typename T> class RangeDataVector {
public:
typedef RangeData<B, S, T> Entry;
@@ -878,8 +877,8 @@ public:
}
}
- // We we can combine at least one entry, then we make a new collection
- // and populate it accordingly, and then swap it into place.
+ // We we can combine at least one entry, then we make a new collection and
+ // populate it accordingly, and then swap it into place.
if (can_combine) {
Collection minimal_ranges;
for (pos = m_entries.begin(), end = m_entries.end(), prev = end;
@@ -889,15 +888,15 @@ public:
else
minimal_ranges.push_back(*pos);
}
- // Use the swap technique in case our new vector is much smaller.
- // We must swap when using the STL because std::vector objects never
- // release or reduce the memory once it has been allocated/reserved.
+ // Use the swap technique in case our new vector is much smaller. We must
+ // swap when using the STL because std::vector objects never release or
+ // reduce the memory once it has been allocated/reserved.
m_entries.swap(minimal_ranges);
}
}
- // Calculate the byte size of ranges with zero byte sizes by finding
- // the next entry with a base address > the current base address
+ // Calculate the byte size of ranges with zero byte sizes by finding the next
+ // entry with a base address > the current base address
void CalculateSizesOfZeroByteSizeRanges(S full_size = 0) {
#ifdef ASSERT_RANGEMAP_ARE_SORTED
assert(IsSorted());
@@ -907,9 +906,9 @@ public:
typename Collection::iterator next;
for (pos = m_entries.begin(), end = m_entries.end(); pos != end; ++pos) {
if (pos->GetByteSize() == 0) {
- // Watch out for multiple entries with same address and make sure
- // we find an entry that is greater than the current base address
- // before we use that for the size
+ // Watch out for multiple entries with same address and make sure we
+ // find an entry that is greater than the current base address before
+ // we use that for the size
auto curr_base = pos->GetRangeBase();
for (next = pos + 1; next != end; ++next) {
auto next_base = next->GetRangeBase();
@@ -1060,8 +1059,8 @@ public:
}
// This method will return the entry that contains the given address, or the
- // entry following that address. If you give it an address of 0 and the first
- // entry starts at address 0x100, you will get the entry at 0x100.
+ // entry following that address. If you give it an address of 0 and the
+ // first entry starts at address 0x100, you will get the entry at 0x100.
//
// For most uses, FindEntryThatContains is the correct one to use, this is a
// less commonly needed behavior. It was added for core file memory regions,
@@ -1102,8 +1101,8 @@ protected:
//----------------------------------------------------------------------
// A simple range with data class where you get to define the type of
-// the range base "B", the type used for the range byte size "S", and
-// the type for the associated data "T".
+// the range base "B", the type used for the range byte size "S", and the type
+// for the associated data "T".
//----------------------------------------------------------------------
template <typename B, typename T> struct AddressData {
typedef B BaseType;
Modified: lldb/trunk/include/lldb/Core/RegisterValue.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/RegisterValue.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/RegisterValue.h (original)
+++ lldb/trunk/include/lldb/Core/RegisterValue.h Mon Apr 30 09:49:04 2018
@@ -95,14 +95,13 @@ public:
bool GetData(DataExtractor &data) const;
- // Copy the register value from this object into a buffer in "dst"
- // and obey the "dst_byte_order" when copying the data. Also watch out
- // in case "dst_len" is longer or shorter than the register value
- // described by "reg_info" and only copy the least significant bytes
- // of the register value, or pad the destination with zeroes if the
- // register byte size is shorter that "dst_len" (all while correctly
- // abiding the "dst_byte_order"). Returns the number of bytes copied
- // into "dst".
+ // Copy the register value from this object into a buffer in "dst" and obey
+ // the "dst_byte_order" when copying the data. Also watch out in case
+ // "dst_len" is longer or shorter than the register value described by
+ // "reg_info" and only copy the least significant bytes of the register
+ // value, or pad the destination with zeroes if the register byte size is
+ // shorter that "dst_len" (all while correctly abiding the "dst_byte_order").
+ // Returns the number of bytes copied into "dst".
uint32_t GetAsMemoryData(const RegisterInfo *reg_info, void *dst,
uint32_t dst_len, lldb::ByteOrder dst_byte_order,
Status &error) const;
Modified: lldb/trunk/include/lldb/Core/STLUtils.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/STLUtils.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/STLUtils.h (original)
+++ lldb/trunk/include/lldb/Core/STLUtils.h Mon Apr 30 09:49:04 2018
@@ -40,8 +40,8 @@ struct CStringEqualBinaryPredicate {
};
//----------------------------------------------------------------------
-// Templated type for finding an entry in a std::map<F,S> whose value
-// is equal to something
+// Templated type for finding an entry in a std::map<F,S> whose value is equal
+// to something
//----------------------------------------------------------------------
template <class F, class S> class ValueEquals {
public:
Modified: lldb/trunk/include/lldb/Core/Scalar.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/Scalar.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/Scalar.h (original)
+++ lldb/trunk/include/lldb/Core/Scalar.h Mon Apr 30 09:49:04 2018
@@ -36,9 +36,9 @@ namespace lldb_private {
//----------------------------------------------------------------------
// A class designed to hold onto values and their corresponding types.
-// Operators are defined and Scalar objects will correctly promote
-// their types and values before performing these operations. Type
-// promotion currently follows the ANSI C type promotion rules.
+// Operators are defined and Scalar objects will correctly promote their types
+// and values before performing these operations. Type promotion currently
+// follows the ANSI C type promotion rules.
//----------------------------------------------------------------------
class Scalar {
public:
@@ -180,10 +180,10 @@ public:
static Scalar::Type GetValueTypeForFloatWithByteSize(size_t byte_size);
//----------------------------------------------------------------------
- // All operators can benefits from the implicit conversions that will
- // happen automagically by the compiler, so no temporary objects will
- // need to be created. As a result, we currently don't need a variety of
- // overloaded set value accessors.
+ // All operators can benefits from the implicit conversions that will happen
+ // automagically by the compiler, so no temporary objects will need to be
+ // created. As a result, we currently don't need a variety of overloaded set
+ // value accessors.
//----------------------------------------------------------------------
Scalar &operator=(const int i);
Scalar &operator=(unsigned int v);
@@ -202,27 +202,27 @@ public:
Scalar &operator&=(const Scalar &rhs);
//----------------------------------------------------------------------
- // Shifts the current value to the right without maintaining the current
- // sign of the value (if it is signed).
+ // Shifts the current value to the right without maintaining the current sign
+ // of the value (if it is signed).
//----------------------------------------------------------------------
bool ShiftRightLogical(const Scalar &rhs); // Returns true on success
//----------------------------------------------------------------------
- // Takes the absolute value of the current value if it is signed, else
- // the value remains unchanged.
- // Returns false if the contained value has a void type.
+ // Takes the absolute value of the current value if it is signed, else the
+ // value remains unchanged. Returns false if the contained value has a void
+ // type.
//----------------------------------------------------------------------
bool AbsoluteValue(); // Returns true on success
//----------------------------------------------------------------------
- // Negates the current value (even for unsigned values).
- // Returns false if the contained value has a void type.
+ // Negates the current value (even for unsigned values). Returns false if the
+ // contained value has a void type.
//----------------------------------------------------------------------
bool UnaryNegate(); // Returns true on success
//----------------------------------------------------------------------
- // Inverts all bits in the current value as long as it isn't void or
- // a float/double/long double type.
- // Returns false if the contained value has a void/float/double/long
- // double type, else the value is inverted and true is returned.
+ // Inverts all bits in the current value as long as it isn't void or a
+ // float/double/long double type. Returns false if the contained value has a
+ // void/float/double/long double type, else the value is inverted and true is
+ // returned.
//----------------------------------------------------------------------
bool OnesComplement(); // Returns true on success
@@ -232,9 +232,9 @@ public:
Scalar::Type GetType() const { return m_type; }
//----------------------------------------------------------------------
- // Returns a casted value of the current contained data without
- // modifying the current value. FAIL_VALUE will be returned if the type
- // of the value is void or invalid.
+ // Returns a casted value of the current contained data without modifying the
+ // current value. FAIL_VALUE will be returned if the type of the value is
+ // void or invalid.
//----------------------------------------------------------------------
int SInt(int fail_value = 0) const;
@@ -342,8 +342,8 @@ private:
};
//----------------------------------------------------------------------
-// Split out the operators into a format where the compiler will be able
-// to implicitly convert numbers into Scalar objects.
+// Split out the operators into a format where the compiler will be able to
+// implicitly convert numbers into Scalar objects.
//
// This allows code like:
// Scalar two(2);
Modified: lldb/trunk/include/lldb/Core/SearchFilter.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/SearchFilter.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/SearchFilter.h (original)
+++ lldb/trunk/include/lldb/Core/SearchFilter.h Mon Apr 30 09:49:04 2018
@@ -303,8 +303,7 @@ protected:
OptionNames name, FileSpecList &file_list);
// These are utility functions to assist with the search iteration. They are
- // used by the
- // default Search method.
+ // used by the default Search method.
Searcher::CallbackReturn DoModuleIteration(const SymbolContext &context,
Searcher &searcher);
Modified: lldb/trunk/include/lldb/Core/Section.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/Section.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/Section.h (original)
+++ lldb/trunk/include/lldb/Core/Section.h Mon Apr 30 09:49:04 2018
@@ -272,10 +272,9 @@ protected:
SectionList m_children; // Child sections
bool m_fake : 1, // If true, then this section only can contain the address if
// one of its
- // children contains an address. This allows for gaps between the children
- // that are contained in the address range for this section, but do not
- // produce
- // hits unless the children contain the address.
+ // children contains an address. This allows for gaps between the
+ // children that are contained in the address range for this section, but
+ // do not produce hits unless the children contain the address.
m_encrypted : 1, // Set to true if the contents are encrypted
m_thread_specific : 1, // This section is thread specific
m_readable : 1, // If this section has read permissions
Modified: lldb/trunk/include/lldb/Core/SourceManager.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/SourceManager.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/SourceManager.h (original)
+++ lldb/trunk/include/lldb/Core/SourceManager.h Mon Apr 30 09:49:04 2018
@@ -106,9 +106,8 @@ public:
#ifndef SWIG
// The SourceFileCache class separates the source manager from the cache of
- // source files, so the
- // cache can be stored in the Debugger, but the source managers can be per
- // target.
+ // source files, so the cache can be stored in the Debugger, but the source
+ // managers can be per target.
class SourceFileCache {
public:
SourceFileCache() = default;
Modified: lldb/trunk/include/lldb/Core/StreamBuffer.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/StreamBuffer.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/StreamBuffer.h (original)
+++ lldb/trunk/include/lldb/Core/StreamBuffer.h Mon Apr 30 09:49:04 2018
@@ -39,9 +39,8 @@ public:
void Clear() { m_packet.clear(); }
// Beware, this might not be NULL terminated as you can expect from
- // StringString as there may be random bits in the llvm::SmallVector. If
- // you are using this class to create a C string, be sure the call PutChar
- // ('\0')
+ // StringString as there may be random bits in the llvm::SmallVector. If you
+ // are using this class to create a C string, be sure the call PutChar ('\0')
// after you have created your string, or use StreamString.
const char *GetData() const { return m_packet.data(); }
Modified: lldb/trunk/include/lldb/Core/UniqueCStringMap.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/UniqueCStringMap.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/UniqueCStringMap.h (original)
+++ lldb/trunk/include/lldb/Core/UniqueCStringMap.h Mon Apr 30 09:49:04 2018
@@ -25,11 +25,10 @@ namespace lldb_private {
//----------------------------------------------------------------------
// Templatized uniqued string map.
//
-// This map is useful for mapping unique C string names to values of
-// type T. Each "const char *" name added must be unique for a given
+// This map is useful for mapping unique C string names to values of type T.
+// Each "const char *" name added must be unique for a given
// C string value. ConstString::GetCString() can provide such strings.
-// Any other string table that has guaranteed unique values can also
-// be used.
+// Any other string table that has guaranteed unique values can also be used.
//----------------------------------------------------------------------
template <typename T> class UniqueCStringMap {
public:
@@ -51,9 +50,9 @@ public:
};
//------------------------------------------------------------------
- // Call this function multiple times to add a bunch of entries to
- // this map, then later call UniqueCStringMap<T>::Sort() before doing
- // any searches by name.
+ // Call this function multiple times to add a bunch of entries to this map,
+ // then later call UniqueCStringMap<T>::Sort() before doing any searches by
+ // name.
//------------------------------------------------------------------
void Append(ConstString unique_cstr, const T &value) {
m_map.push_back(typename UniqueCStringMap<T>::Entry(unique_cstr, value));
@@ -64,8 +63,8 @@ public:
void Clear() { m_map.clear(); }
//------------------------------------------------------------------
- // Call this function to always keep the map sorted when putting
- // entries into the map.
+ // Call this function to always keep the map sorted when putting entries into
+ // the map.
//------------------------------------------------------------------
void Insert(ConstString unique_cstr, const T &value) {
typename UniqueCStringMap<T>::Entry e(unique_cstr, value);
@@ -79,8 +78,8 @@ public:
//------------------------------------------------------------------
// Get an entries by index in a variety of forms.
//
- // The caller is responsible for ensuring that the collection does
- // not change during while using the returned values.
+ // The caller is responsible for ensuring that the collection does not change
+ // during while using the returned values.
//------------------------------------------------------------------
bool GetValueAtIndex(uint32_t idx, T &value) const {
if (idx < m_map.size()) {
@@ -94,12 +93,12 @@ public:
return m_map[idx].cstring;
}
- // Use this function if you have simple types in your map that you
- // can easily copy when accessing values by index.
+ // Use this function if you have simple types in your map that you can easily
+ // copy when accessing values by index.
T GetValueAtIndexUnchecked(uint32_t idx) const { return m_map[idx].value; }
- // Use this function if you have complex types in your map that you
- // don't want to copy when accessing values by index.
+ // Use this function if you have complex types in your map that you don't
+ // want to copy when accessing values by index.
const T &GetValueRefAtIndexUnchecked(uint32_t idx) const {
return m_map[idx].value;
}
@@ -111,8 +110,8 @@ public:
//------------------------------------------------------------------
// Find the value for the unique string in the map.
//
- // Return the value for \a unique_cstr if one is found, return
- // \a fail_value otherwise. This method works well for simple type
+ // Return the value for \a unique_cstr if one is found, return \a fail_value
+ // otherwise. This method works well for simple type
// T values and only if there is a sensible failure value that can
// be returned and that won't match any existing values.
//------------------------------------------------------------------
@@ -128,11 +127,11 @@ public:
}
//------------------------------------------------------------------
- // Get a pointer to the first entry that matches "name". nullptr will
- // be returned if there is no entry that matches "name".
+ // Get a pointer to the first entry that matches "name". nullptr will be
+ // returned if there is no entry that matches "name".
//
- // The caller is responsible for ensuring that the collection does
- // not change during while using the returned pointer.
+ // The caller is responsible for ensuring that the collection does not change
+ // during while using the returned pointer.
//------------------------------------------------------------------
const Entry *FindFirstValueForName(ConstString unique_cstr) const {
Entry search_entry(unique_cstr);
@@ -144,12 +143,12 @@ public:
}
//------------------------------------------------------------------
- // Get a pointer to the next entry that matches "name" from a
- // previously returned Entry pointer. nullptr will be returned if there
- // is no subsequent entry that matches "name".
+ // Get a pointer to the next entry that matches "name" from a previously
+ // returned Entry pointer. nullptr will be returned if there is no subsequent
+ // entry that matches "name".
//
- // The caller is responsible for ensuring that the collection does
- // not change during while using the returned pointer.
+ // The caller is responsible for ensuring that the collection does not change
+ // during while using the returned pointer.
//------------------------------------------------------------------
const Entry *FindNextValueForName(const Entry *entry_ptr) const {
if (!m_map.empty()) {
@@ -204,16 +203,15 @@ public:
bool IsEmpty() const { return m_map.empty(); }
//------------------------------------------------------------------
- // Reserve memory for at least "n" entries in the map. This is
- // useful to call when you know you will be adding a lot of entries
- // using UniqueCStringMap::Append() (which should be followed by a
- // call to UniqueCStringMap::Sort()) or to UniqueCStringMap::Insert().
+ // Reserve memory for at least "n" entries in the map. This is useful to call
+ // when you know you will be adding a lot of entries using
+ // UniqueCStringMap::Append() (which should be followed by a call to
+ // UniqueCStringMap::Sort()) or to UniqueCStringMap::Insert().
//------------------------------------------------------------------
void Reserve(size_t n) { m_map.reserve(n); }
//------------------------------------------------------------------
- // Sort the unsorted contents in this map. A typical code flow would
- // be:
+ // Sort the unsorted contents in this map. A typical code flow would be:
// size_t approximate_num_entries = ....
// UniqueCStringMap<uint32_t> my_map;
// my_map.Reserve (approximate_num_entries);
@@ -226,12 +224,11 @@ public:
void Sort() { std::sort(m_map.begin(), m_map.end()); }
//------------------------------------------------------------------
- // Since we are using a vector to contain our items it will always
- // double its memory consumption as things are added to the vector,
- // so if you intend to keep a UniqueCStringMap around and have
- // a lot of entries in the map, you will want to call this function
- // to create a new vector and copy _only_ the exact size needed as
- // part of the finalization of the string map.
+ // Since we are using a vector to contain our items it will always double its
+ // memory consumption as things are added to the vector, so if you intend to
+ // keep a UniqueCStringMap around and have a lot of entries in the map, you
+ // will want to call this function to create a new vector and copy _only_ the
+ // exact size needed as part of the finalization of the string map.
//------------------------------------------------------------------
void SizeToFit() {
if (m_map.size() < m_map.capacity()) {
Modified: lldb/trunk/include/lldb/Core/UserSettingsController.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/UserSettingsController.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/UserSettingsController.h (original)
+++ lldb/trunk/include/lldb/Core/UserSettingsController.h Mon Apr 30 09:49:04 2018
@@ -49,8 +49,8 @@ public:
virtual ~Properties() {}
virtual lldb::OptionValuePropertiesSP GetValueProperties() const {
- // This function is virtual in case subclasses want to lazily
- // implement creating the properties.
+ // This function is virtual in case subclasses want to lazily implement
+ // creating the properties.
return m_collection_sp;
}
@@ -82,16 +82,11 @@ public:
// We sometimes need to introduce a setting to enable experimental features,
// but then we don't want the setting for these to cause errors when the
- // setting
- // goes away. Add a sub-topic of the settings using this experimental name,
- // and
- // two things will happen. One is that settings that don't find the name will
- // not
- // be treated as errors. Also, if you decide to keep the settings just move
- // them into
- // the containing properties, and we will auto-forward the experimental
- // settings to the
- // real one.
+ // setting goes away. Add a sub-topic of the settings using this
+ // experimental name, and two things will happen. One is that settings that
+ // don't find the name will not be treated as errors. Also, if you decide to
+ // keep the settings just move them into the containing properties, and we
+ // will auto-forward the experimental settings to the real one.
static const char *GetExperimentalSettingsName();
static bool IsSettingExperimental(llvm::StringRef setting);
Modified: lldb/trunk/include/lldb/Core/Value.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/Value.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/Value.h (original)
+++ lldb/trunk/include/lldb/Core/Value.h Mon Apr 30 09:49:04 2018
@@ -48,8 +48,8 @@ namespace lldb_private {
class Value {
public:
- // Values Less than zero are an error, greater than or equal to zero
- // returns what the Scalar result is.
+ // Values Less than zero are an error, greater than or equal to zero returns
+ // what the Scalar result is.
enum ValueType {
// m_value contains...
// ============================
@@ -107,8 +107,7 @@ public:
byte_order != lldb::eByteOrderInvalid);
}
// Casts a vector, if valid, to an unsigned int of matching or largest
- // supported size.
- // Truncates to the beginning of the vector if required.
+ // supported size. Truncates to the beginning of the vector if required.
// Returns a default constructed Scalar if the Vector data is internally
// inconsistent.
llvm::APInt rhs = llvm::APInt(BITWIDTH_INT128, NUM_OF_WORDS_INT128,
Modified: lldb/trunk/include/lldb/Core/ValueObject.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/ValueObject.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/ValueObject.h (original)
+++ lldb/trunk/include/lldb/Core/ValueObject.h Mon Apr 30 09:49:04 2018
@@ -286,10 +286,10 @@ public:
return m_exe_ctx_ref;
}
- // Set the EvaluationPoint to the values in exe_scope,
- // Return true if the Evaluation Point changed.
- // Since the ExecutionContextScope is always going to be valid currently,
- // the Updated Context will also always be valid.
+ // Set the EvaluationPoint to the values in exe_scope, Return true if the
+ // Evaluation Point changed. Since the ExecutionContextScope is always
+ // going to be valid currently, the Updated Context will also always be
+ // valid.
// bool
// SetContext (ExecutionContextScope *exe_scope);
@@ -327,8 +327,7 @@ public:
void SetInvalid() {
// Use the stop id to mark us as invalid, leave the thread id and the
- // stack id around for logging and
- // history purposes.
+ // stack id around for logging and history purposes.
m_mod_id.SetInvalid();
// Can't update an invalid state.
@@ -464,17 +463,16 @@ public:
virtual bool SetValueFromCString(const char *value_str, Status &error);
- // Return the module associated with this value object in case the
- // value is from an executable file and might have its data in
- // sections of the file. This can be used for variables.
+ // Return the module associated with this value object in case the value is
+ // from an executable file and might have its data in sections of the file.
+ // This can be used for variables.
virtual lldb::ModuleSP GetModule();
ValueObject *GetRoot();
// Given a ValueObject, loop over itself and its parent, and its parent's
- // parent, ..
- // until either the given callback returns false, or you end up at a null
- // pointer
+ // parent, .. until either the given callback returns false, or you end up at
+ // a null pointer
ValueObject *FollowParentChain(std::function<bool(ValueObject *)>);
virtual bool GetDeclaration(Declaration &decl);
@@ -517,9 +515,9 @@ public:
virtual bool ResolveValue(Scalar &scalar);
- // return 'false' whenever you set the error, otherwise
- // callers may assume true means everything is OK - this will
- // break breakpoint conditions among potentially a few others
+ // return 'false' whenever you set the error, otherwise callers may assume
+ // true means everything is OK - this will break breakpoint conditions among
+ // potentially a few others
virtual bool IsLogicalTrue(Status &error);
virtual const char *GetLocationAsCString();
@@ -646,8 +644,8 @@ public:
virtual lldb::ValueObjectSP CastPointerType(const char *name,
lldb::TypeSP &type_sp);
- // The backing bits of this value object were updated, clear any
- // descriptive string, so we know we have to refetch them
+ // The backing bits of this value object were updated, clear any descriptive
+ // string, so we know we have to refetch them
virtual void ValueUpdated() {
ClearUserVisibleData(eClearUserVisibleDataItemsValue |
eClearUserVisibleDataItemsSummary |
@@ -694,9 +692,8 @@ public:
lldb::ValueObjectSP Persist();
- // returns true if this is a char* or a char[]
- // if it is a char* and check_pointer is true,
- // it also checks that the pointer is valid
+ // returns true if this is a char* or a char[] if it is a char* and
+ // check_pointer is true, it also checks that the pointer is valid
bool IsCStringContainer(bool check_pointer = false);
std::pair<size_t, bool>
@@ -776,11 +773,9 @@ public:
}
// Use GetParent for display purposes, but if you want to tell the parent to
- // update itself
- // then use m_parent. The ValueObjectDynamicValue's parent is not the correct
- // parent for
- // displaying, they are really siblings, so for display it needs to route
- // through to its grandparent.
+ // update itself then use m_parent. The ValueObjectDynamicValue's parent is
+ // not the correct parent for displaying, they are really siblings, so for
+ // display it needs to route through to its grandparent.
virtual ValueObject *GetParent() { return m_parent; }
virtual const ValueObject *GetParent() const { return m_parent; }
@@ -904,9 +899,9 @@ protected:
ValueObjectManager *m_manager; // This object is managed by the root object
// (any ValueObject that gets created
// without a parent.) The manager gets passed through all the generations of
- // dependent objects, and will keep the whole cluster of objects alive as long
- // as a shared pointer to any of them has been handed out. Shared pointers to
- // value objects must always be made with the GetSP method.
+ // dependent objects, and will keep the whole cluster of objects alive as
+ // long as a shared pointer to any of them has been handed out. Shared
+ // pointers to value objects must always be made with the GetSP method.
ChildrenManager m_children;
std::map<ConstString, ValueObject *> m_synthetic_children;
@@ -954,21 +949,19 @@ protected:
// Constructors and Destructors
//------------------------------------------------------------------
- // Use the no-argument constructor to make a constant variable object (with no
- // ExecutionContextScope.)
+ // Use the no-argument constructor to make a constant variable object (with
+ // no ExecutionContextScope.)
ValueObject();
// Use this constructor to create a "root variable object". The ValueObject
- // will be locked to this context
- // through-out its lifespan.
+ // will be locked to this context through-out its lifespan.
ValueObject(ExecutionContextScope *exe_scope,
AddressType child_ptr_or_ref_addr_type = eAddressTypeLoad);
// Use this constructor to create a ValueObject owned by another ValueObject.
- // It will inherit the ExecutionContext
- // of its parent.
+ // It will inherit the ExecutionContext of its parent.
ValueObject(ValueObject &parent);
@@ -990,8 +983,8 @@ protected:
virtual void CalculateSyntheticValue(bool use_synthetic = true);
- // Should only be called by ValueObject::GetChildAtIndex()
- // Returns a ValueObject managed by this ValueObject's manager.
+ // Should only be called by ValueObject::GetChildAtIndex() Returns a
+ // ValueObject managed by this ValueObject's manager.
virtual ValueObject *CreateChildAtIndex(size_t idx,
bool synthetic_array_member,
int32_t synthetic_index);
@@ -1043,8 +1036,9 @@ private:
//------------------------------------------------------------------------------
// A value object manager class that is seeded with the static variable value
// and it vends the user facing value object. If the type is dynamic it can
-// vend the dynamic type. If this user type also has a synthetic type associated
-// with it, it will vend the synthetic type. The class watches the process' stop
+// vend the dynamic type. If this user type also has a synthetic type
+// associated with it, it will vend the synthetic type. The class watches the
+// process' stop
// ID and will update the user type when needed.
//------------------------------------------------------------------------------
class ValueObjectManager {
Modified: lldb/trunk/include/lldb/Core/ValueObjectSyntheticFilter.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/ValueObjectSyntheticFilter.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/ValueObjectSyntheticFilter.h (original)
+++ lldb/trunk/include/lldb/Core/ValueObjectSyntheticFilter.h Mon Apr 30 09:49:04 2018
@@ -39,9 +39,9 @@ namespace lldb_private {
//----------------------------------------------------------------------
// A ValueObject that obtains its children from some source other than
// real information
-// This is currently used to implement Python-based children and filters
-// but you can bind it to any source of synthetic information and have
-// it behave accordingly
+// This is currently used to implement Python-based children and filters but
+// you can bind it to any source of synthetic information and have it behave
+// accordingly
//----------------------------------------------------------------------
class ValueObjectSynthetic : public ValueObject {
public:
Modified: lldb/trunk/include/lldb/DataFormatters/DataVisualization.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/DataFormatters/DataVisualization.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/DataFormatters/DataVisualization.h (original)
+++ lldb/trunk/include/lldb/DataFormatters/DataVisualization.h Mon Apr 30 09:49:04 2018
@@ -21,15 +21,14 @@
namespace lldb_private {
-// this class is the high-level front-end of LLDB Data Visualization
-// code in FormatManager.h/cpp is the low-level implementation of this feature
-// clients should refer to this class as the entry-point into the data
-// formatters
+// this class is the high-level front-end of LLDB Data Visualization code in
+// FormatManager.h/cpp is the low-level implementation of this feature clients
+// should refer to this class as the entry-point into the data formatters
// unless they have a good reason to bypass this and go to the backend
class DataVisualization {
public:
- // use this call to force the FM to consider itself updated even when there is
- // no apparent reason for that
+ // use this call to force the FM to consider itself updated even when there
+ // is no apparent reason for that
static void ForceUpdate();
static uint32_t GetCurrentRevision();
Modified: lldb/trunk/include/lldb/DataFormatters/FormatClasses.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/DataFormatters/FormatClasses.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/DataFormatters/FormatClasses.h (original)
+++ lldb/trunk/include/lldb/DataFormatters/FormatClasses.h Mon Apr 30 09:49:04 2018
@@ -160,8 +160,8 @@ public:
private:
bool m_is_regex;
- // this works better than TypeAndOrName because the latter only wraps a TypeSP
- // whereas TypePair can also be backed by a CompilerType
+ // this works better than TypeAndOrName because the latter only wraps a
+ // TypeSP whereas TypePair can also be backed by a CompilerType
struct TypeOrName {
std::string m_type_name;
TypePair m_type_pair;
Modified: lldb/trunk/include/lldb/DataFormatters/FormatManager.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/DataFormatters/FormatManager.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/DataFormatters/FormatManager.h (original)
+++ lldb/trunk/include/lldb/DataFormatters/FormatManager.h Mon Apr 30 09:49:04 2018
@@ -33,12 +33,10 @@
namespace lldb_private {
// this file (and its. cpp) contain the low-level implementation of LLDB Data
-// Visualization
-// class DataVisualization is the high-level front-end of this feature
-// clients should refer to that class as the entry-point into the data
-// formatters
-// unless they have a good reason to bypass it and prefer to use this file's
-// objects directly
+// Visualization class DataVisualization is the high-level front-end of this
+// feature clients should refer to that class as the entry-point into the data
+// formatters unless they have a good reason to bypass it and prefer to use
+// this file's objects directly
class FormatManager : public IFormatChangeListener {
typedef FormatMap<ConstString, TypeSummaryImpl> NamedSummariesMap;
@@ -175,24 +173,22 @@ public:
static const char *GetFormatAsCString(lldb::Format format);
- // if the user tries to add formatters for, say, "struct Foo"
- // those will not match any type because of the way we strip qualifiers from
- // typenames
- // this method looks for the case where the user is adding a
- // "class","struct","enum" or "union" Foo
- // and strips the unnecessary qualifier
+ // if the user tries to add formatters for, say, "struct Foo" those will not
+ // match any type because of the way we strip qualifiers from typenames this
+ // method looks for the case where the user is adding a
+ // "class","struct","enum" or "union" Foo and strips the unnecessary
+ // qualifier
static ConstString GetValidTypeName(const ConstString &type);
// when DataExtractor dumps a vectorOfT, it uses a predefined format for each
- // item
- // this method returns it, or eFormatInvalid if vector_format is not a
+ // item this method returns it, or eFormatInvalid if vector_format is not a
// vectorOf
static lldb::Format GetSingleItemFormat(lldb::Format vector_format);
- // this returns true if the ValueObjectPrinter is *highly encouraged*
- // to actually represent this ValueObject in one-liner format
- // If this object has a summary formatter, however, we should not
- // try and do one-lining, just let the summary do the right thing
+ // this returns true if the ValueObjectPrinter is *highly encouraged* to
+ // actually represent this ValueObject in one-liner format If this object has
+ // a summary formatter, however, we should not try and do one-lining, just
+ // let the summary do the right thing
bool ShouldPrintAsOneLiner(ValueObject &valobj);
void Changed() override;
@@ -249,15 +245,12 @@ private:
TypeCategoryMap &GetCategories() { return m_categories_map; }
- // These functions are meant to initialize formatters that are very
- // low-level/global in nature
- // and do not naturally belong in any language. The intent is that most
- // formatters go in
- // language-specific categories. Eventually, the runtimes should also be
- // allowed to vend their
- // own formatters, and then one could put formatters that depend on specific
- // library load events
- // in the language runtimes, on an as-needed basis
+ // These functions are meant to initialize formatters that are very low-
+ // level/global in nature and do not naturally belong in any language. The
+ // intent is that most formatters go in language-specific categories.
+ // Eventually, the runtimes should also be allowed to vend their own
+ // formatters, and then one could put formatters that depend on specific
+ // library load events in the language runtimes, on an as-needed basis
void LoadSystemFormatters();
void LoadVectorFormatters();
Modified: lldb/trunk/include/lldb/DataFormatters/FormattersContainer.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/DataFormatters/FormattersContainer.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/DataFormatters/FormattersContainer.h (original)
+++ lldb/trunk/include/lldb/DataFormatters/FormattersContainer.h Mon Apr 30 09:49:04 2018
@@ -43,12 +43,10 @@ public:
virtual uint32_t GetCurrentRevision() = 0;
};
-// if the user tries to add formatters for, say, "struct Foo"
-// those will not match any type because of the way we strip qualifiers from
-// typenames
-// this method looks for the case where the user is adding a
-// "class","struct","enum" or "union" Foo
-// and strips the unnecessary qualifier
+// if the user tries to add formatters for, say, "struct Foo" those will not
+// match any type because of the way we strip qualifiers from typenames this
+// method looks for the case where the user is adding a "class","struct","enum"
+// or "union" Foo and strips the unnecessary qualifier
static inline ConstString GetValidTypeName_Impl(const ConstString &type) {
if (type.IsEmpty())
return type;
Modified: lldb/trunk/include/lldb/DataFormatters/StringPrinter.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/DataFormatters/StringPrinter.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/DataFormatters/StringPrinter.h (original)
+++ lldb/trunk/include/lldb/DataFormatters/StringPrinter.h Mon Apr 30 09:49:04 2018
@@ -266,8 +266,7 @@ public:
// I can't use a std::unique_ptr for this because the Deleter is a template
// argument there
// and I want the same type to represent both pointers I want to free and
- // pointers I don't need
- // to free - which is what this class essentially is
+ // pointers I don't need to free - which is what this class essentially is
// It's very specialized to the needs of this file, and not suggested for
// general use
template <typename T = uint8_t, typename U = char, typename S = size_t>
Modified: lldb/trunk/include/lldb/DataFormatters/TypeFormat.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/DataFormatters/TypeFormat.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/DataFormatters/TypeFormat.h (original)
+++ lldb/trunk/include/lldb/DataFormatters/TypeFormat.h Mon Apr 30 09:49:04 2018
@@ -146,10 +146,9 @@ public:
virtual Type GetType() { return Type::eTypeUnknown; }
// we are using a ValueObject* instead of a ValueObjectSP because we do not
- // need to hold on to this for
- // extended periods of time and we trust the ValueObject to stay around for as
- // long as it is required
- // for us to generate its value
+ // need to hold on to this for extended periods of time and we trust the
+ // ValueObject to stay around for as long as it is required for us to
+ // generate its value
virtual bool FormatObject(ValueObject *valobj, std::string &dest) const = 0;
virtual std::string GetDescription() = 0;
Modified: lldb/trunk/include/lldb/DataFormatters/TypeSummary.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/DataFormatters/TypeSummary.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/DataFormatters/TypeSummary.h (original)
+++ lldb/trunk/include/lldb/DataFormatters/TypeSummary.h Mon Apr 30 09:49:04 2018
@@ -258,10 +258,9 @@ public:
void SetOptions(uint32_t value) { m_flags.SetValue(value); }
// we are using a ValueObject* instead of a ValueObjectSP because we do not
- // need to hold on to this for
- // extended periods of time and we trust the ValueObject to stay around for as
- // long as it is required
- // for us to generate its summary
+ // need to hold on to this for extended periods of time and we trust the
+ // ValueObject to stay around for as long as it is required for us to
+ // generate its summary
virtual bool FormatObject(ValueObject *valobj, std::string &dest,
const TypeSummaryOptions &options) = 0;
@@ -311,8 +310,8 @@ private:
// summaries implemented via a C++ function
struct CXXFunctionSummaryFormat : public TypeSummaryImpl {
- // we should convert these to SBValue and SBStream if we ever cross
- // the boundary towards the external world
+ // we should convert these to SBValue and SBStream if we ever cross the
+ // boundary towards the external world
typedef std::function<bool(ValueObject &, Stream &,
const TypeSummaryOptions &)>
Callback;
Modified: lldb/trunk/include/lldb/DataFormatters/TypeSynthetic.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/DataFormatters/TypeSynthetic.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/DataFormatters/TypeSynthetic.h (original)
+++ lldb/trunk/include/lldb/DataFormatters/TypeSynthetic.h Mon Apr 30 09:49:04 2018
@@ -55,34 +55,29 @@ public:
virtual size_t GetIndexOfChildWithName(const ConstString &name) = 0;
// this function is assumed to always succeed and it if fails, the front-end
- // should know to deal
- // with it in the correct way (most probably, by refusing to return any
- // children)
- // the return value of Update() should actually be interpreted as
- // "ValueObjectSyntheticFilter cache is good/bad"
- // if =true, ValueObjectSyntheticFilter is allowed to use the children it
- // fetched previously and cached
- // if =false, ValueObjectSyntheticFilter must throw away its cache, and query
- // again for children
+ // should know to deal with it in the correct way (most probably, by refusing
+ // to return any children) the return value of Update() should actually be
+ // interpreted as "ValueObjectSyntheticFilter cache is good/bad" if =true,
+ // ValueObjectSyntheticFilter is allowed to use the children it fetched
+ // previously and cached if =false, ValueObjectSyntheticFilter must throw
+ // away its cache, and query again for children
virtual bool Update() = 0;
// if this function returns false, then CalculateNumChildren() MUST return 0
- // since UI frontends
- // might validly decide not to inquire for children given a false return value
- // from this call
- // if it returns true, then CalculateNumChildren() can return any number >= 0
- // (0 being valid)
- // it should if at all possible be more efficient than CalculateNumChildren()
+ // since UI frontends might validly decide not to inquire for children given
+ // a false return value from this call if it returns true, then
+ // CalculateNumChildren() can return any number >= 0 (0 being valid) it
+ // should if at all possible be more efficient than CalculateNumChildren()
virtual bool MightHaveChildren() = 0;
// if this function returns a non-null ValueObject, then the returned
- // ValueObject will stand
- // for this ValueObject whenever a "value" request is made to this ValueObject
+ // ValueObject will stand for this ValueObject whenever a "value" request is
+ // made to this ValueObject
virtual lldb::ValueObjectSP GetSyntheticValue() { return nullptr; }
- // if this function returns a non-empty ConstString, then clients are expected
- // to use the return
- // as the name of the type of this ValueObject for display purposes
+ // if this function returns a non-empty ConstString, then clients are
+ // expected to use the return as the name of the type of this ValueObject for
+ // display purposes
virtual ConstString GetSyntheticTypeName() { return ConstString(); }
typedef std::shared_ptr<SyntheticChildrenFrontEnd> SharedPointer;
Modified: lldb/trunk/include/lldb/DataFormatters/TypeValidator.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/DataFormatters/TypeValidator.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/DataFormatters/TypeValidator.h (original)
+++ lldb/trunk/include/lldb/DataFormatters/TypeValidator.h Mon Apr 30 09:49:04 2018
@@ -147,10 +147,9 @@ public:
virtual Type GetType() { return Type::eTypeUnknown; }
// we are using a ValueObject* instead of a ValueObjectSP because we do not
- // need to hold on to this for
- // extended periods of time and we trust the ValueObject to stay around for as
- // long as it is required
- // for us to generate its value
+ // need to hold on to this for extended periods of time and we trust the
+ // ValueObject to stay around for as long as it is required for us to
+ // generate its value
virtual ValidationResult FormatObject(ValueObject *valobj) const = 0;
virtual std::string GetDescription() = 0;
Modified: lldb/trunk/include/lldb/DataFormatters/ValueObjectPrinter.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/DataFormatters/ValueObjectPrinter.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/DataFormatters/ValueObjectPrinter.h (original)
+++ lldb/trunk/include/lldb/DataFormatters/ValueObjectPrinter.h Mon Apr 30 09:49:04 2018
@@ -47,16 +47,16 @@ protected:
InstancePointersSetSP m_printed_instance_pointers;
- // only this class (and subclasses, if any) should ever be concerned with
- // the depth mechanism
+ // only this class (and subclasses, if any) should ever be concerned with the
+ // depth mechanism
ValueObjectPrinter(ValueObject *valobj, Stream *s,
const DumpValueObjectOptions &options,
const DumpValueObjectOptions::PointerDepth &ptr_depth,
uint32_t curr_depth,
InstancePointersSetSP printed_instance_pointers);
- // we should actually be using delegating constructors here
- // but some versions of GCC still have trouble with those
+ // we should actually be using delegating constructors here but some versions
+ // of GCC still have trouble with those
void Init(ValueObject *valobj, Stream *s,
const DumpValueObjectOptions &options,
const DumpValueObjectOptions::PointerDepth &ptr_depth,
Modified: lldb/trunk/include/lldb/Expression/ExpressionSourceCode.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Expression/ExpressionSourceCode.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Expression/ExpressionSourceCode.h (original)
+++ lldb/trunk/include/lldb/Expression/ExpressionSourceCode.h Mon Apr 30 09:49:04 2018
@@ -40,9 +40,8 @@ public:
bool static_method, ExecutionContext &exe_ctx) const;
// Given a string returned by GetText, find the beginning and end of the body
- // passed to CreateWrapped.
- // Return true if the bounds could be found. This will also work on text with
- // FixItHints applied.
+ // passed to CreateWrapped. Return true if the bounds could be found. This
+ // will also work on text with FixItHints applied.
static bool GetOriginalBodyBounds(std::string transformed_text,
lldb::LanguageType wrapping_language,
size_t &start_loc, size_t &end_loc);
Modified: lldb/trunk/include/lldb/Expression/ExpressionVariable.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Expression/ExpressionVariable.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Expression/ExpressionVariable.h (original)
+++ lldb/trunk/include/lldb/Expression/ExpressionVariable.h Mon Apr 30 09:49:04 2018
@@ -69,15 +69,12 @@ public:
void SetName(const ConstString &name) { m_frozen_sp->SetName(name); }
// this function is used to copy the address-of m_live_sp into m_frozen_sp
- // this is necessary because the results of certain cast and
- // pointer-arithmetic
- // operations (such as those described in bugzilla issues 11588 and 11618)
- // generate
- // frozen objects that do not have a valid address-of, which can be
- // troublesome when
- // using synthetic children providers. Transferring the address-of the live
- // object
- // solves these issues and provides the expected user-level behavior
+ // this is necessary because the results of certain cast and pointer-
+ // arithmetic operations (such as those described in bugzilla issues 11588
+ // and 11618) generate frozen objects that do not have a valid address-of,
+ // which can be troublesome when using synthetic children providers.
+ // Transferring the address-of the live object solves these issues and
+ // provides the expected user-level behavior
void TransferAddress(bool force = false) {
if (m_live_sp.get() == nullptr)
return;
Modified: lldb/trunk/include/lldb/Expression/IRMemoryMap.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Expression/IRMemoryMap.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Expression/IRMemoryMap.h (original)
+++ lldb/trunk/include/lldb/Expression/IRMemoryMap.h Mon Apr 30 09:49:04 2018
@@ -83,8 +83,8 @@ public:
lldb::TargetSP GetTarget() { return m_target_wp.lock(); }
protected:
- // This function should only be used if you know you are using the JIT.
- // Any other cases should use GetBestExecutionContextScope().
+ // This function should only be used if you know you are using the JIT. Any
+ // other cases should use GetBestExecutionContextScope().
lldb::ProcessWP &GetProcessWP() { return m_process_wp; }
Modified: lldb/trunk/include/lldb/Expression/LLVMUserExpression.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Expression/LLVMUserExpression.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Expression/LLVMUserExpression.h (original)
+++ lldb/trunk/include/lldb/Expression/LLVMUserExpression.h Mon Apr 30 09:49:04 2018
@@ -39,12 +39,11 @@ namespace lldb_private {
class LLVMUserExpression : public UserExpression {
public:
// The IRPasses struct is filled in by a runtime after an expression is
- // compiled and can be used to to run
- // fixups/analysis passes as required. EarlyPasses are run on the generated
- // module before lldb runs its own IR
+ // compiled and can be used to to run fixups/analysis passes as required.
+ // EarlyPasses are run on the generated module before lldb runs its own IR
// fixups and inserts instrumentation code/pointer checks. LatePasses are run
- // after the module has been processed by
- // llvm, before the module is assembled and run in the ThreadPlan.
+ // after the module has been processed by llvm, before the module is
+ // assembled and run in the ThreadPlan.
struct IRPasses {
IRPasses() : EarlyPasses(nullptr), LatePasses(nullptr){};
std::shared_ptr<llvm::legacy::PassManager> EarlyPasses;
Modified: lldb/trunk/include/lldb/Expression/UtilityFunction.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Expression/UtilityFunction.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Expression/UtilityFunction.h (original)
+++ lldb/trunk/include/lldb/Expression/UtilityFunction.h Mon Apr 30 09:49:04 2018
@@ -80,8 +80,8 @@ public:
/// false if not (or the function is not JIT compiled)
//------------------------------------------------------------------
bool ContainsAddress(lldb::addr_t address) {
- // nothing is both >= LLDB_INVALID_ADDRESS and < LLDB_INVALID_ADDRESS,
- // so this always returns false if the function is not JIT compiled yet
+ // nothing is both >= LLDB_INVALID_ADDRESS and < LLDB_INVALID_ADDRESS, so
+ // this always returns false if the function is not JIT compiled yet
return (address >= m_jit_start_addr && address < m_jit_end_addr);
}
@@ -116,10 +116,9 @@ public:
//------------------------------------------------------------------
bool NeedsVariableResolution() override { return false; }
- // This makes the function caller function.
- // Pass in the ThreadSP if you have one available, compilation can end up
- // calling code (e.g. to look up indirect
- // functions) and we don't want this to wander onto another thread.
+ // This makes the function caller function. Pass in the ThreadSP if you have
+ // one available, compilation can end up calling code (e.g. to look up
+ // indirect functions) and we don't want this to wander onto another thread.
FunctionCaller *MakeFunctionCaller(const CompilerType &return_type,
const ValueList &arg_value_list,
lldb::ThreadSP compilation_thread,
Modified: lldb/trunk/include/lldb/Host/Debug.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Host/Debug.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Host/Debug.h (original)
+++ lldb/trunk/include/lldb/Host/Debug.h Mon Apr 30 09:49:04 2018
@@ -25,7 +25,8 @@ namespace lldb_private {
//------------------------------------------------------------------
struct ResumeAction {
lldb::tid_t tid; // The thread ID that this action applies to,
- // LLDB_INVALID_THREAD_ID for the default thread action
+ // LLDB_INVALID_THREAD_ID for the default thread
+ // action
lldb::StateType state; // Valid values are eStateStopped/eStateSuspended,
// eStateRunning, and eStateStepping.
int signal; // When resuming this thread, resume it with this signal if this
@@ -34,10 +35,9 @@ struct ResumeAction {
//------------------------------------------------------------------
// A class that contains instructions for all threads for
-// NativeProcessProtocol::Resume(). Each thread can either run, stay
-// suspended, or step when the process is resumed. We optionally
-// have the ability to also send a signal to the thread when the
-// action is run or step.
+// NativeProcessProtocol::Resume(). Each thread can either run, stay suspended,
+// or step when the process is resumed. We optionally have the ability to also
+// send a signal to the thread when the action is run or step.
//------------------------------------------------------------------
class ResumeActionList {
public:
Modified: lldb/trunk/include/lldb/Host/Editline.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Host/Editline.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Host/Editline.h (original)
+++ lldb/trunk/include/lldb/Host/Editline.h Mon Apr 30 09:49:04 2018
@@ -23,8 +23,8 @@
// broken, which is why we're
// working around it here.
// c) When resizing the terminal window, if the cursor moves between rows
-// libedit will get confused.
-// d) The incremental search uses escape to cancel input, so it's confused by
+// libedit will get confused. d) The incremental search uses escape to cancel
+// input, so it's confused by
// ANSI sequences starting with escape.
// e) Emoji support is fairly terrible, presumably it doesn't understand
// composed characters?
@@ -38,11 +38,10 @@
#include <vector>
// components needed to handle wide characters ( <codecvt>, codecvt_utf8,
-// libedit built with '--enable-widec' )
-// are available on some platforms. The wchar_t versions of libedit functions
-// will only be
-// used in cases where this is true. This is a compile time dependecy, for now
-// selected per target Platform
+// libedit built with '--enable-widec' ) are available on some platforms. The
+// wchar_t versions of libedit functions will only be used in cases where this
+// is true. This is a compile time dependecy, for now selected per target
+// Platform
#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__NetBSD__) || \
defined(__OpenBSD__)
#define LLDB_EDITLINE_USE_WCHAR 1
Modified: lldb/trunk/include/lldb/Host/MainLoop.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Host/MainLoop.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Host/MainLoop.h (original)
+++ lldb/trunk/include/lldb/Host/MainLoop.h Mon Apr 30 09:49:04 2018
@@ -21,12 +21,12 @@
namespace lldb_private {
-// Implementation of the MainLoopBase class. It can monitor file descriptors for
-// readability using ppoll, kqueue, poll or WSAPoll. On Windows it only supports
-// polling sockets, and will not work on generic file handles or pipes. On
-// systems without kqueue or ppoll handling singnals is not supported. In
-// addition to the common base, this class provides the ability to invoke a
-// given handler when a signal is received.
+// Implementation of the MainLoopBase class. It can monitor file descriptors
+// for readability using ppoll, kqueue, poll or WSAPoll. On Windows it only
+// supports polling sockets, and will not work on generic file handles or
+// pipes. On systems without kqueue or ppoll handling singnals is not
+// supported. In addition to the common base, this class provides the ability
+// to invoke a given handler when a signal is received.
//
// Since this class is primarily intended to be used for single-threaded
// processing, it does not attempt to perform any internal synchronisation and
@@ -49,13 +49,13 @@ public:
const Callback &callback,
Status &error) override;
- // Listening for signals from multiple MainLoop instances is perfectly safe as
- // long as they don't try to listen for the same signal. The callback function
- // is invoked when the control returns to the Run() function, not when the
- // hander is executed. This mean that you can treat the callback as a normal
- // function and perform things which would not be safe in a signal handler.
- // However, since the callback is not invoked synchronously, you cannot use
- // this mechanism to handle SIGSEGV and the like.
+ // Listening for signals from multiple MainLoop instances is perfectly safe
+ // as long as they don't try to listen for the same signal. The callback
+ // function is invoked when the control returns to the Run() function, not
+ // when the hander is executed. This mean that you can treat the callback as
+ // a normal function and perform things which would not be safe in a signal
+ // handler. However, since the callback is not invoked synchronously, you
+ // cannot use this mechanism to handle SIGSEGV and the like.
SignalHandleUP RegisterSignal(int signo, const Callback &callback,
Status &error);
Modified: lldb/trunk/include/lldb/Host/MainLoopBase.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Host/MainLoopBase.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Host/MainLoopBase.h (original)
+++ lldb/trunk/include/lldb/Host/MainLoopBase.h Mon Apr 30 09:49:04 2018
@@ -18,21 +18,17 @@
namespace lldb_private {
// The purpose of this class is to enable multiplexed processing of data from
-// different sources
-// without resorting to multi-threading. Clients can register IOObjects, which
-// will be monitored
-// for readability, and when they become ready, the specified callback will be
-// invoked.
-// Monitoring for writability is not supported, but can be easily added if
-// needed.
+// different sources without resorting to multi-threading. Clients can register
+// IOObjects, which will be monitored for readability, and when they become
+// ready, the specified callback will be invoked. Monitoring for writability is
+// not supported, but can be easily added if needed.
//
// The RegisterReadObject function return a handle, which controls the duration
-// of the monitoring. When
-// this handle is destroyed, the callback is deregistered.
+// of the monitoring. When this handle is destroyed, the callback is
+// deregistered.
//
// This class simply defines the interface common for all platforms, actual
-// implementations are
-// platform-specific.
+// implementations are platform-specific.
class MainLoopBase {
private:
class ReadHandle;
@@ -52,8 +48,7 @@ public:
}
// Waits for registered events and invoke the proper callbacks. Returns when
- // all callbacks
- // deregister themselves or when someone requests termination.
+ // all callbacks deregister themselves or when someone requests termination.
virtual Status Run() { llvm_unreachable("Not implemented"); }
// Requests the exit of the Run() function.
Modified: lldb/trunk/include/lldb/Host/PosixApi.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Host/PosixApi.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Host/PosixApi.h (original)
+++ lldb/trunk/include/lldb/Host/PosixApi.h Mon Apr 30 09:49:04 2018
@@ -11,8 +11,8 @@
#define liblldb_Host_PosixApi_h
// This file defines platform specific functions, macros, and types necessary
-// to provide a minimum level of compatibility across all platforms to rely
-// on various posix api functionality.
+// to provide a minimum level of compatibility across all platforms to rely on
+// various posix api functionality.
#if defined(_WIN32)
#include "lldb/Host/windows/PosixApi.h"
Modified: lldb/trunk/include/lldb/Host/Predicate.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Host/Predicate.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Host/Predicate.h (original)
+++ lldb/trunk/include/lldb/Host/Predicate.h Mon Apr 30 09:49:04 2018
@@ -199,11 +199,11 @@ public:
//------------------------------------------------------------------
T WaitForSetValueBits(T bits, const std::chrono::microseconds &timeout =
std::chrono::microseconds(0)) {
- // pthread_cond_timedwait() or pthread_cond_wait() will atomically
- // unlock the mutex and wait for the condition to be set. When either
- // function returns, they will re-lock the mutex. We use an auto lock/unlock
- // class (std::lock_guard) to allow us to return at any point in this
- // function and not have to worry about unlocking the mutex.
+ // pthread_cond_timedwait() or pthread_cond_wait() will atomically unlock
+ // the mutex and wait for the condition to be set. When either function
+ // returns, they will re-lock the mutex. We use an auto lock/unlock class
+ // (std::lock_guard) to allow us to return at any point in this function
+ // and not have to worry about unlocking the mutex.
std::unique_lock<std::mutex> lock(m_mutex);
#ifdef DB_PTHREAD_LOG_EVENTS
printf("%s (bits = 0x%8.8x, timeout = %llu), m_value = 0x%8.8x\n",
@@ -253,11 +253,11 @@ public:
//------------------------------------------------------------------
T WaitForResetValueBits(T bits, const std::chrono::microseconds &timeout =
std::chrono::microseconds(0)) {
- // pthread_cond_timedwait() or pthread_cond_wait() will atomically
- // unlock the mutex and wait for the condition to be set. When either
- // function returns, they will re-lock the mutex. We use an auto lock/unlock
- // class (std::lock_guard) to allow us to return at any point in this
- // function and not have to worry about unlocking the mutex.
+ // pthread_cond_timedwait() or pthread_cond_wait() will atomically unlock
+ // the mutex and wait for the condition to be set. When either function
+ // returns, they will re-lock the mutex. We use an auto lock/unlock class
+ // (std::lock_guard) to allow us to return at any point in this function
+ // and not have to worry about unlocking the mutex.
std::unique_lock<std::mutex> lock(m_mutex);
#ifdef DB_PTHREAD_LOG_EVENTS
@@ -313,11 +313,11 @@ public:
bool WaitForValueEqualTo(T value, const std::chrono::microseconds &timeout =
std::chrono::microseconds(0),
bool *timed_out = nullptr) {
- // pthread_cond_timedwait() or pthread_cond_wait() will atomically
- // unlock the mutex and wait for the condition to be set. When either
- // function returns, they will re-lock the mutex. We use an auto lock/unlock
- // class (std::lock_guard) to allow us to return at any point in this
- // function and not have to worry about unlocking the mutex.
+ // pthread_cond_timedwait() or pthread_cond_wait() will atomically unlock
+ // the mutex and wait for the condition to be set. When either function
+ // returns, they will re-lock the mutex. We use an auto lock/unlock class
+ // (std::lock_guard) to allow us to return at any point in this function
+ // and not have to worry about unlocking the mutex.
std::unique_lock<std::mutex> lock(m_mutex);
#ifdef DB_PTHREAD_LOG_EVENTS
@@ -382,11 +382,11 @@ public:
T wait_value, T new_value,
const std::chrono::microseconds &timeout = std::chrono::microseconds(0),
bool *timed_out = nullptr) {
- // pthread_cond_timedwait() or pthread_cond_wait() will atomically
- // unlock the mutex and wait for the condition to be set. When either
- // function returns, they will re-lock the mutex. We use an auto lock/unlock
- // class (std::lock_guard) to allow us to return at any point in this
- // function and not have to worry about unlocking the mutex.
+ // pthread_cond_timedwait() or pthread_cond_wait() will atomically unlock
+ // the mutex and wait for the condition to be set. When either function
+ // returns, they will re-lock the mutex. We use an auto lock/unlock class
+ // (std::lock_guard) to allow us to return at any point in this function
+ // and not have to worry about unlocking the mutex.
std::unique_lock<std::mutex> lock(m_mutex);
#ifdef DB_PTHREAD_LOG_EVENTS
@@ -449,11 +449,11 @@ public:
bool WaitForValueNotEqualTo(
T value, T &new_value,
const std::chrono::microseconds &timeout = std::chrono::microseconds(0)) {
- // pthread_cond_timedwait() or pthread_cond_wait() will atomically
- // unlock the mutex and wait for the condition to be set. When either
- // function returns, they will re-lock the mutex. We use an auto lock/unlock
- // class (std::lock_guard) to allow us to return at any point in this
- // function and not have to worry about unlocking the mutex.
+ // pthread_cond_timedwait() or pthread_cond_wait() will atomically unlock
+ // the mutex and wait for the condition to be set. When either function
+ // returns, they will re-lock the mutex. We use an auto lock/unlock class
+ // (std::lock_guard) to allow us to return at any point in this function
+ // and not have to worry about unlocking the mutex.
std::unique_lock<std::mutex> lock(m_mutex);
#ifdef DB_PTHREAD_LOG_EVENTS
printf("%s (value = 0x%8.8x, timeout = %llu), m_value = 0x%8.8x\n",
@@ -478,8 +478,8 @@ public:
protected:
//----------------------------------------------------------------------
- // pthread condition and mutex variable to control access and allow
- // blocking between the main thread and the spotlight index thread.
+ // pthread condition and mutex variable to control access and allow blocking
+ // between the main thread and the spotlight index thread.
//----------------------------------------------------------------------
T m_value; ///< The templatized value T that we are protecting access to
mutable std::mutex m_mutex; ///< The mutex to use when accessing the data
Modified: lldb/trunk/include/lldb/Host/Socket.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Host/Socket.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Host/Socket.h (original)
+++ lldb/trunk/include/lldb/Host/Socket.h Mon Apr 30 09:49:04 2018
@@ -60,10 +60,8 @@ public:
virtual Status Accept(Socket *&socket) = 0;
// Initialize a Tcp Socket object in listening mode. listen and accept are
- // implemented
- // separately because the caller may wish to manipulate or query the socket
- // after it is
- // initialized, but before entering a blocking accept.
+ // implemented separately because the caller may wish to manipulate or query
+ // the socket after it is initialized, but before entering a blocking accept.
static Status TcpListen(llvm::StringRef host_and_port,
bool child_processes_inherit, Socket *&socket,
Predicate<uint16_t> *predicate, int backlog = 5);
Modified: lldb/trunk/include/lldb/Host/SocketAddress.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Host/SocketAddress.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Host/SocketAddress.h (original)
+++ lldb/trunk/include/lldb/Host/SocketAddress.h Mon Apr 30 09:49:04 2018
@@ -111,17 +111,16 @@ public:
uint16_t GetPort() const;
//------------------------------------------------------------------
- // Set the port if the socket address for the family has a port.
- // The family must be set correctly prior to calling this function.
+ // Set the port if the socket address for the family has a port. The family
+ // must be set correctly prior to calling this function.
//------------------------------------------------------------------
bool SetPort(uint16_t port);
//------------------------------------------------------------------
- // Set the socket address according to the first match from a call
- // to getaddrinfo() (or equivalent functions for systems that don't
- // have getaddrinfo(). If "addr_info_ptr" is not NULL, it will get
- // filled in with the match that was used to populate this socket
- // address.
+ // Set the socket address according to the first match from a call to
+ // getaddrinfo() (or equivalent functions for systems that don't have
+ // getaddrinfo(). If "addr_info_ptr" is not NULL, it will get filled in with
+ // the match that was used to populate this socket address.
//------------------------------------------------------------------
bool
getaddrinfo(const char *host, // Hostname ("foo.bar.com" or "foo" or IP
@@ -133,9 +132,9 @@ public:
int ai_protocol = 0, int ai_flags = 0);
//------------------------------------------------------------------
- // Quick way to set the SocketAddress to localhost given the family.
- // Returns true if successful, false if "family" doesn't support
- // localhost or if "family" is not supported by this class.
+ // Quick way to set the SocketAddress to localhost given the family. Returns
+ // true if successful, false if "family" doesn't support localhost or if
+ // "family" is not supported by this class.
//------------------------------------------------------------------
bool SetToLocalhost(sa_family_t family, uint16_t port);
@@ -190,11 +189,10 @@ public:
}
//------------------------------------------------------------------
- // Conversion operators to allow getting the contents of this class
- // as a pointer to the appropriate structure. This allows an instance
- // of this class to be used in calls that take one of the sockaddr
- // structure variants without having to manually use the correct
- // accessor function.
+ // Conversion operators to allow getting the contents of this class as a
+ // pointer to the appropriate structure. This allows an instance of this
+ // class to be used in calls that take one of the sockaddr structure variants
+ // without having to manually use the correct accessor function.
//------------------------------------------------------------------
operator struct sockaddr *() { return &m_socket_addr.sa; }
Modified: lldb/trunk/include/lldb/Host/Symbols.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Host/Symbols.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Host/Symbols.h (original)
+++ lldb/trunk/include/lldb/Host/Symbols.h Mon Apr 30 09:49:04 2018
@@ -29,16 +29,16 @@ public:
//----------------------------------------------------------------------
// Locate the executable file given a module specification.
//
- // Locating the file should happen only on the local computer or using
- // the current computers global settings.
+ // Locating the file should happen only on the local computer or using the
+ // current computers global settings.
//----------------------------------------------------------------------
static ModuleSpec LocateExecutableObjectFile(const ModuleSpec &module_spec);
//----------------------------------------------------------------------
// Locate the symbol file given a module specification.
//
- // Locating the file should happen only on the local computer or using
- // the current computers global settings.
+ // Locating the file should happen only on the local computer or using the
+ // current computers global settings.
//----------------------------------------------------------------------
static FileSpec LocateExecutableSymbolFile(const ModuleSpec &module_spec);
@@ -51,10 +51,10 @@ public:
//
// Locating the file can try to download the file from a corporate build
// repository, or using any other means necessary to locate both the
- // unstripped object file and the debug symbols.
- // The force_lookup argument controls whether the external program is called
- // unconditionally to find the symbol file, or if the user's settings are
- // checked to see if they've enabled the external program before calling.
+ // unstripped object file and the debug symbols. The force_lookup argument
+ // controls whether the external program is called unconditionally to find
+ // the symbol file, or if the user's settings are checked to see if they've
+ // enabled the external program before calling.
//
//----------------------------------------------------------------------
static bool DownloadObjectAndSymbolFile(ModuleSpec &module_spec,
Modified: lldb/trunk/include/lldb/Host/TaskPool.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Host/TaskPool.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Host/TaskPool.h (original)
+++ lldb/trunk/include/lldb/Host/TaskPool.h Mon Apr 30 09:49:04 2018
@@ -20,32 +20,27 @@
namespace lldb_private {
-// Global TaskPool class for running tasks in parallel on a set of worker thread
-// created the first
-// time the task pool is used. The TaskPool provide no guarantee about the order
-// the task will be run
-// and about what tasks will run in parallel. None of the task added to the task
-// pool should block
-// on something (mutex, future, condition variable) what will be set only by the
-// completion of an
-// other task on the task pool as they may run on the same thread sequentally.
+// Global TaskPool class for running tasks in parallel on a set of worker
+// thread created the first time the task pool is used. The TaskPool provide no
+// guarantee about the order the task will be run and about what tasks will run
+// in parallel. None of the task added to the task pool should block on
+// something (mutex, future, condition variable) what will be set only by the
+// completion of an other task on the task pool as they may run on the same
+// thread sequentally.
class TaskPool {
public:
// Add a new task to the task pool and return a std::future belonging to the
- // newly created task.
- // The caller of this function has to wait on the future for this task to
- // complete.
+ // newly created task. The caller of this function has to wait on the future
+ // for this task to complete.
template <typename F, typename... Args>
static std::future<typename std::result_of<F(Args...)>::type>
AddTask(F &&f, Args &&... args);
// Run all of the specified tasks on the task pool and wait until all of them
- // are finished
- // before returning. This method is intended to be used for small number tasks
- // where listing
- // them as function arguments is acceptable. For running large number of tasks
- // you should use
- // AddTask for each task and then call wait() on each returned future.
+ // are finished before returning. This method is intended to be used for
+ // small number tasks where listing them as function arguments is acceptable.
+ // For running large number of tasks you should use AddTask for each task and
+ // then call wait() on each returned future.
template <typename... T> static void RunTasks(T &&... tasks);
private:
Modified: lldb/trunk/include/lldb/Host/XML.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Host/XML.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Host/XML.h (original)
+++ lldb/trunk/include/lldb/Host/XML.h Mon Apr 30 09:49:04 2018
@@ -100,8 +100,8 @@ public:
void ForEachSiblingElement(NodeCallback const &callback) const;
//----------------------------------------------------------------------
- // Iterate through only the sibling nodes that are elements and whose
- // name matches \a name.
+ // Iterate through only the sibling nodes that are elements and whose name
+ // matches \a name.
//----------------------------------------------------------------------
void ForEachSiblingElementWithName(const char *name,
NodeCallback const &callback) const;
@@ -137,8 +137,8 @@ public:
const char *url = "untitled.xml");
//----------------------------------------------------------------------
- // If \a name is nullptr, just get the root element node, else only return
- // a value XMLNode if the name of the root element matches \a name.
+ // If \a name is nullptr, just get the root element node, else only return a
+ // value XMLNode if the name of the root element matches \a name.
//----------------------------------------------------------------------
XMLNode GetRootElement(const char *required_name = nullptr);
@@ -176,12 +176,11 @@ public:
StructuredData::ObjectSP GetStructuredData();
protected:
- // Using a node returned from GetValueNode() extract its value as a
- // string (if possible). Array and dictionary nodes will return false
- // as they have no string value. Boolean nodes will return true and
- // \a value will be "true" or "false" as the string value comes from
- // the element name itself. All other nodes will return the text
- // content of the XMLNode.
+ // Using a node returned from GetValueNode() extract its value as a string
+ // (if possible). Array and dictionary nodes will return false as they have
+ // no string value. Boolean nodes will return true and \a value will be
+ // "true" or "false" as the string value comes from the element name itself.
+ // All other nodes will return the text content of the XMLNode.
static bool ExtractStringFromValueNode(const XMLNode &node,
std::string &value);
Modified: lldb/trunk/include/lldb/Host/common/GetOptInc.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Host/common/GetOptInc.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Host/common/GetOptInc.h (original)
+++ lldb/trunk/include/lldb/Host/common/GetOptInc.h Mon Apr 30 09:49:04 2018
@@ -19,8 +19,8 @@
// option structure
struct option {
const char *name;
- // has_arg can't be an enum because some compilers complain about
- // type mismatches in all the code that assumes it is an int.
+ // has_arg can't be an enum because some compilers complain about type
+ // mismatches in all the code that assumes it is an int.
int has_arg;
int *flag;
int val;
Modified: lldb/trunk/include/lldb/Host/common/NativeBreakpoint.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Host/common/NativeBreakpoint.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Host/common/NativeBreakpoint.h (original)
+++ lldb/trunk/include/lldb/Host/common/NativeBreakpoint.h Mon Apr 30 09:49:04 2018
@@ -45,8 +45,8 @@ protected:
private:
bool m_enabled;
- // -----------------------------------------------------------
- // interface for NativeBreakpointList
+ // ----------------------------------------------------------- interface for
+ // NativeBreakpointList
// -----------------------------------------------------------
void AddRef();
int32_t DecRef();
Modified: lldb/trunk/include/lldb/Host/common/NativeProcessProtocol.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Host/common/NativeProcessProtocol.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Host/common/NativeProcessProtocol.h (original)
+++ lldb/trunk/include/lldb/Host/common/NativeProcessProtocol.h Mon Apr 30 09:49:04 2018
@@ -69,8 +69,8 @@ public:
virtual Status Kill() = 0;
//------------------------------------------------------------------
- // Tells a process not to stop the inferior on given signals
- // and just reinject them back.
+ // Tells a process not to stop the inferior on given signals and just
+ // reinject them back.
//------------------------------------------------------------------
virtual Status IgnoreSignals(llvm::ArrayRef<int> signals);
@@ -421,33 +421,30 @@ protected:
int m_terminal_fd;
uint32_t m_stop_id = 0;
- // Set of signal numbers that LLDB directly injects back to inferior
- // without stopping it.
+ // Set of signal numbers that LLDB directly injects back to inferior without
+ // stopping it.
llvm::DenseSet<int> m_signals_to_ignore;
// lldb_private::Host calls should be used to launch a process for debugging,
- // and
- // then the process should be attached to. When attaching to a process
- // lldb_private::Host calls should be used to locate the process to attach to,
- // and then this function should be called.
+ // and then the process should be attached to. When attaching to a process
+ // lldb_private::Host calls should be used to locate the process to attach
+ // to, and then this function should be called.
NativeProcessProtocol(lldb::pid_t pid, int terminal_fd,
NativeDelegate &delegate);
- // -----------------------------------------------------------
- // Internal interface for state handling
+ // ----------------------------------------------------------- Internal
+ // interface for state handling
// -----------------------------------------------------------
void SetState(lldb::StateType state, bool notify_delegates = true);
- // Derived classes need not implement this. It can be used as a
- // hook to clear internal caches that should be invalidated when
- // stop ids change.
+ // Derived classes need not implement this. It can be used as a hook to
+ // clear internal caches that should be invalidated when stop ids change.
//
- // Note this function is called with the state mutex obtained
- // by the caller.
+ // Note this function is called with the state mutex obtained by the caller.
virtual void DoStopIDBumped(uint32_t newBumpId);
- // -----------------------------------------------------------
- // Internal interface for software breakpoints
+ // ----------------------------------------------------------- Internal
+ // interface for software breakpoints
// -----------------------------------------------------------
Status SetSoftwareBreakpoint(lldb::addr_t addr, uint32_t size_hint);
Modified: lldb/trunk/include/lldb/Host/common/NativeRegisterContext.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Host/common/NativeRegisterContext.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Host/common/NativeRegisterContext.h (original)
+++ lldb/trunk/include/lldb/Host/common/NativeRegisterContext.h Mon Apr 30 09:49:04 2018
@@ -98,17 +98,14 @@ public:
virtual lldb::addr_t GetWatchpointAddress(uint32_t wp_index);
// MIPS Linux kernel returns a masked address (last 3bits are masked)
- // when a HW watchpoint is hit. However user may not have set a watchpoint
- // on this address. This function emulates the instruction at PC and
- // finds the base address used in the load/store instruction. This gives the
- // exact address used to read/write the variable being watched.
- // For example:
- // 'n' is at 0x120010d00 and 'm' is 0x120010d04. When a watchpoint is set at
- // 'm',
+ // when a HW watchpoint is hit. However user may not have set a watchpoint on
+ // this address. This function emulates the instruction at PC and finds the
+ // base address used in the load/store instruction. This gives the exact
+ // address used to read/write the variable being watched. For example: 'n' is
+ // at 0x120010d00 and 'm' is 0x120010d04. When a watchpoint is set at 'm',
// then watch exception is generated even when 'n' is read/written. This
- // function
- // returns address of 'n' so that client can check whether a watchpoint is set
- // on this address or not.
+ // function returns address of 'n' so that client can check whether a
+ // watchpoint is set on this address or not.
virtual lldb::addr_t GetWatchpointHitAddress(uint32_t wp_index);
virtual bool HardwareSingleStep(bool enable);
Modified: lldb/trunk/include/lldb/Host/posix/ConnectionFileDescriptorPosix.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Host/posix/ConnectionFileDescriptorPosix.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Host/posix/ConnectionFileDescriptorPosix.h (original)
+++ lldb/trunk/include/lldb/Host/posix/ConnectionFileDescriptorPosix.h Mon Apr 30 09:49:04 2018
@@ -104,8 +104,8 @@ protected:
Predicate<uint16_t>
m_port_predicate; // Used when binding to port zero to wait for the thread
- // that creates the socket, binds and listens to resolve
- // the port number.
+ // that creates the socket, binds and listens to
+ // resolve the port number.
Pipe m_pipe;
std::recursive_mutex m_mutex;
Modified: lldb/trunk/include/lldb/Interpreter/CommandAlias.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/CommandAlias.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Interpreter/CommandAlias.h (original)
+++ lldb/trunk/include/lldb/Interpreter/CommandAlias.h Mon Apr 30 09:49:04 2018
@@ -74,8 +74,8 @@ public:
OptionArgVectorSP GetOptionArguments() const { return m_option_args_sp; }
const char *GetOptionString() { return m_option_string.c_str(); }
- // this takes an alias - potentially nested (i.e. an alias to an alias)
- // and expands it all the way to a non-alias command
+ // this takes an alias - potentially nested (i.e. an alias to an alias) and
+ // expands it all the way to a non-alias command
std::pair<lldb::CommandObjectSP, OptionArgVectorSP> Desugar();
protected:
Modified: lldb/trunk/include/lldb/Interpreter/CommandCompletions.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/CommandCompletions.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Interpreter/CommandCompletions.h (original)
+++ lldb/trunk/include/lldb/Interpreter/CommandCompletions.h Mon Apr 30 09:49:04 2018
@@ -29,9 +29,8 @@ class CommandCompletions {
public:
//----------------------------------------------------------------------
// This is the command completion callback that is used to complete the
- // argument of the option
- // it is bound to (in the OptionDefinition table below). Return the total
- // number of matches.
+ // argument of the option it is bound to (in the OptionDefinition table
+ // below). Return the total number of matches.
//----------------------------------------------------------------------
typedef int (*CompletionCallback)(
CommandInterpreter &interpreter,
@@ -54,9 +53,9 @@ public:
ePlatformPluginCompletion = (1u << 6),
eArchitectureCompletion = (1u << 7),
eVariablePathCompletion = (1u << 8),
- // This item serves two purposes. It is the last element in the enum,
- // so you can add custom enums starting from here in your Option class.
- // Also if you & in this bit the base code will not process the option.
+ // This item serves two purposes. It is the last element in the enum, so
+ // you can add custom enums starting from here in your Option class. Also
+ // if you & in this bit the base code will not process the option.
eCustomCompletion = (1u << 9)
} CommonCompletionTypes;
@@ -133,9 +132,8 @@ public:
lldb_private::StringList &matches);
//----------------------------------------------------------------------
- // The Completer class is a convenient base class for building searchers
- // that go along with the SearchFilter passed to the standard Completer
- // functions.
+ // The Completer class is a convenient base class for building searchers that
+ // go along with the SearchFilter passed to the standard Completer functions.
//----------------------------------------------------------------------
class Completer : public Searcher {
public:
Modified: lldb/trunk/include/lldb/Interpreter/CommandInterpreter.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/CommandInterpreter.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Interpreter/CommandInterpreter.h (original)
+++ lldb/trunk/include/lldb/Interpreter/CommandInterpreter.h Mon Apr 30 09:49:04 2018
@@ -86,11 +86,10 @@ public:
m_add_to_history = value;
}
// These return the default behaviors if the behavior is not
- // eLazyBoolCalculate.
- // But I've also left the ivars public since for different ways of running the
- // interpreter you might want to force different defaults... In that case,
- // just grab
- // the LazyBool ivars directly and do what you want with eLazyBoolCalculate.
+ // eLazyBoolCalculate. But I've also left the ivars public since for
+ // different ways of running the interpreter you might want to force
+ // different defaults... In that case, just grab the LazyBool ivars directly
+ // and do what you want with eLazyBoolCalculate.
bool GetStopOnContinue() const { return DefaultToNo(m_stop_on_continue); }
void SetStopOnContinue(bool stop_on_continue) {
@@ -293,26 +292,19 @@ public:
CommandObject *GetCommandObjectForCommand(llvm::StringRef &command_line);
// This handles command line completion. You are given a pointer to the
- // command string buffer, to the current cursor,
- // and to the end of the string (in case it is not NULL terminated).
- // You also passed in an StringList object to fill with the returns.
- // The first element of the array will be filled with the string that you
- // would need to insert at
- // the cursor point to complete the cursor point to the longest common
- // matching prefix.
- // If you want to limit the number of elements returned, set
- // max_return_elements to the number of elements
- // you want returned. Otherwise set max_return_elements to -1.
- // If you want to start some way into the match list, then set
- // match_start_point to the desired start
- // point.
- // Returns:
- // -1 if the completion character should be inserted
- // -2 if the entire command line should be deleted and replaced with
- // matches.GetStringAtIndex(0)
+ // command string buffer, to the current cursor, and to the end of the string
+ // (in case it is not NULL terminated). You also passed in an StringList
+ // object to fill with the returns. The first element of the array will be
+ // filled with the string that you would need to insert at the cursor point
+ // to complete the cursor point to the longest common matching prefix. If you
+ // want to limit the number of elements returned, set max_return_elements to
+ // the number of elements you want returned. Otherwise set
+ // max_return_elements to -1. If you want to start some way into the match
+ // list, then set match_start_point to the desired start point. Returns: -1
+ // if the completion character should be inserted -2 if the entire command
+ // line should be deleted and replaced with matches.GetStringAtIndex(0)
// INT_MAX if the number of matches is > max_return_elements, but it is
- // expensive to compute.
- // Otherwise, returns the number of matches.
+ // expensive to compute. Otherwise, returns the number of matches.
//
// FIXME: Only max_return_elements == -1 is supported at present.
int HandleCompletion(const char *current_line, const char *cursor,
@@ -320,11 +312,10 @@ public:
int max_return_elements, StringList &matches);
// This version just returns matches, and doesn't compute the substring. It
- // is here so the
- // Help command can call it for the first argument.
+ // is here so the Help command can call it for the first argument.
// word_complete tells whether the completions are considered a "complete"
- // response (so the
- // completer should complete the quote & put a space after the word.
+ // response (so the completer should complete the quote & put a space after
+ // the word.
int HandleCompletionMatches(Args &input, int &cursor_index,
int &cursor_char_position, int match_start_point,
int max_return_elements, bool &word_complete,
Modified: lldb/trunk/include/lldb/Interpreter/CommandObject.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/CommandObject.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Interpreter/CommandObject.h (original)
+++ lldb/trunk/include/lldb/Interpreter/CommandObject.h Mon Apr 30 09:49:04 2018
@@ -32,9 +32,8 @@ namespace lldb_private {
// This function really deals with CommandObjectLists, but we didn't make a
// CommandObjectList class, so I'm sticking it here. But we really should have
// such a class. Anyway, it looks up the commands in the map that match the
-// partial
-// string cmd_str, inserts the matches into matches, and returns the number
-// added.
+// partial string cmd_str, inserts the matches into matches, and returns the
+// number added.
template <typename ValueType>
int AddNamesMatchingPartialString(const std::map<std::string, ValueType> &in_map,
@@ -138,8 +137,8 @@ public:
void SetSyntax(llvm::StringRef str);
- // override this to return true if you want to enable the user to delete
- // the Command object from the Command dictionary (aliases have their own
+ // override this to return true if you want to enable the user to delete the
+ // Command object from the Command dictionary (aliases have their own
// deletion scheme, so they do not need to care about this)
virtual bool IsRemovable() const { return false; }
@@ -149,9 +148,9 @@ public:
virtual bool IsAlias() { return false; }
- // override this to return true if your command is somehow a "dash-dash"
- // form of some other command (e.g. po is expr -O --); this is a powerful
- // hint to the help system that one cannot pass options to this command
+ // override this to return true if your command is somehow a "dash-dash" form
+ // of some other command (e.g. po is expr -O --); this is a powerful hint to
+ // the help system that one cannot pass options to this command
virtual bool IsDashDashCommand() { return false; }
virtual lldb::CommandObjectSP GetSubcommandSP(llvm::StringRef sub_cmd,
@@ -175,10 +174,9 @@ public:
virtual void GenerateHelpText(Stream &result);
- // this is needed in order to allow the SBCommand class to
- // transparently try and load subcommands - it will fail on
- // anything but a multiword command, but it avoids us doing
- // type checkings and casts
+ // this is needed in order to allow the SBCommand class to transparently try
+ // and load subcommands - it will fail on anything but a multiword command,
+ // but it avoids us doing type checkings and casts
virtual bool LoadSubCommand(llvm::StringRef cmd_name,
const lldb::CommandObjectSP &command_obj) {
return false;
@@ -186,9 +184,9 @@ public:
virtual bool WantsRawCommandString() = 0;
- // By default, WantsCompletion = !WantsRawCommandString.
- // Subclasses who want raw command string but desire, for example,
- // argument completion should override this method to return true.
+ // By default, WantsCompletion = !WantsRawCommandString. Subclasses who want
+ // raw command string but desire, for example, argument completion should
+ // override this method to return true.
virtual bool WantsCompletion() { return !WantsRawCommandString(); }
virtual Options *GetOptions();
@@ -210,10 +208,10 @@ public:
static const char *GetArgumentName(lldb::CommandArgumentType arg_type);
// Generates a nicely formatted command args string for help command output.
- // By default, all possible args are taken into account, for example,
- // '<expr | variable-name>'. This can be refined by passing a second arg
- // specifying which option set(s) we are interested, which could then, for
- // example, produce either '<expr>' or '<variable-name>'.
+ // By default, all possible args are taken into account, for example, '<expr
+ // | variable-name>'. This can be refined by passing a second arg specifying
+ // which option set(s) we are interested, which could then, for example,
+ // produce either '<expr>' or '<variable-name>'.
void GetFormattedCommandArguments(Stream &str,
uint32_t opt_set_mask = LLDB_OPT_SET_ALL);
@@ -415,18 +413,16 @@ protected:
}
// This is for use in the command interpreter, when you either want the
- // selected target, or if no target
- // is present you want to prime the dummy target with entities that will be
- // copied over to new targets.
+ // selected target, or if no target is present you want to prime the dummy
+ // target with entities that will be copied over to new targets.
Target *GetSelectedOrDummyTarget(bool prefer_dummy = false);
Target *GetDummyTarget();
- // If a command needs to use the "current" thread, use this call.
- // Command objects will have an ExecutionContext to use, and that may or may
- // not have a thread in it. If it
- // does, you should use that by default, if not, then use the
- // ExecutionContext's target's selected thread, etc...
- // This call insulates you from the details of this calculation.
+ // If a command needs to use the "current" thread, use this call. Command
+ // objects will have an ExecutionContext to use, and that may or may not have
+ // a thread in it. If it does, you should use that by default, if not, then
+ // use the ExecutionContext's target's selected thread, etc... This call
+ // insulates you from the details of this calculation.
Thread *GetDefaultThread();
//------------------------------------------------------------------
Modified: lldb/trunk/include/lldb/Interpreter/CommandObjectMultiword.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/CommandObjectMultiword.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Interpreter/CommandObjectMultiword.h (original)
+++ lldb/trunk/include/lldb/Interpreter/CommandObjectMultiword.h Mon Apr 30 09:49:04 2018
@@ -87,8 +87,8 @@ public:
~CommandObjectProxy() override;
- // Subclasses must provide a command object that will be transparently
- // used for this object.
+ // Subclasses must provide a command object that will be transparently used
+ // for this object.
virtual CommandObject *GetProxyCommandObject() = 0;
llvm::StringRef GetHelpLong() override;
Modified: lldb/trunk/include/lldb/Interpreter/OptionGroupBoolean.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/OptionGroupBoolean.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Interpreter/OptionGroupBoolean.h (original)
+++ lldb/trunk/include/lldb/Interpreter/OptionGroupBoolean.h Mon Apr 30 09:49:04 2018
@@ -24,9 +24,9 @@ namespace lldb_private {
class OptionGroupBoolean : public OptionGroup {
public:
- // When 'no_argument_toggle_default' is true, then setting the option
- // value does NOT require an argument, it sets the boolean value to the
- // inverse of the default value
+ // When 'no_argument_toggle_default' is true, then setting the option value
+ // does NOT require an argument, it sets the boolean value to the inverse of
+ // the default value
OptionGroupBoolean(uint32_t usage_mask, bool required,
const char *long_option, int short_option,
const char *usage_text, bool default_value,
Modified: lldb/trunk/include/lldb/Interpreter/OptionValue.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/OptionValue.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Interpreter/OptionValue.h (original)
+++ lldb/trunk/include/lldb/Interpreter/OptionValue.h Mon Apr 30 09:49:04 2018
@@ -76,8 +76,8 @@ public:
//-----------------------------------------------------------------
virtual Type GetType() const = 0;
- // If this value is always hidden, the avoid showing any info on this
- // value, just show the info for the child values.
+ // If this value is always hidden, the avoid showing any info on this value,
+ // just show the info for the child values.
virtual bool ValueIsTransparent() const {
return GetType() == eTypeProperties;
}
@@ -126,8 +126,8 @@ public:
virtual bool DumpQualifiedName(Stream &strm) const;
//-----------------------------------------------------------------
- // Subclasses should NOT override these functions as they use the
- // above functions to implement functionality
+ // Subclasses should NOT override these functions as they use the above
+ // functions to implement functionality
//-----------------------------------------------------------------
uint32_t GetTypeAsMask() { return 1u << GetType(); }
@@ -183,9 +183,8 @@ public:
CreateValueFromCStringForTypeMask(const char *value_cstr, uint32_t type_mask,
Status &error);
- // Get this value as a uint64_t value if it is encoded as a boolean,
- // uint64_t or int64_t. Other types will cause "fail_value" to be
- // returned
+ // Get this value as a uint64_t value if it is encoded as a boolean, uint64_t
+ // or int64_t. Other types will cause "fail_value" to be returned
uint64_t GetUInt64Value(uint64_t fail_value, bool *success_ptr);
OptionValueArch *GetAsArch();
@@ -339,10 +338,10 @@ protected:
void *m_baton;
bool m_value_was_set; // This can be used to see if a value has been set
// by a call to SetValueFromCString(). It is often
- // handy to know if an option value was set from
- // the command line or as a setting, versus if we
- // just have the default value that was already
- // populated in the option value.
+ // handy to know if an option value was set from the
+ // command line or as a setting, versus if we just have
+ // the default value that was already populated in the
+ // option value.
};
} // namespace lldb_private
Modified: lldb/trunk/include/lldb/Interpreter/OptionValueArray.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/OptionValueArray.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Interpreter/OptionValueArray.h (original)
+++ lldb/trunk/include/lldb/Interpreter/OptionValueArray.h Mon Apr 30 09:49:04 2018
@@ -78,8 +78,8 @@ public:
}
bool AppendValue(const lldb::OptionValueSP &value_sp) {
- // Make sure the value_sp object is allowed to contain
- // values of the type passed in...
+ // Make sure the value_sp object is allowed to contain values of the type
+ // passed in...
if (value_sp && (m_type_mask & value_sp->GetTypeAsMask())) {
m_values.push_back(value_sp);
return true;
@@ -88,8 +88,8 @@ public:
}
bool 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...
+ // Make sure the value_sp object is allowed to contain values of the type
+ // passed in...
if (value_sp && (m_type_mask & value_sp->GetTypeAsMask())) {
if (idx < m_values.size())
m_values.insert(m_values.begin() + idx, value_sp);
@@ -101,8 +101,8 @@ public:
}
bool 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...
+ // Make sure the value_sp object is allowed to contain values of the type
+ // passed in...
if (value_sp && (m_type_mask & value_sp->GetTypeAsMask())) {
if (idx < m_values.size()) {
m_values[idx] = value_sp;
Modified: lldb/trunk/include/lldb/Interpreter/OptionValueProperties.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/OptionValueProperties.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Interpreter/OptionValueProperties.h (original)
+++ lldb/trunk/include/lldb/Interpreter/OptionValueProperties.h Mon Apr 30 09:49:04 2018
@@ -75,15 +75,15 @@ public:
//---------------------------------------------------------------------
// Get the index of a property given its exact name in this property
- // collection, "name" can't be a path to a property path that refers
- // to a property within a property
+ // collection, "name" can't be a path to a property path that refers to a
+ // property within a property
//---------------------------------------------------------------------
virtual uint32_t GetPropertyIndex(const ConstString &name) const;
//---------------------------------------------------------------------
- // Get a property by exact name exists in this property collection, name
- // can not be a path to a property path that refers to a property within
- // a property
+ // Get a property by exact name exists in this property collection, name can
+ // not be a path to a property path that refers to a property within a
+ // property
//---------------------------------------------------------------------
virtual const Property *GetProperty(const ExecutionContext *exe_ctx,
bool will_modify,
Modified: lldb/trunk/include/lldb/Interpreter/OptionValueUInt64.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/OptionValueUInt64.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Interpreter/OptionValueUInt64.h (original)
+++ lldb/trunk/include/lldb/Interpreter/OptionValueUInt64.h Mon Apr 30 09:49:04 2018
@@ -34,9 +34,9 @@ public:
//---------------------------------------------------------------------
// Decode a uint64_t from "value_cstr" return a OptionValueUInt64 object
- // inside of a lldb::OptionValueSP object if all goes well. If the
- // string isn't a uint64_t value or any other error occurs, return an
- // empty lldb::OptionValueSP and fill error in with the correct stuff.
+ // inside of a lldb::OptionValueSP object if all goes well. If the string
+ // isn't a uint64_t value or any other error occurs, return an empty
+ // lldb::OptionValueSP and fill error in with the correct stuff.
//---------------------------------------------------------------------
static lldb::OptionValueSP Create(const char *, Status &) = delete;
static lldb::OptionValueSP Create(llvm::StringRef value_str, Status &error);
Modified: lldb/trunk/include/lldb/Interpreter/Options.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/Options.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Interpreter/Options.h (original)
+++ lldb/trunk/include/lldb/Interpreter/Options.h Mon Apr 30 09:49:04 2018
@@ -92,9 +92,9 @@ public:
bool VerifyOptions(CommandReturnObject &result);
- // Verify that the options given are in the options table and can
- // be used together, but there may be some required options that are
- // missing (used to verify options that get folded into command aliases).
+ // Verify that the options given are in the options table and can be used
+ // together, but there may be some required options that are missing (used to
+ // verify options that get folded into command aliases).
bool VerifyPartialOptions(CommandReturnObject &result);
void OutputFormattedUsageText(Stream &strm,
@@ -106,18 +106,18 @@ public:
bool SupportsLongOption(const char *long_option);
- // The following two pure virtual functions must be defined by every
- // class that inherits from this class.
+ // The following two pure virtual functions must be defined by every class
+ // that inherits from this class.
virtual llvm::ArrayRef<OptionDefinition> GetDefinitions() {
return llvm::ArrayRef<OptionDefinition>();
}
- // Call this prior to parsing any options. This call will call the
- // subclass OptionParsingStarting() and will avoid the need for all
+ // Call this prior to parsing any options. This call will call the subclass
+ // OptionParsingStarting() and will avoid the need for all
// OptionParsingStarting() function instances from having to call the
- // Option::OptionParsingStarting() like they did before. This was error
- // prone and subclasses shouldn't have to do it.
+ // Option::OptionParsingStarting() like they did before. This was error prone
+ // and subclasses shouldn't have to do it.
void NotifyOptionParsingStarting(ExecutionContext *execution_context);
//------------------------------------------------------------------
@@ -298,14 +298,14 @@ protected:
void OptionsSetUnion(const OptionSet &set_a, const OptionSet &set_b,
OptionSet &union_set);
- // Subclasses must reset their option values prior to starting a new
- // option parse. Each subclass must override this function and revert
- // all option settings to default values.
+ // Subclasses must reset their option values prior to starting a new option
+ // parse. Each subclass must override this function and revert all option
+ // settings to default values.
virtual void OptionParsingStarting(ExecutionContext *execution_context) = 0;
virtual Status OptionParsingFinished(ExecutionContext *execution_context) {
- // If subclasses need to know when the options are done being parsed
- // they can implement this function to do extra checking
+ // If subclasses need to know when the options are done being parsed they
+ // can implement this function to do extra checking
Status error;
return error;
}
@@ -326,8 +326,8 @@ public:
virtual void OptionParsingStarting(ExecutionContext *execution_context) = 0;
virtual Status OptionParsingFinished(ExecutionContext *execution_context) {
- // If subclasses need to know when the options are done being parsed
- // they can implement this function to do extra checking
+ // If subclasses need to know when the options are done being parsed they
+ // can implement this function to do extra checking
Status error;
return error;
}
Modified: lldb/trunk/include/lldb/Symbol/Block.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/Block.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Symbol/Block.h (original)
+++ lldb/trunk/include/lldb/Symbol/Block.h Mon Apr 30 09:49:04 2018
@@ -403,8 +403,8 @@ public:
uint32_t GetRangeIndexContainingAddress(const Address &addr);
//------------------------------------------------------------------
- // Since blocks might have multiple discontiguous address ranges,
- // we need to be able to get at any of the address ranges in a block.
+ // Since blocks might have multiple discontiguous address ranges, we need to
+ // be able to get at any of the address ranges in a block.
//------------------------------------------------------------------
bool GetRangeAtIndex(uint32_t range_idx, AddressRange &range);
Modified: lldb/trunk/include/lldb/Symbol/ClangASTContext.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/ClangASTContext.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Symbol/ClangASTContext.h (original)
+++ lldb/trunk/include/lldb/Symbol/ClangASTContext.h Mon Apr 30 09:49:04 2018
@@ -638,8 +638,7 @@ public:
//----------------------------------------------------------------------
// Using the current type, create a new typedef to that type using
- // "typedef_name"
- // as the name and "decl_ctx" as the decl context.
+ // "typedef_name" as the name and "decl_ctx" as the decl context.
static CompilerType
CreateTypedefType(const CompilerType &type, const char *typedef_name,
const CompilerDeclContext &compiler_decl_ctx);
@@ -656,8 +655,7 @@ public:
GetFullyUnqualifiedType(lldb::opaque_compiler_type_t type) override;
// Returns -1 if this isn't a function of if the function doesn't have a
- // prototype
- // Returns a value >= 0 if there is a prototype.
+ // prototype Returns a value >= 0 if there is a prototype.
int GetFunctionArgumentCount(lldb::opaque_compiler_type_t type) override;
CompilerType GetFunctionArgumentTypeAtIndex(lldb::opaque_compiler_type_t type,
@@ -769,8 +767,8 @@ public:
bool &child_is_base_class, bool &child_is_deref_of_parent,
ValueObject *valobj, uint64_t &language_flags) override;
- // Lookup a child given a name. This function will match base class names
- // and member member names in "clang_type" only, not descendants.
+ // Lookup a child given a name. This function will match base class names and
+ // member member names in "clang_type" only, not descendants.
uint32_t GetIndexOfChildWithName(lldb::opaque_compiler_type_t type,
const char *name,
bool omit_empty_base_classes) override;
@@ -800,8 +798,8 @@ public:
CompilerType GetTypeForFormatters(void *type) override;
#define LLDB_INVALID_DECL_LEVEL UINT32_MAX
- // LLDB_INVALID_DECL_LEVEL is returned by CountDeclLevels if
- // child_decl_ctx could not be found in decl_ctx.
+ // LLDB_INVALID_DECL_LEVEL is returned by CountDeclLevels if child_decl_ctx
+ // could not be found in decl_ctx.
uint32_t CountDeclLevels(clang::DeclContext *frame_decl_ctx,
clang::DeclContext *child_decl_ctx,
ConstString *child_name = nullptr,
@@ -892,13 +890,13 @@ public:
// Pointers & References
//------------------------------------------------------------------
- // Call this function using the class type when you want to make a
- // member pointer type to pointee_type.
+ // Call this function using the class type when you want to make a member
+ // pointer type to pointee_type.
static CompilerType CreateMemberPointerType(const CompilerType &type,
const CompilerType &pointee_type);
- // Converts "s" to a floating point value and place resulting floating
- // point bytes in the "dst" buffer.
+ // Converts "s" to a floating point value and place resulting floating point
+ // bytes in the "dst" buffer.
size_t ConvertStringToFloatValue(lldb::opaque_compiler_type_t type,
const char *s, uint8_t *dst,
size_t dst_size) override;
Modified: lldb/trunk/include/lldb/Symbol/ClangASTImporter.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/ClangASTImporter.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Symbol/ClangASTImporter.h (original)
+++ lldb/trunk/include/lldb/Symbol/ClangASTImporter.h Mon Apr 30 09:49:04 2018
@@ -250,13 +250,12 @@ private:
// recorded and placed into the decls_to_deport set.
//
// A call to "ExecuteDeportWorkQueues" completes all the Decls that
- // are in decls_to_deport, adding any Decls it sees along the way that
- // it hasn't already deported. It proceeds until decls_to_deport is
- // empty.
+ // are in decls_to_deport, adding any Decls it sees along the way that it
+ // hasn't already deported. It proceeds until decls_to_deport is empty.
//
- // These calls must be paired. Leaving a minion in deport mode or
- // trying to start deport minion with a new pair of queues will result
- // in an assertion failure.
+ // These calls must be paired. Leaving a minion in deport mode or trying
+ // to start deport minion with a new pair of queues will result in an
+ // assertion failure.
void
InitDeportWorkQueues(std::set<clang::NamedDecl *> *decls_to_deport,
Modified: lldb/trunk/include/lldb/Symbol/ClangExternalASTSourceCallbacks.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/ClangExternalASTSourceCallbacks.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Symbol/ClangExternalASTSourceCallbacks.h (original)
+++ lldb/trunk/include/lldb/Symbol/ClangExternalASTSourceCallbacks.h Mon Apr 30 09:49:04 2018
@@ -60,21 +60,21 @@ public:
//------------------------------------------------------------------
clang::Decl *GetExternalDecl(uint32_t ID) override {
- // This method only needs to be implemented if the AST source ever
- // passes back decl sets as VisibleDeclaration objects.
+ // This method only needs to be implemented if the AST source ever passes
+ // back decl sets as VisibleDeclaration objects.
return nullptr;
}
clang::Stmt *GetExternalDeclStmt(uint64_t Offset) override {
- // This operation is meant to be used via a LazyOffsetPtr. It only
- // needs to be implemented if the AST source uses methods like
+ // This operation is meant to be used via a LazyOffsetPtr. It only needs
+ // to be implemented if the AST source uses methods like
// FunctionDecl::setLazyBody when building decls.
return nullptr;
}
clang::Selector GetExternalSelector(uint32_t ID) override {
- // This operation only needs to be implemented if the AST source
- // returns non-zero for GetNumKnownSelectors().
+ // This operation only needs to be implemented if the AST source returns
+ // non-zero for GetNumKnownSelectors().
return clang::Selector();
}
Modified: lldb/trunk/include/lldb/Symbol/CompactUnwindInfo.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/CompactUnwindInfo.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Symbol/CompactUnwindInfo.h (original)
+++ lldb/trunk/include/lldb/Symbol/CompactUnwindInfo.h Mon Apr 30 09:49:04 2018
@@ -22,23 +22,18 @@
namespace lldb_private {
// Compact Unwind info is an unwind format used on Darwin. The unwind
-// instructions
-// for typical compiler-generated functions can be expressed in a 32-bit
-// encoding.
-// The format includes a two-level index so the unwind information for a
-// function
-// can be found by two binary searches in the section. It can represent both
-// stack frames that use a frame-pointer register and frameless functions, on
-// i386/x86_64 for instance. When a function is too complex to be represented
-// in
-// the compact unwind format, it calls out to eh_frame unwind instructions.
+// instructions for typical compiler-generated functions can be expressed in a
+// 32-bit encoding. The format includes a two-level index so the unwind
+// information for a function can be found by two binary searches in the
+// section. It can represent both stack frames that use a frame-pointer
+// register and frameless functions, on i386/x86_64 for instance. When a
+// function is too complex to be represented in the compact unwind format, it
+// calls out to eh_frame unwind instructions.
// On Mac OS X / iOS, a function will have either a compact unwind
-// representation
-// or an eh_frame representation. If lldb is going to benefit from the
-// compiler's
-// description about saved register locations, it must be able to read both
-// sources of information.
+// representation or an eh_frame representation. If lldb is going to benefit
+// from the compiler's description about saved register locations, it must be
+// able to read both sources of information.
class CompactUnwindInfo {
public:
@@ -54,9 +49,8 @@ private:
// The top level index entries of the compact unwind info
// (internal representation of struct
// unwind_info_section_header_index_entry)
- // There are relatively few of these (one per 500/1000 functions, depending on
- // format) so
- // creating them on first scan will not be too costly.
+ // There are relatively few of these (one per 500/1000 functions, depending
+ // on format) so creating them on first scan will not be too costly.
struct UnwindIndex {
uint32_t function_offset; // The offset of the first function covered by
// this index
@@ -84,8 +78,7 @@ private:
};
// An internal object used to store the information we retrieve about a
- // function --
- // the encoding bits and possibly the LSDA/personality function.
+ // function -- the encoding bits and possibly the LSDA/personality function.
struct FunctionInfo {
uint32_t encoding; // compact encoding 32-bit value for this function
Address lsda_address; // the address of the LSDA data for this function
Modified: lldb/trunk/include/lldb/Symbol/CompilerType.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/CompilerType.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Symbol/CompilerType.h (original)
+++ lldb/trunk/include/lldb/Symbol/CompilerType.h Mon Apr 30 09:49:04 2018
@@ -28,13 +28,12 @@ class DataExtractor;
//----------------------------------------------------------------------
// A class that can carry around a clang ASTContext and a opaque clang
-// QualType. A clang::QualType can be easily reconstructed from an
-// opaque clang type and often the ASTContext is needed when doing
-// various type related tasks, so this class allows both items to travel
-// in a single very lightweight class that can be used. There are many
-// static equivalents of the member functions that allow the ASTContext
-// and the opaque clang QualType to be specified for ease of use and
-// to avoid code duplication.
+// QualType. A clang::QualType can be easily reconstructed from an opaque clang
+// type and often the ASTContext is needed when doing various type related
+// tasks, so this class allows both items to travel in a single very
+// lightweight class that can be used. There are many static equivalents of the
+// member functions that allow the ASTContext and the opaque clang QualType to
+// be specified for ease of use and to avoid code duplication.
//----------------------------------------------------------------------
class CompilerType {
public:
@@ -206,8 +205,7 @@ public:
CompilerType GetFullyUnqualifiedType() const;
// Returns -1 if this isn't a function of if the function doesn't have a
- // prototype
- // Returns a value >= 0 if there is a prototype.
+ // prototype Returns a value >= 0 if there is a prototype.
int GetFunctionArgumentCount() const;
CompilerType GetFunctionArgumentTypeAtIndex(size_t idx) const;
@@ -220,14 +218,14 @@ public:
//----------------------------------------------------------------------
// If this type is a reference to a type (L value or R value reference),
- // return a new type with the reference removed, else return the current
- // type itself.
+ // return a new type with the reference removed, else return the current type
+ // itself.
//----------------------------------------------------------------------
CompilerType GetNonReferenceType() const;
//----------------------------------------------------------------------
- // If this type is a pointer type, return the type that the pointer
- // points to, else return an invalid type.
+ // If this type is a pointer type, return the type that the pointer points
+ // to, else return an invalid type.
//----------------------------------------------------------------------
CompilerType GetPointeeType() const;
@@ -237,44 +235,44 @@ public:
CompilerType GetPointerType() const;
//----------------------------------------------------------------------
- // Return a new CompilerType that is a L value reference to this type if
- // this type is valid and the type system supports L value references,
- // else return an invalid type.
+ // Return a new CompilerType that is a L value reference to this type if this
+ // type is valid and the type system supports L value references, else return
+ // an invalid type.
//----------------------------------------------------------------------
CompilerType GetLValueReferenceType() const;
//----------------------------------------------------------------------
- // Return a new CompilerType that is a R value reference to this type if
- // this type is valid and the type system supports R value references,
- // else return an invalid type.
+ // Return a new CompilerType that is a R value reference to this type if this
+ // type is valid and the type system supports R value references, else return
+ // an invalid type.
//----------------------------------------------------------------------
CompilerType GetRValueReferenceType() const;
//----------------------------------------------------------------------
- // Return a new CompilerType adds a const modifier to this type if
- // this type is valid and the type system supports const modifiers,
- // else return an invalid type.
+ // Return a new CompilerType adds a const modifier to this type if this type
+ // is valid and the type system supports const modifiers, else return an
+ // invalid type.
//----------------------------------------------------------------------
CompilerType AddConstModifier() const;
//----------------------------------------------------------------------
- // Return a new CompilerType adds a volatile modifier to this type if
- // this type is valid and the type system supports volatile modifiers,
- // else return an invalid type.
+ // Return a new CompilerType adds a volatile modifier to this type if this
+ // type is valid and the type system supports volatile modifiers, else return
+ // an invalid type.
//----------------------------------------------------------------------
CompilerType AddVolatileModifier() const;
//----------------------------------------------------------------------
- // Return a new CompilerType adds a restrict modifier to this type if
- // this type is valid and the type system supports restrict modifiers,
- // else return an invalid type.
+ // Return a new CompilerType adds a restrict modifier to this type if this
+ // type is valid and the type system supports restrict modifiers, else return
+ // an invalid type.
//----------------------------------------------------------------------
CompilerType AddRestrictModifier() const;
//----------------------------------------------------------------------
- // Create a typedef to this type using "name" as the name of the typedef
- // this type is valid and the type system supports typedefs, else return
- // an invalid type.
+ // Create a typedef to this type using "name" as the name of the typedef this
+ // type is valid and the type system supports typedefs, else return an
+ // invalid type.
//----------------------------------------------------------------------
CompilerType CreateTypedef(const char *name,
const CompilerDeclContext &decl_ctx) const;
@@ -311,8 +309,8 @@ public:
//----------------------------------------------------------------------
// If this type is an enumeration, iterate through all of its enumerators
- // using a callback. If the callback returns true, keep iterating, else
- // abort the iteration.
+ // using a callback. If the callback returns true, keep iterating, else abort
+ // the iteration.
//----------------------------------------------------------------------
void ForEachEnumerator(
std::function<bool(const CompilerType &integer_type,
@@ -351,8 +349,8 @@ public:
bool &child_is_deref_of_parent, ValueObject *valobj,
uint64_t &language_flags) const;
- // Lookup a child given a name. This function will match base class names
- // and member member names in "clang_type" only, not descendants.
+ // Lookup a child given a name. This function will match base class names and
+ // member member names in "clang_type" only, not descendants.
uint32_t GetIndexOfChildWithName(const char *name,
bool omit_empty_base_classes) const;
@@ -385,8 +383,8 @@ public:
// Pointers & References
//------------------------------------------------------------------
- // Converts "s" to a floating point value and place resulting floating
- // point bytes in the "dst" buffer.
+ // Converts "s" to a floating point value and place resulting floating point
+ // bytes in the "dst" buffer.
size_t ConvertStringToFloatValue(const char *s, uint8_t *dst,
size_t dst_size) const;
Modified: lldb/trunk/include/lldb/Symbol/DWARFCallFrameInfo.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/DWARFCallFrameInfo.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Symbol/DWARFCallFrameInfo.h (original)
+++ lldb/trunk/include/lldb/Symbol/DWARFCallFrameInfo.h Mon Apr 30 09:49:04 2018
@@ -25,12 +25,12 @@
namespace lldb_private {
-// DWARFCallFrameInfo is a class which can read eh_frame and DWARF
-// Call Frame Information FDEs. It stores little information internally.
-// Only two APIs are exported - one to find the high/low pc values
-// of a function given a text address via the information in the
-// eh_frame / debug_frame, and one to generate an UnwindPlan based
-// on the FDE in the eh_frame / debug_frame section.
+// DWARFCallFrameInfo is a class which can read eh_frame and DWARF Call Frame
+// Information FDEs. It stores little information internally. Only two APIs
+// are exported - one to find the high/low pc values of a function given a text
+// address via the information in the eh_frame / debug_frame, and one to
+// generate an UnwindPlan based on the FDE in the eh_frame / debug_frame
+// section.
class DWARFCallFrameInfo {
public:
@@ -40,13 +40,13 @@ public:
~DWARFCallFrameInfo() = default;
- // Locate an AddressRange that includes the provided Address in this
- // object's eh_frame/debug_info
- // Returns true if a range is found to cover that address.
+ // Locate an AddressRange that includes the provided Address in this object's
+ // eh_frame/debug_info Returns true if a range is found to cover that
+ // address.
bool GetAddressRange(Address addr, AddressRange &range);
- // Return an UnwindPlan based on the call frame information encoded
- // in the FDE of this DWARFCallFrameInfo section.
+ // Return an UnwindPlan based on the call frame information encoded in the
+ // FDE of this DWARFCallFrameInfo section.
bool GetUnwindPlan(Address addr, UnwindPlan &unwind_plan);
typedef RangeVector<lldb::addr_t, uint32_t> FunctionAddressAndSizeVector;
@@ -55,12 +55,11 @@ public:
// Build a vector of file address and size for all functions in this Module
// based on the eh_frame FDE entries.
//
- // The eh_frame information can be a useful source of file address and size of
- // the functions in a Module. Often a binary's non-exported symbols are
- // stripped
- // before shipping so lldb won't know the start addr / size of many functions
- // in the Module. But the eh_frame can help to give the addresses of these
- // stripped symbols, at least.
+ // The eh_frame information can be a useful source of file address and size
+ // of the functions in a Module. Often a binary's non-exported symbols are
+ // stripped before shipping so lldb won't know the start addr / size of many
+ // functions in the Module. But the eh_frame can help to give the addresses
+ // of these stripped symbols, at least.
//
// @param[out] function_info
// A vector provided by the caller is filled out. May be empty if no
@@ -112,10 +111,9 @@ private:
typedef std::map<dw_offset_t, CIESP> cie_map_t;
- // Start address (file address), size, offset of FDE location
- // used for finding an FDE for a given File address; the start address field
- // is
- // an offset into an individual Module.
+ // Start address (file address), size, offset of FDE location used for
+ // finding an FDE for a given File address; the start address field is an
+ // offset into an individual Module.
typedef RangeDataVector<lldb::addr_t, uint32_t, dw_offset_t> FDEEntryMap;
bool IsEHFrame() const;
@@ -133,8 +131,8 @@ private:
void GetCFIData();
// Applies the specified DWARF opcode to the given row. This function handle
- // the commands
- // operates only on a single row (these are the ones what can appear both in
+ // the commands operates only on a single row (these are the ones what can
+ // appear both in
// CIE and in FDE).
// Returns true if the opcode is handled and false otherwise.
bool HandleCommonDwarfOpcode(uint8_t primary_opcode, uint8_t extended_opcode,
Modified: lldb/trunk/include/lldb/Symbol/DeclVendor.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/DeclVendor.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Symbol/DeclVendor.h (original)
+++ lldb/trunk/include/lldb/Symbol/DeclVendor.h Mon Apr 30 09:49:04 2018
@@ -20,9 +20,8 @@
namespace lldb_private {
//----------------------------------------------------------------------
-// The Decl vendor class is intended as a generic interface to search
-// for named declarations that are not necessarily backed by a specific
-// symbol file.
+// The Decl vendor class is intended as a generic interface to search for named
+// declarations that are not necessarily backed by a specific symbol file.
//----------------------------------------------------------------------
class DeclVendor {
public:
Modified: lldb/trunk/include/lldb/Symbol/FuncUnwinders.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/FuncUnwinders.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Symbol/FuncUnwinders.h (original)
+++ lldb/trunk/include/lldb/Symbol/FuncUnwinders.h Mon Apr 30 09:49:04 2018
@@ -12,8 +12,8 @@ class UnwindTable;
class FuncUnwinders {
public:
- // FuncUnwinders objects are used to track UnwindPlans for a function
- // (named or not - really just an address range)
+ // FuncUnwinders objects are used to track UnwindPlans for a function (named
+ // or not - really just an address range)
// We'll record four different UnwindPlans for each address range:
//
@@ -28,8 +28,8 @@ public:
// available for some reason.
// Additionally, FuncUnwinds object can be asked where the prologue
- // instructions are finished for migrating breakpoints past the
- // stack frame setup instructions when we don't have line table information.
+ // instructions are finished for migrating breakpoints past the stack frame
+ // setup instructions when we don't have line table information.
FuncUnwinders(lldb_private::UnwindTable &unwind_table, AddressRange range);
@@ -38,10 +38,8 @@ public:
// current_offset is the byte offset into the function.
// 0 means no instructions have executed yet. -1 means the offset is unknown.
// On architectures where the pc points to the next instruction that will
- // execute, this
- // offset value will have already been decremented by 1 to stay within the
- // bounds of the
- // correct function body.
+ // execute, this offset value will have already been decremented by 1 to stay
+ // within the bounds of the correct function body.
lldb::UnwindPlanSP GetUnwindPlanAtCallSite(Target &target,
int current_offset);
@@ -69,24 +67,19 @@ public:
// A function may have a Language Specific Data Area specified -- a block of
// data in
// the object file which is used in the processing of an exception throw /
- // catch.
- // If any of the UnwindPlans have the address of the LSDA region for this
- // function,
- // this will return it.
+ // catch. If any of the UnwindPlans have the address of the LSDA region for
+ // this function, this will return it.
Address GetLSDAAddress(Target &target);
// A function may have a Personality Routine associated with it -- used in the
// processing of throwing an exception. If any of the UnwindPlans have the
- // address of the personality routine, this will return it. Read the
- // target-pointer
- // at this address to get the personality function address.
+ // address of the personality routine, this will return it. Read the target-
+ // pointer at this address to get the personality function address.
Address GetPersonalityRoutinePtrAddress(Target &target);
// The following methods to retrieve specific unwind plans should rarely be
- // used.
- // Instead, clients should ask for the *behavior* they are looking for, using
- // one
- // of the above UnwindPlan retrieval methods.
+ // used. Instead, clients should ask for the *behavior* they are looking for,
+ // using one of the above UnwindPlan retrieval methods.
lldb::UnwindPlanSP GetAssemblyUnwindPlan(Target &target, Thread &thread,
int current_offset);
@@ -116,11 +109,11 @@ public:
private:
lldb::UnwindAssemblySP GetUnwindAssemblyProfiler(Target &target);
- // Do a simplistic comparison for the register restore rule for getting
- // the caller's pc value on two UnwindPlans -- returns LazyBoolYes if
- // they have the same unwind rule for the pc, LazyBoolNo if they do not
- // have the same unwind rule for the pc, and LazyBoolCalculate if it was
- // unable to determine this for some reason.
+ // Do a simplistic comparison for the register restore rule for getting the
+ // caller's pc value on two UnwindPlans -- returns LazyBoolYes if they have
+ // the same unwind rule for the pc, LazyBoolNo if they do not have the same
+ // unwind rule for the pc, and LazyBoolCalculate if it was unable to
+ // determine this for some reason.
lldb_private::LazyBool CompareUnwindPlansForIdenticalInitialPCLocation(
Thread &thread, const lldb::UnwindPlanSP &a, const lldb::UnwindPlanSP &b);
@@ -143,8 +136,8 @@ private:
lldb::UnwindPlanSP m_unwind_plan_arch_default_sp;
lldb::UnwindPlanSP m_unwind_plan_arch_default_at_func_entry_sp;
- // Fetching the UnwindPlans can be expensive - if we've already attempted
- // to get one & failed, don't try again.
+ // Fetching the UnwindPlans can be expensive - if we've already attempted to
+ // get one & failed, don't try again.
bool m_tried_unwind_plan_assembly : 1, m_tried_unwind_plan_eh_frame : 1,
m_tried_unwind_plan_debug_frame : 1,
m_tried_unwind_plan_eh_frame_augmented : 1,
Modified: lldb/trunk/include/lldb/Symbol/GoASTContext.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/GoASTContext.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Symbol/GoASTContext.h (original)
+++ lldb/trunk/include/lldb/Symbol/GoASTContext.h Mon Apr 30 09:49:04 2018
@@ -216,8 +216,7 @@ public:
CompilerType GetCanonicalType(lldb::opaque_compiler_type_t type) override;
// Returns -1 if this isn't a function of if the function doesn't have a
- // prototype
- // Returns a value >= 0 if there is a prototype.
+ // prototype Returns a value >= 0 if there is a prototype.
int GetFunctionArgumentCount(lldb::opaque_compiler_type_t type) override;
CompilerType GetFunctionArgumentTypeAtIndex(lldb::opaque_compiler_type_t type,
@@ -294,8 +293,8 @@ public:
bool &child_is_base_class, bool &child_is_deref_of_parent,
ValueObject *valobj, uint64_t &language_flags) override;
- // Lookup a child given a name. This function will match base class names
- // and member member names in "clang_type" only, not descendants.
+ // Lookup a child given a name. This function will match base class names and
+ // member member names in "clang_type" only, not descendants.
uint32_t GetIndexOfChildWithName(lldb::opaque_compiler_type_t type,
const char *name,
bool omit_empty_base_classes) override;
@@ -347,8 +346,8 @@ public:
Stream *s, const DataExtractor &data,
lldb::offset_t data_offset, size_t data_byte_size) override;
- // Converts "s" to a floating point value and place resulting floating
- // point bytes in the "dst" buffer.
+ // Converts "s" to a floating point value and place resulting floating point
+ // bytes in the "dst" buffer.
size_t ConvertStringToFloatValue(lldb::opaque_compiler_type_t type,
const char *s, uint8_t *dst,
size_t dst_size) override;
Modified: lldb/trunk/include/lldb/Symbol/ObjectFile.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/ObjectFile.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Symbol/ObjectFile.h (original)
+++ lldb/trunk/include/lldb/Symbol/ObjectFile.h Mon Apr 30 09:49:04 2018
@@ -377,13 +377,13 @@ public:
//------------------------------------------------------------------
virtual Symbol *ResolveSymbolForAddress(const Address &so_addr,
bool verify_unique) {
- // Typically overridden to lazily add stripped symbols recoverable from
- // the exception handling unwind information (i.e. without parsing
- // the entire eh_frame section.
+ // Typically overridden to lazily add stripped symbols recoverable from the
+ // exception handling unwind information (i.e. without parsing the entire
+ // eh_frame section.
//
- // The availability of LC_FUNCTION_STARTS allows ObjectFileMachO
- // to efficiently add stripped symbols when the symbol table is
- // first constructed. Poorer cousins are PECoff and ELF.
+ // The availability of LC_FUNCTION_STARTS allows ObjectFileMachO to
+ // efficiently add stripped symbols when the symbol table is first
+ // constructed. Poorer cousins are PECoff and ELF.
return nullptr;
}
@@ -791,10 +791,9 @@ public:
return m_strata;
}
- // When an object file is in memory, subclasses should try and lock
- // the process weak pointer. If the process weak pointer produces a
- // valid ProcessSP, then subclasses can call this function to read
- // memory.
+ // When an object file is in memory, subclasses should try and lock the
+ // process weak pointer. If the process weak pointer produces a valid
+ // ProcessSP, then subclasses can call this function to read memory.
static lldb::DataBufferSP ReadMemory(const lldb::ProcessSP &process_sp,
lldb::addr_t addr, size_t byte_size);
@@ -814,8 +813,8 @@ public:
size_t dst_len);
// This function will transparently decompress section data if the section if
- // compressed. Note that for compressed section the resulting data size may be
- // larger than what Section::GetFileSize reports.
+ // compressed. Note that for compressed section the resulting data size may
+ // be larger than what Section::GetFileSize reports.
virtual size_t ReadSectionData(Section *section,
DataExtractor §ion_data);
Modified: lldb/trunk/include/lldb/Symbol/Symbol.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/Symbol.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Symbol/Symbol.h (original)
+++ lldb/trunk/include/lldb/Symbol/Symbol.h Mon Apr 30 09:49:04 2018
@@ -20,11 +20,9 @@ namespace lldb_private {
class Symbol : public SymbolContextScope {
public:
- // ObjectFile readers can classify their symbol table entries and searches can
- // be made
- // on specific types where the symbol values will have drastically different
- // meanings
- // and sorting requirements.
+ // ObjectFile readers can classify their symbol table entries and searches
+ // can be made on specific types where the symbol values will have
+ // drastically different meanings and sorting requirements.
Symbol();
Symbol(uint32_t symID, const char *name, bool name_is_mangled,
@@ -52,56 +50,53 @@ public:
bool ValueIsAddress() const;
//------------------------------------------------------------------
- // The GetAddressRef() accessor functions should only be called if
- // you previously call ValueIsAddress() otherwise you might get an
- // reference to an Address object that contains an constant integer
- // value in m_addr_range.m_base_addr.m_offset which could be
- // incorrectly used to represent an absolute address since it has
- // no section.
+ // The GetAddressRef() accessor functions should only be called if you
+ // previously call ValueIsAddress() otherwise you might get an reference to
+ // an Address object that contains an constant integer value in
+ // m_addr_range.m_base_addr.m_offset which could be incorrectly used to
+ // represent an absolute address since it has no section.
//------------------------------------------------------------------
Address &GetAddressRef() { return m_addr_range.GetBaseAddress(); }
const Address &GetAddressRef() const { return m_addr_range.GetBaseAddress(); }
//------------------------------------------------------------------
- // Makes sure the symbol's value is an address and returns the file
- // address. Returns LLDB_INVALID_ADDRESS if the symbol's value isn't
- // an address.
+ // Makes sure the symbol's value is an address and returns the file address.
+ // Returns LLDB_INVALID_ADDRESS if the symbol's value isn't an address.
//------------------------------------------------------------------
lldb::addr_t GetFileAddress() const;
//------------------------------------------------------------------
- // Makes sure the symbol's value is an address and gets the load
- // address using \a target if it is. Returns LLDB_INVALID_ADDRESS
- // if the symbol's value isn't an address or if the section isn't
- // loaded in \a target.
+ // Makes sure the symbol's value is an address and gets the load address
+ // using \a target if it is. Returns LLDB_INVALID_ADDRESS if the symbol's
+ // value isn't an address or if the section isn't loaded in \a target.
//------------------------------------------------------------------
lldb::addr_t GetLoadAddress(Target *target) const;
//------------------------------------------------------------------
- // Access the address value. Do NOT hand out the AddressRange as an
- // object as the byte size of the address range may not be filled in
- // and it should be accessed via GetByteSize().
+ // Access the address value. Do NOT hand out the AddressRange as an object as
+ // the byte size of the address range may not be filled in and it should be
+ // accessed via GetByteSize().
//------------------------------------------------------------------
Address GetAddress() const {
- // Make sure the our value is an address before we hand a copy out.
- // We use the Address inside m_addr_range to contain the value for
- // symbols that are not address based symbols so we are using it
- // for more than just addresses. For example undefined symbols on
- // MacOSX have a nlist.n_value of 0 (zero) and this will get placed
- // into m_addr_range.m_base_addr.m_offset and it will have no section.
- // So in the GetAddress() accessor, we need to hand out an invalid
- // address if the symbol's value isn't an address.
+ // Make sure the our value is an address before we hand a copy out. We use
+ // the Address inside m_addr_range to contain the value for symbols that
+ // are not address based symbols so we are using it for more than just
+ // addresses. For example undefined symbols on MacOSX have a nlist.n_value
+ // of 0 (zero) and this will get placed into
+ // m_addr_range.m_base_addr.m_offset and it will have no section. So in the
+ // GetAddress() accessor, we need to hand out an invalid address if the
+ // symbol's value isn't an address.
if (ValueIsAddress())
return m_addr_range.GetBaseAddress();
else
return Address();
}
- // When a symbol's value isn't an address, we need to access the raw
- // value. This function will ensure this symbol's value isn't an address
- // and return the integer value if this checks out, otherwise it will
- // return "fail_value" if the symbol is an address value.
+ // When a symbol's value isn't an address, we need to access the raw value.
+ // This function will ensure this symbol's value isn't an address and return
+ // the integer value if this checks out, otherwise it will return
+ // "fail_value" if the symbol is an address value.
uint64_t GetIntegerValue(uint64_t fail_value = 0) const {
if (ValueIsAddress()) {
// This symbol's value is an address. Use Symbol::GetAddress() to get the
@@ -238,9 +233,8 @@ public:
protected:
// This is the internal guts of ResolveReExportedSymbol, it assumes
- // reexport_name is not null, and that module_spec
- // is valid. We track the modules we've already seen to make sure we don't
- // get caught in a cycle.
+ // reexport_name is not null, and that module_spec is valid. We track the
+ // modules we've already seen to make sure we don't get caught in a cycle.
Symbol *ResolveReExportedSymbolInModuleSpec(
Target &target, ConstString &reexport_name,
@@ -260,8 +254,8 @@ protected:
m_size_is_sibling : 1, // m_size contains the index of this symbol's
// sibling
m_size_is_synthesized : 1, // non-zero if this symbol's size was
- // calculated using a delta between this symbol
- // and the next
+ // calculated using a delta between this
+ // symbol and the next
m_size_is_valid : 1,
m_demangled_is_synthesized : 1, // The demangled name was created should
// not be used for expressions or other
Modified: lldb/trunk/include/lldb/Symbol/SymbolFile.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/SymbolFile.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Symbol/SymbolFile.h (original)
+++ lldb/trunk/include/lldb/Symbol/SymbolFile.h Mon Apr 30 09:49:04 2018
@@ -26,10 +26,10 @@ public:
//------------------------------------------------------------------
// Symbol file ability bits.
//
- // Each symbol file can claim to support one or more symbol file
- // abilities. These get returned from SymbolFile::GetAbilities().
- // These help us to determine which plug-in will be best to load
- // the debug information found in files.
+ // Each symbol file can claim to support one or more symbol file abilities.
+ // These get returned from SymbolFile::GetAbilities(). These help us to
+ // determine which plug-in will be best to load the debug information found
+ // in files.
//------------------------------------------------------------------
enum Abilities {
CompileUnits = (1u << 0),
Modified: lldb/trunk/include/lldb/Symbol/SymbolVendor.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/SymbolVendor.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Symbol/SymbolVendor.h (original)
+++ lldb/trunk/include/lldb/Symbol/SymbolVendor.h Mon Apr 30 09:49:04 2018
@@ -22,14 +22,13 @@
namespace lldb_private {
//----------------------------------------------------------------------
-// The symbol vendor class is designed to abstract the process of
-// searching for debug information for a given module. Platforms can
-// subclass this class and provide extra ways to find debug information.
-// Examples would be a subclass that would allow for locating a stand
-// alone debug file, parsing debug maps, or runtime data in the object
-// files. A symbol vendor can use multiple sources (SymbolFile
-// objects) to provide the information and only parse as deep as needed
-// in order to provide the information that is requested.
+// The symbol vendor class is designed to abstract the process of searching for
+// debug information for a given module. Platforms can subclass this class and
+// provide extra ways to find debug information. Examples would be a subclass
+// that would allow for locating a stand alone debug file, parsing debug maps,
+// or runtime data in the object files. A symbol vendor can use multiple
+// sources (SymbolFile objects) to provide the information and only parse as
+// deep as needed in order to provide the information that is requested.
//----------------------------------------------------------------------
class SymbolVendor : public ModuleChild, public PluginInterface {
public:
Modified: lldb/trunk/include/lldb/Symbol/Type.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/Type.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Symbol/Type.h (original)
+++ lldb/trunk/include/lldb/Symbol/Type.h Mon Apr 30 09:49:04 2018
@@ -24,8 +24,8 @@
namespace lldb_private {
//----------------------------------------------------------------------
-// CompilerContext allows an array of these items to be passed to
-// perform detailed lookups in SymbolVendor and SymbolFile functions.
+// CompilerContext allows an array of these items to be passed to perform
+// detailed lookups in SymbolVendor and SymbolFile functions.
//----------------------------------------------------------------------
struct CompilerContext {
CompilerContext(CompilerContextKind t, const ConstString &n)
@@ -82,16 +82,12 @@ public:
eEncodingIsSyntheticUID
} EncodingDataType;
- // We must force the underlying type of the enum to be unsigned here. Not all
- // compilers
- // behave the same with regards to the default underlying type of an enum, but
- // because
- // this enum is used in an enum bitfield and integer comparisons are done with
- // the value
- // we need to guarantee that it's always unsigned so that, for example,
- // eResolveStateFull
- // doesn't compare less than eResolveStateUnresolved when used in a 2-bit
- // bitfield.
+ // We must force the underlying type of the enum to be unsigned here. Not
+ // all compilers behave the same with regards to the default underlying type
+ // of an enum, but because this enum is used in an enum bitfield and integer
+ // comparisons are done with the value we need to guarantee that it's always
+ // unsigned so that, for example, eResolveStateFull doesn't compare less than
+ // eResolveStateUnresolved when used in a 2-bit bitfield.
typedef enum ResolveStateTag : unsigned {
eResolveStateUnresolved = 0,
eResolveStateForward = 1,
@@ -106,8 +102,7 @@ public:
ResolveState compiler_type_resolve_state);
// This makes an invalid type. Used for functions that return a Type when
- // they
- // get an error.
+ // they get an error.
Type();
Type(const Type &rhs);
@@ -119,7 +114,8 @@ public:
void DumpTypeName(Stream *s);
// Since Type instances only keep a "SymbolFile *" internally, other classes
- // like TypeImpl need make sure the module is still around before playing with
+ // like TypeImpl need make sure the module is still around before playing
+ // with
// Type instances. They can store a weak pointer to the Module;
lldb::ModuleSP GetModule();
@@ -188,8 +184,8 @@ public:
CompilerType GetFullCompilerType();
// Get the clang type, and resolve definitions enough so that the type could
- // have layout performed. This allows ptrs and refs to class/struct/union/enum
- // types remain forward declarations.
+ // have layout performed. This allows ptrs and refs to
+ // class/struct/union/enum types remain forward declarations.
CompilerType GetLayoutCompilerType();
// Get the clang type and leave class/struct/union/enum types as forward
@@ -198,8 +194,8 @@ public:
static int Compare(const Type &a, const Type &b);
- // From a fully qualified typename, split the type into the type basename
- // and the remaining type scope (namespaces/classes).
+ // From a fully qualified typename, split the type into the type basename and
+ // the remaining type scope (namespaces/classes).
static bool GetTypeScopeAndBasename(const llvm::StringRef& name,
llvm::StringRef &scope,
llvm::StringRef &basename,
@@ -366,8 +362,8 @@ protected:
lldb::TypeSP type_sp;
};
-// the two classes here are used by the public API as a backend to
-// the SBType and SBTypeList classes
+// the two classes here are used by the public API as a backend to the SBType
+// and SBTypeList classes
class TypeImpl {
public:
Modified: lldb/trunk/include/lldb/Symbol/TypeSystem.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/TypeSystem.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Symbol/TypeSystem.h (original)
+++ lldb/trunk/include/lldb/Symbol/TypeSystem.h Mon Apr 30 09:49:04 2018
@@ -66,8 +66,8 @@ public:
// {
// }
//
- // Then you can use the llvm casting on any "TypeSystem *" to get an
- // instance of your subclass.
+ // Then you can use the llvm casting on any "TypeSystem *" to get an instance
+ // of your subclass.
//----------------------------------------------------------------------
enum LLVMCastKind {
eKindClang,
@@ -94,8 +94,7 @@ public:
Target *target);
// Free up any resources associated with this TypeSystem. Done before
- // removing
- // all the TypeSystems from the TypeSystemMap.
+ // removing all the TypeSystems from the TypeSystemMap.
virtual void Finalize() {}
virtual DWARFASTParser *GetDWARFParser() { return nullptr; }
@@ -239,8 +238,7 @@ public:
virtual CompilerType GetCanonicalType(lldb::opaque_compiler_type_t type) = 0;
// Returns -1 if this isn't a function of if the function doesn't have a
- // prototype
- // Returns a value >= 0 if there is a prototype.
+ // prototype Returns a value >= 0 if there is a prototype.
virtual int GetFunctionArgumentCount(lldb::opaque_compiler_type_t type) = 0;
virtual CompilerType
@@ -332,8 +330,8 @@ public:
bool &child_is_base_class, bool &child_is_deref_of_parent,
ValueObject *valobj, uint64_t &language_flags) = 0;
- // Lookup a child given a name. This function will match base class names
- // and member member names in "clang_type" only, not descendants.
+ // Lookup a child given a name. This function will match base class names and
+ // member member names in "clang_type" only, not descendants.
virtual uint32_t GetIndexOfChildWithName(lldb::opaque_compiler_type_t type,
const char *name,
bool omit_empty_base_classes) = 0;
@@ -395,8 +393,8 @@ public:
lldb::offset_t data_offset,
size_t data_byte_size) = 0;
- // Converts "s" to a floating point value and place resulting floating
- // point bytes in the "dst" buffer.
+ // Converts "s" to a floating point value and place resulting floating point
+ // bytes in the "dst" buffer.
virtual size_t ConvertStringToFloatValue(lldb::opaque_compiler_type_t type,
const char *s, uint8_t *dst,
size_t dst_size) = 0;
@@ -481,23 +479,17 @@ public:
virtual LazyBool ShouldPrintAsOneLiner(void *type, ValueObject *valobj);
// Type systems can have types that are placeholder types, which are meant to
- // indicate
- // the presence of a type, but offer no actual information about said types,
- // and leave
- // the burden of actually figuring type information out to dynamic type
- // resolution. For instance
- // a language with a generics system, can use placeholder types to indicate
- // "type argument goes here",
- // without promising uniqueness of the placeholder, nor attaching any actually
- // idenfiable information
- // to said placeholder. This API allows type systems to tell LLDB when such a
- // type has been encountered
- // In response, the debugger can react by not using this type as a cache entry
- // in any type-specific way
- // For instance, LLDB will currently not cache any formatters that are
- // discovered on such a type as
- // attributable to the meaningless type itself, instead preferring to use the
- // dynamic type
+ // indicate the presence of a type, but offer no actual information about
+ // said types, and leave the burden of actually figuring type information out
+ // to dynamic type resolution. For instance a language with a generics
+ // system, can use placeholder types to indicate "type argument goes here",
+ // without promising uniqueness of the placeholder, nor attaching any
+ // actually idenfiable information to said placeholder. This API allows type
+ // systems to tell LLDB when such a type has been encountered In response,
+ // the debugger can react by not using this type as a cache entry in any
+ // type-specific way For instance, LLDB will currently not cache any
+ // formatters that are discovered on such a type as attributable to the
+ // meaningless type itself, instead preferring to use the dynamic type
virtual bool IsMeaninglessWithoutDynamicResolution(void *type);
protected:
@@ -514,8 +506,8 @@ public:
// empties the map.
void Clear();
- // Iterate through all of the type systems that are created. Return true
- // from callback to keep iterating, false to stop iterating.
+ // Iterate through all of the type systems that are created. Return true from
+ // callback to keep iterating, false to stop iterating.
void ForEach(std::function<bool(TypeSystem *)> const &callback);
TypeSystem *GetTypeSystemForLanguage(lldb::LanguageType language,
Modified: lldb/trunk/include/lldb/Symbol/UnwindPlan.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/UnwindPlan.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Symbol/UnwindPlan.h (original)
+++ lldb/trunk/include/lldb/Symbol/UnwindPlan.h Mon Apr 30 09:49:04 2018
@@ -25,28 +25,25 @@
namespace lldb_private {
-// The UnwindPlan object specifies how to unwind out of a function - where
-// this function saves the caller's register values before modifying them
-// (for non-volatile aka saved registers) and how to find this frame's
-// Canonical Frame Address (CFA).
-
-// Most commonly, registers are saved on the stack, offset some bytes from
-// the Canonical Frame Address, or CFA, which is the starting address of
-// this function's stack frame (the CFA is same as the eh_frame's CFA,
-// whatever that may be on a given architecture).
-// The CFA address for the stack frame does not change during
-// the lifetime of the function.
+// The UnwindPlan object specifies how to unwind out of a function - where this
+// function saves the caller's register values before modifying them (for non-
+// volatile aka saved registers) and how to find this frame's Canonical Frame
+// Address (CFA).
+
+// Most commonly, registers are saved on the stack, offset some bytes from the
+// Canonical Frame Address, or CFA, which is the starting address of this
+// function's stack frame (the CFA is same as the eh_frame's CFA, whatever that
+// may be on a given architecture). The CFA address for the stack frame does
+// not change during the lifetime of the function.
// Internally, the UnwindPlan is structured as a vector of register locations
// organized by code address in the function, showing which registers have been
-// saved at that point and where they are saved.
-// It can be thought of as the expanded table form of the DWARF CFI
-// encoded information.
+// saved at that point and where they are saved. It can be thought of as the
+// expanded table form of the DWARF CFI encoded information.
// Other unwind information sources will be converted into UnwindPlans before
-// being added to a FuncUnwinders object. The unwind source may be
-// an eh_frame FDE, a DWARF debug_frame FDE, or assembly language based
-// prologue analysis.
+// being added to a FuncUnwinders object. The unwind source may be an eh_frame
+// FDE, a DWARF debug_frame FDE, or assembly language based prologue analysis.
// The UnwindPlan is the canonical form of this information that the unwinder
// code will use when walking the stack.
@@ -371,12 +368,10 @@ public:
void InsertRow(const RowSP &row_sp, bool replace_existing = false);
// Returns a pointer to the best row for the given offset into the function's
- // instructions.
- // If offset is -1 it indicates that the function start is unknown - the final
- // row in the UnwindPlan is returned.
- // In practice, the UnwindPlan for a function with no known start address will
- // be the architectural default
- // UnwindPlan which will only have one row.
+ // instructions. If offset is -1 it indicates that the function start is
+ // unknown - the final row in the UnwindPlan is returned. In practice, the
+ // UnwindPlan for a function with no known start address will be the
+ // architectural default UnwindPlan which will only have one row.
UnwindPlan::RowSP GetRowForFunctionOffset(int offset) const;
lldb::RegisterKind GetRegisterKind() const { return m_register_kind; }
@@ -427,15 +422,13 @@ public:
}
// Is this UnwindPlan valid at all instructions? If not, then it is assumed
- // valid at call sites,
- // e.g. for exception handling.
+ // valid at call sites, e.g. for exception handling.
lldb_private::LazyBool GetUnwindPlanValidAtAllInstructions() const {
return m_plan_is_valid_at_all_instruction_locations;
}
// Is this UnwindPlan valid at all instructions? If not, then it is assumed
- // valid at call sites,
- // e.g. for exception handling.
+ // valid at call sites, e.g. for exception handling.
void SetUnwindPlanValidAtAllInstructions(
lldb_private::LazyBool valid_at_all_insn) {
m_plan_is_valid_at_all_instruction_locations = valid_at_all_insn;
Modified: lldb/trunk/include/lldb/Symbol/UnwindTable.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/UnwindTable.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Symbol/UnwindTable.h (original)
+++ lldb/trunk/include/lldb/Symbol/UnwindTable.h Mon Apr 30 09:49:04 2018
@@ -18,8 +18,8 @@
namespace lldb_private {
// A class which holds all the FuncUnwinders objects for a given ObjectFile.
-// The UnwindTable is populated with FuncUnwinders objects lazily during
-// the debug session.
+// The UnwindTable is populated with FuncUnwinders objects lazily during the
+// debug session.
class UnwindTable {
public:
@@ -39,16 +39,13 @@ public:
bool GetAllowAssemblyEmulationUnwindPlans();
// Normally when we create a new FuncUnwinders object we track it in this
- // UnwindTable so it can
- // be reused later. But for the target modules show-unwind we want to create
- // brand new
- // UnwindPlans for the function of interest - so ignore any existing
- // FuncUnwinders for that
- // function and don't add this new one to our UnwindTable.
- // This FuncUnwinders object does have a reference to the UnwindTable but the
- // lifetime of this
- // uncached FuncUnwinders is expected to be short so in practice this will not
- // be a problem.
+ // UnwindTable so it can be reused later. But for the target modules show-
+ // unwind we want to create brand new UnwindPlans for the function of
+ // interest - so ignore any existing FuncUnwinders for that function and
+ // don't add this new one to our UnwindTable. This FuncUnwinders object does
+ // have a reference to the UnwindTable but the lifetime of this uncached
+ // FuncUnwinders is expected to be short so in practice this will not be a
+ // problem.
lldb::FuncUnwindersSP
GetUncachedFuncUnwindersContainingAddress(const Address &addr,
SymbolContext &sc);
Modified: lldb/trunk/include/lldb/Symbol/Variable.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/Variable.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Symbol/Variable.h (original)
+++ lldb/trunk/include/lldb/Symbol/Variable.h Mon Apr 30 09:49:04 2018
@@ -53,11 +53,11 @@ public:
SymbolContextScope *GetSymbolContextScope() const { return m_owner_scope; }
- // Since a variable can have a basename "i" and also a mangled
- // named "_ZN12_GLOBAL__N_11iE" and a demangled mangled name
- // "(anonymous namespace)::i", this function will allow a generic match
- // function that can be called by commands and expression parsers to make
- // sure we match anything we come across.
+ // Since a variable can have a basename "i" and also a mangled named
+ // "_ZN12_GLOBAL__N_11iE" and a demangled mangled name "(anonymous
+ // namespace)::i", this function will allow a generic match function that can
+ // be called by commands and expression parsers to make sure we match
+ // anything we come across.
bool NameMatches(const ConstString &name) const;
bool NameMatches(const RegularExpression ®ex) const;
Modified: lldb/trunk/include/lldb/Symbol/VariableList.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/VariableList.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Symbol/VariableList.h (original)
+++ lldb/trunk/include/lldb/Symbol/VariableList.h Mon Apr 30 09:49:04 2018
@@ -50,11 +50,11 @@ public:
size_t AppendVariablesIfUnique(VariableList &var_list);
- // Returns the actual number of unique variables that were added to the
- // list. "total_matches" will get updated with the actually number of
- // matches that were found regardless of whether they were unique or not
- // to allow for error conditions when nothing is found, versus conditions
- // where any variables that match "regex" were already in "var_list".
+ // Returns the actual number of unique variables that were added to the list.
+ // "total_matches" will get updated with the actually number of matches that
+ // were found regardless of whether they were unique or not to allow for
+ // error conditions when nothing is found, versus conditions where any
+ // variables that match "regex" were already in "var_list".
size_t AppendVariablesIfUnique(const RegularExpression ®ex,
VariableList &var_list, size_t &total_matches);
Modified: lldb/trunk/include/lldb/Target/ABI.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/ABI.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/ABI.h (original)
+++ lldb/trunk/include/lldb/Target/ABI.h Mon Apr 30 09:49:04 2018
@@ -82,8 +82,7 @@ public:
protected:
// This is the method the ABI will call to actually calculate the return
- // value.
- // Don't put it in a persistent value object, that will be done by the
+ // value. Don't put it in a persistent value object, that will be done by the
// ABI::GetReturnValueObject.
virtual lldb::ValueObjectSP
GetReturnValueObjectImpl(Thread &thread, CompilerType &ast_type) const = 0;
@@ -118,17 +117,17 @@ public:
// restrictions (4, 8 or 16 byte aligned), and zero is usually not allowed.
// This function should return true if "cfa" is valid call frame address for
// the ABI, and false otherwise. This is used by the generic stack frame
- // unwinding
- // code to help determine when a stack ends.
+ // unwinding code to help determine when a stack ends.
virtual bool CallFrameAddressIsValid(lldb::addr_t cfa) = 0;
- // Validates a possible PC value and returns true if an opcode can be at "pc".
+ // Validates a possible PC value and returns true if an opcode can be at
+ // "pc".
virtual bool CodeAddressIsValid(lldb::addr_t pc) = 0;
virtual lldb::addr_t FixCodeAddress(lldb::addr_t pc) {
- // Some targets might use bits in a code address to indicate
- // a mode switch. ARM uses bit zero to signify a code address is
- // thumb, so any ARM ABI plug-ins would strip those bits.
+ // Some targets might use bits in a code address to indicate a mode switch.
+ // ARM uses bit zero to signify a code address is thumb, so any ARM ABI
+ // plug-ins would strip those bits.
return pc;
}
Modified: lldb/trunk/include/lldb/Target/DynamicLoader.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/DynamicLoader.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/DynamicLoader.h (original)
+++ lldb/trunk/include/lldb/Target/DynamicLoader.h Mon Apr 30 09:49:04 2018
@@ -356,8 +356,8 @@ protected:
// Return -1 if the read fails, otherwise return the result as an int64_t.
int64_t ReadUnsignedIntWithSizeInBytes(lldb::addr_t addr, int size_in_bytes);
- // Read a pointer from memory at the given addr.
- // Return LLDB_INVALID_ADDRESS if the read fails.
+ // Read a pointer from memory at the given addr. Return LLDB_INVALID_ADDRESS
+ // if the read fails.
lldb::addr_t ReadPointer(lldb::addr_t addr);
// Calls into the Process protected method LoadOperatingSystemPlugin:
Modified: lldb/trunk/include/lldb/Target/ExecutionContext.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/ExecutionContext.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/ExecutionContext.h (original)
+++ lldb/trunk/include/lldb/Target/ExecutionContext.h Mon Apr 30 09:49:04 2018
@@ -384,8 +384,7 @@ public:
bool thread_and_frame_only_if_stopped = false);
// These two variants take in a locker, and grab the target, lock the API
- // mutex into locker, then
- // fill in the rest of the shared pointers.
+ // mutex into locker, then fill in the rest of the shared pointers.
ExecutionContext(const ExecutionContextRef &exe_ctx_ref,
std::unique_lock<std::recursive_mutex> &locker);
ExecutionContext(const ExecutionContextRef *exe_ctx_ref,
@@ -616,36 +615,35 @@ public:
//------------------------------------------------------------------
// Set the execution context using a target shared pointer.
//
- // If "target_sp" is valid, sets the target context to match and
- // if "get_process" is true, sets the process shared pointer if
- // the target currently has a process.
+ // If "target_sp" is valid, sets the target context to match and if
+ // "get_process" is true, sets the process shared pointer if the target
+ // currently has a process.
//------------------------------------------------------------------
void SetContext(const lldb::TargetSP &target_sp, bool get_process);
//------------------------------------------------------------------
// Set the execution context using a process shared pointer.
//
- // If "process_sp" is valid, then set the process and target in this
- // context. Thread and frame contexts will be cleared.
- // If "process_sp" is not valid, all shared pointers are reset.
+ // If "process_sp" is valid, then set the process and target in this context.
+ // Thread and frame contexts will be cleared. If "process_sp" is not valid,
+ // all shared pointers are reset.
//------------------------------------------------------------------
void SetContext(const lldb::ProcessSP &process_sp);
//------------------------------------------------------------------
// Set the execution context using a thread shared pointer.
//
- // If "thread_sp" is valid, then set the thread, process and target
- // in this context. The frame context will be cleared.
- // If "thread_sp" is not valid, all shared pointers are reset.
+ // If "thread_sp" is valid, then set the thread, process and target in this
+ // context. The frame context will be cleared. If "thread_sp" is not valid,
+ // all shared pointers are reset.
//------------------------------------------------------------------
void SetContext(const lldb::ThreadSP &thread_sp);
//------------------------------------------------------------------
// Set the execution context using a frame shared pointer.
//
- // If "frame_sp" is valid, then set the frame, thread, process and
- // target in this context
- // If "frame_sp" is not valid, all shared pointers are reset.
+ // If "frame_sp" is valid, then set the frame, thread, process and target in
+ // this context If "frame_sp" is not valid, all shared pointers are reset.
//------------------------------------------------------------------
void SetContext(const lldb::StackFrameSP &frame_sp);
Modified: lldb/trunk/include/lldb/Target/Language.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/Language.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/Language.h (original)
+++ lldb/trunk/include/lldb/Target/Language.h Mon Apr 30 09:49:04 2018
@@ -184,19 +184,16 @@ public:
virtual const char *GetLanguageSpecificTypeLookupHelp();
// if an individual data formatter can apply to several types and cross a
- // language boundary
- // it makes sense for individual languages to want to customize the printing
- // of values of that
- // type by appending proper prefix/suffix information in language-specific
- // ways
+ // language boundary it makes sense for individual languages to want to
+ // customize the printing of values of that type by appending proper
+ // prefix/suffix information in language-specific ways
virtual bool GetFormatterPrefixSuffix(ValueObject &valobj,
ConstString type_hint,
std::string &prefix,
std::string &suffix);
// if a language has a custom format for printing variable declarations that
- // it wants LLDB to honor
- // it should return an appropriate closure here
+ // it wants LLDB to honor it should return an appropriate closure here
virtual DumpValueObjectOptions::DeclPrintingHelper GetDeclPrintingHelper();
virtual LazyBool IsLogicalTrue(ValueObject &valobj, Status &error);
@@ -206,11 +203,9 @@ public:
virtual bool IsNilReference(ValueObject &valobj);
// for a ValueObject of some "reference type", if the language provides a
- // technique
- // to decide whether the reference has ever been assigned to some object, this
- // method
- // will return true if such detection is possible, and if the reference has
- // never been assigned
+ // technique to decide whether the reference has ever been assigned to some
+ // object, this method will return true if such detection is possible, and if
+ // the reference has never been assigned
virtual bool IsUninitializedReference(ValueObject &valobj);
virtual bool GetFunctionDisplayName(const SymbolContext *sc,
Modified: lldb/trunk/include/lldb/Target/LanguageRuntime.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/LanguageRuntime.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/LanguageRuntime.h (original)
+++ lldb/trunk/include/lldb/Target/LanguageRuntime.h Mon Apr 30 09:49:04 2018
@@ -85,26 +85,23 @@ public:
Address &address,
Value::ValueType &value_type) = 0;
- // This call should return a CompilerType given a generic type name
- // and an ExecutionContextScope in which one can actually fetch
- // any specialization information required.
+ // This call should return a CompilerType given a generic type name and an
+ // ExecutionContextScope in which one can actually fetch any specialization
+ // information required.
virtual CompilerType GetConcreteType(ExecutionContextScope *exe_scope,
ConstString abstract_type_name) {
return CompilerType();
}
// This should be a fast test to determine whether it is likely that this
- // value would
- // have a dynamic type.
+ // value would have a dynamic type.
virtual bool CouldHaveDynamicValue(ValueObject &in_value) = 0;
// The contract for GetDynamicTypeAndAddress() is to return a "bare-bones"
- // dynamic type
- // For instance, given a Base* pointer, GetDynamicTypeAndAddress() will return
- // the type of
- // Derived, not Derived*. The job of this API is to correct this misalignment
- // between the
- // static type and the discovered dynamic type
+ // dynamic type For instance, given a Base* pointer,
+ // GetDynamicTypeAndAddress() will return the type of Derived, not Derived*.
+ // The job of this API is to correct this misalignment between the static
+ // type and the discovered dynamic type
virtual TypeAndOrName FixUpDynamicType(const TypeAndOrName &type_and_or_name,
ValueObject &static_value) = 0;
@@ -144,18 +141,16 @@ public:
virtual void ModulesDidLoad(const ModuleList &module_list) {}
- // Called by the Clang expression evaluation engine to allow runtimes to alter
- // the set of target options provided to
- // the compiler.
- // If the options prototype is modified, runtimes must return true, false
- // otherwise.
+ // Called by the Clang expression evaluation engine to allow runtimes to
+ // alter the set of target options provided to the compiler. If the options
+ // prototype is modified, runtimes must return true, false otherwise.
virtual bool GetOverrideExprOptions(clang::TargetOptions &prototype) {
return false;
}
// Called by ClangExpressionParser::PrepareForExecution to query for any
- // custom LLVM IR passes
- // that need to be run before an expression is assembled and run.
+ // custom LLVM IR passes that need to be run before an expression is
+ // assembled and run.
virtual bool GetIRPasses(LLVMUserExpression::IRPasses &custom_passes) {
return false;
}
Modified: lldb/trunk/include/lldb/Target/Memory.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/Memory.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/Memory.h (original)
+++ lldb/trunk/include/lldb/Target/Memory.h Mon Apr 30 09:49:04 2018
@@ -120,8 +120,8 @@ protected:
//----------------------------------------------------------------------
// A class that can track allocated memory and give out allocated memory
-// without us having to make an allocate/deallocate call every time we
-// need some memory in a process that is being debugged.
+// without us having to make an allocate/deallocate call every time we need
+// some memory in a process that is being debugged.
//----------------------------------------------------------------------
class AllocatedMemoryCache {
public:
Modified: lldb/trunk/include/lldb/Target/MemoryRegionInfo.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/MemoryRegionInfo.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/MemoryRegionInfo.h (original)
+++ lldb/trunk/include/lldb/Target/MemoryRegionInfo.h Mon Apr 30 09:49:04 2018
@@ -67,8 +67,8 @@ public:
void SetBlocksize(lldb::offset_t blocksize) { m_blocksize = blocksize; }
//----------------------------------------------------------------------
- // Get permissions as a uint32_t that is a mask of one or more bits from
- // the lldb::Permissions
+ // Get permissions as a uint32_t that is a mask of one or more bits from the
+ // lldb::Permissions
//----------------------------------------------------------------------
uint32_t GetLLDBPermissions() const {
uint32_t permissions = 0;
@@ -82,8 +82,8 @@ public:
}
//----------------------------------------------------------------------
- // Set permissions from a uint32_t that contains one or more bits from
- // the lldb::Permissions
+ // Set permissions from a uint32_t that contains one or more bits from the
+ // lldb::Permissions
//----------------------------------------------------------------------
void SetLLDBPermissions(uint32_t permissions) {
m_read = (permissions & lldb::ePermissionsReadable) ? eYes : eNo;
Modified: lldb/trunk/include/lldb/Target/ObjCLanguageRuntime.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/ObjCLanguageRuntime.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/ObjCLanguageRuntime.h (original)
+++ lldb/trunk/include/lldb/Target/ObjCLanguageRuntime.h Mon Apr 30 09:49:04 2018
@@ -48,10 +48,9 @@ public:
class ClassDescriptor;
typedef std::shared_ptr<ClassDescriptor> ClassDescriptorSP;
- // the information that we want to support retrieving from an ObjC class
- // this needs to be pure virtual since there are at least 2 different
- // implementations
- // of the runtime, and more might come
+ // the information that we want to support retrieving from an ObjC class this
+ // needs to be pure virtual since there are at least 2 different
+ // implementations of the runtime, and more might come
class ClassDescriptor {
public:
ClassDescriptor()
@@ -66,8 +65,8 @@ public:
virtual ClassDescriptorSP GetMetaclass() const = 0;
- // virtual if any implementation has some other version-specific rules
- // but for the known v1/v2 this is all that needs to be done
+ // virtual if any implementation has some other version-specific rules but
+ // for the known v1/v2 this is all that needs to be done
virtual bool IsKVO() {
if (m_is_kvo == eLazyBoolCalculate) {
const char *class_name = GetClassName().AsCString();
@@ -78,8 +77,8 @@ public:
return (m_is_kvo == eLazyBoolYes);
}
- // virtual if any implementation has some other version-specific rules
- // but for the known v1/v2 this is all that needs to be done
+ // virtual if any implementation has some other version-specific rules but
+ // for the known v1/v2 this is all that needs to be done
virtual bool IsCFType() {
if (m_is_cf == eLazyBoolCalculate) {
const char *class_name = GetClassName().AsCString();
@@ -268,15 +267,14 @@ public:
virtual DeclVendor *GetDeclVendor() { return nullptr; }
// Finds the byte offset of the child_type ivar in parent_type. If it can't
- // find the
- // offset, returns LLDB_INVALID_IVAR_OFFSET.
+ // find the offset, returns LLDB_INVALID_IVAR_OFFSET.
virtual size_t GetByteOffsetForIvar(CompilerType &parent_qual_type,
const char *ivar_name);
- // Given the name of an Objective-C runtime symbol (e.g., ivar offset symbol),
- // try to determine from the runtime what the value of that symbol would be.
- // Useful when the underlying binary is stripped.
+ // Given the name of an Objective-C runtime symbol (e.g., ivar offset
+ // symbol), try to determine from the runtime what the value of that symbol
+ // would be. Useful when the underlying binary is stripped.
virtual lldb::addr_t LookupRuntimeSymbol(const ConstString &name) {
return LLDB_INVALID_ADDRESS;
}
@@ -334,8 +332,7 @@ protected:
private:
// We keep a map of <Class,Selector>->Implementation so we don't have to call
- // the resolver
- // function over and over.
+ // the resolver function over and over.
// FIXME: We need to watch for the loading of Protocols, and flush the cache
// for any
Modified: lldb/trunk/include/lldb/Target/Platform.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/Platform.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/Platform.h (original)
+++ lldb/trunk/include/lldb/Target/Platform.h Mon Apr 30 09:49:04 2018
@@ -259,9 +259,9 @@ public:
//------------------------------------------------------------------
// Subclasses must be able to fetch the current OS version
//
- // Remote classes must be connected for this to succeed. Local
- // subclasses don't need to override this function as it will just
- // call the HostInfo::GetOSVersion().
+ // Remote classes must be connected for this to succeed. Local subclasses
+ // don't need to override this function as it will just call the
+ // HostInfo::GetOSVersion().
//------------------------------------------------------------------
virtual bool GetRemoteOSVersion() { return false; }
@@ -322,8 +322,8 @@ public:
//----------------------------------------------------------------------
// Locate the scripting resource given a module specification.
//
- // Locating the file should happen only on the local computer or using
- // the current computers global settings.
+ // Locating the file should happen only on the local computer or using the
+ // current computers global settings.
//----------------------------------------------------------------------
virtual FileSpecList
LocateExecutableScriptingResources(Target *target, Module &module,
@@ -467,8 +467,8 @@ public:
// Status &error) = 0;
//------------------------------------------------------------------
- // The base class Platform will take care of the host platform.
- // Subclasses will need to fill in the remote case.
+ // The base class Platform will take care of the host platform. Subclasses
+ // will need to fill in the remote case.
//------------------------------------------------------------------
virtual uint32_t FindProcesses(const ProcessInstanceInfoMatch &match_info,
ProcessInstanceInfoList &proc_infos);
@@ -476,15 +476,15 @@ public:
virtual bool GetProcessInfo(lldb::pid_t pid, ProcessInstanceInfo &proc_info);
//------------------------------------------------------------------
- // Set a breakpoint on all functions that can end up creating a thread
- // for this platform. This is needed when running expressions and
- // also for process control.
+ // Set a breakpoint on all functions that can end up creating a thread for
+ // this platform. This is needed when running expressions and also for
+ // process control.
//------------------------------------------------------------------
virtual lldb::BreakpointSP SetThreadCreationBreakpoint(Target &target);
//------------------------------------------------------------------
- // Given a target, find the local SDK directory if one exists on the
- // current host.
+ // Given a target, find the local SDK directory if one exists on the current
+ // host.
//------------------------------------------------------------------
virtual lldb_private::ConstString
GetSDKDirectory(lldb_private::Target &target) {
@@ -533,8 +533,8 @@ public:
void SetSDKBuild(const ConstString &sdk_build) { m_sdk_build = sdk_build; }
- // Override this to return true if your platform supports Clang modules.
- // You may also need to override AddClangModuleCompilationOptions to pass the
+ // Override this to return true if your platform supports Clang modules. You
+ // may also need to override AddClangModuleCompilationOptions to pass the
// right Clang flags for your platform.
virtual bool SupportsModules() { return false; }
@@ -549,9 +549,8 @@ public:
bool SetWorkingDirectory(const FileSpec &working_dir);
// There may be modules that we don't want to find by default for operations
- // like "setting breakpoint by name".
- // The platform will return "true" from this call if the passed in module
- // happens to be one of these.
+ // like "setting breakpoint by name". The platform will return "true" from
+ // this call if the passed in module happens to be one of these.
virtual bool
ModuleIsExcludedForUnconstrainedSearches(Target &target,
@@ -870,11 +869,11 @@ public:
protected:
bool m_is_host;
- // Set to true when we are able to actually set the OS version while
- // being connected. For remote platforms, we might set the version ahead
- // of time before we actually connect and this version might change when
- // we actually connect to a remote platform. For the host platform this
- // will be set to the once we call HostInfo::GetOSVersion().
+ // Set to true when we are able to actually set the OS version while being
+ // connected. For remote platforms, we might set the version ahead of time
+ // before we actually connect and this version might change when we actually
+ // connect to a remote platform. For the host platform this will be set to
+ // the once we call HostInfo::GetOSVersion().
bool m_os_version_set_while_connected;
bool m_system_arch_set_while_connected;
ConstString
@@ -925,9 +924,8 @@ protected:
const char *GetCachedUserName(uint32_t uid) {
std::lock_guard<std::mutex> guard(m_mutex);
- // return the empty string if our string is NULL
- // so we can tell when things were in the negative
- // cached (didn't find a valid user name, don't keep
+ // return the empty string if our string is NULL so we can tell when things
+ // were in the negative cached (didn't find a valid user name, don't keep
// trying)
const auto pos = m_uid_map.find(uid);
return ((pos != m_uid_map.end()) ? pos->second.AsCString("") : nullptr);
@@ -957,9 +955,8 @@ protected:
const char *GetCachedGroupName(uint32_t gid) {
std::lock_guard<std::mutex> guard(m_mutex);
- // return the empty string if our string is NULL
- // so we can tell when things were in the negative
- // cached (didn't find a valid group name, don't keep
+ // return the empty string if our string is NULL so we can tell when things
+ // were in the negative cached (didn't find a valid group name, don't keep
// trying)
const auto pos = m_gid_map.find(gid);
return ((pos != m_gid_map.end()) ? pos->second.AsCString("") : nullptr);
Modified: lldb/trunk/include/lldb/Target/Process.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/Process.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/Process.h (original)
+++ lldb/trunk/include/lldb/Target/Process.h Mon Apr 30 09:49:04 2018
@@ -114,8 +114,8 @@ typedef std::shared_ptr<ProcessPropertie
//----------------------------------------------------------------------
// ProcessInstanceInfo
//
-// Describes an existing process and any discoverable information that
-// pertains to that process.
+// Describes an existing process and any discoverable information that pertains
+// to that process.
//----------------------------------------------------------------------
class ProcessInstanceInfo : public ProcessInfo {
public:
@@ -279,7 +279,8 @@ protected:
class ProcessLaunchCommandOptions : public Options {
public:
ProcessLaunchCommandOptions() : Options() {
- // Keep default values of all options in one place: OptionParsingStarting ()
+ // Keep default values of all options in one place: OptionParsingStarting
+ // ()
OptionParsingStarting(nullptr);
}
@@ -389,10 +390,8 @@ protected:
};
// This class tracks the Modification state of the process. Things that can
-// currently modify
-// the program are running the program (which will up the StopID) and writing
-// memory (which
-// will up the MemoryID.)
+// currently modify the program are running the program (which will up the
+// StopID) and writing memory (which will up the MemoryID.)
// FIXME: Should we also include modification of register states?
class ProcessModID {
@@ -540,12 +539,11 @@ public:
enum Warnings { eWarningsOptimization = 1 };
typedef Range<lldb::addr_t, lldb::addr_t> LoadRange;
- // We use a read/write lock to allow on or more clients to
- // access the process state while the process is stopped (reader).
- // We lock the write lock to control access to the process
- // while it is running (readers, or clients that want the process
- // stopped can block waiting for the process to stop, or just
- // try to lock it to see if they can immediately access the stopped
+ // We use a read/write lock to allow on or more clients to access the process
+ // state while the process is stopped (reader). We lock the write lock to
+ // control access to the process while it is running (readers, or clients
+ // that want the process stopped can block waiting for the process to stop,
+ // or just try to lock it to see if they can immediately access the stopped
// process. If the try read lock fails, then the process is running.
typedef ProcessRunLock::ProcessRunLocker StopLocker;
@@ -810,18 +808,16 @@ public:
//------------------------------------------------------------------
// FUTURE WORK: {Set,Get}LoadImageUtilityFunction are the first use we've
// had of having other plugins cache data in the Process. This is handy for
- // long-living plugins - like the Platform - which manage interactions whose
- // lifetime is governed by the Process lifetime. If we find we need to do
+ // long-living plugins - like the Platform - which manage interactions whose
+ // lifetime is governed by the Process lifetime. If we find we need to do
// this more often, we should construct a general solution to the problem.
// The consensus suggestion was that we have a token based registry in the
- // Process.
- // Some undecided questions are
- // (1) who manages the tokens. It's probably best that you add the element
- // and get back a token that represents it. That will avoid collisions. But
- // there may be some utility in the registerer controlling the token?
- // (2) whether the thing added should be simply owned by Process, and
- // just go away when it does
- // (3) whether the registree should be notified of the Process' demise.
+ // Process. Some undecided questions are (1) who manages the tokens. It's
+ // probably best that you add the element and get back a token that
+ // represents it. That will avoid collisions. But there may be some utility
+ // in the registerer controlling the token? (2) whether the thing added
+ // should be simply owned by Process, and just go away when it does (3)
+ // whether the registree should be notified of the Process' demise.
//
// We are postponing designing this till we have at least a second use case.
//------------------------------------------------------------------
@@ -1565,8 +1561,8 @@ public:
//------------------------------------------------------------------
// Notify this process class that modules got loaded.
//
- // If subclasses override this method, they must call this version
- // before doing anything in the subclass version of the function.
+ // If subclasses override this method, they must call this version before
+ // doing anything in the subclass version of the function.
//------------------------------------------------------------------
virtual void ModulesDidLoad(ModuleList &module_list);
@@ -1604,16 +1600,14 @@ public:
}
// On macOS 10.12, tvOS 10, iOS 10, watchOS 3 and newer, debugserver can
- // return
- // the full list of loaded shared libraries without needing any input.
+ // return the full list of loaded shared libraries without needing any input.
virtual lldb_private::StructuredData::ObjectSP
GetLoadedDynamicLibrariesInfos() {
return StructuredData::ObjectSP();
}
// On macOS 10.12, tvOS 10, iOS 10, watchOS 3 and newer, debugserver can
- // return
- // information about binaries given their load addresses.
+ // return information about binaries given their load addresses.
virtual lldb_private::StructuredData::ObjectSP GetLoadedDynamicLibrariesInfos(
const std::vector<lldb::addr_t> &load_addresses) {
return StructuredData::ObjectSP();
@@ -1623,10 +1617,9 @@ public:
// Get information about the library shared cache, if that exists
//
// On macOS 10.12, tvOS 10, iOS 10, watchOS 3 and newer, debugserver can
- // return
- // information about the library shared cache (a set of standard libraries
- // that are
- // loaded at the same location for all processes on a system) in use.
+ // return information about the library shared cache (a set of standard
+ // libraries that are loaded at the same location for all processes on a
+ // system) in use.
//------------------------------------------------------------------
virtual lldb_private::StructuredData::ObjectSP GetSharedCacheInfo() {
return StructuredData::ObjectSP();
@@ -2371,9 +2364,9 @@ public:
}
// This is implemented completely using the lldb::Process API. Subclasses
- // don't need to implement this function unless the standard flow of
- // read existing opcode, write breakpoint opcode, verify breakpoint opcode
- // doesn't work for a specific process plug-in.
+ // don't need to implement this function unless the standard flow of read
+ // existing opcode, write breakpoint opcode, verify breakpoint opcode doesn't
+ // work for a specific process plug-in.
virtual Status EnableSoftwareBreakpoint(BreakpointSite *bp_site);
// This is implemented completely using the lldb::Process API. Subclasses
@@ -2397,8 +2390,8 @@ public:
Status EnableBreakpointSiteByID(lldb::user_id_t break_id);
- // BreakpointLocations use RemoveOwnerFromBreakpointSite to remove
- // themselves from the owner's list of this breakpoint sites.
+ // BreakpointLocations use RemoveOwnerFromBreakpointSite to remove themselves
+ // from the owner's list of this breakpoint sites.
void RemoveOwnerFromBreakpointSite(lldb::user_id_t owner_id,
lldb::user_id_t owner_loc_id,
lldb::BreakpointSiteSP &bp_site_sp);
@@ -2420,11 +2413,10 @@ public:
ThreadList &GetThreadList() { return m_thread_list; }
- // When ExtendedBacktraces are requested, the HistoryThreads that are
- // created need an owner -- they're saved here in the Process. The
- // threads in this list are not iterated over - driver programs need to
- // request the extended backtrace calls starting from a root concrete
- // thread one by one.
+ // When ExtendedBacktraces are requested, the HistoryThreads that are created
+ // need an owner -- they're saved here in the Process. The threads in this
+ // list are not iterated over - driver programs need to request the extended
+ // backtrace calls starting from a root concrete thread one by one.
ThreadList &GetExtendedThreadList() { return m_extended_thread_list; }
ThreadList::ThreadIterable Threads() { return m_thread_list.Threads(); }
@@ -2436,10 +2428,9 @@ public:
// Returns true if an index id has been assigned to a thread.
bool HasAssignedIndexIDToThread(uint64_t sb_thread_id);
- // Given a thread_id, it will assign a more reasonable index id for display to
- // the user.
- // If the thread_id has previously been assigned, the same index id will be
- // used.
+ // Given a thread_id, it will assign a more reasonable index id for display
+ // to the user. If the thread_id has previously been assigned, the same index
+ // id will be used.
uint32_t AssignIndexIDToThread(uint64_t thread_id);
//------------------------------------------------------------------
@@ -2464,13 +2455,11 @@ public:
lldb::StateType GetNextEvent(lldb::EventSP &event_sp);
// Returns the process state when it is stopped. If specified, event_sp_ptr
- // is set to the event which triggered the stop. If wait_always = false,
- // and the process is already stopped, this function returns immediately.
- // If the process is hijacked and use_run_lock is true (the default), then
- // this
+ // is set to the event which triggered the stop. If wait_always = false, and
+ // the process is already stopped, this function returns immediately. If the
+ // process is hijacked and use_run_lock is true (the default), then this
// function releases the run lock after the stop. Setting use_run_lock to
- // false
- // will avoid this behavior.
+ // false will avoid this behavior.
lldb::StateType
WaitForProcessToStop(const Timeout<std::micro> &timeout,
lldb::EventSP *event_sp_ptr = nullptr,
@@ -2628,27 +2617,26 @@ public:
void SetSTDIOFileDescriptor(int file_descriptor);
//------------------------------------------------------------------
- // Add a permanent region of memory that should never be read or
- // written to. This can be used to ensure that memory reads or writes
- // to certain areas of memory never end up being sent to the
- // DoReadMemory or DoWriteMemory functions which can improve
- // performance.
+ // Add a permanent region of memory that should never be read or written to.
+ // This can be used to ensure that memory reads or writes to certain areas of
+ // memory never end up being sent to the DoReadMemory or DoWriteMemory
+ // functions which can improve performance.
//------------------------------------------------------------------
void AddInvalidMemoryRegion(const LoadRange ®ion);
//------------------------------------------------------------------
- // Remove a permanent region of memory that should never be read or
- // written to that was previously added with AddInvalidMemoryRegion.
+ // Remove a permanent region of memory that should never be read or written
+ // to that was previously added with AddInvalidMemoryRegion.
//------------------------------------------------------------------
bool RemoveInvalidMemoryRange(const LoadRange ®ion);
//------------------------------------------------------------------
// If the setup code of a thread plan needs to do work that might involve
- // calling a function in the target, it should not do that work directly
- // in one of the thread plan functions (DidPush/WillResume) because
- // such work needs to be handled carefully. Instead, put that work in
- // a PreResumeAction callback, and register it with the process. It will
- // get done before the actual "DoResume" gets called.
+ // calling a function in the target, it should not do that work directly in
+ // one of the thread plan functions (DidPush/WillResume) because such work
+ // needs to be handled carefully. Instead, put that work in a
+ // PreResumeAction callback, and register it with the process. It will get
+ // done before the actual "DoResume" gets called.
//------------------------------------------------------------------
typedef bool(PreResumeActionCallback)(void *);
@@ -2936,15 +2924,14 @@ protected:
const char *fmt, ...) __attribute__((format(printf, 4, 5)));
//------------------------------------------------------------------
- // NextEventAction provides a way to register an action on the next
- // event that is delivered to this process. There is currently only
- // one next event action allowed in the process at one time. If a
- // new "NextEventAction" is added while one is already present, the
- // old action will be discarded (with HandleBeingUnshipped called
- // after it is discarded.)
+ // NextEventAction provides a way to register an action on the next event
+ // that is delivered to this process. There is currently only one next event
+ // action allowed in the process at one time. If a new "NextEventAction" is
+ // added while one is already present, the old action will be discarded (with
+ // HandleBeingUnshipped called after it is discarded.)
//
- // If you want to resume the process as a result of a resume action,
- // call RequestResume, don't call Resume directly.
+ // If you want to resume the process as a result of a resume action, call
+ // RequestResume, don't call Resume directly.
//------------------------------------------------------------------
class NextEventAction {
public:
@@ -3158,11 +3145,11 @@ protected:
bool m_currently_handling_do_on_removals;
bool m_resume_requested; // If m_currently_handling_event or
// m_currently_handling_do_on_removals are true,
- // Resume will only request a resume, using this flag
- // to check.
+ // Resume will only request a resume, using this
+ // flag to check.
bool m_finalizing; // This is set at the beginning of Process::Finalize() to
- // stop functions from looking up or creating things during
- // a finalize call
+ // stop functions from looking up or creating things
+ // during a finalize call
bool m_finalize_called; // This is set at the end of Process::Finalize()
bool m_clear_thread_plans_on_stop;
bool m_force_next_event_delivery;
@@ -3213,12 +3200,9 @@ private:
static lldb::thread_result_t PrivateStateThread(void *arg);
// The starts up the private state thread that will watch for events from the
- // debugee.
- // Pass true for is_secondary_thread in the case where you have to temporarily
- // spin up a
- // secondary state thread to handle events from a hand-called function on the
- // primary
- // private state thread.
+ // debugee. Pass true for is_secondary_thread in the case where you have to
+ // temporarily spin up a secondary state thread to handle events from a hand-
+ // called function on the primary private state thread.
lldb::thread_result_t RunPrivateStateThread(bool is_secondary_thread);
@@ -3231,8 +3215,7 @@ protected:
const Timeout<std::micro> &timeout);
// This waits for both the state change broadcaster, and the control
- // broadcaster.
- // If control_only, it only waits for the control broadcaster.
+ // broadcaster. If control_only, it only waits for the control broadcaster.
bool GetEventsPrivate(lldb::EventSP &event_sp,
const Timeout<std::micro> &timeout, bool control_only);
Modified: lldb/trunk/include/lldb/Target/ProcessInfo.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/ProcessInfo.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/ProcessInfo.h (original)
+++ lldb/trunk/include/lldb/Target/ProcessInfo.h Mon Apr 30 09:49:04 2018
@@ -21,9 +21,9 @@ namespace lldb_private {
// ProcessInfo
//
// A base class for information for a process. This can be used to fill
-// out information for a process prior to launching it, or it can be
-// used for an instance of a process and can be filled in with the
-// existing values for that process.
+// out information for a process prior to launching it, or it can be used for
+// an instance of a process and can be filled in with the existing values for
+// that process.
//----------------------------------------------------------------------
class ProcessInfo {
public:
@@ -88,9 +88,8 @@ public:
protected:
FileSpec m_executable;
std::string m_arg0; // argv[0] if supported. If empty, then use m_executable.
- // Not all process plug-ins support specifying an argv[0]
- // that differs from the resolved platform executable
- // (which is in m_executable)
+ // Not all process plug-ins support specifying an argv[0] that differs from
+ // the resolved platform executable (which is in m_executable)
Args m_arguments; // All program arguments except argv[0]
Environment m_environment;
uint32_t m_uid;
Modified: lldb/trunk/include/lldb/Target/ProcessLaunchInfo.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/ProcessLaunchInfo.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/ProcessLaunchInfo.h (original)
+++ lldb/trunk/include/lldb/Target/ProcessLaunchInfo.h Mon Apr 30 09:49:04 2018
@@ -110,10 +110,9 @@ public:
bool GetMonitorSignals() const { return m_monitor_signals; }
// If the LaunchInfo has a monitor callback, then arrange to monitor the
- // process.
- // Return true if the LaunchInfo has taken care of monitoring the process, and
- // false if the
- // caller might want to monitor the process themselves.
+ // process. Return true if the LaunchInfo has taken care of monitoring the
+ // process, and false if the caller might want to monitor the process
+ // themselves.
bool MonitorProcess() const;
Modified: lldb/trunk/include/lldb/Target/Queue.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/Queue.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/Queue.h (original)
+++ lldb/trunk/include/lldb/Target/Queue.h Mon Apr 30 09:49:04 2018
@@ -22,15 +22,14 @@ namespace lldb_private {
//------------------------------------------------------------------
// Queue:
-// This class represents a libdispatch aka Grand Central Dispatch
-// queue in the process.
+// This class represents a libdispatch aka Grand Central Dispatch queue in the
+// process.
//
// A program using libdispatch will create queues, put work items
-// (functions, blocks) on the queues. The system will create /
-// reassign pthreads to execute the work items for the queues. A
-// serial queue will be associated with a single thread (or possibly
-// no thread, if it is not doing any work). A concurrent queue may
-// be associated with multiple threads.
+// (functions, blocks) on the queues. The system will create / reassign
+// pthreads to execute the work items for the queues. A serial queue will be
+// associated with a single thread (or possibly no thread, if it is not doing
+// any work). A concurrent queue may be associated with multiple threads.
//------------------------------------------------------------------
class Queue : public std::enable_shared_from_this<Queue> {
Modified: lldb/trunk/include/lldb/Target/QueueItem.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/QueueItem.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/QueueItem.h (original)
+++ lldb/trunk/include/lldb/Target/QueueItem.h Mon Apr 30 09:49:04 2018
@@ -29,12 +29,11 @@ namespace lldb_private {
//------------------------------------------------------------------
// QueueItem:
-// This class represents a work item enqueued on a libdispatch aka
-// Grand Central Dispatch (GCD) queue. Most often, this will be a
-// function or block.
-// "enqueued" here means that the work item has been added to a queue
-// but it has not yet started executing. When it is "dequeued",
-// execution of the item begins.
+// This class represents a work item enqueued on a libdispatch aka Grand
+// Central Dispatch (GCD) queue. Most often, this will be a function or block.
+// "enqueued" here means that the work item has been added to a queue but it
+// has not yet started executing. When it is "dequeued", execution of the item
+// begins.
//------------------------------------------------------------------
class QueueItem : public std::enable_shared_from_this<QueueItem> {
Modified: lldb/trunk/include/lldb/Target/QueueList.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/QueueList.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/QueueList.h (original)
+++ lldb/trunk/include/lldb/Target/QueueList.h Mon Apr 30 09:49:04 2018
@@ -21,12 +21,11 @@ namespace lldb_private {
//------------------------------------------------------------------
// QueueList:
-// This is the container for libdispatch aka Grand Central Dispatch
-// Queue objects.
+// This is the container for libdispatch aka Grand Central Dispatch Queue
+// objects.
//
-// Each Process will have a QueueList. When the process execution is
-// paused, the QueueList may be populated with Queues by the
-// SystemRuntime.
+// Each Process will have a QueueList. When the process execution is paused,
+// the QueueList may be populated with Queues by the SystemRuntime.
//------------------------------------------------------------------
class QueueList {
Modified: lldb/trunk/include/lldb/Target/RegisterCheckpoint.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/RegisterCheckpoint.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/RegisterCheckpoint.h (original)
+++ lldb/trunk/include/lldb/Target/RegisterCheckpoint.h Mon Apr 30 09:49:04 2018
@@ -16,20 +16,19 @@
namespace lldb_private {
-// Inherit from UserID in case pushing/popping all register values can be
-// done using a 64 bit integer that holds a baton/cookie instead of actually
-// having to read all register values into a buffer
+// Inherit from UserID in case pushing/popping all register values can be done
+// using a 64 bit integer that holds a baton/cookie instead of actually having
+// to read all register values into a buffer
class RegisterCheckpoint : public UserID {
public:
enum class Reason {
// An expression is about to be run on the thread if the protocol that
// talks to the debuggee supports checkpointing the registers using a
- // push/pop then the UserID base class in the RegisterCheckpoint can
- // be used to store the baton/cookie that refers to the remote saved
- // state.
+ // push/pop then the UserID base class in the RegisterCheckpoint can be
+ // used to store the baton/cookie that refers to the remote saved state.
eExpression,
- // The register checkpoint wants the raw register bytes, so they must
- // be read into m_data_sp, or the save/restore checkpoint should fail.
+ // The register checkpoint wants the raw register bytes, so they must be
+ // read into m_data_sp, or the save/restore checkpoint should fail.
eDataBackup
};
Modified: lldb/trunk/include/lldb/Target/RegisterContext.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/RegisterContext.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/RegisterContext.h (original)
+++ lldb/trunk/include/lldb/Target/RegisterContext.h Mon Apr 30 09:49:04 2018
@@ -63,16 +63,14 @@ public:
}
// These two functions are used to implement "push" and "pop" of register
- // states. They are used primarily
- // for expression evaluation, where we need to push a new state (storing the
- // old one in data_sp) and then
- // restoring the original state by passing the data_sp we got from
- // ReadAllRegisters to WriteAllRegisterValues.
- // ReadAllRegisters will do what is necessary to return a coherent set of
- // register values for this thread, which
- // may mean e.g. interrupting a thread that is sitting in a kernel trap. That
- // is a somewhat disruptive operation,
- // so these API's should only be used when this behavior is needed.
+ // states. They are used primarily for expression evaluation, where we need
+ // to push a new state (storing the old one in data_sp) and then restoring
+ // the original state by passing the data_sp we got from ReadAllRegisters to
+ // WriteAllRegisterValues. ReadAllRegisters will do what is necessary to
+ // return a coherent set of register values for this thread, which may mean
+ // e.g. interrupting a thread that is sitting in a kernel trap. That is a
+ // somewhat disruptive operation, so these API's should only be used when
+ // this behavior is needed.
virtual bool
ReadAllRegisterValues(lldb_private::RegisterCheckpoint ®_checkpoint);
Modified: lldb/trunk/include/lldb/Target/RegisterNumber.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/RegisterNumber.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/RegisterNumber.h (original)
+++ lldb/trunk/include/lldb/Target/RegisterNumber.h Mon Apr 30 09:49:04 2018
@@ -26,8 +26,8 @@ public:
// This constructor plus the init() method below allow for the placeholder
// creation of an invalid object initially, possibly to be filled in. It
- // would be more consistent to have three Set* methods to set the three
- // data that the object needs.
+ // would be more consistent to have three Set* methods to set the three data
+ // that the object needs.
RegisterNumber();
void init(lldb_private::Thread &thread, lldb::RegisterKind kind,
Modified: lldb/trunk/include/lldb/Target/SectionLoadHistory.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/SectionLoadHistory.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/SectionLoadHistory.h (original)
+++ lldb/trunk/include/lldb/Target/SectionLoadHistory.h Mon Apr 30 09:49:04 2018
@@ -23,8 +23,8 @@ namespace lldb_private {
class SectionLoadHistory {
public:
enum : unsigned {
- // Pass eStopIDNow to any function that takes a stop ID to get
- // the current value.
+ // Pass eStopIDNow to any function that takes a stop ID to get the current
+ // value.
eStopIDNow = UINT32_MAX
};
//------------------------------------------------------------------
@@ -33,8 +33,8 @@ public:
SectionLoadHistory() : m_stop_id_to_section_load_list(), m_mutex() {}
~SectionLoadHistory() {
- // Call clear since this takes a lock and clears the section load list
- // in case another thread is currently using this section load list
+ // Call clear since this takes a lock and clears the section load list in
+ // case another thread is currently using this section load list
Clear();
}
@@ -59,14 +59,14 @@ public:
bool warn_multiple = false);
// The old load address should be specified when unloading to ensure we get
- // the correct instance of the section as a shared library could be loaded
- // at more than one location.
+ // the correct instance of the section as a shared library could be loaded at
+ // more than one location.
bool SetSectionUnloaded(uint32_t stop_id, const lldb::SectionSP §ion_sp,
lldb::addr_t load_addr);
// Unload all instances of a section. This function can be used on systems
- // that don't support multiple copies of the same shared library to be
- // loaded at the same time.
+ // that don't support multiple copies of the same shared library to be loaded
+ // at the same time.
size_t SetSectionUnloaded(uint32_t stop_id,
const lldb::SectionSP §ion_sp);
Modified: lldb/trunk/include/lldb/Target/SectionLoadList.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/SectionLoadList.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/SectionLoadList.h (original)
+++ lldb/trunk/include/lldb/Target/SectionLoadList.h Mon Apr 30 09:49:04 2018
@@ -34,8 +34,8 @@ public:
SectionLoadList(const SectionLoadList &rhs);
~SectionLoadList() {
- // Call clear since this takes a lock and clears the section load list
- // in case another thread is currently using this section load list
+ // Call clear since this takes a lock and clears the section load list in
+ // case another thread is currently using this section load list
Clear();
}
@@ -55,14 +55,14 @@ public:
bool warn_multiple = false);
// The old load address should be specified when unloading to ensure we get
- // the correct instance of the section as a shared library could be loaded
- // at more than one location.
+ // the correct instance of the section as a shared library could be loaded at
+ // more than one location.
bool SetSectionUnloaded(const lldb::SectionSP §ion_sp,
lldb::addr_t load_addr);
// Unload all instances of a section. This function can be used on systems
- // that don't support multiple copies of the same shared library to be
- // loaded at the same time.
+ // that don't support multiple copies of the same shared library to be loaded
+ // at the same time.
size_t SetSectionUnloaded(const lldb::SectionSP §ion_sp);
void Dump(Stream &s, Target *target);
Modified: lldb/trunk/include/lldb/Target/StackFrame.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/StackFrame.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/StackFrame.h (original)
+++ lldb/trunk/include/lldb/Target/StackFrame.h Mon Apr 30 09:49:04 2018
@@ -469,8 +469,7 @@ public:
lldb::LanguageType GetLanguage();
// similar to GetLanguage(), but is allowed to take a potentially incorrect
- // guess
- // if exact information is not available
+ // guess if exact information is not available
lldb::LanguageType GuessLanguage();
//------------------------------------------------------------------
Modified: lldb/trunk/include/lldb/Target/StackID.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/StackID.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/StackID.h (original)
+++ lldb/trunk/include/lldb/Target/StackID.h Mon Apr 30 09:49:04 2018
@@ -81,20 +81,20 @@ protected:
lldb::addr_t
m_pc; // The pc value for the function/symbol for this frame. This will
// only get used if the symbol scope is nullptr (the code where we are
- // stopped is not represented by any function or symbol in any
- // shared library).
+ // stopped is not represented by any function or symbol in any shared
+ // library).
lldb::addr_t m_cfa; // The call frame address (stack pointer) value
// at the beginning of the function that uniquely
- // identifies this frame (along with m_symbol_scope below)
+ // identifies this frame (along with m_symbol_scope
+ // below)
SymbolContextScope *
m_symbol_scope; // If nullptr, there is no block or symbol for this frame.
// If not nullptr, this will either be the scope for the
- // lexical block for the frame, or the scope
- // for the symbol. Symbol context scopes are
- // always be unique pointers since the are part
- // of the Block and Symbol objects and can easily
- // be used to tell if a stack ID is the same as
- // another.
+ // lexical block for the frame, or the scope for the
+ // symbol. Symbol context scopes are always be unique
+ // pointers since the are part of the Block and Symbol
+ // objects and can easily be used to tell if a stack ID
+ // is the same as another.
};
bool operator==(const StackID &lhs, const StackID &rhs);
Modified: lldb/trunk/include/lldb/Target/StopInfo.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/StopInfo.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/StopInfo.h (original)
+++ lldb/trunk/include/lldb/Target/StopInfo.h Mon Apr 30 09:49:04 2018
@@ -40,12 +40,10 @@ public:
lldb::ThreadSP GetThread() const { return m_thread_wp.lock(); }
- // The value of the StopInfo depends on the StopReason.
- // StopReason Meaning
- // ----------------------------------------------
- // eStopReasonBreakpoint BreakpointSiteID
- // eStopReasonSignal Signal number
- // eStopReasonWatchpoint WatchpointLocationID
+ // The value of the StopInfo depends on the StopReason. StopReason
+ // Meaning ----------------------------------------------
+ // eStopReasonBreakpoint BreakpointSiteID eStopReasonSignal
+ // Signal number eStopReasonWatchpoint WatchpointLocationID
// eStopReasonPlanComplete No significance
uint64_t GetValue() const { return m_value; }
@@ -53,10 +51,8 @@ public:
virtual lldb::StopReason GetStopReason() const = 0;
// ShouldStopSynchronous will get called before any thread plans are
- // consulted, and if it says we should
- // resume the target, then we will just immediately resume. This should not
- // run any code in or resume the
- // target.
+ // consulted, and if it says we should resume the target, then we will just
+ // immediately resume. This should not run any code in or resume the target.
virtual bool ShouldStopSynchronous(Event *event_ptr) { return true; }
@@ -88,14 +84,11 @@ public:
virtual bool IsValidForOperatingSystemThread(Thread &thread) { return true; }
// Sometimes the thread plan logic will know that it wants a given stop to
- // stop or not,
- // regardless of what the ordinary logic for that StopInfo would dictate. The
- // main example
- // of this is the ThreadPlanCallFunction, which for instance knows - based on
- // how that particular
- // expression was executed - whether it wants all breakpoints to auto-continue
- // or not.
- // Use OverrideShouldStop on the StopInfo to implement this.
+ // stop or not, regardless of what the ordinary logic for that StopInfo would
+ // dictate. The main example of this is the ThreadPlanCallFunction, which
+ // for instance knows - based on how that particular expression was executed
+ // - whether it wants all breakpoints to auto-continue or not. Use
+ // OverrideShouldStop on the StopInfo to implement this.
void OverrideShouldStop(bool override_value) {
m_override_should_stop = override_value ? eLazyBoolYes : eLazyBoolNo;
@@ -159,15 +152,13 @@ protected:
virtual bool DoShouldNotify(Event *event_ptr) { return false; }
- // Stop the thread by default. Subclasses can override this to allow
- // the thread to continue if desired. The ShouldStop method should not do
- // anything
- // that might run code. If you need to run code when deciding whether to stop
- // at this StopInfo, that must be done in the PerformAction.
+ // Stop the thread by default. Subclasses can override this to allow the
+ // thread to continue if desired. The ShouldStop method should not do
+ // anything that might run code. If you need to run code when deciding
+ // whether to stop at this StopInfo, that must be done in the PerformAction.
// The PerformAction will always get called before the ShouldStop. This is
- // done by the
- // ProcessEventData::DoOnRemoval, though the ThreadPlanBase needs to consult
- // this later on.
+ // done by the ProcessEventData::DoOnRemoval, though the ThreadPlanBase needs
+ // to consult this later on.
virtual bool ShouldStop(Event *event_ptr) { return true; }
//------------------------------------------------------------------
@@ -185,14 +176,13 @@ protected:
StructuredData::ObjectSP
m_extended_info; // The extended info for this stop info
- // This determines whether the target has run since this stop info.
- // N.B. running to evaluate a user expression does not count.
+ // This determines whether the target has run since this stop info. N.B.
+ // running to evaluate a user expression does not count.
bool HasTargetRunSinceMe();
// MakeStopInfoValid is necessary to allow saved stop infos to resurrect
- // themselves as valid.
- // It should only be used by Thread::RestoreThreadStateFromCheckpoint and to
- // make sure the one-step
+ // themselves as valid. It should only be used by
+ // Thread::RestoreThreadStateFromCheckpoint and to make sure the one-step
// needed for before-the-fact watchpoints does not prevent us from stopping
void MakeStopInfoValid();
Modified: lldb/trunk/include/lldb/Target/Target.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/Target.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/Target.h (original)
+++ lldb/trunk/include/lldb/Target/Target.h Mon Apr 30 09:49:04 2018
@@ -232,8 +232,8 @@ class EvaluateExpressionOptions {
public:
// MSVC has a bug here that reports C4268: 'const' static/global data
// initialized with compiler generated default constructor fills the object
-// with zeros.
-// Confirmed that MSVC is *not* zero-initializing, it's just a bogus warning.
+// with zeros. Confirmed that MSVC is *not* zero-initializing, it's just a
+// bogus warning.
#if defined(_MSC_VER)
#pragma warning(push)
#pragma warning(disable : 4268)
@@ -350,8 +350,7 @@ public:
}
// Allows the expression contents to be remapped to point to the specified
- // file and line
- // using #line directives.
+ // file and line using #line directives.
void SetPoundLine(const char *path, uint32_t line) const {
if (path && path[0]) {
m_pound_line_file = path;
@@ -398,8 +397,8 @@ private:
Timeout<std::micro> m_one_thread_timeout = llvm::None;
lldb::ExpressionCancelCallback m_cancel_callback = nullptr;
void *m_cancel_callback_baton = nullptr;
- // If m_pound_line_file is not empty and m_pound_line_line is non-zero,
- // use #line %u "%s" before the expression content to remap where the source
+ // If m_pound_line_file is not empty and m_pound_line_line is non-zero, use
+ // #line %u "%s" before the expression content to remap where the source
// originates
mutable std::string m_pound_line_file;
mutable uint32_t m_pound_line_line;
@@ -557,9 +556,8 @@ public:
LazyBool move_to_nearest_code);
// Use this to create breakpoint that matches regex against the source lines
- // in files given in source_file_list:
- // If function_names is non-empty, also filter by function after the matches
- // are made.
+ // in files given in source_file_list: If function_names is non-empty, also
+ // filter by function after the matches are made.
lldb::BreakpointSP CreateSourceRegexBreakpoint(
const FileSpecList *containingModules,
const FileSpecList *source_file_list,
@@ -583,8 +581,8 @@ public:
// Use this to create a function breakpoint by regexp in
// containingModule/containingSourceFiles, or all modules if it is nullptr
- // When "skip_prologue is set to eLazyBoolCalculate, we use the current target
- // setting, else we use the values passed in
+ // When "skip_prologue is set to eLazyBoolCalculate, we use the current
+ // target setting, else we use the values passed in
lldb::BreakpointSP CreateFuncRegexBreakpoint(
const FileSpecList *containingModules,
const FileSpecList *containingSourceFiles, RegularExpression &func_regexp,
@@ -592,10 +590,10 @@ public:
bool internal, bool request_hardware);
// Use this to create a function breakpoint by name in containingModule, or
- // all modules if it is nullptr
- // When "skip_prologue is set to eLazyBoolCalculate, we use the current target
- // setting, else we use the values passed in.
- // func_name_type_mask is or'ed values from the FunctionNameType enum.
+ // all modules if it is nullptr When "skip_prologue is set to
+ // eLazyBoolCalculate, we use the current target setting, else we use the
+ // values passed in. func_name_type_mask is or'ed values from the
+ // FunctionNameType enum.
lldb::BreakpointSP CreateBreakpoint(const FileSpecList *containingModules,
const FileSpecList *containingSourceFiles,
const char *func_name,
@@ -612,11 +610,10 @@ public:
Status *additional_args_error = nullptr);
// This is the same as the func_name breakpoint except that you can specify a
- // vector of names. This is cheaper
- // than a regular expression breakpoint in the case where you just want to set
- // a breakpoint on a set of names
- // you already know.
- // func_name_type_mask is or'ed values from the FunctionNameType enum.
+ // vector of names. This is cheaper than a regular expression breakpoint in
+ // the case where you just want to set a breakpoint on a set of names you
+ // already know. func_name_type_mask is or'ed values from the
+ // FunctionNameType enum.
lldb::BreakpointSP
CreateBreakpoint(const FileSpecList *containingModules,
const FileSpecList *containingSourceFiles,
@@ -760,13 +757,11 @@ public:
lldb::addr_t load_addr,
lldb::AddressClass addr_class = lldb::eAddressClassInvalid) const;
- // Get load_addr as breakable load address for this target.
- // Take a addr and check if for any reason there is a better address than this
- // to put a breakpoint on.
- // If there is then return that address.
- // For MIPS, if instruction at addr is a delay slot instruction then this
- // method will find the address of its
- // previous instruction and return that address.
+ // Get load_addr as breakable load address for this target. Take a addr and
+ // check if for any reason there is a better address than this to put a
+ // breakpoint on. If there is then return that address. For MIPS, if
+ // instruction at addr is a delay slot instruction then this method will find
+ // the address of its previous instruction and return that address.
lldb::addr_t GetBreakableLoadAddress(lldb::addr_t addr);
void ModulesDidLoad(ModuleList &module_list);
@@ -951,12 +946,12 @@ public:
Status &error);
// Reading memory through the target allows us to skip going to the process
- // for reading memory if possible and it allows us to try and read from
- // any constant sections in our object files on disk. If you always want
- // live program memory, read straight from the process. If you possibly
- // want to read from const sections in object files, read from the target.
- // This version of ReadMemory will try and read memory from the process
- // if the process is alive. The order is:
+ // for reading memory if possible and it allows us to try and read from any
+ // constant sections in our object files on disk. If you always want live
+ // program memory, read straight from the process. If you possibly want to
+ // read from const sections in object files, read from the target. This
+ // version of ReadMemory will try and read memory from the process if the
+ // process is alive. The order is:
// 1 - if (prefer_file_cache == true) then read from object file cache
// 2 - if there is a valid process, try and read from its memory
// 3 - if (prefer_file_cache == false) then read from object file cache
@@ -1012,9 +1007,8 @@ public:
PersistentExpressionState *
GetPersistentExpressionStateForLanguage(lldb::LanguageType language);
- // Creates a UserExpression for the given language, the rest of the parameters
- // have the
- // same meaning as for the UserExpression constructor.
+ // Creates a UserExpression for the given language, the rest of the
+ // parameters have the same meaning as for the UserExpression constructor.
// Returns a new-ed object which the caller owns.
UserExpression *GetUserExpressionForLanguage(
@@ -1022,10 +1016,9 @@ public:
Expression::ResultType desired_type,
const EvaluateExpressionOptions &options, Status &error);
- // Creates a FunctionCaller for the given language, the rest of the parameters
- // have the
- // same meaning as for the FunctionCaller constructor. Since a FunctionCaller
- // can't be
+ // Creates a FunctionCaller for the given language, the rest of the
+ // parameters have the same meaning as for the FunctionCaller constructor.
+ // Since a FunctionCaller can't be
// IR Interpreted, it makes no sense to call this with an
// ExecutionContextScope that lacks
// a Process.
@@ -1038,8 +1031,7 @@ public:
const char *name, Status &error);
// Creates a UtilityFunction for the given language, the rest of the
- // parameters have the
- // same meaning as for the UtilityFunction constructor.
+ // parameters have the same meaning as for the UtilityFunction constructor.
// Returns a new-ed object which the caller owns.
UtilityFunction *GetUtilityFunctionForLanguage(const char *expr,
@@ -1052,8 +1044,8 @@ public:
lldb::ClangASTImporterSP GetClangASTImporter();
//----------------------------------------------------------------------
- // Install any files through the platform that need be to installed
- // prior to launching or attaching.
+ // Install any files through the platform that need be to installed prior to
+ // launching or attaching.
//----------------------------------------------------------------------
Status Install(ProcessLaunchInfo *launch_info);
@@ -1078,10 +1070,10 @@ public:
void ClearAllLoadedSections();
// Since expressions results can persist beyond the lifetime of a process,
- // and the const expression results are available after a process is gone,
- // we provide a way for expressions to be evaluated from the Target itself.
- // If an expression is going to be run, then it should have a frame filled
- // in in th execution context.
+ // and the const expression results are available after a process is gone, we
+ // provide a way for expressions to be evaluated from the Target itself. If
+ // an expression is going to be run, then it should have a frame filled in in
+ // th execution context.
lldb::ExpressionResults EvaluateExpression(
llvm::StringRef expression, ExecutionContextScope *exe_scope,
lldb::ValueObjectSP &result_valobj_sp,
@@ -1135,17 +1127,15 @@ public:
bool m_active;
// Use CreateStopHook to make a new empty stop hook. The GetCommandPointer
- // and fill it with commands,
- // and SetSpecifier to set the specifier shared pointer (can be null, that
- // will match anything.)
+ // and fill it with commands, and SetSpecifier to set the specifier shared
+ // pointer (can be null, that will match anything.)
StopHook(lldb::TargetSP target_sp, lldb::user_id_t uid);
friend class Target;
};
typedef std::shared_ptr<StopHook> StopHookSP;
- // Add an empty stop hook to the Target's stop hook list, and returns a shared
- // pointer to it in new_hook.
- // Returns the id of the new hook.
+ // Add an empty stop hook to the Target's stop hook list, and returns a
+ // shared pointer to it in new_hook. Returns the id of the new hook.
StopHookSP CreateStopHook();
void RunStopHooks();
@@ -1259,9 +1249,9 @@ protected:
lldb::BreakpointSP m_last_created_breakpoint;
WatchpointList m_watchpoint_list;
lldb::WatchpointSP m_last_created_watchpoint;
- // We want to tightly control the process destruction process so
- // we can correctly tear down everything that we need to, so the only
- // class that knows about the process lifespan is this target class.
+ // We want to tightly control the process destruction process so we can
+ // correctly tear down everything that we need to, so the only class that
+ // knows about the process lifespan is this target class.
lldb::ProcessSP m_process_sp;
lldb::SearchFilterSP m_search_filter_sp;
PathMappingList m_image_search_paths;
Modified: lldb/trunk/include/lldb/Target/Thread.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/Thread.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/Thread.h (original)
+++ lldb/trunk/include/lldb/Target/Thread.h Mon Apr 30 09:49:04 2018
@@ -214,8 +214,8 @@ public:
// This function is called on all the threads before "ShouldResume" and
// "WillResume" in case a thread needs to change its state before the
- // ThreadList polls all the threads to figure out which ones actually
- // will get to run and how.
+ // ThreadList polls all the threads to figure out which ones actually will
+ // get to run and how.
void SetupForResume();
// Do not override this function, it is for thread plan logic only
@@ -224,8 +224,8 @@ public:
// Override this to do platform specific tasks before resume.
virtual void WillResume(lldb::StateType resume_state) {}
- // This clears generic thread state after a resume. If you subclass this,
- // be sure to call it.
+ // This clears generic thread state after a resume. If you subclass this, be
+ // sure to call it.
virtual void DidResume();
// This notifies the thread when a private stop occurs.
@@ -244,14 +244,10 @@ public:
void Flush();
// Return whether this thread matches the specification in ThreadSpec. This
- // is a virtual
- // method because at some point we may extend the thread spec with a platform
- // specific
- // dictionary of attributes, which then only the platform specific Thread
- // implementation
- // would know how to match. For now, this just calls through to the
- // ThreadSpec's
- // ThreadPassesBasicTests method.
+ // is a virtual method because at some point we may extend the thread spec
+ // with a platform specific dictionary of attributes, which then only the
+ // platform specific Thread implementation would know how to match. For now,
+ // this just calls through to the ThreadSpec's ThreadPassesBasicTests method.
virtual bool MatchesSpec(const ThreadSpec *spec);
lldb::StopInfoSP GetStopInfo();
@@ -261,9 +257,8 @@ public:
bool StopInfoIsUpToDate() const;
// This sets the stop reason to a "blank" stop reason, so you can call
- // functions on the thread
- // without having the called function run with whatever stop reason you
- // stopped with.
+ // functions on the thread without having the called function run with
+ // whatever stop reason you stopped with.
void SetStopInfoToNothing();
bool ThreadStoppedForAReason();
@@ -492,16 +487,15 @@ public:
virtual void ClearBackingThread() {
// Subclasses can use this function if a thread is actually backed by
// another thread. This is currently used for the OperatingSystem plug-ins
- // where they might have a thread that is in memory, yet its registers
- // are available through the lldb_private::Thread subclass for the current
+ // where they might have a thread that is in memory, yet its registers are
+ // available through the lldb_private::Thread subclass for the current
// lldb_private::Process class. Since each time the process stops the
- // backing
- // threads for memory threads can change, we need a way to clear the backing
- // thread for all memory threads each time we stop.
+ // backing threads for memory threads can change, we need a way to clear
+ // the backing thread for all memory threads each time we stop.
}
- // If stop_format is true, this will be the form used when we print stop info.
- // If false, it will be the form we use for thread list and co.
+ // If stop_format is true, this will be the form used when we print stop
+ // info. If false, it will be the form we use for thread list and co.
void DumpUsingSettingsFormat(Stream &strm, uint32_t frame_idx,
bool stop_format);
@@ -607,30 +601,24 @@ public:
// Thread Plan Providers:
// This section provides the basic thread plans that the Process control
// machinery uses to run the target. ThreadPlan.h provides more details on
- // how this mechanism works.
- // The thread provides accessors to a set of plans that perform basic
- // operations.
- // The idea is that particular Platform plugins can override these methods to
- // provide the implementation of these basic operations appropriate to their
- // environment.
+ // how this mechanism works. The thread provides accessors to a set of plans
+ // that perform basic operations. The idea is that particular Platform
+ // plugins can override these methods to provide the implementation of these
+ // basic operations appropriate to their environment.
//
// NB: All the QueueThreadPlanXXX providers return Shared Pointers to
// Thread plans. This is useful so that you can modify the plans after
// creation in ways specific to that plan type. Also, it is often necessary
- // for
- // ThreadPlans that utilize other ThreadPlans to implement their task to keep
- // a shared
- // pointer to the sub-plan.
- // But besides that, the shared pointers should only be held onto by entities
- // who live no longer
- // than the thread containing the ThreadPlan.
+ // for ThreadPlans that utilize other ThreadPlans to implement their task to
+ // keep a shared pointer to the sub-plan. But besides that, the shared
+ // pointers should only be held onto by entities who live no longer than the
+ // thread containing the ThreadPlan.
// FIXME: If this becomes a problem, we can make a version that just returns a
// pointer,
// which it is clearly unsafe to hold onto, and a shared pointer version, and
- // only allow
- // ThreadPlan and Co. to use the latter. That is made more annoying to do
- // because there's
- // no elegant way to friend a method to all sub-classes of a given class.
+ // only allow ThreadPlan and Co. to use the latter. That is made more
+ // annoying to do because there's no elegant way to friend a method to all
+ // sub-classes of a given class.
//
//------------------------------------------------------------------
@@ -717,9 +705,8 @@ public:
LazyBool step_out_avoids_code_without_debug_info = eLazyBoolCalculate);
// Helper function that takes a LineEntry to step, insted of an AddressRange.
- // This may combine multiple
- // LineEntries of the same source line number to step over a longer address
- // range in a single operation.
+ // This may combine multiple LineEntries of the same source line number to
+ // step over a longer address range in a single operation.
virtual lldb::ThreadPlanSP QueueThreadPlanForStepOverRange(
bool abort_other_plans, const LineEntry &line_entry,
const SymbolContext &addr_context, lldb::RunMode stop_other_threads,
@@ -779,9 +766,8 @@ public:
LazyBool step_out_avoids_code_without_debug_info = eLazyBoolCalculate);
// Helper function that takes a LineEntry to step, insted of an AddressRange.
- // This may combine multiple
- // LineEntries of the same source line number to step over a longer address
- // range in a single operation.
+ // This may combine multiple LineEntries of the same source line number to
+ // step over a longer address range in a single operation.
virtual lldb::ThreadPlanSP QueueThreadPlanForStepInRange(
bool abort_other_plans, const LineEntry &line_entry,
const SymbolContext &addr_context, const char *step_in_target,
@@ -1115,23 +1101,22 @@ public:
void SetTracer(lldb::ThreadPlanTracerSP &tracer_sp);
//------------------------------------------------------------------
- // Get the thread index ID. The index ID that is guaranteed to not
- // be re-used by a process. They start at 1 and increase with each
- // new thread. This allows easy command line access by a unique ID
- // that is easier to type than the actual system thread ID.
+ // Get the thread index ID. The index ID that is guaranteed to not be re-used
+ // by a process. They start at 1 and increase with each new thread. This
+ // allows easy command line access by a unique ID that is easier to type than
+ // the actual system thread ID.
//------------------------------------------------------------------
uint32_t GetIndexID() const;
//------------------------------------------------------------------
// Get the originating thread's index ID.
- // In the case of an "extended" thread -- a thread which represents
- // the stack that enqueued/spawned work that is currently executing --
- // we need to provide the IndexID of the thread that actually did
- // this work. We don't want to just masquerade as that thread's IndexID
- // by using it in our own IndexID because that way leads to madness -
- // but the driver program which is iterating over extended threads
- // may ask for the OriginatingThreadID to display that information
- // to the user.
+ // In the case of an "extended" thread -- a thread which represents the stack
+ // that enqueued/spawned work that is currently executing -- we need to
+ // provide the IndexID of the thread that actually did this work. We don't
+ // want to just masquerade as that thread's IndexID by using it in our own
+ // IndexID because that way leads to madness - but the driver program which
+ // is iterating over extended threads may ask for the OriginatingThreadID to
+ // display that information to the user.
// Normal threads will return the same thing as GetIndexID();
//------------------------------------------------------------------
virtual uint32_t GetExtendedBacktraceOriginatingIndexID() {
@@ -1139,10 +1124,10 @@ public:
}
//------------------------------------------------------------------
- // The API ID is often the same as the Thread::GetID(), but not in
- // all cases. Thread::GetID() is the user visible thread ID that
- // clients would want to see. The API thread ID is the thread ID
- // that is used when sending data to/from the debugging protocol.
+ // The API ID is often the same as the Thread::GetID(), but not in all cases.
+ // Thread::GetID() is the user visible thread ID that clients would want to
+ // see. The API thread ID is the thread ID that is used when sending data
+ // to/from the debugging protocol.
//------------------------------------------------------------------
virtual lldb::user_id_t GetProtocolID() const { return GetID(); }
@@ -1171,9 +1156,9 @@ public:
uint32_t num_frames_with_source);
// We need a way to verify that even though we have a thread in a shared
- // pointer that the object itself is still valid. Currently this won't be
- // the case if DestroyThread() was called. DestroyThread is called when
- // a thread has been removed from the Process' thread list.
+ // pointer that the object itself is still valid. Currently this won't be the
+ // case if DestroyThread() was called. DestroyThread is called when a thread
+ // has been removed from the Process' thread list.
bool IsValid() const { return !m_destroy_called; }
// Sets and returns a valid stop info based on the process stop ID and the
@@ -1194,8 +1179,8 @@ public:
//----------------------------------------------------------------------
// Ask the thread subclass to set its stop info.
//
- // Thread subclasses should call Thread::SetStopInfo(...) with the
- // reason the thread stopped.
+ // Thread subclasses should call Thread::SetStopInfo(...) with the reason the
+ // thread stopped.
//
// @return
// True if Thread::SetStopInfo(...) was called, false otherwise.
@@ -1206,10 +1191,10 @@ public:
// Gets the temporary resume state for a thread.
//
// This value gets set in each thread by complex debugger logic in
- // Thread::ShouldResume() and an appropriate thread resume state will get
- // set in each thread every time the process is resumed prior to calling
- // Process::DoResume(). The lldb_private::Process subclass should adhere
- // to the thread resume state request which will be one of:
+ // Thread::ShouldResume() and an appropriate thread resume state will get set
+ // in each thread every time the process is resumed prior to calling
+ // Process::DoResume(). The lldb_private::Process subclass should adhere to
+ // the thread resume state request which will be one of:
//
// eStateRunning - thread will resume when process is resumed
// eStateStepping - thread should step 1 instruction and stop when process
@@ -1257,10 +1242,9 @@ protected:
friend class StackFrame;
friend class OperatingSystem;
- // This is necessary to make sure thread assets get destroyed while the thread
- // is still in good shape
- // to call virtual thread methods. This must be called by classes that derive
- // from Thread in their destructor.
+ // This is necessary to make sure thread assets get destroyed while the
+ // thread is still in good shape to call virtual thread methods. This must
+ // be called by classes that derive from Thread in their destructor.
virtual void DestroyThread();
void PushPlan(lldb::ThreadPlanSP &plan_sp);
@@ -1286,8 +1270,7 @@ protected:
virtual bool IsOperatingSystemPluginThread() const { return false; }
// Subclasses that have a way to get an extended info dictionary for this
- // thread should
- // fill
+ // thread should fill
virtual lldb_private::StructuredData::ObjectSP FetchThreadExtendedInfo() {
return StructuredData::ObjectSP();
}
@@ -1307,7 +1290,8 @@ protected:
lldb::StopInfoSP m_stop_info_sp; ///< The private stop reason for this thread
uint32_t m_stop_info_stop_id; // This is the stop id for which the StopInfo is
// valid. Can use this so you know that
- // the thread's m_stop_info_sp is current and you don't have to fetch it again
+ // the thread's m_stop_info_sp is current and you don't have to fetch it
+ // again
uint32_t m_stop_info_override_stop_id; // The stop ID containing the last time
// the stop info was checked against
// the stop info override
Modified: lldb/trunk/include/lldb/Target/ThreadCollection.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/ThreadCollection.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/ThreadCollection.h (original)
+++ lldb/trunk/include/lldb/Target/ThreadCollection.h Mon Apr 30 09:49:04 2018
@@ -39,9 +39,9 @@ public:
void InsertThread(const lldb::ThreadSP &thread_sp, uint32_t idx);
- // Note that "idx" is not the same as the "thread_index". It is a zero
- // based index to accessing the current threads, whereas "thread_index"
- // is a unique index assigned
+ // Note that "idx" is not the same as the "thread_index". It is a zero based
+ // index to accessing the current threads, whereas "thread_index" is a unique
+ // index assigned
lldb::ThreadSP GetThreadAtIndex(uint32_t idx);
virtual ThreadIterable Threads() {
Modified: lldb/trunk/include/lldb/Target/ThreadList.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/ThreadList.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/ThreadList.h (original)
+++ lldb/trunk/include/lldb/Target/ThreadList.h Mon Apr 30 09:49:04 2018
@@ -43,9 +43,8 @@ public:
lldb::ThreadSP GetSelectedThread();
// Manage the thread to use for running expressions. This is usually the
- // Selected thread,
- // but sometimes (e.g. when evaluating breakpoint conditions & stop hooks) it
- // isn't.
+ // Selected thread, but sometimes (e.g. when evaluating breakpoint conditions
+ // & stop hooks) it isn't.
class ExpressionExecutionThreadPusher {
public:
ExpressionExecutionThreadPusher(ThreadList &thread_list, lldb::tid_t tid)
@@ -83,9 +82,9 @@ public:
void Destroy();
- // Note that "idx" is not the same as the "thread_index". It is a zero
- // based index to accessing the current threads, whereas "thread_index"
- // is a unique index assigned
+ // Note that "idx" is not the same as the "thread_index". It is a zero based
+ // index to accessing the current threads, whereas "thread_index" is a unique
+ // index assigned
lldb::ThreadSP GetThreadAtIndex(uint32_t idx, bool can_update = true);
lldb::ThreadSP FindThreadByID(lldb::tid_t tid, bool can_update = true);
Modified: lldb/trunk/include/lldb/Target/ThreadPlan.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/ThreadPlan.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/ThreadPlan.h (original)
+++ lldb/trunk/include/lldb/Target/ThreadPlan.h Mon Apr 30 09:49:04 2018
@@ -340,9 +340,8 @@ class ThreadPlan : public std::enable_sh
public:
typedef enum { eAllThreads, eSomeThreads, eThisThread } ThreadScope;
- // We use these enums so that we can cast a base thread plan to it's real type
- // without having to resort
- // to dynamic casting.
+ // We use these enums so that we can cast a base thread plan to it's real
+ // type without having to resort to dynamic casting.
typedef enum {
eKindGeneric,
eKindNull,
@@ -432,9 +431,8 @@ public:
virtual bool ShouldAutoContinue(Event *event_ptr) { return false; }
- // Whether a "stop class" event should be reported to the "outside world". In
- // general
- // if a thread plan is active, events should not be reported.
+ // Whether a "stop class" event should be reported to the "outside world".
+ // In general if a thread plan is active, events should not be reported.
virtual Vote ShouldReportStop(Event *event_ptr);
@@ -445,8 +443,7 @@ public:
virtual bool StopOthers();
// This is the wrapper for DoWillResume that does generic ThreadPlan logic,
- // then
- // calls DoWillResume.
+ // then calls DoWillResume.
bool WillResume(lldb::StateType resume_state, bool current_plan);
virtual bool WillStop() = 0;
@@ -468,8 +465,8 @@ public:
virtual bool MischiefManaged();
virtual void ThreadDestroyed() {
- // Any cleanup that a plan might want to do in case the thread goes away
- // in the middle of the plan being queued on a thread can be done here.
+ // Any cleanup that a plan might want to do in case the thread goes away in
+ // the middle of the plan being queued on a thread can be done here.
}
bool GetPrivate() { return m_plan_private; }
@@ -509,39 +506,35 @@ public:
}
// Some thread plans hide away the actual stop info which caused any
- // particular stop. For
- // instance the ThreadPlanCallFunction restores the original stop reason so
- // that stopping and
- // calling a few functions won't lose the history of the run.
- // This call can be implemented to get you back to the real stop info.
+ // particular stop. For instance the ThreadPlanCallFunction restores the
+ // original stop reason so that stopping and calling a few functions won't
+ // lose the history of the run. This call can be implemented to get you back
+ // to the real stop info.
virtual lldb::StopInfoSP GetRealStopInfo() { return m_thread.GetStopInfo(); }
// If the completion of the thread plan stepped out of a function, the return
- // value of the function
- // might have been captured by the thread plan (currently only
- // ThreadPlanStepOut does this.)
- // If so, the ReturnValueObject can be retrieved from here.
+ // value of the function might have been captured by the thread plan
+ // (currently only ThreadPlanStepOut does this.) If so, the ReturnValueObject
+ // can be retrieved from here.
virtual lldb::ValueObjectSP GetReturnValueObject() {
return lldb::ValueObjectSP();
}
// If the thread plan managing the evaluation of a user expression lives
- // longer than the command
- // that instigated the expression (generally because the expression evaluation
- // hit a breakpoint, and
- // the user regained control at that point) a subsequent process control
- // command step/continue/etc. might
- // complete the expression evaluations. If so, the result of the expression
- // evaluation will show up here.
+ // longer than the command that instigated the expression (generally because
+ // the expression evaluation hit a breakpoint, and the user regained control
+ // at that point) a subsequent process control command step/continue/etc.
+ // might complete the expression evaluations. If so, the result of the
+ // expression evaluation will show up here.
virtual lldb::ExpressionVariableSP GetExpressionVariable() {
return lldb::ExpressionVariableSP();
}
- // If a thread plan stores the state before it was run, then you might
- // want to restore the state when it is done. This will do that job.
- // This is mostly useful for artificial plans like CallFunction plans.
+ // If a thread plan stores the state before it was run, then you might want
+ // to restore the state when it is done. This will do that job. This is
+ // mostly useful for artificial plans like CallFunction plans.
virtual bool RestoreThreadState() {
// Nothing to do in general.
@@ -585,8 +578,7 @@ protected:
ThreadPlan *GetPreviousPlan() { return m_thread.GetPreviousPlan(this); }
// This forwards the private Thread::GetPrivateStopInfo which is generally
- // what
- // ThreadPlan's need to know.
+ // what ThreadPlan's need to know.
lldb::StopInfoSP GetPrivateStopInfo() {
return m_thread.GetPrivateStopInfo();
@@ -638,10 +630,10 @@ private:
//----------------------------------------------------------------------
// ThreadPlanNull:
-// Threads are assumed to always have at least one plan on the plan stack.
-// This is put on the plan stack when a thread is destroyed so that if you
-// accidentally access a thread after it is destroyed you won't crash.
-// But asking questions of the ThreadPlanNull is definitely an error.
+// Threads are assumed to always have at least one plan on the plan stack. This
+// is put on the plan stack when a thread is destroyed so that if you
+// accidentally access a thread after it is destroyed you won't crash. But
+// asking questions of the ThreadPlanNull is definitely an error.
//----------------------------------------------------------------------
class ThreadPlanNull : public ThreadPlan {
Modified: lldb/trunk/include/lldb/Target/ThreadPlanCallFunction.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/ThreadPlanCallFunction.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/ThreadPlanCallFunction.h (original)
+++ lldb/trunk/include/lldb/Target/ThreadPlanCallFunction.h Mon Apr 30 09:49:04 2018
@@ -24,9 +24,8 @@ namespace lldb_private {
class ThreadPlanCallFunction : public ThreadPlan {
// Create a thread plan to call a function at the address passed in the
- // "function"
- // argument. If you plan to call GetReturnValueObject, then pass in the
- // return type, otherwise just pass in an invalid CompilerType.
+ // "function" argument. If you plan to call GetReturnValueObject, then pass
+ // in the return type, otherwise just pass in an invalid CompilerType.
public:
ThreadPlanCallFunction(Thread &thread, const Address &function,
const CompilerType &return_type,
@@ -69,27 +68,23 @@ public:
return m_return_valobj_sp;
}
- // Return the stack pointer that the function received
- // on entry. Any stack address below this should be
- // considered invalid after the function has been
- // cleaned up.
+ // Return the stack pointer that the function received on entry. Any stack
+ // address below this should be considered invalid after the function has
+ // been cleaned up.
lldb::addr_t GetFunctionStackPointer() { return m_function_sp; }
- // Classes that derive from FunctionCaller, and implement
- // their own WillPop methods should call this so that the
- // thread state gets restored if the plan gets discarded.
+ // Classes that derive from FunctionCaller, and implement their own WillPop
+ // methods should call this so that the thread state gets restored if the
+ // plan gets discarded.
void WillPop() override;
// If the thread plan stops mid-course, this will be the stop reason that
- // interrupted us.
- // Once DoTakedown is called, this will be the real stop reason at the end of
- // the function call.
- // If it hasn't been set for one or the other of these reasons, we'll return
- // the PrivateStopReason.
- // This is needed because we want the CallFunction thread plans not to show up
- // as the stop reason.
- // But if something bad goes wrong, it is nice to be able to tell the user
- // what really happened.
+ // interrupted us. Once DoTakedown is called, this will be the real stop
+ // reason at the end of the function call. If it hasn't been set for one or
+ // the other of these reasons, we'll return the PrivateStopReason. This is
+ // needed because we want the CallFunction thread plans not to show up as the
+ // stop reason. But if something bad goes wrong, it is nice to be able to
+ // tell the user what really happened.
lldb::StopInfoSP GetRealStopInfo() override {
if (m_real_stop_info_sp)
@@ -140,9 +135,9 @@ protected:
Thread::ThreadStateCheckpoint m_stored_thread_state;
lldb::StopInfoSP
m_real_stop_info_sp; // In general we want to hide call function
- // thread plans, but for reporting purposes,
- // it's nice to know the real stop reason.
- // This gets set in DoTakedown.
+ // thread plans, but for reporting purposes, it's
+ // nice to know the real stop reason. This gets set
+ // in DoTakedown.
StreamString m_constructor_errors;
lldb::ValueObjectSP m_return_valobj_sp; // If this contains a valid pointer,
// use the ABI to extract values when
Modified: lldb/trunk/include/lldb/Target/ThreadPlanCallFunctionUsingABI.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/ThreadPlanCallFunctionUsingABI.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/ThreadPlanCallFunctionUsingABI.h (original)
+++ lldb/trunk/include/lldb/Target/ThreadPlanCallFunctionUsingABI.h Mon Apr 30 09:49:04 2018
@@ -27,11 +27,9 @@ namespace lldb_private {
class ThreadPlanCallFunctionUsingABI : public ThreadPlanCallFunction {
// Create a thread plan to call a function at the address passed in the
- // "function"
- // argument, this function is executed using register manipulation instead of
- // JIT.
- // Class derives from ThreadPlanCallFunction and differs by calling a
- // alternative
+ // "function" argument, this function is executed using register manipulation
+ // instead of JIT. Class derives from ThreadPlanCallFunction and differs by
+ // calling a alternative
// ABI interface ABI::PrepareTrivialCall() which provides more detailed
// information.
public:
Modified: lldb/trunk/include/lldb/Target/ThreadPlanShouldStopHere.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/ThreadPlanShouldStopHere.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/ThreadPlanShouldStopHere.h (original)
+++ lldb/trunk/include/lldb/Target/ThreadPlanShouldStopHere.h Mon Apr 30 09:49:04 2018
@@ -19,20 +19,16 @@
namespace lldb_private {
// This is an interface that ThreadPlans can adopt to allow flexible
-// modifications of the behavior
-// when a thread plan comes to a place where it would ordinarily stop. If such
-// modification makes
-// sense for your plan, inherit from this class, and when you would be about to
-// stop (in your ShouldStop
-// method), call InvokeShouldStopHereCallback, passing in the frame comparison
-// between where the step operation
-// started and where you arrived. If it returns true, then QueueStepOutFromHere
-// will queue the plan
-// to execute instead of stopping.
+// modifications of the behavior when a thread plan comes to a place where it
+// would ordinarily stop. If such modification makes sense for your plan,
+// inherit from this class, and when you would be about to stop (in your
+// ShouldStop method), call InvokeShouldStopHereCallback, passing in the frame
+// comparison between where the step operation started and where you arrived.
+// If it returns true, then QueueStepOutFromHere will queue the plan to execute
+// instead of stopping.
//
// The classic example of the use of this is ThreadPlanStepInRange not stopping
-// in frames that have
-// no debug information.
+// in frames that have no debug information.
//
// This class also defines a set of flags to control general aspects of this
// "ShouldStop" behavior.
@@ -82,11 +78,9 @@ public:
virtual ~ThreadPlanShouldStopHere();
// Set the ShouldStopHere callbacks. Pass in null to clear them and have no
- // special behavior (though you
- // can also call ClearShouldStopHereCallbacks for that purpose. If you pass
- // in a valid pointer, it will
- // adopt the non-null fields, and any null fields will be set to the default
- // values.
+ // special behavior (though you can also call ClearShouldStopHereCallbacks
+ // for that purpose. If you pass in a valid pointer, it will adopt the non-
+ // null fields, and any null fields will be set to the default values.
void
SetShouldStopHereCallbacks(const ThreadPlanShouldStopHereCallbacks *callbacks,
Modified: lldb/trunk/include/lldb/Target/ThreadPlanStepRange.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/ThreadPlanStepRange.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/ThreadPlanStepRange.h (original)
+++ lldb/trunk/include/lldb/Target/ThreadPlanStepRange.h Mon Apr 30 09:49:04 2018
@@ -58,10 +58,9 @@ protected:
size_t &insn_offset);
// Pushes a plan to proceed through the next section of instructions in the
- // range - usually just a RunToAddress
- // plan to run to the next branch. Returns true if it pushed such a plan. If
- // there was no available 'quick run'
- // plan, then just single step.
+ // range - usually just a RunToAddress plan to run to the next branch.
+ // Returns true if it pushed such a plan. If there was no available 'quick
+ // run' plan, then just single step.
bool SetNextBranchBreakpoint();
void ClearNextBranchBreakpoint();
Modified: lldb/trunk/include/lldb/Target/UnixSignals.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/UnixSignals.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/UnixSignals.h (original)
+++ lldb/trunk/include/lldb/Target/UnixSignals.h Mon Apr 30 09:49:04 2018
@@ -63,8 +63,7 @@ public:
// These provide an iterator through the signals available on this system.
// Call GetFirstSignalNumber to get the first entry, then iterate on
- // GetNextSignalNumber
- // till you get back LLDB_INVALID_SIGNAL_NUMBER.
+ // GetNextSignalNumber till you get back LLDB_INVALID_SIGNAL_NUMBER.
int32_t GetFirstSignalNumber() const;
int32_t GetNextSignalNumber(int32_t current_signal) const;
@@ -76,13 +75,10 @@ public:
ConstString GetShortName(ConstString name) const;
// We assume that the elements of this object are constant once it is
- // constructed,
- // since a process should never need to add or remove symbols as it runs. So
- // don't
- // call these functions anywhere but the constructor of your subclass of
- // UnixSignals or in
- // your Process Plugin's GetUnixSignals method before you return the
- // UnixSignal object.
+ // constructed, since a process should never need to add or remove symbols as
+ // it runs. So don't call these functions anywhere but the constructor of
+ // your subclass of UnixSignals or in your Process Plugin's GetUnixSignals
+ // method before you return the UnixSignal object.
void AddSignal(int signo, const char *name, bool default_suppress,
bool default_stop, bool default_notify,
@@ -90,15 +86,14 @@ public:
void RemoveSignal(int signo);
- // Returns a current version of the data stored in this class.
- // Version gets incremented each time Set... method is called.
+ // Returns a current version of the data stored in this class. Version gets
+ // incremented each time Set... method is called.
uint64_t GetVersion() const;
- // Returns a vector of signals that meet criteria provided in arguments.
- // Each should_[suppress|stop|notify] flag can be
- // None - no filtering by this flag
- // true - only signals that have it set to true are returned
- // false - only signals that have it set to true are returned
+ // Returns a vector of signals that meet criteria provided in arguments. Each
+ // should_[suppress|stop|notify] flag can be None - no filtering by this
+ // flag true - only signals that have it set to true are returned false -
+ // only signals that have it set to true are returned
std::vector<int32_t> GetFilteredSignals(llvm::Optional<bool> should_suppress,
llvm::Optional<bool> should_stop,
llvm::Optional<bool> should_notify);
@@ -126,10 +121,10 @@ protected:
collection m_signals;
- // This version gets incremented every time something is changing in
- // this class, including when we call AddSignal from the constructor.
- // So after the object is constructed m_version is going to be > 0
- // if it has at least one signal registered in it.
+ // This version gets incremented every time something is changing in this
+ // class, including when we call AddSignal from the constructor. So after the
+ // object is constructed m_version is going to be > 0 if it has at least one
+ // signal registered in it.
uint64_t m_version = 0;
// GDBRemote signals need to be copyable.
Modified: lldb/trunk/include/lldb/Utility/ArchSpec.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/ArchSpec.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Utility/ArchSpec.h (original)
+++ lldb/trunk/include/lldb/Utility/ArchSpec.h Mon Apr 30 09:49:04 2018
@@ -592,15 +592,14 @@ protected:
Core m_core = kCore_invalid;
lldb::ByteOrder m_byte_order = lldb::eByteOrderInvalid;
- // Additional arch flags which we cannot get from triple and core
- // For MIPS these are application specific extensions like
- // micromips, mips16 etc.
+ // Additional arch flags which we cannot get from triple and core For MIPS
+ // these are application specific extensions like micromips, mips16 etc.
uint32_t m_flags = 0;
ConstString m_distribution_id;
- // Called when m_def or m_entry are changed. Fills in all remaining
- // members with default values.
+ // Called when m_def or m_entry are changed. Fills in all remaining members
+ // with default values.
void CoreUpdated(bool update_triple);
};
Modified: lldb/trunk/include/lldb/Utility/Args.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/Args.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Utility/Args.h (original)
+++ lldb/trunk/include/lldb/Utility/Args.h Mon Apr 30 09:49:04 2018
@@ -343,11 +343,11 @@ public:
static void EncodeEscapeSequences(const char *src, std::string &dst);
// ExpandEscapeSequences will change a string of possibly non-printable
- // characters and expand them into text. So '\n' will turn into two characters
- // like "\n" which is suitable for human reading. When a character is not
- // printable and isn't one of the common in escape sequences listed in the
- // help for EncodeEscapeSequences, then it will be encoded as octal. Printable
- // characters are left alone.
+ // characters and expand them into text. So '\n' will turn into two
+ // characters like "\n" which is suitable for human reading. When a character
+ // is not printable and isn't one of the common in escape sequences listed in
+ // the help for EncodeEscapeSequences, then it will be encoded as octal.
+ // Printable characters are left alone.
static void ExpandEscapedCharacters(const char *src, std::string &dst);
static std::string EscapeLLDBCommandArgument(const std::string &arg,
Modified: lldb/trunk/include/lldb/Utility/ConstString.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/ConstString.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Utility/ConstString.h (original)
+++ lldb/trunk/include/lldb/Utility/ConstString.h Mon Apr 30 09:49:04 2018
@@ -174,8 +174,8 @@ public:
/// @li \b false if this object is not equal to \a rhs.
//------------------------------------------------------------------
bool operator==(const ConstString &rhs) const {
- // We can do a pointer compare to compare these strings since they
- // must come from the same pool in order to be equal.
+ // We can do a pointer compare to compare these strings since they must
+ // come from the same pool in order to be equal.
return m_string == rhs.m_string;
}
Modified: lldb/trunk/include/lldb/Utility/DataBufferHeap.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/DataBufferHeap.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Utility/DataBufferHeap.h (original)
+++ lldb/trunk/include/lldb/Utility/DataBufferHeap.h Mon Apr 30 09:49:04 2018
@@ -123,8 +123,8 @@ public:
private:
//------------------------------------------------------------------
- // This object uses a std::vector<uint8_t> to store its data. This
- // takes care of free the data when the object is deleted.
+ // This object uses a std::vector<uint8_t> to store its data. This takes care
+ // of free the data when the object is deleted.
//------------------------------------------------------------------
typedef std::vector<uint8_t> buffer_t; ///< Buffer type
buffer_t m_data; ///< The heap based buffer where data is stored
Modified: lldb/trunk/include/lldb/Utility/History.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/History.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Utility/History.h (original)
+++ lldb/trunk/include/lldb/Utility/History.h Mon Apr 30 09:49:04 2018
@@ -39,9 +39,9 @@ public:
virtual ~HistorySource() {}
- // Create a new history event. Subclasses should use any data or members
- // in the subclass of this class to produce a history event and push it
- // onto the end of the history stack.
+ // Create a new history event. Subclasses should use any data or members in
+ // the subclass of this class to produce a history event and push it onto the
+ // end of the history stack.
virtual HistoryEvent CreateHistoryEvent() = 0;
@@ -85,9 +85,9 @@ class HistorySourceUInt : public History
~HistorySourceUInt() override {}
- // Create a new history event. Subclasses should use any data or members
- // in the subclass of this class to produce a history event and push it
- // onto the end of the history stack.
+ // Create a new history event. Subclasses should use any data or members in
+ // the subclass of this class to produce a history event and push it onto the
+ // end of the history stack.
HistoryEvent CreateHistoryEvent() override {
++m_curr_id;
Modified: lldb/trunk/include/lldb/Utility/JSON.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/JSON.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Utility/JSON.h (original)
+++ lldb/trunk/include/lldb/Utility/JSON.h Mon Apr 30 09:49:04 2018
@@ -79,9 +79,8 @@ public:
// SFINAE to avoid having ambiguous overloads because of the implicit type
// promotion. If we
// would have constructors only with int64_t, uint64_t and double types then
- // constructing a
- // JSONNumber from an int32_t (or any other similar type) would fail to
- // compile.
+ // constructing a JSONNumber from an int32_t (or any other similar type)
+ // would fail to compile.
template <typename T, typename std::enable_if<
std::is_integral<T>::value &&
Modified: lldb/trunk/include/lldb/Utility/Log.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/Log.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Utility/Log.h (original)
+++ lldb/trunk/include/lldb/Utility/Log.h Mon Apr 30 09:49:04 2018
@@ -74,10 +74,10 @@ public:
: log_ptr(nullptr), categories(categories),
default_flags(default_flags) {}
- // This function is safe to call at any time
- // If the channel is disabled after (or concurrently with) this function
- // returning a non-null Log pointer, it is still safe to attempt to write to
- // the Log object -- the output will be discarded.
+ // This function is safe to call at any time If the channel is disabled
+ // after (or concurrently with) this function returning a non-null Log
+ // pointer, it is still safe to attempt to write to the Log object -- the
+ // output will be discarded.
Log *GetLogIfAll(uint32_t mask) {
Log *log = log_ptr.load(std::memory_order_relaxed);
if (log && log->GetMask().AllSet(mask))
@@ -85,10 +85,10 @@ public:
return nullptr;
}
- // This function is safe to call at any time
- // If the channel is disabled after (or concurrently with) this function
- // returning a non-null Log pointer, it is still safe to attempt to write to
- // the Log object -- the output will be discarded.
+ // This function is safe to call at any time If the channel is disabled
+ // after (or concurrently with) this function returning a non-null Log
+ // pointer, it is still safe to attempt to write to the Log object -- the
+ // output will be discarded.
Log *GetLogIfAny(uint32_t mask) {
Log *log = log_ptr.load(std::memory_order_relaxed);
if (log && log->GetMask().AnySet(mask))
@@ -171,8 +171,8 @@ public:
private:
Channel &m_channel;
- // The mutex makes sure enable/disable operations are thread-safe. The options
- // and mask variables are atomic to enable their reading in
+ // The mutex makes sure enable/disable operations are thread-safe. The
+ // options and mask variables are atomic to enable their reading in
// Channel::GetLogIfAny without taking the mutex to speed up the fast path.
// Their modification however, is still protected by this mutex.
llvm::sys::RWMutex m_mutex;
Modified: lldb/trunk/include/lldb/Utility/SafeMachO.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/SafeMachO.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Utility/SafeMachO.h (original)
+++ lldb/trunk/include/lldb/Utility/SafeMachO.h Mon Apr 30 09:49:04 2018
@@ -9,18 +9,15 @@
#ifndef liblldb_SafeMachO_h_
#define liblldb_SafeMachO_h_
-// This header file is required to work around collisions between the defines in
-// mach/machine.h, and enum members
-// of the same name in llvm's MachO.h. If you want to use llvm/Support/MachO.h,
-// use this file instead.
-// The caveats are:
-// 1) You can only use the MachO.h enums, you can't use the defines. That won't
-// make a difference since the values
+// This header file is required to work around collisions between the defines
+// in mach/machine.h, and enum members of the same name in llvm's MachO.h. If
+// you want to use llvm/Support/MachO.h, use this file instead. The caveats
+// are: 1) You can only use the MachO.h enums, you can't use the defines. That
+// won't make a difference since the values
// are the same.
// 2) If you need any header file that relies on mach/machine.h, you must
-// include that first.
-// 3) This isn't a total solution, it doesn't undef every define that MachO.h
-// has borrowed from various system headers,
+// include that first. 3) This isn't a total solution, it doesn't undef every
+// define that MachO.h has borrowed from various system headers,
// only the ones that come from mach/machine.h because that is the one we
// ended up pulling in from various places.
//
Modified: lldb/trunk/include/lldb/Utility/SelectHelper.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/SelectHelper.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Utility/SelectHelper.h (original)
+++ lldb/trunk/include/lldb/Utility/SelectHelper.h Mon Apr 30 09:49:04 2018
@@ -23,32 +23,31 @@ public:
// Defaults to infinite wait for select unless you call SetTimeout()
SelectHelper();
- // Call SetTimeout() before calling SelectHelper::Select() to set the
- // timeout based on the current time + the timeout. This allows multiple
- // calls to SelectHelper::Select() without having to worry about the
- // absolute timeout as this class manages to set the relative timeout
- // correctly.
+ // Call SetTimeout() before calling SelectHelper::Select() to set the timeout
+ // based on the current time + the timeout. This allows multiple calls to
+ // SelectHelper::Select() without having to worry about the absolute timeout
+ // as this class manages to set the relative timeout correctly.
void SetTimeout(const std::chrono::microseconds &timeout);
- // Call the FDSet*() functions before calling SelectHelper::Select() to
- // set the file descriptors that we will watch for when calling
- // select. This will cause FD_SET() to be called prior to calling select
- // using the "fd" provided.
+ // Call the FDSet*() functions before calling SelectHelper::Select() to set
+ // the file descriptors that we will watch for when calling select. This will
+ // cause FD_SET() to be called prior to calling select using the "fd"
+ // provided.
void FDSetRead(lldb::socket_t fd);
void FDSetWrite(lldb::socket_t fd);
void FDSetError(lldb::socket_t fd);
- // Call the FDIsSet*() functions after calling SelectHelper::Select()
- // to check which file descriptors are ready for read/write/error. This
- // will contain the result of FD_ISSET after calling select for a given
- // file descriptor.
+ // Call the FDIsSet*() functions after calling SelectHelper::Select() to
+ // check which file descriptors are ready for read/write/error. This will
+ // contain the result of FD_ISSET after calling select for a given file
+ // descriptor.
bool FDIsSetRead(lldb::socket_t fd) const;
bool FDIsSetWrite(lldb::socket_t fd) const;
bool FDIsSetError(lldb::socket_t fd) const;
- // Call the system's select() to wait for descriptors using
- // timeout provided in a call the SelectHelper::SetTimeout(),
- // or infinite wait if no timeout was set.
+ // Call the system's select() to wait for descriptors using timeout provided
+ // in a call the SelectHelper::SetTimeout(), or infinite wait if no timeout
+ // was set.
lldb_private::Status Select();
protected:
Modified: lldb/trunk/include/lldb/Utility/SharedCluster.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/SharedCluster.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Utility/SharedCluster.h (original)
+++ lldb/trunk/include/lldb/Utility/SharedCluster.h Mon Apr 30 09:49:04 2018
@@ -50,9 +50,9 @@ public:
delete object;
}
- // Decrement refcount should have been called on this ClusterManager,
- // and it should have locked the mutex, now we will unlock it before
- // we destroy it...
+ // Decrement refcount should have been called on this ClusterManager, and
+ // it should have locked the mutex, now we will unlock it before we destroy
+ // it...
m_mutex.unlock();
}
Modified: lldb/trunk/include/lldb/Utility/SharingPtr.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/SharingPtr.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Utility/SharingPtr.h (original)
+++ lldb/trunk/include/lldb/Utility/SharingPtr.h Mon Apr 30 09:49:04 2018
@@ -14,9 +14,9 @@
// C++ Includes
#include <memory>
-// Microsoft Visual C++ currently does not enable std::atomic to work
-// in CLR mode - as such we need to "hack around it" for MSVC++ builds only
-// using Windows specific intrinsics instead of the C++11 atomic support
+// Microsoft Visual C++ currently does not enable std::atomic to work in CLR
+// mode - as such we need to "hack around it" for MSVC++ builds only using
+// Windows specific intrinsics instead of the C++11 atomic support
#ifdef _MSC_VER
#include <intrin.h>
#else
Modified: lldb/trunk/include/lldb/Utility/Stream.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/Stream.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Utility/Stream.h (original)
+++ lldb/trunk/include/lldb/Utility/Stream.h Mon Apr 30 09:49:04 2018
@@ -163,8 +163,8 @@ public:
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)
+ // Append \a src_len bytes from \a src to the stream as hex characters (two
+ // ascii characters per byte of input data)
size_t
PutBytesAsRawHex8(const void *src, size_t src_len,
lldb::ByteOrder src_byte_order = lldb::eByteOrderInvalid,
Modified: lldb/trunk/include/lldb/Utility/StreamTee.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/StreamTee.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Utility/StreamTee.h (original)
+++ lldb/trunk/include/lldb/Utility/StreamTee.h Mon Apr 30 09:49:04 2018
@@ -61,10 +61,9 @@ public:
std::lock_guard<std::recursive_mutex> guard(m_streams_mutex);
collection::iterator pos, end;
for (pos = m_streams.begin(), end = m_streams.end(); pos != end; ++pos) {
- // Allow for our collection to contain NULL streams. This allows
- // the StreamTee to be used with hard coded indexes for clients
- // that might want N total streams with only a few that are set
- // to valid values.
+ // Allow for our collection to contain NULL streams. This allows the
+ // StreamTee to be used with hard coded indexes for clients that might
+ // want N total streams with only a few that are set to valid values.
Stream *strm = pos->get();
if (strm)
strm->Flush();
@@ -79,10 +78,9 @@ public:
size_t min_bytes_written = SIZE_MAX;
collection::iterator pos, end;
for (pos = m_streams.begin(), end = m_streams.end(); pos != end; ++pos) {
- // Allow for our collection to contain NULL streams. This allows
- // the StreamTee to be used with hard coded indexes for clients
- // that might want N total streams with only a few that are set
- // to valid values.
+ // Allow for our collection to contain NULL streams. This allows the
+ // StreamTee to be used with hard coded indexes for clients that might
+ // want N total streams with only a few that are set to valid values.
Stream *strm = pos->get();
if (strm) {
const size_t bytes_written = strm->Write(s, length);
@@ -121,10 +119,9 @@ public:
void SetStreamAtIndex(uint32_t idx, const lldb::StreamSP &stream_sp) {
std::lock_guard<std::recursive_mutex> guard(m_streams_mutex);
- // Resize our stream vector as necessary to fit as many streams
- // as needed. This also allows this class to be used with hard
- // coded indexes that can be used contain many streams, not all
- // of which are valid.
+ // Resize our stream vector as necessary to fit as many streams as needed.
+ // This also allows this class to be used with hard coded indexes that can
+ // be used contain many streams, not all of which are valid.
if (idx >= m_streams.size())
m_streams.resize(idx + 1);
m_streams[idx] = stream_sp;
Modified: lldb/trunk/include/lldb/Utility/StringExtractor.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/StringExtractor.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Utility/StringExtractor.h (original)
+++ lldb/trunk/include/lldb/Utility/StringExtractor.h Mon Apr 30 09:49:04 2018
@@ -41,8 +41,8 @@ public:
m_index = 0;
}
- // Returns true if the file position is still valid for the data
- // contained in this string extractor object.
+ // Returns true if the file position is still valid for the data contained in
+ // this string extractor object.
bool IsGood() const { return m_index != UINT64_MAX; }
uint64_t GetFilePos() const { return m_index; }
@@ -129,9 +129,9 @@ protected:
//------------------------------------------------------------------
std::string m_packet; // The string in which to extract data.
uint64_t m_index; // When extracting data from a packet, this index
- // will march along as things get extracted. If set
- // to UINT64_MAX the end of the packet data was
- // reached when decoding information
+ // will march along as things get extracted. If set to
+ // UINT64_MAX the end of the packet data was reached
+ // when decoding information
};
#endif // utility_StringExtractor_h_
Modified: lldb/trunk/include/lldb/Utility/StringExtractorGDBRemote.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/StringExtractorGDBRemote.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Utility/StringExtractorGDBRemote.h (original)
+++ lldb/trunk/include/lldb/Utility/StringExtractorGDBRemote.h Mon Apr 30 09:49:04 2018
@@ -188,8 +188,8 @@ public:
bool IsErrorResponse() const;
- // Returns zero if the packet isn't a EXX packet where XX are two hex
- // digits. Otherwise the error encoded in XX is returned.
+ // Returns zero if the packet isn't a EXX packet where XX are two hex digits.
+ // Otherwise the error encoded in XX is returned.
uint8_t GetError();
lldb_private::Status GetStatus();
Modified: lldb/trunk/include/lldb/Utility/StringList.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/StringList.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Utility/StringList.h (original)
+++ lldb/trunk/include/lldb/Utility/StringList.h Mon Apr 30 09:49:04 2018
@@ -100,20 +100,17 @@ public:
// Copy assignment for a vector of strings
StringList &operator=(const std::vector<std::string> &rhs);
- // This string list contains a list of valid auto completion
- // strings, and the "s" is passed in. "matches" is filled in
- // with zero or more string values that start with "s", and
- // the first string to exactly match one of the string
- // values in this collection, will have "exact_matches_idx"
- // filled in to match the index, or "exact_matches_idx" will
- // have SIZE_MAX
+ // This string list contains a list of valid auto completion strings, and the
+ // "s" is passed in. "matches" is filled in with zero or more string values
+ // that start with "s", and the first string to exactly match one of the
+ // string values in this collection, will have "exact_matches_idx" filled in
+ // to match the index, or "exact_matches_idx" will have SIZE_MAX
size_t AutoComplete(llvm::StringRef s, StringList &matches,
size_t &exact_matches_idx) const;
// Dump the StringList to the given lldb_private::Log, `log`, one item per
- // line.
- // If given, `name` will be used to identify the start and end of the list in
- // the output.
+ // line. If given, `name` will be used to identify the start and end of the
+ // list in the output.
virtual void LogDump(Log *log, const char *name = nullptr);
// Static helper to convert an iterable of strings to a StringList, and then
Modified: lldb/trunk/include/lldb/Utility/Timeout.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/Timeout.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Utility/Timeout.h (original)
+++ lldb/trunk/include/lldb/Utility/Timeout.h Mon Apr 30 09:49:04 2018
@@ -22,9 +22,9 @@ namespace lldb_private {
// from Timeout<std::milli> to Timeout<std::micro>.
//
// The intended meaning of the values is:
-// - llvm::None - no timeout, the call should wait forever
-// - 0 - poll, only complete the call if it will not block
-// - >0 - wait for a given number of units for the result
+// - llvm::None - no timeout, the call should wait forever - 0 - poll, only
+// complete the call if it will not block - >0 - wait for a given number of
+// units for the result
template <typename Ratio>
class Timeout : public llvm::Optional<std::chrono::duration<int64_t, Ratio>> {
private:
Modified: lldb/trunk/include/lldb/lldb-enumerations.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/lldb-enumerations.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/lldb-enumerations.h (original)
+++ lldb/trunk/include/lldb/lldb-enumerations.h Mon Apr 30 09:49:04 2018
@@ -21,8 +21,8 @@
// warning, as it's part of -Wmicrosoft which also catches a whole slew of
// other useful issues.
//
-// To make matters worse, early versions of SWIG don't recognize the syntax
-// of specifying the underlying type of an enum (and Python doesn't care anyway)
+// To make matters worse, early versions of SWIG don't recognize the syntax of
+// specifying the underlying type of an enum (and Python doesn't care anyway)
// so we need a way to specify the underlying type when the enum is being used
// from C++ code, but just use a regular enum when swig is pre-processing.
#define FLAGS_ENUM(Name) enum Name : unsigned
@@ -193,9 +193,8 @@ enum ScriptLanguage {
//----------------------------------------------------------------------
// Register numbering types
-// See RegisterContext::ConvertRegisterKindToRegisterNumber to convert
-// any of these to the lldb internal register numbering scheme
-// (eRegisterKindLLDB).
+// See RegisterContext::ConvertRegisterKindToRegisterNumber to convert any of
+// these to the lldb internal register numbering scheme (eRegisterKindLLDB).
//----------------------------------------------------------------------
enum RegisterKind {
eRegisterKindEHFrame = 0, // the register numbers seen in eh_frame
@@ -445,8 +444,8 @@ enum LanguageType {
// Vendor Extensions
// Note: Language::GetNameForLanguageType
// assumes these can be used as indexes into array language_names, and
- // Language::SetLanguageFromCString and Language::AsCString
- // assume these can be used as indexes into array g_languages.
+ // Language::SetLanguageFromCString and Language::AsCString assume these can
+ // be used as indexes into array g_languages.
eLanguageTypeMipsAssembler = 0x0024, ///< Mips_Assembler.
eLanguageTypeExtRenderScript = 0x0025, ///< RenderScript.
eNumLanguageTypes
@@ -671,10 +670,10 @@ FLAGS_ENUM(FunctionNameType){
(1u << 1), // Automatically figure out which FunctionNameType
// bits to set based on the function name.
eFunctionNameTypeFull = (1u << 2), // The function name.
- // For C this is the same as just the name of the function
- // For C++ this is the mangled or demangled version of the mangled name.
- // For ObjC this is the full function signature with the + or
- // - and the square brackets and the class and selector
+ // For C this is the same as just the name of the function For C++ this is
+ // the mangled or demangled version of the mangled name. For ObjC this is
+ // the full function signature with the + or - and the square brackets and
+ // the class and selector
eFunctionNameTypeBase = (1u << 3), // The function name only, no namespaces
// or arguments and no class
// methods or selectors will be searched.
@@ -773,8 +772,8 @@ enum TemplateArgumentKind {
};
//----------------------------------------------------------------------
-// Options that can be set for a formatter to alter its behavior
-// Not all of these are applicable to all formatter types
+// Options that can be set for a formatter to alter its behavior Not all of
+// these are applicable to all formatter types
//----------------------------------------------------------------------
FLAGS_ENUM(TypeOptions){eTypeOptionNone = (0u),
eTypeOptionCascade = (1u << 0),
@@ -788,20 +787,17 @@ FLAGS_ENUM(TypeOptions){eTypeOptionNone
eTypeOptionHideEmptyAggregates = (1u << 8)};
//----------------------------------------------------------------------
-// This is the return value for frame comparisons. If you are comparing frame A
-// to frame B
-// the following cases arise:
-// 1) When frame A pushes frame B (or a frame that ends up pushing B) A is Older
-// than B.
-// 2) When frame A pushed frame B (or if frame A is on the stack but B is not) A
-// is Younger than B
-// 3) When frame A and frame B have the same StackID, they are Equal.
-// 4) When frame A and frame B have the same immediate parent frame, but are not
-// equal, the comparison yields
+// This is the return value for frame comparisons. If you are comparing frame
+// A to frame B the following cases arise: 1) When frame A pushes frame B (or a
+// frame that ends up pushing B) A is Older than B. 2) When frame A pushed
+// frame B (or if frame A is on the stack but B is not) A is Younger than B 3)
+// When frame A and frame B have the same StackID, they are Equal. 4) When
+// frame A and frame B have the same immediate parent frame, but are not equal,
+// the comparison yields
// SameParent.
// 5) If the two frames are on different threads or processes the comparison is
-// Invalid
-// 6) If for some reason we can't figure out what went on, we return Unknown.
+// Invalid 6) If for some reason we can't figure out what went on, we return
+// Unknown.
//----------------------------------------------------------------------
enum FrameComparison {
eFrameCompareInvalid,
@@ -816,11 +812,11 @@ enum FrameComparison {
// Address Class
//
// A way of classifying an address used for disassembling and setting
-// breakpoints. Many object files can track exactly what parts of their
-// object files are code, data and other information. This is of course
-// above and beyond just looking at the section types. For example, code
-// might contain PC relative data and the object file might be able to
-// tell us that an address in code is data.
+// breakpoints. Many object files can track exactly what parts of their object
+// files are code, data and other information. This is of course above and
+// beyond just looking at the section types. For example, code might contain PC
+// relative data and the object file might be able to tell us that an address
+// in code is data.
//----------------------------------------------------------------------
enum AddressClass {
eAddressClassInvalid,
@@ -835,9 +831,8 @@ enum AddressClass {
//----------------------------------------------------------------------
// File Permissions
//
-// Designed to mimic the unix file permission bits so they can be
-// used with functions that set 'mode_t' to certain values for
-// permissions.
+// Designed to mimic the unix file permission bits so they can be used with
+// functions that set 'mode_t' to certain values for permissions.
//----------------------------------------------------------------------
FLAGS_ENUM(FilePermissions){
eFilePermissionsUserRead = (1u << 8), eFilePermissionsUserWrite = (1u << 7),
@@ -897,8 +892,8 @@ FLAGS_ENUM(FilePermissions){
//----------------------------------------------------------------------
// Queue work item types
//
-// The different types of work that can be enqueued on a libdispatch
-// aka Grand Central Dispatch (GCD) queue.
+// The different types of work that can be enqueued on a libdispatch aka Grand
+// Central Dispatch (GCD) queue.
//----------------------------------------------------------------------
enum QueueItemKind {
eQueueItemKindUnknown = 0,
@@ -932,8 +927,8 @@ enum ExpressionEvaluationPhase {
//----------------------------------------------------------------------
// Watchpoint Kind
-// Indicates what types of events cause the watchpoint to fire.
-// Used by Native*Protocol-related classes.
+// Indicates what types of events cause the watchpoint to fire. Used by Native
+// *Protocol-related classes.
//----------------------------------------------------------------------
FLAGS_ENUM(WatchpointKind){eWatchpointKindWrite = (1u << 0),
eWatchpointKindRead = (1u << 1)};
@@ -948,9 +943,9 @@ enum GdbSignal {
};
//----------------------------------------------------------------------
-// Used with SBHost::GetPath (lldb::PathType) to find files that are
-// related to LLDB on the current host machine. Most files are relative
-// to LLDB or are in known locations.
+// Used with SBHost::GetPath (lldb::PathType) to find files that are related to
+// LLDB on the current host machine. Most files are relative to LLDB or are in
+// known locations.
//----------------------------------------------------------------------
enum PathType {
ePathTypeLLDBShlibDir, // The directory where the lldb.so (unix) or LLDB
@@ -1009,58 +1004,54 @@ FLAGS_ENUM(CommandFlags){
//----------------------------------------------------------------------
// eCommandRequiresTarget
//
- // Ensures a valid target is contained in m_exe_ctx prior to executing
- // the command. If a target doesn't exist or is invalid, the command
- // will fail and CommandObject::GetInvalidTargetDescription() will be
- // returned as the error. CommandObject subclasses can override the
- // virtual function for GetInvalidTargetDescription() to provide custom
- // strings when needed.
+ // Ensures a valid target is contained in m_exe_ctx prior to executing the
+ // command. If a target doesn't exist or is invalid, the command will fail
+ // and CommandObject::GetInvalidTargetDescription() will be returned as the
+ // error. CommandObject subclasses can override the virtual function for
+ // GetInvalidTargetDescription() to provide custom strings when needed.
//----------------------------------------------------------------------
eCommandRequiresTarget = (1u << 0),
//----------------------------------------------------------------------
// eCommandRequiresProcess
//
- // Ensures a valid process is contained in m_exe_ctx prior to executing
- // the command. If a process doesn't exist or is invalid, the command
- // will fail and CommandObject::GetInvalidProcessDescription() will be
- // returned as the error. CommandObject subclasses can override the
- // virtual function for GetInvalidProcessDescription() to provide custom
- // strings when needed.
+ // Ensures a valid process is contained in m_exe_ctx prior to executing the
+ // command. If a process doesn't exist or is invalid, the command will fail
+ // and CommandObject::GetInvalidProcessDescription() will be returned as
+ // the error. CommandObject subclasses can override the virtual function
+ // for GetInvalidProcessDescription() to provide custom strings when
+ // needed.
//----------------------------------------------------------------------
eCommandRequiresProcess = (1u << 1),
//----------------------------------------------------------------------
// eCommandRequiresThread
//
- // Ensures a valid thread is contained in m_exe_ctx prior to executing
- // the command. If a thread doesn't exist or is invalid, the command
- // will fail and CommandObject::GetInvalidThreadDescription() will be
- // returned as the error. CommandObject subclasses can override the
- // virtual function for GetInvalidThreadDescription() to provide custom
- // strings when needed.
+ // Ensures a valid thread is contained in m_exe_ctx prior to executing the
+ // command. If a thread doesn't exist or is invalid, the command will fail
+ // and CommandObject::GetInvalidThreadDescription() will be returned as the
+ // error. CommandObject subclasses can override the virtual function for
+ // GetInvalidThreadDescription() to provide custom strings when needed.
//----------------------------------------------------------------------
eCommandRequiresThread = (1u << 2),
//----------------------------------------------------------------------
// eCommandRequiresFrame
//
- // Ensures a valid frame is contained in m_exe_ctx prior to executing
- // the command. If a frame doesn't exist or is invalid, the command
- // will fail and CommandObject::GetInvalidFrameDescription() will be
- // returned as the error. CommandObject subclasses can override the
- // virtual function for GetInvalidFrameDescription() to provide custom
- // strings when needed.
+ // Ensures a valid frame is contained in m_exe_ctx prior to executing the
+ // command. If a frame doesn't exist or is invalid, the command will fail
+ // and CommandObject::GetInvalidFrameDescription() will be returned as the
+ // error. CommandObject subclasses can override the virtual function for
+ // GetInvalidFrameDescription() to provide custom strings when needed.
//----------------------------------------------------------------------
eCommandRequiresFrame = (1u << 3),
//----------------------------------------------------------------------
// eCommandRequiresRegContext
//
- // Ensures a valid register context (from the selected frame if there
- // is a frame in m_exe_ctx, or from the selected thread from m_exe_ctx)
- // is available from m_exe_ctx prior to executing the command. If a
- // target doesn't exist or is invalid, the command will fail and
- // CommandObject::GetInvalidRegContextDescription() will be returned as
- // the error. CommandObject subclasses can override the virtual function
- // for GetInvalidRegContextDescription() to provide custom strings when
- // needed.
+ // Ensures a valid register context (from the selected frame if there is a
+ // frame in m_exe_ctx, or from the selected thread from m_exe_ctx) is
+ // available from m_exe_ctx prior to executing the command. If a target
+ // doesn't exist or is invalid, the command will fail and
+ // CommandObject::GetInvalidRegContextDescription() will be returned as the
+ // error. CommandObject subclasses can override the virtual function for
+ // GetInvalidRegContextDescription() to provide custom strings when needed.
//----------------------------------------------------------------------
eCommandRequiresRegContext = (1u << 4),
//----------------------------------------------------------------------
@@ -1074,15 +1065,15 @@ FLAGS_ENUM(CommandFlags){
//----------------------------------------------------------------------
// eCommandProcessMustBeLaunched
//
- // Verifies that there is a launched process in m_exe_ctx, if there
- // isn't, the command will fail with an appropriate error message.
+ // Verifies that there is a launched process in m_exe_ctx, if there isn't,
+ // the command will fail with an appropriate error message.
//----------------------------------------------------------------------
eCommandProcessMustBeLaunched = (1u << 6),
//----------------------------------------------------------------------
// eCommandProcessMustBePaused
//
- // Verifies that there is a paused process in m_exe_ctx, if there
- // isn't, the command will fail with an appropriate error message.
+ // Verifies that there is a paused process in m_exe_ctx, if there isn't,
+ // the command will fail with an appropriate error message.
//----------------------------------------------------------------------
eCommandProcessMustBePaused = (1u << 7)};
Modified: lldb/trunk/include/lldb/lldb-private-enumerations.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/lldb-private-enumerations.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/lldb-private-enumerations.h (original)
+++ lldb/trunk/include/lldb/lldb-private-enumerations.h Mon Apr 30 09:49:04 2018
@@ -105,9 +105,9 @@ typedef enum SortOrder {
} SortOrder;
//----------------------------------------------------------------------
-// LazyBool is for boolean values that need to be calculated lazily.
-// Values start off set to eLazyBoolCalculate, and then they can be
-// calculated once and set to eLazyBoolNo or eLazyBoolYes.
+// LazyBool is for boolean values that need to be calculated lazily. Values
+// start off set to eLazyBoolCalculate, and then they can be calculated once
+// and set to eLazyBoolNo or eLazyBoolYes.
//----------------------------------------------------------------------
typedef enum LazyBool {
eLazyBoolCalculate = -1,
@@ -217,8 +217,7 @@ enum class LineStatus {
enum class TypeValidatorResult : bool { Success = true, Failure = false };
//----------------------------------------------------------------------
-// Enumerations that can be used to specify scopes types when looking up
-// types.
+// Enumerations that can be used to specify scopes types when looking up types.
//----------------------------------------------------------------------
enum class CompilerContextKind {
Invalid = 0,
@@ -235,8 +234,8 @@ enum class CompilerContextKind {
};
//----------------------------------------------------------------------
-// Enumerations that can be used to specify the kind of metric we're
-// looking at when collecting stats.
+// Enumerations that can be used to specify the kind of metric we're looking at
+// when collecting stats.
//----------------------------------------------------------------------
enum StatisticKind {
ExpressionSuccessful = 0,
Modified: lldb/trunk/include/lldb/lldb-private-forward.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/lldb-private-forward.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/lldb-private-forward.h (original)
+++ lldb/trunk/include/lldb/lldb-private-forward.h Mon Apr 30 09:49:04 2018
@@ -15,8 +15,8 @@
#include <memory>
namespace lldb_private {
-// ---------------------------------------------------------------
-// Class forward decls.
+// --------------------------------------------------------------- Class
+// forward decls.
// ---------------------------------------------------------------
class NativeBreakpoint;
class NativeBreakpointList;
@@ -26,8 +26,7 @@ class NativeThreadProtocol;
class ResumeActionList;
class UnixSignals;
-// ---------------------------------------------------------------
-// SP/WP decls.
+// --------------------------------------------------------------- SP/WP decls.
// ---------------------------------------------------------------
typedef std::shared_ptr<NativeBreakpoint> NativeBreakpointSP;
}
Modified: lldb/trunk/include/lldb/lldb-private-types.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/lldb-private-types.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/lldb-private-types.h (original)
+++ lldb/trunk/include/lldb/lldb-private-types.h Mon Apr 30 09:49:04 2018
@@ -30,9 +30,8 @@ typedef llvm::sys::DynamicLibrary (*Load
const lldb::DebuggerSP &debugger_sp, const FileSpec &spec, Status &error);
//----------------------------------------------------------------------
-// Every register is described in detail including its name, alternate
-// name (optional), encoding, size in bytes and the default display
-// format.
+// Every register is described in detail including its name, alternate name
+// (optional), encoding, size in bytes and the default display format.
//----------------------------------------------------------------------
struct RegisterInfo {
const char *name; // Name of this register, can't be NULL
@@ -41,28 +40,29 @@ struct RegisterInfo {
uint32_t byte_offset; // The byte offset in the register context data where
// this register's value is found.
// This is optional, and can be 0 if a particular RegisterContext does not
- // need to
- // address its registers by byte offset.
+ // need to address its registers by byte offset.
lldb::Encoding encoding; // Encoding of the register bits
lldb::Format format; // Default display format
uint32_t kinds[lldb::kNumRegisterKinds]; // Holds all of the various register
// numbers for all register kinds
uint32_t *value_regs; // List of registers (terminated with
- // LLDB_INVALID_REGNUM). If this value is not
- // null, all registers in this list will be read first, at which point the
- // value
- // for this register will be valid. For example, the value list for ah
- // would be eax (x86) or rax (x64).
+ // LLDB_INVALID_REGNUM). If this value is not null,
+ // all registers in this list will be read first, at
+ // which point the value for this register will be
+ // valid. For example, the value list for ah would be
+ // eax (x86) or rax (x64).
uint32_t *invalidate_regs; // List of registers (terminated with
// LLDB_INVALID_REGNUM). If this value is not
- // null, all registers in this list will be invalidated when the value of this
- // register changes. For example, the invalidate list for eax would be rax
- // ax, ah, and al.
+ // null, all registers in this list will be
+ // invalidated when the value of this register
+ // changes. For example, the invalidate list for
+ // eax would be rax ax, ah, and al.
const uint8_t *dynamic_size_dwarf_expr_bytes; // A DWARF expression that when
// evaluated gives
// the byte size of this register.
size_t dynamic_size_dwarf_len; // The length of the DWARF expression in bytes
- // in the dynamic_size_dwarf_expr_bytes member.
+ // in the dynamic_size_dwarf_expr_bytes
+ // member.
llvm::ArrayRef<uint8_t> data(const uint8_t *context_base) const {
return llvm::ArrayRef<uint8_t>(context_base + byte_offset, byte_size);
@@ -85,8 +85,8 @@ struct RegisterSet {
// values in this array are
// *indices* (not register numbers) into a particular RegisterContext's
// register array. For example, if eax is defined at index 4 for a
- // particular RegisterContext, eax would be included in this RegisterSet
- // by adding the value 4. Not by adding the value lldb_eax_i386.
+ // particular RegisterContext, eax would be included in this RegisterSet by
+ // adding the value 4. Not by adding the value lldb_eax_i386.
};
struct OptionEnumValueElement {
@@ -112,7 +112,8 @@ struct OptionDefinition {
int short_option; // Single character for this option.
int option_has_arg; // no_argument, required_argument or optional_argument
OptionValidator *validator; // If non-NULL, option is valid iff
- // |validator->IsValid()|, otherwise always valid.
+ // |validator->IsValid()|, otherwise always
+ // valid.
OptionEnumValueElement *enum_values; // If non-NULL an array of enum values.
uint32_t completion_type; // Cookie the option class can use to do define the
// argument completion.
Modified: lldb/trunk/include/lldb/lldb-types.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/lldb-types.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/lldb-types.h (original)
+++ lldb/trunk/include/lldb/lldb-types.h Mon Apr 30 09:49:04 2018
@@ -31,8 +31,8 @@
//----------------------------------------------------------------------
// TODO: Add a bunch of ifdefs to determine the host system and what
-// things should be defined. Currently MacOSX is being assumed by default
-// since that is what lldb was first developed for.
+// things should be defined. Currently MacOSX is being assumed by default since
+// that is what lldb was first developed for.
#ifdef _WIN32
Modified: lldb/trunk/include/lldb/lldb-versioning.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/lldb-versioning.h?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/include/lldb/lldb-versioning.h (original)
+++ lldb/trunk/include/lldb/lldb-versioning.h Mon Apr 30 09:49:04 2018
@@ -100,8 +100,8 @@
*/
// if you want the version checking to work on other OS/compiler, define
-// appropriate IMPL_DEPRECATED/IMPL_TOONEW
-// and define LLDB_API_CHECK_VERSIONING_WORKS when you are ready to go live
+// appropriate IMPL_DEPRECATED/IMPL_TOONEW and define
+// LLDB_API_CHECK_VERSIONING_WORKS when you are ready to go live
#if defined(__APPLE__) && defined(__clang__)
#define LLDB_API_IMPL_DEPRECATED __attribute__((deprecated))
#define LLDB_API_IMPL_TOONEW __attribute__((unavailable))
Modified: lldb/trunk/source/API/SBAddress.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBAddress.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/API/SBAddress.cpp (original)
+++ lldb/trunk/source/API/SBAddress.cpp Mon Apr 30 09:49:04 2018
@@ -120,10 +120,9 @@ void SBAddress::SetLoadAddress(lldb::add
else
m_opaque_ap->Clear();
- // Check if we weren't were able to resolve a section offset address.
- // If we weren't it is ok, the load address might be a location on the
- // stack or heap, so we should just have an address with no section and
- // a valid offset
+ // Check if we weren't were able to resolve a section offset address. If we
+ // weren't it is ok, the load address might be a location on the stack or
+ // heap, so we should just have an address with no section and a valid offset
if (!m_opaque_ap->IsValid())
m_opaque_ap->SetOffset(load_addr);
}
@@ -163,9 +162,8 @@ Address &SBAddress::ref() {
}
const Address &SBAddress::ref() const {
- // This object should already have checked with "IsValid()"
- // prior to calling this function. In case you didn't we will assert
- // and die to let you know.
+ // This object should already have checked with "IsValid()" prior to calling
+ // this function. In case you didn't we will assert and die to let you know.
assert(m_opaque_ap.get());
return *m_opaque_ap;
}
Modified: lldb/trunk/source/API/SBBreakpointName.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBBreakpointName.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/API/SBBreakpointName.cpp (original)
+++ lldb/trunk/source/API/SBBreakpointName.cpp Mon Apr 30 09:49:04 2018
@@ -52,8 +52,8 @@ public:
bool operator==(const SBBreakpointNameImpl &rhs);
bool operator!=(const SBBreakpointNameImpl &rhs);
- // For now we take a simple approach and only keep the name, and relook
- // up the location when we need it.
+ // For now we take a simple approach and only keep the name, and relook up
+ // the location when we need it.
TargetSP GetTarget() const {
return m_target_wp.lock();
@@ -115,8 +115,7 @@ SBBreakpointName::SBBreakpointName() {}
SBBreakpointName::SBBreakpointName(SBTarget &sb_target, const char *name)
{
m_impl_up.reset(new SBBreakpointNameImpl(sb_target, name));
- // Call FindBreakpointName here to make sure the name is valid, reset if
- // not:
+ // Call FindBreakpointName here to make sure the name is valid, reset if not:
BreakpointName *bp_name = GetBreakpointName();
if (!bp_name)
m_impl_up.reset();
@@ -133,8 +132,7 @@ SBBreakpointName::SBBreakpointName(SBBre
m_impl_up.reset(new SBBreakpointNameImpl(target.shared_from_this(), name));
- // Call FindBreakpointName here to make sure the name is valid, reset if
- // not:
+ // Call FindBreakpointName here to make sure the name is valid, reset if not:
BreakpointName *bp_name = GetBreakpointName();
if (!bp_name) {
m_impl_up.reset();
Modified: lldb/trunk/source/API/SBCommandInterpreter.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBCommandInterpreter.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/API/SBCommandInterpreter.cpp (original)
+++ lldb/trunk/source/API/SBCommandInterpreter.cpp Mon Apr 30 09:49:04 2018
@@ -272,8 +272,8 @@ int SBCommandInterpreter::HandleCompleti
Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
int num_completions = 0;
- // Sanity check the arguments that are passed in:
- // cursor & last_char have to be within the current_line.
+ // Sanity check the arguments that are passed in: cursor & last_char have to
+ // be within the current_line.
if (current_line == nullptr || cursor == nullptr || last_char == nullptr)
return 0;
Modified: lldb/trunk/source/API/SBDebugger.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBDebugger.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/API/SBDebugger.cpp (original)
+++ lldb/trunk/source/API/SBDebugger.cpp Mon Apr 30 09:49:04 2018
@@ -168,14 +168,10 @@ SBDebugger SBDebugger::Create(bool sourc
SBDebugger debugger;
// Currently we have issues if this function is called simultaneously on two
- // different
- // threads. The issues mainly revolve around the fact that the
- // lldb_private::FormatManager
- // uses global collections and having two threads parsing the .lldbinit files
- // can cause
- // mayhem. So to get around this for now we need to use a mutex to prevent bad
- // things
- // from happening.
+ // different threads. The issues mainly revolve around the fact that the
+ // lldb_private::FormatManager uses global collections and having two threads
+ // parsing the .lldbinit files can cause mayhem. So to get around this for
+ // now we need to use a mutex to prevent bad things from happening.
static std::recursive_mutex g_mutex;
std::lock_guard<std::recursive_mutex> guard(g_mutex);
@@ -220,10 +216,10 @@ void SBDebugger::Destroy(SBDebugger &deb
}
void SBDebugger::MemoryPressureDetected() {
- // Since this function can be call asynchronously, we allow it to be
- // non-mandatory. We have seen deadlocks with this function when called
- // so we need to safeguard against this until we can determine what is
- // causing the deadlocks.
+ // Since this function can be call asynchronously, we allow it to be non-
+ // mandatory. We have seen deadlocks with this function when called so we
+ // need to safeguard against this until we can determine what is causing the
+ // deadlocks.
Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
const bool mandatory = false;
@@ -256,9 +252,9 @@ void SBDebugger::SkipAppInitFiles(bool b
m_opaque_sp->GetCommandInterpreter().SkipAppInitFiles(b);
}
-// Shouldn't really be settable after initialization as this could cause lots of
-// problems; don't want users
-// trying to switch modes in the middle of a debugging session.
+// Shouldn't really be settable after initialization as this could cause lots
+// of problems; don't want users trying to switch modes in the middle of a
+// debugging session.
void SBDebugger::SetInputFileHandle(FILE *fh, bool transfer_ownership) {
Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
Modified: lldb/trunk/source/API/SBEvent.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBEvent.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/API/SBEvent.cpp (original)
+++ lldb/trunk/source/API/SBEvent.cpp Mon Apr 30 09:49:04 2018
@@ -146,8 +146,8 @@ void SBEvent::reset(Event *event_ptr) {
}
bool SBEvent::IsValid() const {
- // Do NOT use m_opaque_ptr directly!!! Must use the SBEvent::get()
- // accessor. See comments in SBEvent::get()....
+ // Do NOT use m_opaque_ptr directly!!! Must use the SBEvent::get() accessor.
+ // See comments in SBEvent::get()....
return SBEvent::get() != NULL;
}
Modified: lldb/trunk/source/API/SBInstruction.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBInstruction.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/API/SBInstruction.cpp (original)
+++ lldb/trunk/source/API/SBInstruction.cpp Mon Apr 30 09:49:04 2018
@@ -27,12 +27,11 @@
#include "lldb/Utility/DataExtractor.h"
//----------------------------------------------------------------------
-// We recently fixed a leak in one of the Instruction subclasses where
-// the instruction will only hold a weak reference to the disassembler
-// to avoid a cycle that was keeping both objects alive (leak) and we
-// need the InstructionImpl class to make sure our public API behaves
-// as users would expect. Calls in our public API allow clients to do
-// things like:
+// We recently fixed a leak in one of the Instruction subclasses where the
+// instruction will only hold a weak reference to the disassembler to avoid a
+// cycle that was keeping both objects alive (leak) and we need the
+// InstructionImpl class to make sure our public API behaves as users would
+// expect. Calls in our public API allow clients to do things like:
//
// 1 lldb::SBInstruction inst;
// 2 inst = target.ReadInstructions(pc, 1).GetInstructionAtIndex(0)
@@ -40,12 +39,12 @@
// 4 ...
//
// There was a temporary lldb::DisassemblerSP object created in the
-// SBInstructionList that was returned by lldb.target.ReadInstructions()
-// that will go away after line 2 but the "inst" object should be able
-// to still answer questions about itself. So we make sure that any
-// SBInstruction objects that are given out have a strong reference to
-// the disassembler and the instruction so that the object can live and
-// successfully respond to all queries.
+// SBInstructionList that was returned by lldb.target.ReadInstructions() that
+// will go away after line 2 but the "inst" object should be able to still
+// answer questions about itself. So we make sure that any SBInstruction
+// objects that are given out have a strong reference to the disassembler and
+// the instruction so that the object can live and successfully respond to all
+// queries.
//----------------------------------------------------------------------
class InstructionImpl {
public:
Modified: lldb/trunk/source/API/SBInstructionList.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBInstructionList.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/API/SBInstructionList.cpp (original)
+++ lldb/trunk/source/API/SBInstructionList.cpp Mon Apr 30 09:49:04 2018
@@ -92,8 +92,8 @@ bool SBInstructionList::GetDescription(l
if (m_opaque_sp) {
size_t num_instructions = GetSize();
if (num_instructions) {
- // Call the ref() to make sure a stream is created if one deesn't
- // exist already inside description...
+ // Call the ref() to make sure a stream is created if one deesn't exist
+ // already inside description...
Stream &sref = description.ref();
const uint32_t max_opcode_byte_size =
m_opaque_sp->GetInstructionList().GetMaxOpcocdeByteSize();
Modified: lldb/trunk/source/API/SBLaunchInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBLaunchInfo.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/API/SBLaunchInfo.cpp (original)
+++ lldb/trunk/source/API/SBLaunchInfo.cpp Mon Apr 30 09:49:04 2018
@@ -148,8 +148,8 @@ void SBLaunchInfo::SetProcessPluginName(
}
const char *SBLaunchInfo::GetShell() {
- // Constify this string so that it is saved in the string pool. Otherwise
- // it would be freed when this function goes out of scope.
+ // Constify this string so that it is saved in the string pool. Otherwise it
+ // would be freed when this function goes out of scope.
ConstString shell(m_opaque_sp->GetShell().GetPath().c_str());
return shell.AsCString();
}
Modified: lldb/trunk/source/API/SBModule.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBModule.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/API/SBModule.cpp (original)
+++ lldb/trunk/source/API/SBModule.cpp Mon Apr 30 09:49:04 2018
@@ -165,11 +165,10 @@ const char *SBModule::GetUUIDString() co
const char *uuid_cstr = NULL;
ModuleSP module_sp(GetSP());
if (module_sp) {
- // We are going to return a "const char *" value through the public
- // API, so we need to constify it so it gets added permanently the
- // string pool and then we don't need to worry about the lifetime of the
- // string as it will never go away once it has been put into the ConstString
- // string pool
+ // We are going to return a "const char *" value through the public API, so
+ // we need to constify it so it gets added permanently the string pool and
+ // then we don't need to worry about the lifetime of the string as it will
+ // never go away once it has been put into the ConstString string pool
uuid_cstr = ConstString(module_sp->GetUUID().GetAsString()).GetCString();
}
@@ -515,9 +514,9 @@ const char *SBModule::GetTriple() {
ModuleSP module_sp(GetSP());
if (module_sp) {
std::string triple(module_sp->GetArchitecture().GetTriple().str());
- // Unique the string so we don't run into ownership issues since
- // the const strings put the string into the string pool once and
- // the strings never comes out
+ // Unique the string so we don't run into ownership issues since the const
+ // strings put the string into the string pool once and the strings never
+ // comes out
ConstString const_triple(triple.c_str());
return const_triple.GetCString();
}
Modified: lldb/trunk/source/API/SBModuleSpec.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBModuleSpec.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/API/SBModuleSpec.cpp (original)
+++ lldb/trunk/source/API/SBModuleSpec.cpp Mon Apr 30 09:49:04 2018
@@ -70,9 +70,9 @@ void SBModuleSpec::SetObjectName(const c
const char *SBModuleSpec::GetTriple() {
std::string triple(m_opaque_ap->GetArchitecture().GetTriple().str());
- // Unique the string so we don't run into ownership issues since
- // the const strings put the string into the string pool once and
- // the strings never comes out
+ // Unique the string so we don't run into ownership issues since the const
+ // strings put the string into the string pool once and the strings never
+ // comes out
ConstString const_triple(triple.c_str());
return const_triple.GetCString();
}
Modified: lldb/trunk/source/API/SBProcess.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBProcess.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/API/SBProcess.cpp (original)
+++ lldb/trunk/source/API/SBProcess.cpp Mon Apr 30 09:49:04 2018
@@ -896,8 +896,7 @@ SBProcess SBProcess::GetProcessFromEvent
ProcessSP process_sp =
Process::ProcessEventData::GetProcessFromEvent(event.get());
if (!process_sp) {
- // StructuredData events also know the process they come from.
- // Try that.
+ // StructuredData events also know the process they come from. Try that.
process_sp = EventDataStructuredData::GetProcessFromEvent(event.get());
}
Modified: lldb/trunk/source/API/SBQueueItem.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBQueueItem.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/API/SBQueueItem.cpp (original)
+++ lldb/trunk/source/API/SBQueueItem.cpp Mon Apr 30 09:49:04 2018
@@ -112,8 +112,7 @@ SBThread SBQueueItem::GetExtendedBacktra
thread_sp = m_queue_item_sp->GetExtendedBacktraceThread(type_const);
if (thread_sp) {
// Save this in the Process' ExtendedThreadList so a strong pointer
- // retains the
- // object
+ // retains the object
process_sp->GetExtendedThreadList().AddThread(thread_sp);
result.SetThread(thread_sp);
if (log) {
Modified: lldb/trunk/source/API/SBStream.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBStream.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/API/SBStream.cpp (original)
+++ lldb/trunk/source/API/SBStream.cpp Mon Apr 30 09:49:04 2018
@@ -26,8 +26,8 @@ SBStream::~SBStream() {}
bool SBStream::IsValid() const { return (m_opaque_ap.get() != NULL); }
-// If this stream is not redirected to a file, it will maintain a local
-// cache for the stream data which can be accessed using this accessor.
+// If this stream is not redirected to a file, it will maintain a local cache
+// for the stream data which can be accessed using this accessor.
const char *SBStream::GetData() {
if (m_is_file || m_opaque_ap.get() == NULL)
return NULL;
@@ -35,9 +35,8 @@ const char *SBStream::GetData() {
return static_cast<StreamString *>(m_opaque_ap.get())->GetData();
}
-// If this stream is not redirected to a file, it will maintain a local
-// cache for the stream output whose length can be accessed using this
-// accessor.
+// If this stream is not redirected to a file, it will maintain a local cache
+// for the stream output whose length can be accessed using this accessor.
size_t SBStream::GetSize() {
if (m_is_file || m_opaque_ap.get() == NULL)
return 0;
Modified: lldb/trunk/source/API/SBTarget.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBTarget.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/API/SBTarget.cpp (original)
+++ lldb/trunk/source/API/SBTarget.cpp Mon Apr 30 09:49:04 2018
@@ -84,8 +84,8 @@ Status AttachToProcess(ProcessAttachInfo
const auto state = process_sp->GetState();
if (process_sp->IsAlive() && state == eStateConnected) {
// If we are already connected, then we have already specified the
- // listener, so if a valid listener is supplied, we need to error out
- // to let the client know.
+ // listener, so if a valid listener is supplied, we need to error out to
+ // let the client know.
if (attach_info.GetListener())
return Status("process is connected and already has a listener, pass "
"empty listener");
@@ -288,8 +288,8 @@ SBProcess SBTarget::Launch(SBListener &l
if (state == eStateConnected) {
// If we are already connected, then we have already specified the
- // listener, so if a valid listener is supplied, we need to error out
- // to let the client know.
+ // listener, so if a valid listener is supplied, we need to error out to
+ // let the client know.
if (listener.IsValid()) {
error.SetErrorString("process is connected and already has a listener, "
"pass empty listener");
@@ -1543,9 +1543,9 @@ const char *SBTarget::GetTriple() {
TargetSP target_sp(GetSP());
if (target_sp) {
std::string triple(target_sp->GetArchitecture().GetTriple().str());
- // Unique the string so we don't run into ownership issues since
- // the const strings put the string into the string pool once and
- // the strings never comes out
+ // Unique the string so we don't run into ownership issues since the const
+ // strings put the string into the string pool once and the strings never
+ // comes out
ConstString const_triple(triple.c_str());
return const_triple.GetCString();
}
@@ -1695,8 +1695,8 @@ lldb::SBType SBTarget::FindFirstType(con
}
}
- // Didn't find the type in the symbols; try the Objective-C runtime
- // if one is installed
+ // Didn't find the type in the symbols; try the Objective-C runtime if one
+ // is installed
ProcessSP process_sp(target_sp->GetProcessSP());
Modified: lldb/trunk/source/API/SBThread.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBThread.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/API/SBThread.cpp (original)
+++ lldb/trunk/source/API/SBThread.cpp Mon Apr 30 09:49:04 2018
@@ -615,8 +615,7 @@ SBError SBThread::ResumeNewPlan(Executio
}
// User level plans should be Master Plans so they can be interrupted, other
- // plans executed, and
- // then a "continue" will resume the plan.
+ // plans executed, and then a "continue" will resume the plan.
if (new_plan != NULL) {
new_plan->SetIsMasterPlan(true);
new_plan->SetOkayToDiscard(false);
@@ -911,8 +910,7 @@ SBError SBThread::StepOverUntil(lldb::SB
// Grab the current function, then we will make sure the "until" address is
// within the function. We discard addresses that are out of the current
// function, and then if there are no addresses remaining, give an
- // appropriate
- // error message.
+ // appropriate error message.
bool all_in_function = true;
AddressRange fun_range = frame_sc.function->GetAddressRange();
@@ -1374,8 +1372,7 @@ SBThread SBThread::GetExtendedBacktraceT
runtime->GetExtendedBacktraceThread(real_thread, type_const));
if (new_thread_sp) {
// Save this in the Process' ExtendedThreadList so a strong
- // pointer retains the
- // object.
+ // pointer retains the object.
process->GetExtendedThreadList().AddThread(new_thread_sp);
sb_origin_thread.SetThread(new_thread_sp);
if (log) {
Modified: lldb/trunk/source/API/SBThreadPlan.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBThreadPlan.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/API/SBThreadPlan.cpp (original)
+++ lldb/trunk/source/API/SBThreadPlan.cpp Mon Apr 30 09:49:04 2018
@@ -138,8 +138,7 @@ bool SBThreadPlan::IsValid() {
// plans...
//
// FIXME, you should only be able to queue thread plans from inside the methods
-// of a
-// Scripted Thread Plan. Need a way to enforce that.
+// of a Scripted Thread Plan. Need a way to enforce that.
SBThreadPlan
SBThreadPlan::QueueThreadPlanForStepOverRange(SBAddress &sb_start_address,
Modified: lldb/trunk/source/API/SBType.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBType.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/API/SBType.cpp (original)
+++ lldb/trunk/source/API/SBType.cpp Mon Apr 30 09:49:04 2018
@@ -88,9 +88,9 @@ TypeImpl &SBType::ref() {
}
const TypeImpl &SBType::ref() const {
- // "const SBAddress &addr" should already have checked "addr.IsValid()"
- // prior to calling this function. In case you didn't we will assert
- // and die to let you know.
+ // "const SBAddress &addr" should already have checked "addr.IsValid()" prior
+ // to calling this function. In case you didn't we will assert and die to let
+ // you know.
assert(m_opaque_sp.get());
return *m_opaque_sp;
}
Modified: lldb/trunk/source/API/SBTypeCategory.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBTypeCategory.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/API/SBTypeCategory.cpp (original)
+++ lldb/trunk/source/API/SBTypeCategory.cpp Mon Apr 30 09:49:04 2018
@@ -341,9 +341,9 @@ bool SBTypeCategory::AddTypeSummary(SBTy
// FIXME: we need to iterate over all the Debugger objects and have each of
// them contain a copy of the function
// since we currently have formatters live in a global space, while Python
- // code lives in a specific Debugger-related environment
- // this should eventually be fixed by deciding a final location in the LLDB
- // object space for formatters
+ // code lives in a specific Debugger-related environment this should
+ // eventually be fixed by deciding a final location in the LLDB object space
+ // for formatters
if (summary.IsFunctionCode()) {
const void *name_token =
(const void *)ConstString(type_name.GetName()).GetCString();
@@ -453,9 +453,9 @@ bool SBTypeCategory::AddTypeSynthetic(SB
// FIXME: we need to iterate over all the Debugger objects and have each of
// them contain a copy of the function
// since we currently have formatters live in a global space, while Python
- // code lives in a specific Debugger-related environment
- // this should eventually be fixed by deciding a final location in the LLDB
- // object space for formatters
+ // code lives in a specific Debugger-related environment this should
+ // eventually be fixed by deciding a final location in the LLDB object space
+ // for formatters
if (synth.IsClassCode()) {
const void *name_token =
(const void *)ConstString(type_name.GetName()).GetCString();
Modified: lldb/trunk/source/API/SBValue.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBValue.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/API/SBValue.cpp (original)
+++ lldb/trunk/source/API/SBValue.cpp Mon Apr 30 09:49:04 2018
@@ -89,16 +89,13 @@ public:
// FIXME: This check is necessary but not sufficient. We for sure don't
// want to touch SBValues whose owning
// targets have gone away. This check is a little weak in that it
- // enforces that restriction when you call
- // IsValid, but since IsValid doesn't lock the target, you have no
- // guarantee that the SBValue won't go
- // invalid after you call this...
- // Also, an SBValue could depend on data from one of the modules in the
- // target, and those could go away
- // independently of the target, for instance if a module is unloaded. But
- // right now, neither SBValues
- // nor ValueObjects know which modules they depend on. So I have no good
- // way to make that check without
+ // enforces that restriction when you call IsValid, but since IsValid
+ // doesn't lock the target, you have no guarantee that the SBValue won't
+ // go invalid after you call this... Also, an SBValue could depend on
+ // data from one of the modules in the target, and those could go away
+ // independently of the target, for instance if a module is unloaded.
+ // But right now, neither SBValues nor ValueObjects know which modules
+ // they depend on. So I have no good way to make that check without
// tracking that in all the ValueObject subclasses.
TargetSP target_sp = m_valobj_sp->GetTargetSP();
if (target_sp && target_sp->IsValid())
@@ -129,9 +126,9 @@ public:
ProcessSP process_sp(value_sp->GetProcessSP());
if (process_sp && !stop_locker.TryLock(&process_sp->GetRunLock())) {
- // We don't allow people to play around with ValueObject if the process is
- // running.
- // If you want to look at values, pause the process, then look.
+ // We don't allow people to play around with ValueObject if the process
+ // is running. If you want to look at values, pause the process, then
+ // look.
if (log)
log->Printf("SBValue(%p)::GetSP() => error: process is running",
static_cast<void *>(value_sp.get()));
@@ -171,10 +168,8 @@ public:
// All the derived values that we would make from the m_valobj_sp will share
// the ExecutionContext with m_valobj_sp, so we don't need to do the
- // calculations
- // in GetSP to return the Target, Process, Thread or Frame. It is convenient
- // to
- // provide simple accessors for these, which I do here.
+ // calculations in GetSP to return the Target, Process, Thread or Frame. It
+ // is convenient to provide simple accessors for these, which I do here.
TargetSP GetTargetSP() {
if (m_valobj_sp)
return m_valobj_sp->GetTargetSP();
@@ -242,9 +237,9 @@ SBValue &SBValue::operator=(const SBValu
SBValue::~SBValue() {}
bool SBValue::IsValid() {
- // If this function ever changes to anything that does more than just
- // check if the opaque shared pointer is non NULL, then we need to update
- // all "if (m_opaque_sp)" code in this file.
+ // If this function ever changes to anything that does more than just check
+ // if the opaque shared pointer is non NULL, then we need to update all "if
+ // (m_opaque_sp)" code in this file.
return m_opaque_sp.get() != NULL && m_opaque_sp->IsValid() &&
m_opaque_sp->GetRootSP().get() != NULL;
}
@@ -1397,11 +1392,9 @@ lldb::SBAddress SBValue::GetAddress() {
if (module_sp)
module_sp->ResolveFileAddress(value, addr);
} else if (addr_type == eAddressTypeLoad) {
- // no need to check the return value on this.. if it can actually do the
- // resolve
- // addr will be in the form (section,offset), otherwise it will simply
- // be returned
- // as (NULL, value)
+ // no need to check the return value on this.. if it can actually do
+ // the resolve addr will be in the form (section,offset), otherwise it
+ // will simply be returned as (NULL, value)
addr.SetLoadAddress(value, target_sp.get());
}
}
Modified: lldb/trunk/source/API/SystemInitializerFull.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SystemInitializerFull.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/API/SystemInitializerFull.cpp (original)
+++ lldb/trunk/source/API/SystemInitializerFull.cpp Mon Apr 30 09:49:04 2018
@@ -138,11 +138,10 @@ extern "C" void init_lldb(void);
#define LLDBSwigPyInit init_lldb
#endif
-// these are the Pythonic implementations of the required callbacks
-// these are scripting-language specific, which is why they belong here
-// we still need to use function pointers to them instead of relying
-// on linkage-time resolution because the SWIG stuff and this file
-// get built at different times
+// these are the Pythonic implementations of the required callbacks these are
+// scripting-language specific, which is why they belong here we still need to
+// use function pointers to them instead of relying on linkage-time resolution
+// because the SWIG stuff and this file get built at different times
extern "C" bool LLDBSwigPythonBreakpointCallbackFunction(
const char *python_function_name, const char *session_dictionary_name,
const lldb::StackFrameSP &sb_frame,
@@ -262,10 +261,9 @@ void SystemInitializerFull::Initialize()
#if !defined(LLDB_DISABLE_PYTHON)
InitializeSWIG();
- // ScriptInterpreterPython::Initialize() depends on things like HostInfo being
- // initialized
- // so it can compute the python directory etc, so we need to do this after
- // SystemInitializerCommon::Initialize().
+ // ScriptInterpreterPython::Initialize() depends on things like HostInfo
+ // being initialized so it can compute the python directory etc, so we need
+ // to do this after SystemInitializerCommon::Initialize().
ScriptInterpreterPython::Initialize();
#endif
@@ -363,8 +361,8 @@ void SystemInitializerFull::Initialize()
DynamicLoaderDarwinKernel::Initialize();
#endif
- // This plugin is valid on any host that talks to a Darwin remote.
- // It shouldn't be limited to __APPLE__.
+ // This plugin is valid on any host that talks to a Darwin remote. It
+ // shouldn't be limited to __APPLE__.
StructuredDataDarwinLog::Initialize();
//----------------------------------------------------------------------
@@ -382,8 +380,8 @@ void SystemInitializerFull::Initialize()
// Scan for any system or user LLDB plug-ins
PluginManager::Initialize();
- // The process settings need to know about installed plug-ins, so the Settings
- // must be initialized
+ // The process settings need to know about installed plug-ins, so the
+ // Settings must be initialized
// AFTER PluginManager::Initialize is called.
Debugger::SettingsInitialize();
Modified: lldb/trunk/source/Breakpoint/Breakpoint.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Breakpoint/Breakpoint.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Breakpoint/Breakpoint.cpp (original)
+++ lldb/trunk/source/Breakpoint/Breakpoint.cpp Mon Apr 30 09:49:04 2018
@@ -285,13 +285,13 @@ void Breakpoint::RemoveInvalidLocations(
m_locations.RemoveInvalidLocations(arch);
}
-// For each of the overall options we need to decide how they propagate to
-// the location options. This will determine the precedence of options on
-// the breakpoint vs. its locations.
-
-// Disable at the breakpoint level should override the location settings.
-// That way you can conveniently turn off a whole breakpoint without messing
-// up the individual settings.
+// For each of the overall options we need to decide how they propagate to the
+// location options. This will determine the precedence of options on the
+// breakpoint vs. its locations.
+
+// Disable at the breakpoint level should override the location settings. That
+// way you can conveniently turn off a whole breakpoint without messing up the
+// individual settings.
void Breakpoint::SetEnabled(bool enable) {
if (enable == m_options_up->IsEnabled())
@@ -331,10 +331,8 @@ bool Breakpoint::IgnoreCountShouldStop()
uint32_t ignore = GetIgnoreCount();
if (ignore != 0) {
// When we get here we know the location that caused the stop doesn't have
- // an ignore count,
- // since by contract we call it first... So we don't have to find &
- // decrement it, we only have
- // to decrement our own ignore count.
+ // an ignore count, since by contract we call it first... So we don't have
+ // to find & decrement it, we only have to decrement our own ignore count.
DecrementIgnoreCount();
return false;
} else
@@ -431,8 +429,8 @@ const char *Breakpoint::GetConditionText
// This function is used when "baton" doesn't need to be freed
void Breakpoint::SetCallback(BreakpointHitCallback callback, void *baton,
bool is_synchronous) {
- // The default "Baton" class will keep a copy of "baton" and won't free
- // or delete it when it goes goes out of scope.
+ // The default "Baton" class will keep a copy of "baton" and won't free or
+ // delete it when it goes goes out of scope.
m_options_up->SetCallback(callback, std::make_shared<UntypedBaton>(baton),
is_synchronous);
@@ -478,8 +476,7 @@ void Breakpoint::ResolveBreakpointInModu
bool send_event) {
if (m_resolver_sp) {
// If this is not an internal breakpoint, set up to record the new
- // locations, then dispatch
- // an event with the new locations.
+ // locations, then dispatch an event with the new locations.
if (!IsInternal() && send_event) {
BreakpointEventData *new_locations_event = new BreakpointEventData(
eBreakpointEventTypeLocationsAdded, shared_from_this());
@@ -517,8 +514,8 @@ void Breakpoint::ModulesChanged(ModuleLi
std::lock_guard<std::recursive_mutex> guard(module_list.GetMutex());
if (load) {
// The logic for handling new modules is:
- // 1) If the filter rejects this module, then skip it.
- // 2) Run through the current location list and if there are any locations
+ // 1) If the filter rejects this module, then skip it. 2) Run through the
+ // current location list and if there are any locations
// for that module, we mark the module as "seen" and we don't try to
// re-resolve
// breakpoint locations for that module.
@@ -528,8 +525,8 @@ void Breakpoint::ModulesChanged(ModuleLi
ModuleList new_modules; // We'll stuff the "unseen" modules in this list,
// and then resolve
- // them after the locations pass. Have to do it this way because
- // resolving breakpoints will add new locations potentially.
+ // them after the locations pass. Have to do it this way because resolving
+ // breakpoints will add new locations potentially.
for (ModuleSP module_sp : module_list.ModulesNoLocking()) {
bool seen = false;
@@ -540,9 +537,9 @@ void Breakpoint::ModulesChanged(ModuleLi
for (BreakpointLocationSP break_loc_sp :
m_locations.BreakpointLocations()) {
- // If the section for this location was deleted, that means
- // it's Module has gone away but somebody forgot to tell us.
- // Let's clean it up here.
+ // If the section for this location was deleted, that means it's Module
+ // has gone away but somebody forgot to tell us. Let's clean it up
+ // here.
Address section_addr(break_loc_sp->GetAddress());
if (section_addr.SectionWasDeleted()) {
locations_with_no_section.Add(break_loc_sp);
@@ -554,10 +551,10 @@ void Breakpoint::ModulesChanged(ModuleLi
SectionSP section_sp(section_addr.GetSection());
- // If we don't have a Section, that means this location is a raw address
- // that we haven't resolved to a section yet. So we'll have to look
- // in all the new modules to resolve this location.
- // Otherwise, if it was set in this module, re-resolve it here.
+ // If we don't have a Section, that means this location is a raw
+ // address that we haven't resolved to a section yet. So we'll have to
+ // look in all the new modules to resolve this location. Otherwise, if
+ // it was set in this module, re-resolve it here.
if (section_sp && section_sp->GetModule() == module_sp) {
if (!seen)
seen = true;
@@ -606,10 +603,9 @@ void Breakpoint::ModulesChanged(ModuleLi
BreakpointLocationSP break_loc_sp(m_locations.GetByIndex(loc_idx));
SectionSP section_sp(break_loc_sp->GetAddress().GetSection());
if (section_sp && section_sp->GetModule() == module_sp) {
- // Remove this breakpoint since the shared library is
- // unloaded, but keep the breakpoint location around
- // so we always get complete hit count and breakpoint
- // lifetime info
+ // Remove this breakpoint since the shared library is unloaded, but
+ // keep the breakpoint location around so we always get complete
+ // hit count and breakpoint lifetime info
break_loc_sp->ClearBreakpointSite();
if (removed_locations_event) {
removed_locations_event->GetBreakpointLocationCollection().Add(
@@ -637,7 +633,8 @@ static bool SymbolContextsMightBeEquival
bool equivalent_scs = false;
if (old_sc.module_sp.get() == new_sc.module_sp.get()) {
- // If these come from the same module, we can directly compare the pointers:
+ // If these come from the same module, we can directly compare the
+ // pointers:
if (old_sc.comp_unit && new_sc.comp_unit &&
(old_sc.comp_unit == new_sc.comp_unit)) {
if (old_sc.function && new_sc.function &&
@@ -694,15 +691,13 @@ void Breakpoint::ModuleReplaced(ModuleSP
temp_list.Append(new_module_sp);
ResolveBreakpointInModules(temp_list);
} else {
- // First search the new module for locations.
- // Then compare this with the old list, copy over locations that "look the
- // same"
- // Then delete the old locations.
- // Finally remember to post the creation event.
+ // First search the new module for locations. Then compare this with the
+ // old list, copy over locations that "look the same" Then delete the old
+ // locations. Finally remember to post the creation event.
//
- // Two locations are the same if they have the same comp unit & function (by
- // name) and there are the same number
- // of locations in the old function as in the new one.
+ // Two locations are the same if they have the same comp unit & function
+ // (by name) and there are the same number of locations in the old function
+ // as in the new one.
ModuleList temp_list;
temp_list.Append(new_module_sp);
@@ -715,8 +710,8 @@ void Breakpoint::ModuleReplaced(ModuleSP
if (num_new_locations > 0) {
// Break out the case of one location -> one location since that's the
- // most common one, and there's no need
- // to build up the structures needed for the merge in that case.
+ // most common one, and there's no need to build up the structures needed
+ // for the merge in that case.
if (num_new_locations == 1 && num_old_locations == 1) {
bool equivalent_locations = false;
SymbolContext old_sc, new_sc;
@@ -739,8 +734,7 @@ void Breakpoint::ModuleReplaced(ModuleSP
}
} else {
// We don't want to have to keep computing the SymbolContexts for these
- // addresses over and over,
- // so lets get them up front:
+ // addresses over and over, so lets get them up front:
typedef std::map<lldb::break_id_t, SymbolContext> IDToSCMap;
IDToSCMap old_sc_map;
@@ -763,7 +757,8 @@ void Breakpoint::ModuleReplaced(ModuleSP
lldb::break_id_t old_id = old_sc_map.begin()->first;
SymbolContext &old_sc = old_sc_map.begin()->second;
- // Count the number of entries equivalent to this SC for the old list:
+ // Count the number of entries equivalent to this SC for the old
+ // list:
std::vector<lldb::break_id_t> old_id_vec;
old_id_vec.push_back(old_id);
@@ -783,13 +778,11 @@ void Breakpoint::ModuleReplaced(ModuleSP
}
// Alright, if we have the same number of potentially equivalent
- // locations in the old
- // and new modules, we'll just map them one to one in ascending ID
- // order (assuming the
- // resolver's order would match the equivalent ones.
- // Otherwise, we'll dump all the old ones, and just take the new ones,
- // erasing the elements
- // from both maps as we go.
+ // locations in the old and new modules, we'll just map them one to
+ // one in ascending ID order (assuming the resolver's order would
+ // match the equivalent ones. Otherwise, we'll dump all the old ones,
+ // and just take the new ones, erasing the elements from both maps as
+ // we go.
if (old_id_vec.size() == new_id_vec.size()) {
llvm::sort(old_id_vec.begin(), old_id_vec.end());
@@ -821,11 +814,9 @@ void Breakpoint::ModuleReplaced(ModuleSP
}
// Now remove the remaining old locations, and cons up a removed locations
- // event.
- // Note, we don't put the new locations that were swapped with an old
- // location on the locations_to_remove
- // list, so we don't need to worry about telling the world about removing a
- // location we didn't tell them
+ // event. Note, we don't put the new locations that were swapped with an
+ // old location on the locations_to_remove list, so we don't need to worry
+ // about telling the world about removing a location we didn't tell them
// about adding.
BreakpointEventData *locations_event;
@@ -861,8 +852,8 @@ void Breakpoint::ModuleReplaced(ModuleSP
void Breakpoint::Dump(Stream *) {}
size_t Breakpoint::GetNumResolvedLocations() const {
- // Return the number of breakpoints that are actually resolved and set
- // down in the inferior process.
+ // Return the number of breakpoints that are actually resolved and set down
+ // in the inferior process.
return m_locations.GetNumResolvedLocations();
}
@@ -889,9 +880,8 @@ void Breakpoint::GetDescription(Stream *
const size_t num_resolved_locations = GetNumResolvedLocations();
// They just made the breakpoint, they don't need to be told HOW they made
- // it...
- // Also, we'll print the breakpoint number differently depending on whether
- // there is 1 or more locations.
+ // it... Also, we'll print the breakpoint number differently depending on
+ // whether there is 1 or more locations.
if (level != eDescriptionLevelInitial) {
s->Printf("%i: ", GetID());
GetResolverDescription(s);
@@ -908,8 +898,7 @@ void Breakpoint::GetDescription(Stream *
(uint64_t)num_resolved_locations, GetHitCount());
} else {
// Don't print the pending notification for exception resolvers since we
- // don't generally
- // know how to set them until the target is run.
+ // don't generally know how to set them until the target is run.
if (m_resolver_sp->getResolverID() !=
BreakpointResolver::ExceptionResolver)
s->Printf(", locations = 0 (pending)");
@@ -965,8 +954,7 @@ void Breakpoint::GetDescription(Stream *
}
// The brief description is just the location name (1.2 or whatever). That's
- // pointless to
- // show in the breakpoint's description, so suppress it.
+ // pointless to show in the breakpoint's description, so suppress it.
if (show_locations && level != lldb::eDescriptionLevelBrief) {
s->IndentMore();
for (size_t i = 0; i < num_locations; ++i) {
Modified: lldb/trunk/source/Breakpoint/BreakpointID.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Breakpoint/BreakpointID.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Breakpoint/BreakpointID.cpp (original)
+++ lldb/trunk/source/Breakpoint/BreakpointID.cpp Mon Apr 30 09:49:04 2018
@@ -29,10 +29,9 @@ BreakpointID::~BreakpointID() = default;
static llvm::StringRef g_range_specifiers[] = {"-", "to", "To", "TO"};
// Tells whether or not STR is valid to use between two strings representing
-// breakpoint IDs, to
-// indicate a range of breakpoint IDs. This is broken out into a separate
-// function so that we can
-// easily change or add to the format for specifying ID ranges at a later date.
+// breakpoint IDs, to indicate a range of breakpoint IDs. This is broken out
+// into a separate function so that we can easily change or add to the format
+// for specifying ID ranges at a later date.
bool BreakpointID::IsRangeIdentifier(llvm::StringRef str) {
for (auto spec : g_range_specifiers) {
Modified: lldb/trunk/source/Breakpoint/BreakpointIDList.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Breakpoint/BreakpointIDList.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Breakpoint/BreakpointIDList.cpp (original)
+++ lldb/trunk/source/Breakpoint/BreakpointIDList.cpp Mon Apr 30 09:49:04 2018
@@ -237,13 +237,13 @@ void BreakpointIDList::FindAndReplaceIDR
}
// We have valid range starting & ending breakpoint IDs. Go through all
- // the breakpoints in the target and find all the breakpoints that fit
- // into this range, and add them to new_args.
+ // the breakpoints in the target and find all the breakpoints that fit into
+ // this range, and add them to new_args.
// Next check to see if we have location id's. If so, make sure the
- // start_bp_id and end_bp_id are for the same breakpoint; otherwise we
- // have an illegal range: breakpoint id ranges that specify bp locations
- // are NOT allowed to cross major bp id numbers.
+ // start_bp_id and end_bp_id are for the same breakpoint; otherwise we have
+ // an illegal range: breakpoint id ranges that specify bp locations are NOT
+ // allowed to cross major bp id numbers.
if ((start_loc_id != LLDB_INVALID_BREAK_ID) ||
(end_loc_id != LLDB_INVALID_BREAK_ID)) {
Modified: lldb/trunk/source/Breakpoint/BreakpointLocation.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Breakpoint/BreakpointLocation.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Breakpoint/BreakpointLocation.cpp (original)
+++ lldb/trunk/source/Breakpoint/BreakpointLocation.cpp Mon Apr 30 09:49:04 2018
@@ -110,8 +110,8 @@ void BreakpointLocation::SetThreadID(lld
if (thread_id != LLDB_INVALID_THREAD_ID)
GetLocationOptions()->SetThreadID(thread_id);
else {
- // If we're resetting this to an invalid thread id, then
- // don't make an options pointer just to do that.
+ // If we're resetting this to an invalid thread id, then don't make an
+ // options pointer just to do that.
if (m_options_ap.get() != nullptr)
m_options_ap->SetThreadID(thread_id);
}
@@ -132,8 +132,8 @@ void BreakpointLocation::SetThreadIndex(
if (index != 0)
GetLocationOptions()->GetThreadSpec()->SetIndex(index);
else {
- // If we're resetting this to an invalid thread id, then
- // don't make an options pointer just to do that.
+ // If we're resetting this to an invalid thread id, then don't make an
+ // options pointer just to do that.
if (m_options_ap.get() != nullptr)
m_options_ap->GetThreadSpec()->SetIndex(index);
}
@@ -154,8 +154,8 @@ void BreakpointLocation::SetThreadName(c
if (thread_name != nullptr)
GetLocationOptions()->GetThreadSpec()->SetName(thread_name);
else {
- // If we're resetting this to an invalid thread id, then
- // don't make an options pointer just to do that.
+ // If we're resetting this to an invalid thread id, then don't make an
+ // options pointer just to do that.
if (m_options_ap.get() != nullptr)
m_options_ap->GetThreadSpec()->SetName(thread_name);
}
@@ -176,8 +176,8 @@ void BreakpointLocation::SetQueueName(co
if (queue_name != nullptr)
GetLocationOptions()->GetThreadSpec()->SetQueueName(queue_name);
else {
- // If we're resetting this to an invalid thread id, then
- // don't make an options pointer just to do that.
+ // If we're resetting this to an invalid thread id, then don't make an
+ // options pointer just to do that.
if (m_options_ap.get() != nullptr)
m_options_ap->GetThreadSpec()->SetQueueName(queue_name);
}
@@ -203,8 +203,8 @@ bool BreakpointLocation::InvokeCallback(
void BreakpointLocation::SetCallback(BreakpointHitCallback callback,
void *baton, bool is_synchronous) {
- // The default "Baton" class will keep a copy of "baton" and won't free
- // or delete it when it goes goes out of scope.
+ // The default "Baton" class will keep a copy of "baton" and won't free or
+ // delete it when it goes goes out of scope.
GetLocationOptions()->SetCallback(
callback, std::make_shared<UntypedBaton>(baton), is_synchronous);
SendBreakpointLocationChangedEvent(eBreakpointEventTypeCommandChanged);
@@ -283,8 +283,7 @@ bool BreakpointLocation::ConditionSaysSt
}
// We need to make sure the user sees any parse errors in their condition, so
- // we'll hook the
- // constructor errors up to the debugger's Async I/O.
+ // we'll hook the constructor errors up to the debugger's Async I/O.
ValueObjectSP result_value_sp;
@@ -372,9 +371,9 @@ bool BreakpointLocation::IgnoreCountShou
}
BreakpointOptions *BreakpointLocation::GetLocationOptions() {
- // If we make the copy we don't copy the callbacks because that is potentially
- // expensive and we don't want to do that for the simple case where someone is
- // just disabling the location.
+ // If we make the copy we don't copy the callbacks because that is
+ // potentially expensive and we don't want to do that for the simple case
+ // where someone is just disabling the location.
if (m_options_ap.get() == nullptr)
m_options_ap.reset(
new BreakpointOptions(false));
@@ -479,9 +478,8 @@ bool BreakpointLocation::ClearBreakpoint
if (m_bp_site_sp.get()) {
ProcessSP process_sp(m_owner.GetTarget().GetProcessSP());
// If the process exists, get it to remove the owner, it will remove the
- // physical implementation
- // of the breakpoint as well if there are no more owners. Otherwise just
- // remove this owner.
+ // physical implementation of the breakpoint as well if there are no more
+ // owners. Otherwise just remove this owner.
if (process_sp)
process_sp->RemoveOwnerFromBreakpointSite(GetBreakpoint().GetID(),
GetID(), m_bp_site_sp);
@@ -499,8 +497,8 @@ void BreakpointLocation::GetDescription(
SymbolContext sc;
// If the description level is "initial" then the breakpoint is printing out
- // our initial state,
- // and we should let it decide how it wants to print our label.
+ // our initial state, and we should let it decide how it wants to print our
+ // label.
if (level != eDescriptionLevelInitial) {
s->Indent();
BreakpointID::GetCanonicalReference(s, m_owner.GetID(), GetID());
Modified: lldb/trunk/source/Breakpoint/BreakpointLocationList.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Breakpoint/BreakpointLocationList.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Breakpoint/BreakpointLocationList.cpp (original)
+++ lldb/trunk/source/Breakpoint/BreakpointLocationList.cpp Mon Apr 30 09:49:04 2018
@@ -49,12 +49,12 @@ bool BreakpointLocationList::ShouldStop(
BreakpointLocationSP bp = FindByID(break_id);
if (bp) {
// Let the BreakpointLocation decide if it should stop here (could not have
- // reached it's target hit count yet, or it could have a callback
- // that decided it shouldn't stop (shared library loads/unloads).
+ // reached it's target hit count yet, or it could have a callback that
+ // decided it shouldn't stop (shared library loads/unloads).
return bp->ShouldStop(context);
}
- // We should stop here since this BreakpointLocation isn't valid anymore or it
- // doesn't exist.
+ // We should stop here since this BreakpointLocation isn't valid anymore or
+ // it doesn't exist.
return true;
}
@@ -266,8 +266,8 @@ void BreakpointLocationList::RemoveLocat
void BreakpointLocationList::RemoveInvalidLocations(const ArchSpec &arch) {
std::lock_guard<std::recursive_mutex> guard(m_mutex);
size_t idx = 0;
- // Don't cache m_location.size() as it will change since we might
- // remove locations from our vector...
+ // Don't cache m_location.size() as it will change since we might remove
+ // locations from our vector...
while (idx < m_locations.size()) {
BreakpointLocation *bp_loc = m_locations[idx].get();
if (bp_loc->GetAddress().SectionWasDeleted()) {
@@ -287,7 +287,8 @@ void BreakpointLocationList::RemoveInval
}
}
}
- // Only increment the index if we didn't remove the locations at index "idx"
+ // Only increment the index if we didn't remove the locations at index
+ // "idx"
++idx;
}
}
Modified: lldb/trunk/source/Breakpoint/BreakpointOptions.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Breakpoint/BreakpointOptions.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Breakpoint/BreakpointOptions.cpp (original)
+++ lldb/trunk/source/Breakpoint/BreakpointOptions.cpp Mon Apr 30 09:49:04 2018
@@ -425,10 +425,9 @@ void BreakpointOptions::SetCallback(Brea
const lldb::BatonSP &callback_baton_sp,
bool callback_is_synchronous) {
// FIXME: This seems unsafe. If BatonSP actually *is* a CommandBaton, but
- // in a shared_ptr<Baton> instead of a shared_ptr<CommandBaton>, then we
- // will set m_baton_is_command_baton to false, which is incorrect.
- // One possible solution is to make the base Baton class provide a method
- // such as:
+ // in a shared_ptr<Baton> instead of a shared_ptr<CommandBaton>, then we will
+ // set m_baton_is_command_baton to false, which is incorrect. One possible
+ // solution is to make the base Baton class provide a method such as:
// virtual StringRef getBatonId() const { return ""; }
// and have CommandBaton override this to return something unique, and then
// check for it here. Another option might be to make Baton using the llvm
@@ -554,8 +553,7 @@ void BreakpointOptions::SetThreadSpec(
void BreakpointOptions::GetDescription(Stream *s,
lldb::DescriptionLevel level) const {
// Figure out if there are any options not at their default value, and only
- // print
- // anything if there are:
+ // print anything if there are:
if (m_ignore_count != 0 || !m_enabled || m_one_shot || m_auto_continue ||
(GetThreadSpecNoCreate() != nullptr &&
@@ -660,8 +658,7 @@ bool BreakpointOptions::BreakpointOption
CommandReturnObject result;
Debugger &debugger = target->GetDebugger();
// Rig up the results secondary output stream to the debugger's, so the
- // output will come out synchronously
- // if the debugger is set up that way.
+ // output will come out synchronously if the debugger is set up that way.
StreamSP output_stream(debugger.GetAsyncOutputStream());
StreamSP error_stream(debugger.GetAsyncErrorStream());
Modified: lldb/trunk/source/Breakpoint/BreakpointResolver.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Breakpoint/BreakpointResolver.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Breakpoint/BreakpointResolver.cpp (original)
+++ lldb/trunk/source/Breakpoint/BreakpointResolver.cpp Mon Apr 30 09:49:04 2018
@@ -15,8 +15,8 @@
// Project includes
#include "lldb/Breakpoint/Breakpoint.h"
#include "lldb/Breakpoint/BreakpointLocation.h"
-// Have to include the other breakpoint resolver types here so the static create
-// from StructuredData can call them.
+// Have to include the other breakpoint resolver types here so the static
+// create from StructuredData can call them.
#include "lldb/Breakpoint/BreakpointResolverAddress.h"
#include "lldb/Breakpoint/BreakpointResolverFileLine.h"
#include "lldb/Breakpoint/BreakpointResolverFileRegex.h"
@@ -212,8 +212,7 @@ void BreakpointResolver::SetSCMatchesByL
sc_list.RemoveContextAtIndex(current_idx);
// ResolveSymbolContext will always return a number that is >= the line
- // number you pass in.
- // So the smaller line number is always better.
+ // number you pass in. So the smaller line number is always better.
if (sc.line_entry.line < closest_line_number)
closest_line_number = sc.line_entry.line;
} else
@@ -234,8 +233,7 @@ void BreakpointResolver::SetSCMatchesByL
}
// Next go through and see if there are line table entries that are
- // contiguous, and if so keep only the
- // first of the contiguous range:
+ // contiguous, and if so keep only the first of the contiguous range:
current_idx = 0;
std::map<Block *, lldb::addr_t> blocks_with_breakpoints;
Modified: lldb/trunk/source/Breakpoint/BreakpointResolverAddress.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Breakpoint/BreakpointResolverAddress.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Breakpoint/BreakpointResolverAddress.cpp (original)
+++ lldb/trunk/source/Breakpoint/BreakpointResolverAddress.cpp Mon Apr 30 09:49:04 2018
@@ -100,11 +100,10 @@ BreakpointResolverAddress::SerializeToSt
}
void BreakpointResolverAddress::ResolveBreakpoint(SearchFilter &filter) {
- // If the address is not section relative, then we should not try to
- // re-resolve it, it is just some
- // random address and we wouldn't know what to do on reload. But if it is
- // section relative, we need to
- // re-resolve it since the section it's in may have shifted on re-run.
+ // If the address is not section relative, then we should not try to re-
+ // resolve it, it is just some random address and we wouldn't know what to do
+ // on reload. But if it is section relative, we need to re-resolve it since
+ // the section it's in may have shifted on re-run.
bool re_resolve = false;
if (m_addr.GetSection() || m_module_filespec)
re_resolve = true;
@@ -137,8 +136,8 @@ BreakpointResolverAddress::SearchCallbac
if (filter.AddressPasses(m_addr)) {
if (m_breakpoint->GetNumLocations() == 0) {
// If the address is just an offset, and we're given a module, see if we
- // can find the appropriate module
- // loaded in the binary, and fix up m_addr to use that.
+ // can find the appropriate module loaded in the binary, and fix up
+ // m_addr to use that.
if (!m_addr.IsSectionOffset() && m_module_filespec) {
Target &target = m_breakpoint->GetTarget();
ModuleSpec module_spec(m_module_filespec);
Modified: lldb/trunk/source/Breakpoint/BreakpointResolverFileLine.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Breakpoint/BreakpointResolverFileLine.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Breakpoint/BreakpointResolverFileLine.cpp (original)
+++ lldb/trunk/source/Breakpoint/BreakpointResolverFileLine.cpp Mon Apr 30 09:49:04 2018
@@ -110,10 +110,10 @@ BreakpointResolverFileLine::SerializeToS
// Filter the symbol context list to remove contexts where the line number was
// moved into a new function. We do this conservatively, so if e.g. we cannot
-// resolve the function in the context (which can happen in case of
-// line-table-only debug info), we leave the context as is. The trickiest part
-// here is handling inlined functions -- in this case we need to make sure we
-// look at the declaration line of the inlined function, NOT the function it was
+// resolve the function in the context (which can happen in case of line-table-
+// only debug info), we leave the context as is. The trickiest part here is
+// handling inlined functions -- in this case we need to make sure we look at
+// the declaration line of the inlined function, NOT the function it was
// inlined into.
void BreakpointResolverFileLine::FilterContexts(SymbolContextList &sc_list,
bool is_relative) {
@@ -133,8 +133,8 @@ void BreakpointResolverFileLine::FilterC
// relative parts of the path match the path from support files
auto sc_dir = sc.line_entry.file.GetDirectory().GetStringRef();
if (!sc_dir.endswith(relative_path)) {
- // We had a relative path specified and the relative directory
- // doesn't match so remove this one
+ // We had a relative path specified and the relative directory doesn't
+ // match so remove this one
LLDB_LOG(log, "removing not matching relative path {0} since it "
"doesn't end with {1}", sc_dir, relative_path);
sc_list.RemoveContextAtIndex(i);
@@ -199,20 +199,20 @@ BreakpointResolverFileLine::SearchCallba
assert(m_breakpoint != NULL);
// There is a tricky bit here. You can have two compilation units that
- // #include the same file, and in one of them the function at m_line_number is
- // used (and so code and a line entry for it is generated) but in the other it
- // isn't. If we considered the CU's independently, then in the second
- // inclusion, we'd move the breakpoint to the next function that actually
- // generated code in the header file. That would end up being confusing. So
- // instead, we do the CU iterations by hand here, then scan through the
- // complete list of matches, and figure out the closest line number match, and
- // only set breakpoints on that match.
-
- // Note also that if file_spec only had a file name and not a directory, there
- // may be many different file spec's in the resultant list. The closest line
- // match for one will not be right for some totally different file. 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.
+ // #include the same file, and in one of them the function at m_line_number
+ // is used (and so code and a line entry for it is generated) but in the
+ // other it isn't. If we considered the CU's independently, then in the
+ // second inclusion, we'd move the breakpoint to the next function that
+ // actually generated code in the header file. That would end up being
+ // confusing. So instead, we do the CU iterations by hand here, then scan
+ // through the complete list of matches, and figure out the closest line
+ // number match, and only set breakpoints on that match.
+
+ // Note also that if file_spec only had a file name and not a directory,
+ // there may be many different file spec's in the resultant list. The
+ // closest line match for one will not be right for some totally different
+ // file. 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.
FileSpec search_file_spec = m_file_spec;
const bool is_relative = m_file_spec.IsRelative();
Modified: lldb/trunk/source/Breakpoint/BreakpointResolverName.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Breakpoint/BreakpointResolverName.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Breakpoint/BreakpointResolverName.cpp (original)
+++ lldb/trunk/source/Breakpoint/BreakpointResolverName.cpp Mon Apr 30 09:49:04 2018
@@ -241,9 +241,8 @@ void BreakpointResolverName::AddNameLook
// FIXME: Right now we look at the module level, and call the module's
// "FindFunctions".
// Greg says he will add function tables, maybe at the CompileUnit level to
-// accelerate function
-// lookup. At that point, we should switch the depth to CompileUnit, and look
-// in these tables.
+// accelerate function lookup. At that point, we should switch the depth to
+// CompileUnit, and look in these tables.
Searcher::CallbackReturn
BreakpointResolverName::SearchCallback(SearchFilter &filter,
@@ -301,8 +300,8 @@ BreakpointResolverName::SearchCallback(S
break;
}
- // If the filter specifies a Compilation Unit, remove the ones that don't pass
- // at this point.
+ // If the filter specifies a Compilation Unit, remove the ones that don't
+ // pass at this point.
if (filter_by_cu || filter_by_language) {
uint32_t num_functions = func_list.GetSize();
Modified: lldb/trunk/source/Breakpoint/BreakpointSiteList.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Breakpoint/BreakpointSiteList.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Breakpoint/BreakpointSiteList.cpp (original)
+++ lldb/trunk/source/Breakpoint/BreakpointSiteList.cpp Mon Apr 30 09:49:04 2018
@@ -24,8 +24,7 @@ BreakpointSiteList::BreakpointSiteList()
BreakpointSiteList::~BreakpointSiteList() {}
// Add breakpoint site to the list. However, if the element already exists in
-// the
-// list, then we don't add it, and return LLDB_INVALID_BREAK_ID.
+// the list, then we don't add it, and return LLDB_INVALID_BREAK_ID.
lldb::break_id_t BreakpointSiteList::Add(const BreakpointSiteSP &bp) {
lldb::addr_t bp_site_load_addr = bp->GetLoadAddress();
@@ -45,8 +44,8 @@ bool BreakpointSiteList::ShouldStop(Stop
BreakpointSiteSP site_sp(FindByID(site_id));
if (site_sp) {
// Let the BreakpointSite decide if it should stop here (could not have
- // reached it's target hit count yet, or it could have a callback
- // that decided it shouldn't stop (shared library loads/unloads).
+ // reached it's target hit count yet, or it could have a callback that
+ // decided it shouldn't stop (shared library loads/unloads).
return site_sp->ShouldStop(context);
}
// We should stop here since this BreakpointSite isn't valid anymore or it
@@ -60,7 +59,8 @@ lldb::break_id_t BreakpointSiteList::Fin
// PRIx64 " ) => %u", __FUNCTION__, (uint64_t)addr, bp->GetID());
return bp.get()->GetID();
}
- // DBLogIf(PD_LOG_BREAKPOINTS, "BreakpointSiteList::%s ( addr = 0x%8.8" PRIx64
+ // DBLogIf(PD_LOG_BREAKPOINTS, "BreakpointSiteList::%s ( addr = 0x%8.8"
+ // PRIx64
// " ) => NONE", __FUNCTION__, (uint64_t)addr);
return LLDB_INVALID_BREAK_ID;
}
@@ -185,10 +185,9 @@ bool BreakpointSiteList::FindInRange(lld
if (lower == m_bp_site_list.end() || (*lower).first >= upper_bound)
return false;
- // This is one tricky bit. The breakpoint might overlap the bottom end of the
- // range. So we grab the
- // breakpoint prior to the lower bound, and check that that + its byte size
- // isn't in our range.
+ // This is one tricky bit. The breakpoint might overlap the bottom end of
+ // the range. So we grab the breakpoint prior to the lower bound, and check
+ // that that + its byte size isn't in our range.
if (lower != m_bp_site_list.begin()) {
collection::const_iterator prev_pos = lower;
prev_pos--;
Modified: lldb/trunk/source/Breakpoint/Watchpoint.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Breakpoint/Watchpoint.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Breakpoint/Watchpoint.cpp (original)
+++ lldb/trunk/source/Breakpoint/Watchpoint.cpp Mon Apr 30 09:49:04 2018
@@ -59,8 +59,8 @@ Watchpoint::~Watchpoint() = default;
// This function is used when "baton" doesn't need to be freed
void Watchpoint::SetCallback(WatchpointHitCallback callback, void *baton,
bool is_synchronous) {
- // The default "Baton" class will keep a copy of "baton" and won't free
- // or delete it when it goes goes out of scope.
+ // The default "Baton" class will keep a copy of "baton" and won't free or
+ // delete it when it goes goes out of scope.
m_options.SetCallback(callback, std::make_shared<UntypedBaton>(baton),
is_synchronous);
@@ -103,8 +103,8 @@ bool Watchpoint::CaptureWatchedValue(con
Address watch_address(GetLoadAddress());
if (!m_type.IsValid()) {
// Don't know how to report new & old values, since we couldn't make a
- // scalar type for this watchpoint.
- // This works around an assert in ValueObjectMemory::Create.
+ // scalar type for this watchpoint. This works around an assert in
+ // ValueObjectMemory::Create.
// FIXME: This should not happen, but if it does in some case we care about,
// we can go grab the value raw and print it as unsigned.
return false;
@@ -217,11 +217,9 @@ void Watchpoint::DumpWithLevel(Stream *s
bool Watchpoint::IsEnabled() const { return m_enabled; }
// Within StopInfo.cpp, we purposely turn on the ephemeral mode right before
-// temporarily disable the watchpoint
-// in order to perform possible watchpoint actions without triggering further
-// watchpoint events.
-// After the temporary disabled watchpoint is enabled, we then turn off the
-// ephemeral mode.
+// temporarily disable the watchpoint in order to perform possible watchpoint
+// actions without triggering further watchpoint events. After the temporary
+// disabled watchpoint is enabled, we then turn off the ephemeral mode.
void Watchpoint::TurnOnEphemeralMode() { m_is_ephemeral = true; }
Modified: lldb/trunk/source/Breakpoint/WatchpointList.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Breakpoint/WatchpointList.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Breakpoint/WatchpointList.cpp (original)
+++ lldb/trunk/source/Breakpoint/WatchpointList.cpp Mon Apr 30 09:49:04 2018
@@ -203,9 +203,9 @@ bool WatchpointList::ShouldStop(Stoppoin
WatchpointSP wp_sp = FindByID(watch_id);
if (wp_sp) {
- // Let the Watchpoint decide if it should stop here (could not have
- // reached it's target hit count yet, or it could have a callback
- // that decided it shouldn't stop.
+ // Let the Watchpoint decide if it should stop here (could not have reached
+ // it's target hit count yet, or it could have a callback that decided it
+ // shouldn't stop.
return wp_sp->ShouldStop(context);
}
// We should stop here since this Watchpoint isn't valid anymore or it
Modified: lldb/trunk/source/Breakpoint/WatchpointOptions.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Breakpoint/WatchpointOptions.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Breakpoint/WatchpointOptions.cpp (original)
+++ lldb/trunk/source/Breakpoint/WatchpointOptions.cpp Mon Apr 30 09:49:04 2018
@@ -143,8 +143,7 @@ void WatchpointOptions::GetCallbackDescr
void WatchpointOptions::GetDescription(Stream *s,
lldb::DescriptionLevel level) const {
// Figure out if there are any options not at their default value, and only
- // print
- // anything if there are:
+ // print anything if there are:
if ((GetThreadSpecNoCreate() != nullptr &&
GetThreadSpecNoCreate()->HasSpecification())) {
Modified: lldb/trunk/source/Commands/CommandCompletions.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandCompletions.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandCompletions.cpp (original)
+++ lldb/trunk/source/Commands/CommandCompletions.cpp Mon Apr 30 09:49:04 2018
@@ -149,8 +149,8 @@ static int DiskFilesOrDirectories(const
return matches.GetSize();
}
- // If there was no trailing slash, then we're done as soon as we resolve the
- // expression to the correct directory. Otherwise we need to continue
+ // If there was no trailing slash, then we're done as soon as we resolve
+ // the expression to the correct directory. Otherwise we need to continue
// looking for matches within that directory.
if (FirstSep == llvm::StringRef::npos) {
// Make sure it ends with a separator.
Modified: lldb/trunk/source/Commands/CommandObjectApropos.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectApropos.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectApropos.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectApropos.cpp Mon Apr 30 09:49:04 2018
@@ -53,8 +53,8 @@ bool CommandObjectApropos::DoExecute(Arg
if (argc == 1) {
auto search_word = args[0].ref;
if (!search_word.empty()) {
- // The bulk of the work must be done inside the Command Interpreter, since
- // the command dictionary is private.
+ // The bulk of the work must be done inside the Command Interpreter,
+ // since the command dictionary is private.
StringList commands_found;
StringList commands_help;
Modified: lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp Mon Apr 30 09:49:04 2018
@@ -85,8 +85,8 @@ public:
switch (short_option) {
case 'c':
- // Normally an empty breakpoint condition marks is as unset.
- // But we need to say it was passed in.
+ // Normally an empty breakpoint condition marks is as unset. But we need
+ // to say it was passed in.
m_bp_opts.SetCondition(option_arg.str().c_str());
m_bp_opts.m_set_flags.Set(BreakpointOptions::eCondition);
break;
@@ -263,8 +263,9 @@ static OptionDefinition g_breakpoint_set
"#included, set target.inline-breakpoint-strategy to \"always\"." },
{ LLDB_OPT_SET_1, true, "line", 'l', OptionParser::eRequiredArgument, nullptr, nullptr, 0, eArgTypeLineNum, "Specifies the line number on which to set this breakpoint." },
- // Comment out this option for the moment, as we don't actually use it, but will in the future.
- // This way users won't see it, but the infrastructure is left in place.
+ // Comment out this option for the moment, as we don't actually use it, but
+ // will in the future. This way users won't see it, but the infrastructure is
+ // left in place.
// { 0, false, "column", 'C', OptionParser::eRequiredArgument, nullptr, "<column>",
// "Set the breakpoint by source location at this particular column."},
@@ -854,9 +855,9 @@ protected:
output_stream.Printf("Breakpoint set in dummy target, will get copied "
"into future targets.\n");
else {
- // Don't print out this warning for exception breakpoints. They can get
- // set before the target is set, but we won't know how to actually set
- // the breakpoint till we run.
+ // Don't print out this warning for exception breakpoints. They can
+ // get set before the target is set, but we won't know how to actually
+ // set the breakpoint till we run.
if (bp_sp->GetNumLocations() == 0 && break_type != eSetTypeException) {
output_stream.Printf("WARNING: Unable to resolve breakpoint to any "
"actual locations.\n");
@@ -875,8 +876,8 @@ private:
bool GetDefaultFile(Target *target, FileSpec &file,
CommandReturnObject &result) {
uint32_t default_line;
- // First use the Source Manager's default file.
- // Then use the current stack frame's file.
+ // First use the Source Manager's default file. Then use the current stack
+ // frame's file.
if (!target->GetSourceManager().GetDefaultFileAndLine(file, default_line)) {
StackFrame *cur_frame = m_exe_ctx.GetFramePtr();
if (cur_frame == nullptr) {
@@ -1452,7 +1453,8 @@ protected:
return false;
}
- // The following are the various types of breakpoints that could be cleared:
+ // The following are the various types of breakpoints that could be
+ // cleared:
// 1). -f -l (clearing breakpoint by source location)
BreakpointClearType break_type = eClearTypeInvalid;
@@ -1898,8 +1900,8 @@ protected:
return false;
}
}
- // Now configure them, we already pre-checked the names so we don't need
- // to check the error:
+ // Now configure them, we already pre-checked the names so we don't need to
+ // check the error:
BreakpointSP bp_sp;
if (m_bp_id.m_breakpoint.OptionWasSet())
{
@@ -2560,11 +2562,10 @@ void CommandObjectMultiwordBreakpoint::V
}
// Create a new Args variable to use; copy any non-breakpoint-id-ranges stuff
- // directly from the old ARGS to
- // the new TEMP_ARGS. Do not copy breakpoint id range strings over; instead
- // generate a list of strings for
- // all the breakpoint ids in the range, and shove all of those breakpoint id
- // strings into TEMP_ARGS.
+ // directly from the old ARGS to the new TEMP_ARGS. Do not copy breakpoint
+ // id range strings over; instead generate a list of strings for all the
+ // breakpoint ids in the range, and shove all of those breakpoint id strings
+ // into TEMP_ARGS.
BreakpointIDList::FindAndReplaceIDRanges(args, target, allow_locations,
purpose, result, temp_args);
@@ -2575,15 +2576,13 @@ void CommandObjectMultiwordBreakpoint::V
valid_ids->InsertStringArray(temp_args.GetConstArgumentVector(),
temp_args.GetArgumentCount(), result);
- // At this point, all of the breakpoint ids that the user passed in have been
- // converted to breakpoint IDs
- // and put into valid_ids.
+ // At this point, all of the breakpoint ids that the user passed in have
+ // been converted to breakpoint IDs and put into valid_ids.
if (result.Succeeded()) {
// Now that we've converted everything from args into a list of breakpoint
- // ids, go through our tentative list
- // of breakpoint id's and verify that they correspond to valid/currently set
- // breakpoints.
+ // ids, go through our tentative list of breakpoint id's and verify that
+ // they correspond to valid/currently set breakpoints.
const size_t count = valid_ids->GetSize();
for (size_t i = 0; i < count; ++i) {
Modified: lldb/trunk/source/Commands/CommandObjectBreakpointCommand.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectBreakpointCommand.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectBreakpointCommand.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectBreakpointCommand.cpp Mon Apr 30 09:49:04 2018
@@ -412,8 +412,8 @@ protected:
} else {
BreakpointLocationSP bp_loc_sp(
bp->FindLocationByID(cur_bp_id.GetLocationID()));
- // This breakpoint does have an associated location.
- // Get its breakpoint options.
+ // This breakpoint does have an associated location. Get its
+ // breakpoint options.
if (bp_loc_sp)
bp_options = bp_loc_sp->GetLocationOptions();
}
@@ -422,9 +422,9 @@ protected:
}
}
- // If we are using script language, get the script interpreter
- // in order to set or collect command callback. Otherwise, call
- // the methods associated with this object.
+ // If we are using script language, get the script interpreter in order
+ // to set or collect command callback. Otherwise, call the methods
+ // associated with this object.
if (m_options.m_use_script_language) {
ScriptInterpreter *script_interp = m_interpreter.GetScriptInterpreter();
// Special handling for one-liner specified inline.
@@ -456,16 +456,15 @@ private:
std::vector<BreakpointOptions *> m_bp_options_vec; // This stores the
// breakpoint options that
// we are currently
- // collecting commands for. In the CollectData... calls we need
- // to hand this off to the IOHandler, which may run asynchronously.
- // So we have to have some way to keep it alive, and not leak it.
- // Making it an ivar of the command object, which never goes away
- // achieves this. Note that if we were able to run
- // the same command concurrently in one interpreter we'd have to
- // make this "per invocation". But there are many more reasons
- // why it is not in general safe to do that in lldb at present,
- // so it isn't worthwhile to come up with a more complex mechanism
- // to address this particular weakness right now.
+ // collecting commands for. In the CollectData... calls we need to hand this
+ // off to the IOHandler, which may run asynchronously. So we have to have
+ // some way to keep it alive, and not leak it. Making it an ivar of the
+ // command object, which never goes away achieves this. Note that if we were
+ // able to run the same command concurrently in one interpreter we'd have to
+ // make this "per invocation". But there are many more reasons why it is not
+ // in general safe to do that in lldb at present, so it isn't worthwhile to
+ // come up with a more complex mechanism to address this particular weakness
+ // right now.
static const char *g_reader_instructions;
};
Modified: lldb/trunk/source/Commands/CommandObjectCommands.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectCommands.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectCommands.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectCommands.cpp Mon Apr 30 09:49:04 2018
@@ -331,9 +331,8 @@ protected:
m_interpreter.HandleCommandsFromFile(cmd_file, exe_ctx, options, result);
} else {
- // No options were set, inherit any settings from nested "command
- // source" commands,
- // or set to sane default settings...
+ // No options were set, inherit any settings from nested "command source"
+ // commands, or set to sane default settings...
CommandInterpreterRunOptions options;
m_interpreter.HandleCommandsFromFile(cmd_file, exe_ctx, options, result);
}
@@ -614,8 +613,7 @@ protected:
}
// Strip the new alias name off 'raw_command_string' (leave it on args,
- // which gets passed to 'Execute', which
- // does the stripping itself.
+ // which gets passed to 'Execute', which does the stripping itself.
size_t pos = raw_command_string.find(alias_command);
if (pos == 0) {
raw_command_string = raw_command_string.substr(alias_command.size());
@@ -653,9 +651,8 @@ protected:
return false;
} else if (!cmd_obj->WantsRawCommandString()) {
// Note that args was initialized with the original command, and has not
- // been updated to this point.
- // Therefore can we pass it to the version of Execute that does not
- // need/expect raw input in the alias.
+ // been updated to this point. Therefore can we pass it to the version of
+ // Execute that does not need/expect raw input in the alias.
return HandleAliasingNormalCommand(args, result);
} else {
return HandleAliasingRawCommand(alias_command, raw_command_string,
@@ -1129,8 +1126,8 @@ protected:
return error;
}
const size_t first_separator_char_pos = 1;
- // use the char that follows 's' as the regex separator character
- // so we can have "s/<regex>/<subst>/" or "s|<regex>|<subst>|"
+ // use the char that follows 's' as the regex separator character so we can
+ // have "s/<regex>/<subst>/" or "s|<regex>|<subst>|"
const char separator_char = regex_sed[first_separator_char_pos];
const size_t second_separator_char_pos =
regex_sed.find(separator_char, first_separator_char_pos + 1);
@@ -1159,8 +1156,7 @@ protected:
}
if (third_separator_char_pos != regex_sed_size - 1) {
- // Make sure that everything that follows the last regex
- // separator char
+ // Make sure that everything that follows the last regex separator char
if (regex_sed.find_first_not_of("\t\n\v\f\r ",
third_separator_char_pos + 1) !=
std::string::npos) {
@@ -1541,10 +1537,11 @@ protected:
// FIXME: this is necessary because CommandObject::CheckRequirements()
// assumes that commands won't ever be recursively invoked, but it's
// actually possible to craft a Python script that does other "command
- // script imports" in __lldb_init_module the real fix is to have recursive
- // commands possible with a CommandInvocation object separate from the
- // CommandObject itself, so that recursive command invocations won't stomp
- // on each other (wrt to execution contents, options, and more)
+ // script imports" in __lldb_init_module the real fix is to have
+ // recursive commands possible with a CommandInvocation object separate
+ // from the CommandObject itself, so that recursive command invocations
+ // won't stomp on each other (wrt to execution contents, options, and
+ // more)
m_exe_ctx.Clear();
if (m_interpreter.GetScriptInterpreter()->LoadScriptingModule(
entry.c_str(), m_options.m_allow_reload, init_session, error)) {
Modified: lldb/trunk/source/Commands/CommandObjectDisassemble.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectDisassemble.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectDisassemble.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectDisassemble.cpp Mon Apr 30 09:49:04 2018
@@ -126,8 +126,8 @@ Status CommandObjectDisassemble::Command
case 'l':
frame_line = true;
- // Disassemble the current source line kind of implies showing mixed
- // source code context.
+ // Disassemble the current source line kind of implies showing mixed source
+ // code context.
show_mixed = true;
some_location_specified = true;
break;
@@ -205,10 +205,9 @@ void CommandObjectDisassemble::CommandOp
execution_context ? execution_context->GetTargetPtr() : nullptr;
// This is a hack till we get the ability to specify features based on
- // architecture. For now GetDisassemblyFlavor
- // is really only valid for x86 (and for the llvm assembler plugin, but I'm
- // papering over that since that is the
- // only disassembler plugin we have...
+ // architecture. For now GetDisassemblyFlavor is really only valid for x86
+ // (and for the llvm assembler plugin, but I'm papering over that since that
+ // is the only disassembler plugin we have...
if (target) {
if (target->GetArchitecture().GetTriple().getArch() == llvm::Triple::x86 ||
target->GetArchitecture().GetTriple().getArch() ==
@@ -375,8 +374,8 @@ bool CommandObjectDisassemble::DoExecute
}
}
- // Did the "m_options.frame_line" find a valid range already? If so
- // skip the rest...
+ // Did the "m_options.frame_line" find a valid range already? If so skip
+ // the rest...
if (range.GetByteSize() == 0) {
if (m_options.at_pc) {
if (frame == nullptr) {
Modified: lldb/trunk/source/Commands/CommandObjectExpression.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectExpression.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectExpression.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectExpression.cpp Mon Apr 30 09:49:04 2018
@@ -322,9 +322,9 @@ bool CommandObjectExpression::EvaluateEx
Stream *output_stream,
Stream *error_stream,
CommandReturnObject *result) {
- // Don't use m_exe_ctx as this might be called asynchronously
- // after the command object DoExecute has finished when doing
- // multi-line expression that use an input reader...
+ // Don't use m_exe_ctx as this might be called asynchronously after the
+ // command object DoExecute has finished when doing multi-line expression
+ // that use an input reader...
ExecutionContext exe_ctx(m_interpreter.GetExecutionContext());
Target *target = exe_ctx.GetTargetPtr();
@@ -363,8 +363,8 @@ bool CommandObjectExpression::EvaluateEx
if (m_command_options.top_level)
options.SetExecutionPolicy(eExecutionPolicyTopLevel);
- // If there is any chance we are going to stop and want to see
- // what went wrong with our expression, we should generate debug info
+ // If there is any chance we are going to stop and want to see what went
+ // wrong with our expression, we should generate debug info
if (!m_command_options.ignore_breakpoints ||
!m_command_options.unwind_on_error)
options.SetGenerateDebugInfo(true);
@@ -475,9 +475,8 @@ bool CommandObjectExpression::IOHandlerI
// An empty lines is used to indicate the end of input
const size_t num_lines = lines.GetSize();
if (num_lines > 0 && lines[num_lines - 1].empty()) {
- // Remove the last empty line from "lines" so it doesn't appear
- // in our resulting input and return true to indicate we are done
- // getting lines
+ // Remove the last empty line from "lines" so it doesn't appear in our
+ // resulting input and return true to indicate we are done getting lines
lines.PopBack();
return true;
}
@@ -562,19 +561,16 @@ bool CommandObjectExpression::DoExecute(
Debugger &debugger = target->GetDebugger();
// Check if the LLDB command interpreter is sitting on top of a REPL
- // that
- // launched it...
+ // that launched it...
if (debugger.CheckTopIOHandlerTypes(
IOHandler::Type::CommandInterpreter, IOHandler::Type::REPL)) {
// the LLDB command interpreter is sitting on top of a REPL that
- // launched it,
- // so just say the command interpreter is done and fall back to the
- // existing REPL
+ // launched it, so just say the command interpreter is done and
+ // fall back to the existing REPL
m_interpreter.GetIOHandler(false)->SetIsDone(true);
} else {
// We are launching the REPL on top of the current LLDB command
- // interpreter,
- // so just push one
+ // interpreter, so just push one
bool initialize = false;
Status repl_error;
REPLSP repl_sp(target->GetREPL(
@@ -642,14 +638,12 @@ bool CommandObjectExpression::DoExecute(
}
history.AppendString(fixed_command);
}
- // Increment statistics to record this expression evaluation
- // success.
+ // Increment statistics to record this expression evaluation success.
target->IncrementStats(StatisticKind::ExpressionSuccessful);
return true;
}
- // Increment statistics to record this expression evaluation
- // failure.
+ // Increment statistics to record this expression evaluation failure.
target->IncrementStats(StatisticKind::ExpressionFailure);
result.SetStatus(eReturnStatusFailed);
return false;
Modified: lldb/trunk/source/Commands/CommandObjectFrame.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectFrame.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectFrame.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectFrame.cpp Mon Apr 30 09:49:04 2018
@@ -342,8 +342,8 @@ protected:
frame_idx += m_options.relative_frame_offset;
else {
if (frame_idx == 0) {
- // If you are already at the bottom of the stack, then just warn and
- // don't reset the frame.
+ // If you are already at the bottom of the stack, then just warn
+ // and don't reset the frame.
result.AppendError("Already at the bottom of the stack.");
result.SetStatus(eReturnStatusFailed);
return false;
@@ -504,16 +504,15 @@ protected:
}
bool DoExecute(Args &command, CommandReturnObject &result) override {
- // No need to check "frame" for validity as eCommandRequiresFrame ensures it
- // is valid
+ // No need to check "frame" for validity as eCommandRequiresFrame ensures
+ // it is valid
StackFrame *frame = m_exe_ctx.GetFramePtr();
Stream &s = result.GetOutputStream();
// Be careful about the stack frame, if any summary formatter runs code, it
- // might clear the StackFrameList
- // for the thread. So hold onto a shared pointer to the frame so it stays
- // alive.
+ // might clear the StackFrameList for the thread. So hold onto a shared
+ // pointer to the frame so it stays alive.
VariableList *variable_list =
frame->GetVariableList(m_option_variable.show_globals);
@@ -547,8 +546,8 @@ protected:
if (!command.empty()) {
VariableList regex_var_list;
- // If we have any args to the variable command, we will make
- // variable objects from them...
+ // If we have any args to the variable command, we will make variable
+ // objects from them...
for (auto &entry : command) {
if (m_option_variable.use_regex) {
const size_t regex_start_index = regex_var_list.GetSize();
@@ -677,14 +676,13 @@ protected:
if (m_option_variable.show_scope)
scope_string = GetScopeString(var_sp).str();
- // Use the variable object code to make sure we are
- // using the same APIs as the public API will be
- // using...
+ // Use the variable object code to make sure we are using the same
+ // APIs as the public API will be using...
valobj_sp = frame->GetValueObjectForFrameVariable(
var_sp, m_varobj_options.use_dynamic);
if (valobj_sp) {
- // When dumping all variables, don't print any variables
- // that are not in scope to avoid extra unneeded output
+ // When dumping all variables, don't print any variables that are
+ // not in scope to avoid extra unneeded output
if (valobj_sp->IsInScope()) {
if (!valobj_sp->GetTargetSP()
->GetDisplayRuntimeSupportValues() &&
Modified: lldb/trunk/source/Commands/CommandObjectHelp.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectHelp.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectHelp.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectHelp.cpp Mon Apr 30 09:49:04 2018
@@ -89,10 +89,9 @@ bool CommandObjectHelp::DoExecute(Args &
CommandObject *cmd_obj;
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.
+ // '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.
if (argc == 0) {
uint32_t cmd_types = CommandInterpreter::eCommandTypesBuiltin;
if (m_options.m_show_aliases)
@@ -225,8 +224,8 @@ int CommandObjectHelp::HandleCompletion(
CommandObject *cmd_obj = m_interpreter.GetCommandObject(input[0].ref);
// The command that they are getting help on might be ambiguous, in which
- // case we should complete that,
- // otherwise complete with the command the user is getting help on...
+ // case we should complete that, otherwise complete with the command the
+ // user is getting help on...
if (cmd_obj) {
input.Shift();
Modified: lldb/trunk/source/Commands/CommandObjectMemory.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectMemory.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectMemory.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectMemory.cpp Mon Apr 30 09:49:04 2018
@@ -554,8 +554,8 @@ protected:
lldb::addr_t addr;
size_t total_byte_size = 0;
if (argc == 0) {
- // Use the last address and byte size and all options as they were
- // if no options have been set
+ // Use the last address and byte size and all options as they were if no
+ // options have been set
addr = m_next_addr;
total_byte_size = m_prev_byte_size;
clang_ast_type = m_prev_clang_ast_type;
@@ -574,8 +574,8 @@ protected:
// TODO For non-8-bit byte addressable architectures this needs to be
// revisited to fully support all lldb's range of formatting options.
- // Furthermore code memory reads (for those architectures) will not
- // be correctly formatted even w/o formatting options.
+ // Furthermore code memory reads (for those architectures) will not be
+ // correctly formatted even w/o formatting options.
size_t item_byte_size =
target->GetArchitecture().GetDataByteSize() > 1
? target->GetArchitecture().GetDataByteSize()
@@ -844,16 +844,14 @@ protected:
if (!m_format_options.GetCountValue().OptionWasSet() || item_count == 1) {
// this turns requests such as
// memory read -fc -s10 -c1 *charPtrPtr
- // which make no sense (what is a char of size 10?)
- // into a request for fetching 10 chars of size 1 from the same memory
- // location
+ // which make no sense (what is a char of size 10?) into a request for
+ // fetching 10 chars of size 1 from the same memory location
format = eFormatCharArray;
item_count = item_byte_size;
item_byte_size = 1;
} else {
- // here we passed a count, and it was not 1
- // so we have a byte_size and a count
- // we could well multiply those, but instead let's just fail
+ // here we passed a count, and it was not 1 so we have a byte_size and
+ // a count we could well multiply those, but instead let's just fail
result.AppendErrorWithFormat(
"reading memory as characters of size %" PRIu64 " is not supported",
(uint64_t)item_byte_size);
Modified: lldb/trunk/source/Commands/CommandObjectMultiword.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectMultiword.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectMultiword.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectMultiword.cpp Mon Apr 30 09:49:04 2018
@@ -55,8 +55,7 @@ CommandObjectSP CommandObjectMultiword::
if (num_matches == 1) {
// Cleaner, but slightly less efficient would be to call back into this
- // function, since I now
- // know I have an exact match...
+ // function, since I now know I have an exact match...
sub_cmd = matches->GetStringAtIndex(0);
pos = m_subcommand_dict.find(sub_cmd);
@@ -121,8 +120,8 @@ bool CommandObjectMultiword::Execute(con
CommandObject *sub_cmd_obj = GetSubcommandObject(sub_command, &matches);
if (sub_cmd_obj != nullptr) {
// Now call CommandObject::Execute to process options in `rest_of_line`.
- // From there the command-specific version of Execute will be called,
- // with the processed arguments.
+ // From there the command-specific version of Execute will be called, with
+ // the processed arguments.
args.Shift();
sub_cmd_obj->Execute(args_string, result);
@@ -156,8 +155,8 @@ bool CommandObjectMultiword::Execute(con
}
void CommandObjectMultiword::GenerateHelpText(Stream &output_stream) {
- // First time through here, generate the help text for the object and
- // push it to the return result object as well
+ // First time through here, generate the help text for the object and push it
+ // to the return result object as well
CommandObject::GenerateHelpText(output_stream);
output_stream.PutCString("\nThe following subcommands are supported:\n\n");
Modified: lldb/trunk/source/Commands/CommandObjectPlatform.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectPlatform.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectPlatform.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectPlatform.cpp Mon Apr 30 09:49:04 2018
@@ -385,8 +385,8 @@ protected:
Status error;
if (platform_sp->IsConnected()) {
- // Cache the instance name if there is one since we are
- // about to disconnect and the name might go with it.
+ // Cache the instance name if there is one since we are about to
+ // disconnect and the name might go with it.
const char *hostname_cstr = platform_sp->GetHostname();
std::string hostname;
if (hostname_cstr)
@@ -867,8 +867,8 @@ public:
// argument entry.
arg2.push_back(file_arg_host);
- // Push the data for the first and the second arguments into the m_arguments
- // vector.
+ // Push the data for the first and the second arguments into the
+ // m_arguments vector.
m_arguments.push_back(arg1);
m_arguments.push_back(arg2);
}
@@ -1059,8 +1059,8 @@ protected:
if (argc > 0) {
if (m_options.launch_info.GetExecutableFile()) {
- // We already have an executable file, so we will use this
- // and all arguments to this function are extra arguments
+ // We already have an executable file, so we will use this and all
+ // arguments to this function are extra arguments
m_options.launch_info.GetArguments().AppendArguments(args);
} else {
// We don't have any file yet, so the first argument is our
@@ -1574,8 +1574,7 @@ public:
// Are we in the name?
// Look to see if there is a -P argument provided, and if so use that
- // plugin, otherwise
- // use the default plugin.
+ // plugin, otherwise use the default plugin.
const char *partial_name = nullptr;
partial_name = input.GetArgumentAtIndex(opt_arg_pos);
Modified: lldb/trunk/source/Commands/CommandObjectProcess.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectProcess.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectProcess.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectProcess.cpp Mon Apr 30 09:49:04 2018
@@ -180,18 +180,18 @@ protected:
llvm::StringRef target_settings_argv0 = target->GetArg0();
// Determine whether we will disable ASLR or leave it in the default state
- // (i.e. enabled if the platform supports it).
- // First check if the process launch options explicitly turn on/off
+ // (i.e. enabled if the platform supports it). First check if the process
+ // launch options explicitly turn on/off
// disabling ASLR. If so, use that setting;
// otherwise, use the 'settings target.disable-aslr' setting.
bool disable_aslr = false;
if (m_options.disable_aslr != eLazyBoolCalculate) {
- // The user specified an explicit setting on the process launch line. Use
- // it.
+ // The user specified an explicit setting on the process launch line.
+ // Use it.
disable_aslr = (m_options.disable_aslr == eLazyBoolYes);
} else {
- // The user did not explicitly specify whether to disable ASLR. Fall back
- // to the target.disable-aslr setting.
+ // The user did not explicitly specify whether to disable ASLR. Fall
+ // back to the target.disable-aslr setting.
disable_aslr = target->GetDisableASLR();
}
@@ -234,10 +234,9 @@ protected:
ProcessSP process_sp(target->GetProcessSP());
if (process_sp) {
// There is a race condition where this thread will return up the call
- // stack to the main command
- // handler and show an (lldb) prompt before HandlePrivateEvent (from
- // PrivateStateThread) has
- // a chance to call PushProcessIOHandler().
+ // stack to the main command handler and show an (lldb) prompt before
+ // HandlePrivateEvent (from PrivateStateThread) has a chance to call
+ // PushProcessIOHandler().
process_sp->SyncIOHandler(0, 2000);
llvm::StringRef data = stream.GetString();
@@ -401,8 +400,7 @@ public:
// Are we in the name?
// Look to see if there is a -P argument provided, and if so use that
- // plugin, otherwise
- // use the default plugin.
+ // plugin, otherwise use the default plugin.
const char *partial_name = nullptr;
partial_name = input.GetArgumentAtIndex(opt_arg_pos);
@@ -453,10 +451,9 @@ protected:
Target *target = m_interpreter.GetDebugger().GetSelectedTarget().get();
// N.B. The attach should be synchronous. It doesn't help much to get the
- // prompt back between initiating the attach
- // and the target actually stopping. So even if the interpreter is set to
- // be asynchronous, we wait for the stop
- // ourselves here.
+ // prompt back between initiating the attach and the target actually
+ // stopping. So even if the interpreter is set to be asynchronous, we wait
+ // for the stop ourselves here.
StateType state = eStateInvalid;
Process *process = m_exe_ctx.GetProcessPtr();
@@ -482,9 +479,8 @@ protected:
}
// Record the old executable module, we want to issue a warning if the
- // process of attaching changed the
- // current executable (like somebody said "file foo" then attached to a PID
- // whose executable was bar.)
+ // process of attaching changed the current executable (like somebody said
+ // "file foo" then attached to a PID whose executable was bar.)
ModuleSP old_exec_module_sp = target->GetExecutableModule();
ArchSpec old_arch_spec = target->GetArchitecture();
@@ -553,8 +549,8 @@ protected:
target->GetArchitecture().GetTriple().getTriple().c_str());
}
- // This supports the use-case scenario of immediately continuing the process
- // once attached.
+ // This supports the use-case scenario of immediately continuing the
+ // process once attached.
if (m_options.attach_info.GetContinueOnceAttached())
m_interpreter.HandleCommand("process continue", eLazyBoolNo, result);
@@ -692,10 +688,9 @@ protected:
if (error.Success()) {
// There is a race condition where this thread will return up the call
- // stack to the main command
- // handler and show an (lldb) prompt before HandlePrivateEvent (from
- // PrivateStateThread) has
- // a chance to call PushProcessIOHandler().
+ // stack to the main command handler and show an (lldb) prompt before
+ // HandlePrivateEvent (from PrivateStateThread) has a chance to call
+ // PushProcessIOHandler().
process->SyncIOHandler(iohandler_id, 2000);
result.AppendMessageWithFormat("Process %" PRIu64 " resuming\n",
@@ -1560,8 +1555,7 @@ protected:
int32_t signo = signals_sp->GetSignalNumberFromName(arg.c_str());
if (signo != LLDB_INVALID_SIGNAL_NUMBER) {
// Casting the actions as bools here should be okay, because
- // VerifyCommandOptionValue guarantees
- // the value is either 0 or 1.
+ // VerifyCommandOptionValue guarantees the value is either 0 or 1.
if (stop_action != -1)
signals_sp->SetShouldStop(signo, stop_action);
if (pass_action != -1) {
Modified: lldb/trunk/source/Commands/CommandObjectQuit.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectQuit.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectQuit.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectQuit.cpp Mon Apr 30 09:49:04 2018
@@ -30,10 +30,9 @@ CommandObjectQuit::CommandObjectQuit(Com
CommandObjectQuit::~CommandObjectQuit() {}
-// returns true if there is at least one alive process
-// is_a_detach will be true if all alive processes will be detached when you
-// quit
-// and false if at least one process will be killed instead
+// returns true if there is at least one alive process is_a_detach will be true
+// if all alive processes will be detached when you quit and false if at least
+// one process will be killed instead
bool CommandObjectQuit::ShouldAskForConfirmation(bool &is_a_detach) {
if (m_interpreter.GetPromptOnQuit() == false)
return false;
Modified: lldb/trunk/source/Commands/CommandObjectRegister.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectRegister.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectRegister.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectRegister.cpp Mon Apr 30 09:49:04 2018
@@ -192,8 +192,8 @@ protected:
num_register_sets = reg_ctx->GetRegisterSetCount();
for (set_idx = 0; set_idx < num_register_sets; ++set_idx) {
- // When dump_all_sets option is set, dump primitive as well as derived
- // registers.
+ // When dump_all_sets option is set, dump primitive as well as
+ // derived registers.
DumpRegisterSet(m_exe_ctx, strm, reg_ctx, set_idx,
!m_command_options.dump_all_sets.GetCurrentValue());
}
@@ -209,8 +209,8 @@ protected:
result.SetStatus(eReturnStatusFailed);
} else {
for (auto &entry : command) {
- // in most LLDB commands we accept $rbx as the name for register RBX -
- // and here we would reject it and non-existant. we should be more
+ // in most LLDB commands we accept $rbx as the name for register RBX
+ // - and here we would reject it and non-existant. we should be more
// consistent towards the user and allow them to say reg read $rbx -
// internally, however, we should be strict and not allow ourselves
// to call our registers $rbx in our own API
@@ -350,11 +350,11 @@ protected:
auto reg_name = command[0].ref;
auto value_str = command[1].ref;
- // in most LLDB commands we accept $rbx as the name for register RBX - and
- // here we would reject it and non-existant. we should be more consistent
- // towards the user and allow them to say reg write $rbx - internally,
- // however, we should be strict and not allow ourselves to call our
- // registers $rbx in our own API
+ // in most LLDB commands we accept $rbx as the name for register RBX -
+ // and here we would reject it and non-existant. we should be more
+ // consistent towards the user and allow them to say reg write $rbx -
+ // internally, however, we should be strict and not allow ourselves to
+ // call our registers $rbx in our own API
reg_name.consume_front("$");
const RegisterInfo *reg_info = reg_ctx->GetRegisterInfoByName(reg_name);
@@ -365,8 +365,8 @@ protected:
Status error(reg_value.SetValueFromString(reg_info, value_str));
if (error.Success()) {
if (reg_ctx->WriteRegister(reg_info, reg_value)) {
- // Toss all frames and anything else in the thread
- // after a register has been written.
+ // Toss all frames and anything else in the thread after a register
+ // has been written.
m_exe_ctx.GetThreadRef().Flush();
result.SetStatus(eReturnStatusSuccessFinishNoResult);
return true;
Modified: lldb/trunk/source/Commands/CommandObjectSettings.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectSettings.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectSettings.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectSettings.cpp Mon Apr 30 09:49:04 2018
@@ -220,10 +220,8 @@ protected:
if (error.Success()) {
// FIXME this is the same issue as the one in commands script import
// we could be setting target.load-script-from-symbol-file which would
- // cause
- // Python scripts to be loaded, which could run LLDB commands
- // (e.g. settings set target.process.python-os-plugin-path) and cause a
- // crash
+ // cause Python scripts to be loaded, which could run LLDB commands (e.g.
+ // settings set target.process.python-os-plugin-path) and cause a crash
// if we did not clear the command's exe_ctx first
ExecutionContext exe_ctx(m_exe_ctx);
m_exe_ctx.Clear();
@@ -920,8 +918,8 @@ protected:
return false;
}
- // Do not perform cmd_args.Shift() since StringRef is manipulating the
- // raw character string later on.
+ // Do not perform cmd_args.Shift() since StringRef is manipulating the raw
+ // character string later on.
// Split the raw command into var_name and value pair.
llvm::StringRef raw_str(command);
Modified: lldb/trunk/source/Commands/CommandObjectSource.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectSource.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectSource.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectSource.cpp Mon Apr 30 09:49:04 2018
@@ -148,16 +148,13 @@ public:
Options *GetOptions() override { return &m_options; }
protected:
- // Dump the line entries in each symbol context.
- // Return the number of entries found.
- // If module_list is set, only dump lines contained in one of the modules.
- // If file_spec is set, only dump lines in the file.
- // If the start_line option was specified, don't print lines less than
- // start_line.
+ // Dump the line entries in each symbol context. Return the number of entries
+ // found. If module_list is set, only dump lines contained in one of the
+ // modules. If file_spec is set, only dump lines in the file. If the
+ // start_line option was specified, don't print lines less than start_line.
// If the end_line option was specified, don't print lines greater than
- // end_line.
- // If the num_lines option was specified, dont print more than num_lines
- // entries.
+ // end_line. If the num_lines option was specified, dont print more than
+ // num_lines entries.
uint32_t DumpLinesInSymbolContexts(Stream &strm,
const SymbolContextList &sc_list,
const ModuleList &module_list,
@@ -222,14 +219,11 @@ protected:
}
// Dump the requested line entries for the file in the compilation unit.
- // Return the number of entries found.
- // If module_list is set, only dump lines contained in one of the modules.
- // If the start_line option was specified, don't print lines less than
- // start_line.
- // If the end_line option was specified, don't print lines greater than
- // end_line.
- // If the num_lines option was specified, dont print more than num_lines
- // entries.
+ // Return the number of entries found. If module_list is set, only dump lines
+ // contained in one of the modules. If the start_line option was specified,
+ // don't print lines less than start_line. If the end_line option was
+ // specified, don't print lines greater than end_line. If the num_lines
+ // option was specified, dont print more than num_lines entries.
uint32_t DumpFileLinesInCompUnit(Stream &strm, Module *module,
CompileUnit *cu, const FileSpec &file_spec) {
uint32_t start_line = m_options.start_line;
@@ -259,8 +253,8 @@ protected:
while (true) {
LineEntry line_entry;
- // Find the lowest index of a line entry with a line equal to
- // or higher than 'line'.
+ // Find the lowest index of a line entry with a line equal to or
+ // higher than 'line'.
uint32_t start_idx = 0;
start_idx = cu->FindLineEntry(start_idx, line, &cu_file_spec,
/*exact=*/false, &line_entry);
@@ -271,7 +265,8 @@ protected:
if (end_line > 0 && line_entry.line > end_line)
break;
- // Loop through to find any other entries for this line, dumping each.
+ // Loop through to find any other entries for this line, dumping
+ // each.
line = line_entry.line;
do {
num_matches++;
@@ -305,22 +300,18 @@ protected:
return num_matches;
}
- // Dump the requested line entries for the file in the module.
- // Return the number of entries found.
- // If module_list is set, only dump lines contained in one of the modules.
- // If the start_line option was specified, don't print lines less than
- // start_line.
- // If the end_line option was specified, don't print lines greater than
- // end_line.
- // If the num_lines option was specified, dont print more than num_lines
- // entries.
+ // Dump the requested line entries for the file in the module. Return the
+ // number of entries found. If module_list is set, only dump lines contained
+ // in one of the modules. If the start_line option was specified, don't print
+ // lines less than start_line. If the end_line option was specified, don't
+ // print lines greater than end_line. If the num_lines option was specified,
+ // dont print more than num_lines entries.
uint32_t DumpFileLinesInModule(Stream &strm, Module *module,
const FileSpec &file_spec) {
uint32_t num_matches = 0;
if (module) {
// Look through all the compilation units (CUs) in this module for ones
- // that
- // contain lines of code from this source file.
+ // that contain lines of code from this source file.
for (size_t i = 0; i < module->GetNumCompileUnits(); i++) {
// Look for a matching source file in this CU.
CompUnitSP cu_sp(module->GetCompileUnitAtIndex(i));
@@ -334,10 +325,8 @@ protected:
}
// Given an address and a list of modules, append the symbol contexts of all
- // line entries
- // containing the address found in the modules and return the count of
- // matches. If none
- // is found, return an error in 'error_strm'.
+ // line entries containing the address found in the modules and return the
+ // count of matches. If none is found, return an error in 'error_strm'.
size_t GetSymbolContextsForAddress(const ModuleList &module_list,
lldb::addr_t addr,
SymbolContextList &sc_list,
@@ -347,8 +336,8 @@ protected:
assert(module_list.GetSize() > 0);
Target *target = m_exe_ctx.GetTargetPtr();
if (target->GetSectionLoadList().IsEmpty()) {
- // The target isn't loaded yet, we need to lookup the file address in
- // all modules. Note: the module list option does not apply to addresses.
+ // The target isn't loaded yet, we need to lookup the file address in all
+ // modules. Note: the module list option does not apply to addresses.
const size_t num_modules = module_list.GetSize();
for (size_t i = 0; i < num_modules; ++i) {
ModuleSP module_sp(module_list.GetModuleAtIndex(i));
@@ -370,8 +359,8 @@ protected:
" not found in any modules.\n",
addr);
} else {
- // The target has some things loaded, resolve this address to a
- // compile unit + file + line and display
+ // The target has some things loaded, resolve this address to a compile
+ // unit + file + line and display
if (target->GetSectionLoadList().ResolveLoadAddress(addr, so_addr)) {
ModuleSP module_sp(so_addr.GetModule());
// Check to make sure this module is in our list.
@@ -409,8 +398,8 @@ protected:
return num_matches;
}
- // Dump the line entries found in functions matching the name specified in the
- // option.
+ // Dump the line entries found in functions matching the name specified in
+ // the option.
bool DumpLinesInFunctions(CommandReturnObject &result) {
SymbolContextList sc_list_funcs;
ConstString name(m_options.symbol_name.c_str());
@@ -774,9 +763,9 @@ public:
const char *GetRepeatCommand(Args ¤t_command_args,
uint32_t index) override {
- // This is kind of gross, but the command hasn't been parsed yet so we can't
- // look at the option values for this invocation... I have to scan the
- // arguments directly.
+ // This is kind of gross, but the command hasn't been parsed yet so we
+ // can't look at the option values for this invocation... I have to scan
+ // the arguments directly.
auto iter =
llvm::find_if(current_command_args, [](const Args::ArgEntry &e) {
return e.ref == "-r" || e.ref == "--reverse";
@@ -864,11 +853,9 @@ protected:
}
// 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.
+ // 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.
uint32_t extra_lines;
if (m_options.num_lines >= 10)
extra_lines = 5;
@@ -881,8 +868,7 @@ protected:
line_no = start_line - extra_lines;
// For fun, if the function is shorter than the number of lines we're
- // supposed to display,
- // only display the function...
+ // supposed to display, only display the function...
if (end_line != 0) {
if (m_options.num_lines > end_line - line_no)
m_options.num_lines = end_line - line_no + extra_lines;
@@ -913,14 +899,13 @@ protected:
return 0;
}
- // From Jim: The FindMatchingFunctions / FindMatchingFunctionSymbols functions
- // "take a possibly empty vector of strings which are names of modules, and
- // run the two search functions on the subset of the full module list that
- // matches the strings in the input vector". If we wanted to put these
- // somewhere,
- // there should probably be a module-filter-list that can be passed to the
- // various ModuleList::Find* calls, which would either be a vector of string
- // names or a ModuleSpecList.
+ // From Jim: The FindMatchingFunctions / FindMatchingFunctionSymbols
+ // functions "take a possibly empty vector of strings which are names of
+ // modules, and run the two search functions on the subset of the full module
+ // list that matches the strings in the input vector". If we wanted to put
+ // these somewhere, there should probably be a module-filter-list that can be
+ // passed to the various ModuleList::Find* calls, which would either be a
+ // vector of string names or a ModuleSpecList.
size_t FindMatchingFunctions(Target *target, const ConstString &name,
SymbolContextList &sc_list) {
// Displaying the source for a symbol:
@@ -997,8 +982,7 @@ protected:
size_t num_matches = FindMatchingFunctions(target, name, sc_list);
if (!num_matches) {
// If we didn't find any functions with that name, try searching for
- // symbols
- // that line up exactly with function addresses.
+ // symbols that line up exactly with function addresses.
SymbolContextList sc_list_symbols;
size_t num_symbol_matches =
FindMatchingFunctionSymbols(target, name, sc_list_symbols);
@@ -1065,8 +1049,8 @@ protected:
SymbolContextList sc_list;
if (target->GetSectionLoadList().IsEmpty()) {
- // The target isn't loaded yet, we need to lookup the file address
- // in all modules
+ // The target isn't loaded yet, we need to lookup the file address in
+ // all modules
const ModuleList &module_list = target->GetImages();
const size_t num_modules = module_list.GetSize();
for (size_t i = 0; i < num_modules; ++i) {
@@ -1091,8 +1075,8 @@ protected:
return false;
}
} else {
- // The target has some things loaded, resolve this address to a
- // compile unit + file + line and display
+ // The target has some things loaded, resolve this address to a compile
+ // unit + file + line and display
if (target->GetSectionLoadList().ResolveLoadAddress(m_options.address,
so_addr)) {
ModuleSP module_sp(so_addr.GetModule());
@@ -1169,11 +1153,10 @@ protected:
}
}
} else if (m_options.file_name.empty()) {
- // Last valid source manager context, or the current frame if no
- // valid last context in source manager.
- // One little trick here, if you type the exact same list command twice in
- // a row, it is
- // more likely because you typed it once, then typed it again
+ // Last valid source manager context, or the current frame if no valid
+ // last context in source manager. One little trick here, if you type the
+ // exact same list command twice in a row, it is more likely because you
+ // typed it once, then typed it again
if (m_options.start_line == 0) {
if (target->GetSourceManager().DisplayMoreWithLineNumbers(
&result.GetOutputStream(), m_options.num_lines,
Modified: lldb/trunk/source/Commands/CommandObjectTarget.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectTarget.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectTarget.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectTarget.cpp Mon Apr 30 09:49:04 2018
@@ -274,10 +274,8 @@ protected:
if (target_sp) {
// Only get the platform after we create the target because we might
- // have
- // switched platforms depending on what the arguments were to
- // CreateTarget()
- // we can't rely on the selected platform.
+ // have switched platforms depending on what the arguments were to
+ // CreateTarget() we can't rely on the selected platform.
PlatformSP platform_sp = target_sp->GetPlatform();
@@ -368,8 +366,8 @@ protected:
&core_file));
if (process_sp) {
- // Seems weird that we Launch a core file, but that is
- // what we do!
+ // Seems weird that we Launch a core file, but that is what we
+ // do!
error = process_sp->LoadCore();
if (error.Fail()) {
@@ -618,8 +616,8 @@ protected:
target_list.DeleteTarget(target_sp);
target_sp->Destroy();
}
- // If "--clean" was specified, prune any orphaned shared modules from
- // the global shared module list
+ // If "--clean" was specified, prune any orphaned shared modules from the
+ // global shared module list
if (m_cleanup_option.GetOptionValue()) {
const bool mandatory = true;
ModuleList::RemoveOrphanSharedModules(mandatory);
@@ -997,10 +995,9 @@ public:
new_prefix_arg.arg_type = eArgTypeNewPathPrefix;
new_prefix_arg.arg_repetition = eArgRepeatPairPlus;
- // There are two required arguments that must always occur together, i.e. an
- // argument "pair". Because they
- // must always occur together, they are treated as two variants of one
- // argument rather than two independent
+ // There are two required arguments that must always occur together, i.e.
+ // an argument "pair". Because they must always occur together, they are
+ // treated as two variants of one argument rather than two independent
// arguments. Push them both into the first argument position for
// m_arguments...
@@ -1111,10 +1108,9 @@ public:
new_prefix_arg.arg_type = eArgTypeNewPathPrefix;
new_prefix_arg.arg_repetition = eArgRepeatPairPlus;
- // There are two required arguments that must always occur together, i.e. an
- // argument "pair". Because they
- // must always occur together, they are treated as two variants of one
- // argument rather than two independent
+ // There are two required arguments that must always occur together, i.e.
+ // an argument "pair". Because they must always occur together, they are
+ // treated as two variants of one argument rather than two independent
// arguments. Push them both into the same argument position for
// m_arguments...
@@ -1635,8 +1631,8 @@ static size_t LookupTypeInModule(Command
strm.PutCString(":\n");
for (TypeSP type_sp : type_list.Types()) {
if (type_sp) {
- // Resolve the clang type so that any forward references
- // to types that haven't yet been parsed will get parsed.
+ // Resolve the clang type so that any forward references to types
+ // that haven't yet been parsed will get parsed.
type_sp->GetFullCompilerType();
type_sp->GetDescription(&strm, eDescriptionLevelFull, true);
// Print all typedef chains
@@ -1686,8 +1682,8 @@ static size_t LookupTypeHere(CommandInte
TypeSP type_sp(type_list.GetTypeAtIndex(0));
if (type_sp) {
- // Resolve the clang type so that any forward references
- // to types that haven't yet been parsed will get parsed.
+ // Resolve the clang type so that any forward references to types that
+ // haven't yet been parsed will get parsed.
type_sp->GetFullCompilerType();
type_sp->GetDescription(&strm, eDescriptionLevelFull, true);
// Print all typedef chains
@@ -1765,9 +1761,8 @@ static size_t FindModulesByName(Target *
const size_t num_matches =
target->GetImages().FindModules(module_spec, module_list);
- // Not found in our module list for our target, check the main
- // shared module list in case it is a extra file used somewhere
- // else
+ // Not found in our module list for our target, check the main shared
+ // module list in case it is a extra file used somewhere else
if (num_matches == 0) {
module_spec.GetArchitecture() = target->GetArchitecture();
ModuleList::FindSharedModules(module_spec, module_list);
@@ -2607,8 +2602,7 @@ protected:
ModuleSpec module_spec;
bool search_using_module_spec = false;
- // Allow "load" option to work without --file or --uuid
- // option.
+ // Allow "load" option to work without --file or --uuid option.
if (load) {
if (!m_file_option.GetOptionValue().OptionWasSet() &&
!m_uuid_option_group.GetOptionValue().OptionWasSet()) {
@@ -2930,9 +2924,8 @@ protected:
Target *target = m_interpreter.GetDebugger().GetSelectedTarget().get();
const bool use_global_module_list = m_options.m_use_global_module_list;
// Define a local module list here to ensure it lives longer than any
- // "locker"
- // object which might lock its contents below (through the "module_list_ptr"
- // variable).
+ // "locker" object which might lock its contents below (through the
+ // "module_list_ptr" variable).
ModuleList module_list;
if (target == nullptr && !use_global_module_list) {
result.AppendError("invalid target, create a debug target using the "
@@ -2980,10 +2973,9 @@ protected:
size_t num_modules = 0;
// This locker will be locked on the mutex in module_list_ptr if it is
- // non-nullptr.
- // Otherwise it will lock the AllocationModuleCollectionMutex when
- // accessing
- // the global module list directly.
+ // non-nullptr. Otherwise it will lock the
+ // AllocationModuleCollectionMutex when accessing the global module list
+ // directly.
std::unique_lock<std::recursive_mutex> guard(
Module::GetAllocationModuleCollectionMutex(), std::defer_lock);
@@ -3831,9 +3823,9 @@ protected:
if (command.GetArgumentCount() == 0) {
ModuleSP current_module;
- // Where it is possible to look in the current symbol context
- // first, try that. If this search was successful and --all
- // was not passed, don't print anything else.
+ // Where it is possible to look in the current symbol context first,
+ // try that. If this search was successful and --all was not passed,
+ // don't print anything else.
if (LookupHere(m_interpreter, result, syntax_error)) {
result.GetOutputStream().EOL();
num_successful_lookups++;
@@ -4045,10 +4037,9 @@ protected:
if (!module_spec.GetFileSpec() && !module_spec.GetPlatformFileSpec())
module_spec.GetFileSpec().GetFilename() = symbol_fspec.GetFilename();
}
- // We now have a module that represents a symbol file
- // that can be used for a module that might exist in the
- // current target, so we need to find that module in the
- // target
+ // We now have a module that represents a symbol file that can be used
+ // for a module that might exist in the current target, so we need to
+ // find that module in the target
ModuleList matching_module_list;
size_t num_matches = 0;
@@ -4074,8 +4065,7 @@ protected:
if (num_matches == 0) {
// No matches yet, iterate through the module specs to find a UUID
- // value that
- // we can match up to an image in our target
+ // value that we can match up to an image in our target
const size_t num_symfile_module_specs =
symfile_module_specs.GetSize();
for (size_t i = 0; i < num_symfile_module_specs && num_matches == 0;
@@ -4095,8 +4085,8 @@ protected:
}
}
- // Just try to match up the file by basename if we have no matches at this
- // point
+ // Just try to match up the file by basename if we have no matches at
+ // this point
if (num_matches == 0)
num_matches =
target->GetImages().FindModules(module_spec, matching_module_list);
@@ -4108,7 +4098,8 @@ protected:
if (!filename_no_extension)
break;
- // Check if there was no extension to strip and the basename is the same
+ // Check if there was no extension to strip and the basename is the
+ // same
if (filename_no_extension == module_spec.GetFileSpec().GetFilename())
break;
@@ -4127,9 +4118,9 @@ protected:
} else if (num_matches == 1) {
ModuleSP module_sp(matching_module_list.GetModuleAtIndex(0));
- // The module has not yet created its symbol vendor, we can just
- // give the existing target module the symfile path to use for
- // when it decides to create it!
+ // The module has not yet created its symbol vendor, we can just give
+ // the existing target module the symfile path to use for when it
+ // decides to create it!
module_sp->SetSymbolFileFileSpec(symbol_fspec);
SymbolVendor *symbol_vendor =
@@ -4147,8 +4138,8 @@ protected:
"symbol file '%s' has been added to '%s'\n", symfile_path,
module_fs.GetPath().c_str());
- // Let clients know something changed in the module
- // if it is currently loaded
+ // Let clients know something changed in the module if it is
+ // currently loaded
ModuleList module_list;
module_list.Append(module_sp);
target->SymbolsDidLoad(module_list);
Modified: lldb/trunk/source/Commands/CommandObjectThread.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectThread.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectThread.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectThread.cpp Mon Apr 30 09:49:04 2018
@@ -104,8 +104,8 @@ public:
}
// Use tids instead of ThreadSPs to prevent deadlocking problems which
- // result from JIT-ing
- // code while iterating over the (locked) ThreadSP list.
+ // result from JIT-ing code while iterating over the (locked) ThreadSP
+ // list.
std::vector<lldb::tid_t> tids;
if (all_threads || m_unique_stacks) {
@@ -196,11 +196,10 @@ protected:
//
// If you return false, the iteration will stop, otherwise it will proceed.
// The result is set to m_success_return (defaults to
- // eReturnStatusSuccessFinishResult) before the iteration,
- // so you only need to set the return status in HandleOneThread if you want to
- // indicate an error.
- // If m_add_return is true, a blank line will be inserted between each of the
- // listings (except the last one.)
+ // eReturnStatusSuccessFinishResult) before the iteration, so you only need
+ // to set the return status in HandleOneThread if you want to indicate an
+ // error. If m_add_return is true, a blank line will be inserted between each
+ // of the listings (except the last one.)
virtual bool HandleOneThread(lldb::tid_t, CommandReturnObject &result) = 0;
@@ -647,8 +646,7 @@ protected:
const lldb::RunMode stop_other_threads = m_options.m_run_mode;
// This is a bit unfortunate, but not all the commands in this command
- // object support
- // only while stepping, so I use the bool for them.
+ // object support only while stepping, so I use the bool for them.
bool bool_stop_other_threads;
if (m_options.m_run_mode == eAllThreads)
bool_stop_other_threads = false;
@@ -753,8 +751,8 @@ protected:
}
// If we got a new plan, then set it to be a master plan (User level Plans
- // should be master plans
- // so that they can be interruptible). Then resume the process.
+ // should be master plans so that they can be interruptible). Then resume
+ // the process.
if (new_plan_sp) {
new_plan_sp->SetIsMasterPlan(true);
@@ -785,10 +783,9 @@ protected:
}
// There is a race condition where this thread will return up the call
- // stack to the main command handler
- // and show an (lldb) prompt before HandlePrivateEvent (from
- // PrivateStateThread) has
- // a chance to call PushProcessIOHandler().
+ // stack to the main command handler and show an (lldb) prompt before
+ // HandlePrivateEvent (from PrivateStateThread) has a chance to call
+ // PushProcessIOHandler().
process->SyncIOHandler(iohandler_id, 2000);
if (synchronous_execution) {
@@ -870,9 +867,9 @@ public:
(state == eStateSuspended)) {
const size_t argc = command.GetArgumentCount();
if (argc > 0) {
- // These two lines appear at the beginning of both blocks in
- // this if..else, but that is because we need to release the
- // lock before calling process->Resume below.
+ // These two lines appear at the beginning of both blocks in this
+ // if..else, but that is because we need to release the lock before
+ // calling process->Resume below.
std::lock_guard<std::recursive_mutex> guard(
process->GetThreadList().GetMutex());
const uint32_t num_threads = process->GetThreadList().GetSize();
@@ -931,9 +928,9 @@ public:
process->GetID());
}
} else {
- // These two lines appear at the beginning of both blocks in
- // this if..else, but that is because we need to release the
- // lock before calling process->Resume below.
+ // These two lines appear at the beginning of both blocks in this
+ // if..else, but that is because we need to release the lock before
+ // calling process->Resume below.
std::lock_guard<std::recursive_mutex> guard(
process->GetThreadList().GetMutex());
const uint32_t num_threads = process->GetThreadList().GetSize();
@@ -1195,8 +1192,8 @@ protected:
ThreadPlanSP new_plan_sp;
if (frame->HasDebugInformation()) {
- // Finally we got here... Translate the given line number to a bunch of
- // addresses:
+ // Finally we got here... Translate the given line number to a bunch
+ // of addresses:
SymbolContext sc(frame->GetSymbolContext(eSymbolContextCompUnit));
LineTable *line_table = nullptr;
if (sc.comp_unit)
@@ -1275,10 +1272,9 @@ protected:
abort_other_plans, &address_list.front(), address_list.size(),
m_options.m_stop_others, m_options.m_frame_idx);
// User level plans should be master plans so they can be interrupted
- // (e.g. by hitting a breakpoint)
- // and other plans executed by the user (stepping around the breakpoint)
- // and then a "continue"
- // will resume the original plan.
+ // (e.g. by hitting a breakpoint) and other plans executed by the user
+ // (stepping around the breakpoint) and then a "continue" will resume
+ // the original plan.
new_plan_sp->SetIsMasterPlan(true);
new_plan_sp->SetOkayToDiscard(false);
} else {
Modified: lldb/trunk/source/Commands/CommandObjectType.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectType.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectType.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectType.cpp Mon Apr 30 09:49:04 2018
@@ -1421,8 +1421,8 @@ bool CommandObjectTypeSummaryAdd::Execut
return result.Succeeded();
}
- // if I am here, script_format must point to something good, so I can add that
- // as a script summary to all interested parties
+ // if I am here, script_format must point to something good, so I can add
+ // that as a script summary to all interested parties
Status error;
@@ -2757,9 +2757,8 @@ static OptionDefinition g_type_lookup_op
class CommandObjectTypeLookup : public CommandObjectRaw {
protected:
// this function is allowed to do a more aggressive job at guessing languages
- // than the expression parser
- // is comfortable with - so leave the original call alone and add one that is
- // specific to type lookup
+ // than the expression parser is comfortable with - so leave the original
+ // call alone and add one that is specific to type lookup
lldb::LanguageType GuessLanguage(StackFrame *frame) {
lldb::LanguageType lang_type = lldb::eLanguageTypeUnknown;
@@ -2934,9 +2933,8 @@ public:
}
// This is not the most efficient way to do this, but we support very few
- // languages
- // so the cost of the sort is going to be dwarfed by the actual lookup
- // anyway
+ // languages so the cost of the sort is going to be dwarfed by the actual
+ // lookup anyway
if (StackFrame *frame = m_exe_ctx.GetFramePtr()) {
guessed_language = GuessLanguage(frame);
if (guessed_language != eLanguageTypeUnknown) {
Modified: lldb/trunk/source/Commands/CommandObjectWatchpoint.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectWatchpoint.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectWatchpoint.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectWatchpoint.cpp Mon Apr 30 09:49:04 2018
@@ -74,8 +74,8 @@ static int32_t WithRSAIndex(llvm::String
return -1;
}
-// Return true if wp_ids is successfully populated with the watch ids.
-// False otherwise.
+// Return true if wp_ids is successfully populated with the watch ids. False
+// otherwise.
bool CommandObjectMultiwordWatchpoint::VerifyWatchpointIDs(
Target *target, Args &args, std::vector<uint32_t> &wp_ids) {
// Pre-condition: args.GetArgumentCount() > 0.
@@ -111,8 +111,8 @@ bool CommandObjectMultiwordWatchpoint::V
if (!second.empty())
StrRefArgs.push_back(second);
}
- // Now process the canonical list and fill in the vector of uint32_t's.
- // If there is any error, return false and the client should ignore wp_ids.
+ // Now process the canonical list and fill in the vector of uint32_t's. If
+ // there is any error, return false and the client should ignore wp_ids.
uint32_t beg, end, id;
size_t size = StrRefArgs.size();
bool in_range = false;
@@ -848,8 +848,8 @@ protected:
Target *target = m_interpreter.GetDebugger().GetSelectedTarget().get();
StackFrame *frame = m_exe_ctx.GetFramePtr();
- // If no argument is present, issue an error message. There's no way to set
- // a watchpoint.
+ // If no argument is present, issue an error message. There's no way to
+ // set a watchpoint.
if (command.GetArgumentCount() <= 0) {
result.GetErrorStream().Printf("error: required argument missing; "
"specify your program variable to watch "
@@ -863,8 +863,8 @@ protected:
m_option_watchpoint.watch_type = OptionGroupWatchpoint::eWatchWrite;
}
- // We passed the sanity check for the command.
- // Proceed to set the watchpoint now.
+ // We passed the sanity check for the command. Proceed to set the
+ // watchpoint now.
lldb::addr_t addr = 0;
size_t size = 0;
@@ -1072,8 +1072,8 @@ protected:
if (expr == nullptr)
expr = raw_command;
- // If no argument is present, issue an error message. There's no way to set
- // a watchpoint.
+ // If no argument is present, issue an error message. There's no way to
+ // set a watchpoint.
if (command.GetArgumentCount() == 0) {
result.GetErrorStream().Printf("error: required argument missing; "
"specify an expression to evaulate into "
@@ -1087,8 +1087,8 @@ protected:
m_option_watchpoint.watch_type = OptionGroupWatchpoint::eWatchWrite;
}
- // We passed the sanity check for the command.
- // Proceed to set the watchpoint now.
+ // We passed the sanity check for the command. Proceed to set the
+ // watchpoint now.
lldb::addr_t addr = 0;
size_t size = 0;
Modified: lldb/trunk/source/Commands/CommandObjectWatchpointCommand.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectWatchpointCommand.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectWatchpointCommand.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectWatchpointCommand.cpp Mon Apr 30 09:49:04 2018
@@ -254,11 +254,10 @@ are no syntax errors may indicate that a
std::unique_ptr<WatchpointOptions::CommandData> data_ap(
new WatchpointOptions::CommandData());
- // It's necessary to set both user_source and script_source to the oneliner.
- // The former is used to generate callback description (as in watchpoint
- // command list)
- // while the latter is used for Python to interpret during the actual
- // callback.
+ // It's necessary to set both user_source and script_source to the
+ // oneliner. The former is used to generate callback description (as in
+ // watchpoint command list) while the latter is used for Python to
+ // interpret during the actual callback.
data_ap->user_source.AppendString(oneliner);
data_ap->script_source.assign(oneliner);
data_ap->stop_on_error = m_options.m_stop_on_error;
@@ -287,8 +286,8 @@ are no syntax errors may indicate that a
CommandReturnObject result;
Debugger &debugger = target->GetDebugger();
// Rig up the results secondary output stream to the debugger's, so the
- // output will come out synchronously
- // if the debugger is set up that way.
+ // output will come out synchronously if the debugger is set up that
+ // way.
StreamSP output_stream(debugger.GetAsyncOutputStream());
StreamSP error_stream(debugger.GetAsyncErrorStream());
@@ -441,20 +440,19 @@ protected:
if (wp_options == nullptr)
continue;
- // If we are using script language, get the script interpreter
- // in order to set or collect command callback. Otherwise, call
- // the methods associated with this object.
+ // If we are using script language, get the script interpreter in order
+ // to set or collect command callback. Otherwise, call the methods
+ // associated with this object.
if (m_options.m_use_script_language) {
// Special handling for one-liner specified inline.
if (m_options.m_use_one_liner) {
m_interpreter.GetScriptInterpreter()->SetWatchpointCommandCallback(
wp_options, m_options.m_one_liner.c_str());
}
- // Special handling for using a Python function by name
- // instead of extending the watchpoint callback data structures, we
- // just automatize
- // what the user would do manually: make their watchpoint command be a
- // function call
+ // Special handling for using a Python function by name instead of
+ // extending the watchpoint callback data structures, we just
+ // automatize what the user would do manually: make their watchpoint
+ // command be a function call
else if (!m_options.m_function_name.empty()) {
std::string oneliner(m_options.m_function_name);
oneliner += "(frame, wp, internal_dict)";
Modified: lldb/trunk/source/Core/Address.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Address.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Core/Address.cpp (original)
+++ lldb/trunk/source/Core/Address.cpp Mon Apr 30 09:49:04 2018
@@ -141,8 +141,8 @@ static bool ReadAddress(ExecutionContext
deref_so_addr))
return true;
} else {
- // If we were not running, yet able to read an integer, we must
- // have a module
+ // If we were not running, yet able to read an integer, we must have a
+ // module
ModuleSP module_sp(address.GetModule());
assert(module_sp);
@@ -151,8 +151,8 @@ static bool ReadAddress(ExecutionContext
}
// We couldn't make "deref_addr" into a section offset value, but we were
- // able to read the address, so we return a section offset address with
- // no section and "deref_addr" as the offset (address).
+ // able to read the address, so we return a section offset address with no
+ // section and "deref_addr" as the offset (address).
deref_so_addr.SetRawAddress(deref_addr);
return true;
}
@@ -278,12 +278,12 @@ addr_t Address::GetFileAddress() const {
// Section isn't resolved, we can't return a valid file address
return LLDB_INVALID_ADDRESS;
}
- // We have a valid file range, so we can return the file based
- // address by adding the file base address to our offset
+ // We have a valid file range, so we can return the file based address by
+ // adding the file base address to our offset
return sect_file_addr + m_offset;
} else if (SectionWasDeletedPrivate()) {
- // Used to have a valid section but it got deleted so the
- // offset doesn't mean anything without the section
+ // Used to have a valid section but it got deleted so the offset doesn't
+ // mean anything without the section
return LLDB_INVALID_ADDRESS;
}
// No section, we just return the offset since it is the value in this case
@@ -297,21 +297,21 @@ addr_t Address::GetLoadAddress(Target *t
addr_t sect_load_addr = section_sp->GetLoadBaseAddress(target);
if (sect_load_addr != LLDB_INVALID_ADDRESS) {
- // We have a valid file range, so we can return the file based
- // address by adding the file base address to our offset
+ // We have a valid file range, so we can return the file based address
+ // by adding the file base address to our offset
return sect_load_addr + m_offset;
}
}
} else if (SectionWasDeletedPrivate()) {
- // Used to have a valid section but it got deleted so the
- // offset doesn't mean anything without the section
+ // Used to have a valid section but it got deleted so the offset doesn't
+ // mean anything without the section
return LLDB_INVALID_ADDRESS;
} else {
// We don't have a section so the offset is the load address
return m_offset;
}
- // The section isn't resolved or an invalid target was passed in
- // so we can't return a valid load address.
+ // The section isn't resolved or an invalid target was passed in so we can't
+ // return a valid load address.
return LLDB_INVALID_ADDRESS;
}
@@ -375,16 +375,15 @@ bool Address::SetOpcodeLoadAddress(lldb:
bool Address::Dump(Stream *s, ExecutionContextScope *exe_scope, DumpStyle style,
DumpStyle fallback_style, uint32_t addr_size) const {
// If the section was nullptr, only load address is going to work unless we
- // are
- // trying to deref a pointer
+ // are trying to deref a pointer
SectionSP section_sp(GetSection());
if (!section_sp && style != DumpStyleResolvedPointerDescription)
style = DumpStyleLoadAddress;
ExecutionContext exe_ctx(exe_scope);
Target *target = exe_ctx.GetTargetPtr();
- // If addr_byte_size is UINT32_MAX, then determine the correct address
- // byte size for the process or default to the size of addr_t
+ // If addr_byte_size is UINT32_MAX, then determine the correct address byte
+ // size for the process or default to the size of addr_t
if (addr_size == UINT32_MAX) {
if (target)
addr_size = target->GetArchitecture().GetAddressByteSize();
@@ -651,15 +650,15 @@ bool Address::Dump(Stream *s, ExecutionC
}
}
if (show_stop_context) {
- // We have a function or a symbol from the same
- // sections as this address.
+ // We have a function or a symbol from the same sections as this
+ // address.
sc.DumpStopContext(s, exe_scope, *this, show_fullpaths,
show_module, show_inlined_frames,
show_function_arguments, show_function_name);
} else {
- // We found a symbol but it was in a different
- // section so it isn't the symbol we should be
- // showing, just show the section name + offset
+ // We found a symbol but it was in a different section so it
+ // isn't the symbol we should be showing, just show the section
+ // name + offset
Dump(s, exe_scope, DumpStyleSectionNameOffset);
}
}
@@ -680,10 +679,10 @@ bool Address::Dump(Stream *s, ExecutionC
module_sp->ResolveSymbolContextForAddress(
*this, eSymbolContextEverything | eSymbolContextVariable, sc);
if (sc.symbol) {
- // If we have just a symbol make sure it is in the same section
- // as our address. If it isn't, then we might have just found
- // the last symbol that came before the address that we are
- // looking up that has nothing to do with our address lookup.
+ // If we have just a symbol make sure it is in the same section as
+ // our address. If it isn't, then we might have just found the last
+ // symbol that came before the address that we are looking up that
+ // has nothing to do with our address lookup.
if (sc.symbol->ValueIsAddress() &&
sc.symbol->GetAddressRef().GetSection() != GetSection())
sc.symbol = nullptr;
@@ -771,14 +770,11 @@ bool Address::SectionWasDeletedPrivate()
lldb::SectionWP empty_section_wp;
// If either call to "std::weak_ptr::owner_before(...) value returns true,
- // this
- // indicates that m_section_wp once contained (possibly still does) a
- // reference
- // to a valid shared pointer. This helps us know if we had a valid reference
- // to
- // a section which is now invalid because the module it was in was
- // unloaded/deleted,
- // or if the address doesn't have a valid reference to a section.
+ // this indicates that m_section_wp once contained (possibly still does) a
+ // reference to a valid shared pointer. This helps us know if we had a valid
+ // reference to a section which is now invalid because the module it was in
+ // was unloaded/deleted, or if the address doesn't have a valid reference to
+ // a section.
return empty_section_wp.owner_before(m_section_wp) ||
m_section_wp.owner_before(empty_section_wp);
}
@@ -914,8 +910,8 @@ int Address::CompareModulePointerAndOffs
return -1;
if (a_module > b_module)
return +1;
- // Modules are the same, just compare the file address since they should
- // be unique
+ // Modules are the same, just compare the file address since they should be
+ // unique
addr_t a_file_addr = a.GetFileAddress();
addr_t b_file_addr = b.GetFileAddress();
if (a_file_addr < b_file_addr)
@@ -926,24 +922,23 @@ int Address::CompareModulePointerAndOffs
}
size_t Address::MemorySize() const {
- // Noting special for the memory size of a single Address object,
- // it is just the size of itself.
+ // Noting special for the memory size of a single Address object, it is just
+ // the size of itself.
return sizeof(Address);
}
//----------------------------------------------------------------------
// NOTE: Be careful using this operator. It can correctly compare two
-// addresses from the same Module correctly. It can't compare two
-// addresses from different modules in any meaningful way, but it will
-// compare the module pointers.
+// addresses from the same Module correctly. It can't compare two addresses
+// from different modules in any meaningful way, but it will compare the module
+// pointers.
//
// To sum things up:
-// - works great for addresses within the same module
-// - it works for addresses across multiple modules, but don't expect the
+// - works great for addresses within the same module - it works for addresses
+// across multiple modules, but don't expect the
// address results to make much sense
//
-// This basically lets Address objects be used in ordered collection
-// classes.
+// This basically lets Address objects be used in ordered collection classes.
//----------------------------------------------------------------------
bool lldb_private::operator<(const Address &lhs, const Address &rhs) {
@@ -955,8 +950,8 @@ bool lldb_private::operator<(const Addre
// Addresses are in the same module, just compare the file addresses
return lhs.GetFileAddress() < rhs.GetFileAddress();
} else {
- // The addresses are from different modules, just use the module
- // pointer value to get consistent ordering
+ // The addresses are from different modules, just use the module pointer
+ // value to get consistent ordering
return lhs_module < rhs_module;
}
}
@@ -970,8 +965,8 @@ bool lldb_private::operator>(const Addre
// Addresses are in the same module, just compare the file addresses
return lhs.GetFileAddress() > rhs.GetFileAddress();
} else {
- // The addresses are from different modules, just use the module
- // pointer value to get consistent ordering
+ // The addresses are from different modules, just use the module pointer
+ // value to get consistent ordering
return lhs_module > rhs_module;
}
}
Modified: lldb/trunk/source/Core/AddressResolverName.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/AddressResolverName.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Core/AddressResolverName.cpp (original)
+++ lldb/trunk/source/Core/AddressResolverName.cpp Mon Apr 30 09:49:04 2018
@@ -62,9 +62,8 @@ AddressResolverName::~AddressResolverNam
// FIXME: Right now we look at the module level, and call the module's
// "FindFunctions".
// Greg says he will add function tables, maybe at the CompileUnit level to
-// accelerate function
-// lookup. At that point, we should switch the depth to CompileUnit, and look
-// in these tables.
+// accelerate function lookup. At that point, we should switch the depth to
+// CompileUnit, and look in these tables.
Searcher::CallbackReturn
AddressResolverName::SearchCallback(SearchFilter &filter,
Modified: lldb/trunk/source/Core/Broadcaster.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Broadcaster.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Core/Broadcaster.cpp (original)
+++ lldb/trunk/source/Core/Broadcaster.cpp Mon Apr 30 09:49:04 2018
@@ -74,9 +74,8 @@ Broadcaster::BroadcasterImpl::GetListene
void Broadcaster::BroadcasterImpl::Clear() {
std::lock_guard<std::recursive_mutex> guard(m_listeners_mutex);
- // Make sure the listener forgets about this broadcaster. We do
- // this in the broadcaster in case the broadcaster object initiates
- // the removal.
+ // Make sure the listener forgets about this broadcaster. We do this in the
+ // broadcaster in case the broadcaster object initiates the removal.
for (auto &pair : GetListeners())
pair.first->BroadcasterWillDestruct(&m_broadcaster);
Modified: lldb/trunk/source/Core/Communication.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Communication.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Core/Communication.cpp (original)
+++ lldb/trunk/source/Core/Communication.cpp Mon Apr 30 09:49:04 2018
@@ -97,15 +97,15 @@ ConnectionStatus Communication::Disconne
lldb::ConnectionSP connection_sp(m_connection_sp);
if (connection_sp) {
ConnectionStatus status = connection_sp->Disconnect(error_ptr);
- // We currently don't protect connection_sp with any mutex for
- // multi-threaded environments. So lets not nuke our connection class
- // without putting some multi-threaded protections in. We also probably
- // don't want to pay for the overhead it might cause if every time we
- // access the connection we have to take a lock.
+ // We currently don't protect connection_sp with any mutex for multi-
+ // threaded environments. So lets not nuke our connection class without
+ // putting some multi-threaded protections in. We also probably don't want
+ // to pay for the overhead it might cause if every time we access the
+ // connection we have to take a lock.
//
- // This unique pointer will cleanup after itself when this object goes away,
- // so there is no need to currently have it destroy itself immediately
- // upon disconnnect.
+ // This unique pointer will cleanup after itself when this object goes
+ // away, so there is no need to currently have it destroy itself
+ // immediately upon disconnnect.
// connection_sp.reset();
return status;
}
@@ -240,8 +240,8 @@ bool Communication::JoinReadThread(Statu
size_t Communication::GetCachedBytes(void *dst, size_t dst_len) {
std::lock_guard<std::recursive_mutex> guard(m_bytes_mutex);
if (!m_bytes.empty()) {
- // If DST is nullptr and we have a thread, then return the number
- // of bytes that are available so the caller can call again
+ // If DST is nullptr and we have a thread, then return the number of bytes
+ // that are available so the caller can call again
if (dst == nullptr)
return m_bytes.size();
@@ -337,8 +337,7 @@ lldb::thread_result_t Communication::Rea
case eConnectionStatusInterrupted: // Synchronization signal from
// SynchronizeWithReadThread()
// The connection returns eConnectionStatusInterrupted only when there is
- // no
- // input pending to be read, so we can signal that.
+ // no input pending to be read, so we can signal that.
comm->BroadcastEvent(eBroadcastBitNoMorePendingInput);
break;
case eConnectionStatusNoConnection: // No connection
Modified: lldb/trunk/source/Core/Debugger.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Debugger.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Core/Debugger.cpp (original)
+++ lldb/trunk/source/Core/Debugger.cpp Mon Apr 30 09:49:04 2018
@@ -167,13 +167,15 @@ OptionEnumValueElement g_language_enumer
"}${addr-file-or-load}{ " \
"<${function.concrete-only-addr-offset-no-padding}>}: "
-// gdb's disassembly format can be emulated with
-// ${current-pc-arrow}${addr-file-or-load}{
-// <${function.name-without-args}${function.concrete-only-addr-offset-no-padding}>}:
+// gdb's disassembly format can be emulated with ${current-pc-arrow}${addr-
+// file-or-load}{ <${function.name-without-args}${function.concrete-only-addr-
+// offset-no-padding}>}:
// lldb's original format for disassembly would look like this format string -
-// {${function.initial-function}{${module.file.basename}`}{${function.name-without-args}}:\n}{${function.changed}\n{${module.file.basename}`}{${function.name-without-args}}:\n}{${current-pc-arrow}
-// }{${addr-file-or-load}}:
+// {${function.initial-function}{${module.file.basename}`}{${function.name-
+// without-
+// args}}:\n}{${function.changed}\n{${module.file.basename}`}{${function.name-
+// without-args}}:\n}{${current-pc-arrow} }{${addr-file-or-load}}:
#define DEFAULT_STOP_SHOW_COLUMN_ANSI_PREFIX "${ansi.underline}"
#define DEFAULT_STOP_SHOW_COLUMN_ANSI_SUFFIX "${ansi.normal}"
@@ -590,9 +592,9 @@ bool Debugger::LoadPlugin(const FileSpec
return true;
}
} else {
- // The g_load_plugin_callback is registered in SBDebugger::Initialize()
- // and if the public API layer isn't available (code is linking against
- // all of the internal LLDB static libraries), then we can't load plugins
+ // The g_load_plugin_callback is registered in SBDebugger::Initialize() and
+ // if the public API layer isn't available (code is linking against all of
+ // the internal LLDB static libraries), then we can't load plugins
error.SetErrorString("Public API layer is not available");
}
return false;
@@ -612,8 +614,8 @@ LoadPluginCallback(void *baton, llvm::sy
Debugger *debugger = (Debugger *)baton;
namespace fs = llvm::sys::fs;
- // If we have a regular file, a symbolic link or unknown file type, try
- // and process the file. We must handle unknown as sometimes the directory
+ // If we have a regular file, a symbolic link or unknown file type, try and
+ // process the file. We must handle unknown as sometimes the directory
// enumeration might be enumerating a file system that doesn't have correct
// file type information.
if (ft == fs::file_type::regular_file || ft == fs::file_type::symlink_file ||
@@ -633,9 +635,9 @@ LoadPluginCallback(void *baton, llvm::sy
} else if (ft == fs::file_type::directory_file ||
ft == fs::file_type::symlink_file ||
ft == fs::file_type::type_unknown) {
- // Try and recurse into anything that a directory or symbolic link.
- // We must also do this for unknown as sometimes the directory enumeration
- // might be enumerating a file system that doesn't have correct file type
+ // Try and recurse into anything that a directory or symbolic link. We must
+ // also do this for unknown as sometimes the directory enumeration might be
+ // enumerating a file system that doesn't have correct file type
// information.
return FileSpec::eEnumerateDirectoryResultEnter;
}
@@ -800,10 +802,9 @@ Debugger::~Debugger() { Clear(); }
void Debugger::Clear() {
//----------------------------------------------------------------------
- // Make sure we call this function only once. With the C++ global
- // destructor chain having a list of debuggers and with code that can be
- // running on other threads, we need to ensure this doesn't happen
- // multiple times.
+ // Make sure we call this function only once. With the C++ global destructor
+ // chain having a list of debuggers and with code that can be running on
+ // other threads, we need to ensure this doesn't happen multiple times.
//
// The following functions call Debugger::Clear():
// Debugger::~Debugger();
@@ -828,8 +829,7 @@ void Debugger::Clear() {
m_broadcaster_manager_sp->Clear();
// Close the input file _before_ we close the input read communications
- // class
- // as it does NOT own the input file, our m_input_file does.
+ // class as it does NOT own the input file, our m_input_file does.
m_terminal_state.Clear();
if (m_input_file_sp)
m_input_file_sp->GetFile().Close();
@@ -865,8 +865,8 @@ void Debugger::SetInputFileHandle(FILE *
if (!in_file.IsValid())
in_file.SetStream(stdin, true);
- // Save away the terminal state if that is relevant, so that we can restore it
- // in RestoreInputState.
+ // Save away the terminal state if that is relevant, so that we can restore
+ // it in RestoreInputState.
SaveInputTerminalState();
}
@@ -880,8 +880,8 @@ void Debugger::SetOutputFileHandle(FILE
if (!out_file.IsValid())
out_file.SetStream(stdout, false);
- // do not create the ScriptInterpreter just for setting the output file handle
- // as the constructor will know how to do the right thing on its own
+ // do not create the ScriptInterpreter just for setting the output file
+ // handle as the constructor will know how to do the right thing on its own
const bool can_create = false;
ScriptInterpreter *script_interpreter =
GetCommandInterpreter().GetScriptInterpreter(can_create);
@@ -1027,11 +1027,10 @@ void Debugger::RunIOHandler(const IOHand
void Debugger::AdoptTopIOHandlerFilesIfInvalid(StreamFileSP &in,
StreamFileSP &out,
StreamFileSP &err) {
- // Before an IOHandler runs, it must have in/out/err streams.
- // This function is called when one ore more of the streams
- // are nullptr. We use the top input reader's in/out/err streams,
- // or fall back to the debugger file handles, or we fall back
- // onto stdin/stdout/stderr as a last resort.
+ // Before an IOHandler runs, it must have in/out/err streams. This function
+ // is called when one ore more of the streams are nullptr. We use the top
+ // input reader's in/out/err streams, or fall back to the debugger file
+ // handles, or we fall back onto stdin/stdout/stderr as a last resort.
std::lock_guard<std::recursive_mutex> guard(m_input_reader_stack.GetMutex());
IOHandlerSP top_reader_sp(m_input_reader_stack.Top());
@@ -1087,8 +1086,8 @@ void Debugger::PushIOHandler(const IOHan
m_input_reader_stack.Push(reader_sp);
reader_sp->Activate();
- // Interrupt the top input reader to it will exit its Run() function
- // and let this new input reader take over
+ // Interrupt the top input reader to it will exit its Run() function and let
+ // this new input reader take over
if (top_reader_sp) {
top_reader_sp->Deactivate();
top_reader_sp->Cancel();
@@ -1101,8 +1100,8 @@ bool Debugger::PopIOHandler(const IOHand
std::lock_guard<std::recursive_mutex> guard(m_input_reader_stack.GetMutex());
- // The reader on the stop of the stack is done, so let the next
- // read on the stack refresh its prompt and if there is one...
+ // The reader on the stop of the stack is done, so let the next read on the
+ // stack refresh its prompt and if there is one...
if (m_input_reader_stack.IsEmpty())
return false;
@@ -1197,8 +1196,8 @@ bool Debugger::FormatDisassemblerAddress
}
}
}
- // The first context on a list of instructions will have a prev_sc that
- // has no Function or Symbol -- if SymbolContext had an IsValid() method, it
+ // The first context on a list of instructions will have a prev_sc that has
+ // no Function or Symbol -- if SymbolContext had an IsValid() method, it
// would return false. But we do get a prev_sc pointer.
if ((sc && (sc->function || sc->symbol)) && prev_sc &&
(prev_sc->function == nullptr && prev_sc->symbol == nullptr)) {
@@ -1464,8 +1463,8 @@ void Debugger::HandleProcessEvent(const
}
void Debugger::HandleThreadEvent(const EventSP &event_sp) {
- // At present the only thread event we handle is the Frame Changed event,
- // and all we do for that is just reprint the thread status for that thread.
+ // At present the only thread event we handle is the Frame Changed event, and
+ // all we do for that is just reprint the thread status for that thread.
using namespace lldb;
const uint32_t event_type = event_sp->GetType();
const bool stop_format = true;
@@ -1518,8 +1517,8 @@ void Debugger::DefaultEventHandler() {
CommandInterpreter::eBroadcastBitAsynchronousOutputData |
CommandInterpreter::eBroadcastBitAsynchronousErrorData);
- // Let the thread that spawned us know that we have started up and
- // that we are now listening to all required events so no events get missed
+ // Let the thread that spawned us know that we have started up and that we
+ // are now listening to all required events so no events get missed
m_sync_broadcaster.BroadcastEvent(eBroadcastBitEventThreadIsListening);
bool done = false;
@@ -1584,9 +1583,9 @@ lldb::thread_result_t Debugger::EventHan
bool Debugger::StartEventHandlerThread() {
if (!m_event_handler_thread.IsJoinable()) {
- // We must synchronize with the DefaultEventHandler() thread to ensure
- // it is up and running and listening to events before we return from
- // this function. We do this by listening to events for the
+ // We must synchronize with the DefaultEventHandler() thread to ensure it
+ // is up and running and listening to events before we return from this
+ // function. We do this by listening to events for the
// eBroadcastBitEventThreadIsListening from the m_sync_broadcaster
ListenerSP listener_sp(
Listener::MakeListener("lldb.debugger.event-handler"));
@@ -1598,13 +1597,11 @@ bool Debugger::StartEventHandlerThread()
"lldb.debugger.event-handler", EventHandlerThread, this, nullptr,
g_debugger_event_thread_stack_bytes);
- // Make sure DefaultEventHandler() is running and listening to events before
- // we return
- // from this function. We are only listening for events of type
- // eBroadcastBitEventThreadIsListening so we don't need to check the event,
- // we just need
- // to wait an infinite amount of time for it (nullptr timeout as the first
- // parameter)
+ // Make sure DefaultEventHandler() is running and listening to events
+ // before we return from this function. We are only listening for events of
+ // type eBroadcastBitEventThreadIsListening so we don't need to check the
+ // event, we just need to wait an infinite amount of time for it (nullptr
+ // timeout as the first parameter)
lldb::EventSP event_sp;
listener_sp->GetEvent(event_sp, llvm::None);
}
Modified: lldb/trunk/source/Core/Disassembler.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Disassembler.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Core/Disassembler.cpp (original)
+++ lldb/trunk/source/Core/Disassembler.cpp Mon Apr 30 09:49:04 2018
@@ -96,8 +96,8 @@ DisassemblerSP Disassembler::FindPluginF
const char *plugin_name) {
if (target_sp && flavor == nullptr) {
// FIXME - we don't have the mechanism in place to do per-architecture
- // settings. But since we know that for now
- // we only support flavors on x86 & x86_64,
+ // settings. But since we know that for now we only support flavors on x86
+ // & x86_64,
if (arch.GetTriple().getArch() == llvm::Triple::x86 ||
arch.GetTriple().getArch() == llvm::Triple::x86_64)
flavor = target_sp->GetDisassemblyFlavor();
@@ -108,8 +108,8 @@ DisassemblerSP Disassembler::FindPluginF
static void ResolveAddress(const ExecutionContext &exe_ctx, const Address &addr,
Address &resolved_addr) {
if (!addr.IsSectionOffset()) {
- // If we weren't passed in a section offset address range,
- // try and resolve it to something
+ // If we weren't passed in a section offset address range, try and resolve
+ // it to something
Target *target = exe_ctx.GetTargetPtr();
if (target) {
if (target->GetSectionLoadList().IsEmpty()) {
@@ -118,8 +118,7 @@ static void ResolveAddress(const Executi
target->GetSectionLoadList().ResolveLoadAddress(addr.GetOffset(),
resolved_addr);
}
- // We weren't able to resolve the address, just treat it as a
- // raw address
+ // We weren't able to resolve the address, just treat it as a raw address
if (resolved_addr.IsValid())
return;
}
@@ -410,15 +409,13 @@ bool Disassembler::PrintInstructions(Dis
disassembly_format = &format;
}
- // First pass: step through the list of instructions,
- // find how long the initial addresses strings are, insert padding
- // in the second pass so the opcodes all line up nicely.
+ // First pass: step through the list of instructions, find how long the
+ // initial addresses strings are, insert padding in the second pass so the
+ // opcodes all line up nicely.
// Also build up the source line mapping if this is mixed source & assembly
- // mode.
- // Calculate the source line for each assembly instruction (eliding inlined
- // functions
- // which the user wants to skip).
+ // mode. Calculate the source line for each assembly instruction (eliding
+ // inlined functions which the user wants to skip).
std::map<FileSpec, std::set<uint32_t>> source_lines_seen;
Symbol *previous_symbol = nullptr;
@@ -495,17 +492,13 @@ bool Disassembler::PrintInstructions(Dis
if (mixed_source_and_assembly) {
// If we've started a new function (non-inlined), print all of the
- // source lines from the
- // function declaration until the first line table entry - typically
- // the opening curly brace of
- // the function.
+ // source lines from the function declaration until the first line
+ // table entry - typically the opening curly brace of the function.
if (previous_symbol != sc.symbol) {
- // The default disassembly format puts an extra blank line between
- // functions - so
- // when we're displaying the source context for a function, we
- // don't want to add
- // a blank line after the source context or we'll end up with two
- // of them.
+ // The default disassembly format puts an extra blank line
+ // between functions - so when we're displaying the source
+ // context for a function, we don't want to add a blank line
+ // after the source context or we'll end up with two of them.
if (previous_symbol != nullptr)
source_lines_to_display.print_source_context_end_eol = false;
@@ -520,9 +513,9 @@ bool Disassembler::PrintInstructions(Dis
func_decl_line);
if (func_decl_file == prologue_end_line.file ||
func_decl_file == prologue_end_line.original_file) {
- // Add all the lines between the function declaration
- // and the first non-prologue source line to the list
- // of lines to print.
+ // Add all the lines between the function declaration and
+ // the first non-prologue source line to the list of lines
+ // to print.
for (uint32_t lineno = func_decl_line;
lineno <= prologue_end_line.line; lineno++) {
SourceLine this_line;
@@ -530,8 +523,8 @@ bool Disassembler::PrintInstructions(Dis
this_line.line = lineno;
source_lines_to_display.lines.push_back(this_line);
}
- // Mark the last line as the "current" one. Usually
- // this is the open curly brace.
+ // Mark the last line as the "current" one. Usually this
+ // is the open curly brace.
if (source_lines_to_display.lines.size() > 0)
source_lines_to_display.current_source_line =
source_lines_to_display.lines.size() - 1;
@@ -542,8 +535,8 @@ bool Disassembler::PrintInstructions(Dis
current_source_line_range);
}
- // If we've left a previous source line's address range, print a new
- // source line
+ // If we've left a previous source line's address range, print a
+ // new source line
if (!current_source_line_range.ContainsFileAddress(addr)) {
sc.GetAddressRange(scope, 0, use_inline_block_range,
current_source_line_range);
@@ -558,8 +551,8 @@ bool Disassembler::PrintInstructions(Dis
// Only print this source line if it is different from the
// last source line we printed. There may have been inlined
// functions between these lines that we elided, resulting in
- // the same line being printed twice in a row for a contiguous
- // block of assembly instructions.
+ // the same line being printed twice in a row for a
+ // contiguous block of assembly instructions.
if (this_line != previous_line) {
std::vector<uint32_t> previous_lines;
@@ -710,16 +703,16 @@ void Instruction::Dump(lldb_private::Str
if (show_bytes) {
if (m_opcode.GetType() == Opcode::eTypeBytes) {
- // x86_64 and i386 are the only ones that use bytes right now so
- // pad out the byte dump to be able to always show 15 bytes (3 chars each)
- // plus a space
+ // x86_64 and i386 are the only ones that use bytes right now so pad out
+ // the byte dump to be able to always show 15 bytes (3 chars each) plus a
+ // space
if (max_opcode_byte_size > 0)
m_opcode.Dump(&ss, max_opcode_byte_size * 3 + 1);
else
m_opcode.Dump(&ss, 15 * 3 + 1);
} else {
- // Else, we have ARM or MIPS which can show up to a uint32_t
- // 0x00000000 (10 spaces) plus two for padding...
+ // Else, we have ARM or MIPS which can show up to a uint32_t 0x00000000
+ // (10 spaces) plus two for padding...
if (max_opcode_byte_size > 0)
m_opcode.Dump(&ss, max_opcode_byte_size * 3 + 1);
else
@@ -903,7 +896,8 @@ OptionValueSP Instruction::ReadDictionar
option_value_sp.reset();
return option_value_sp;
}
- // We've used the data_type to read an array; re-set the type to Invalid
+ // We've used the data_type to read an array; re-set the type to
+ // Invalid
data_type = OptionValue::eTypeInvalid;
} else if ((value[0] == '0') && (value[1] == 'x')) {
value_sp = std::make_shared<OptionValueUInt64>(0, 0);
@@ -1107,9 +1101,9 @@ InstructionList::GetIndexOfNextBranchIns
}
}
- // Hexagon needs the first instruction of the packet with the branch.
- // Go backwards until we find an instruction marked end-of-packet, or
- // until we hit start.
+ // Hexagon needs the first instruction of the packet with the branch. Go
+ // backwards until we find an instruction marked end-of-packet, or until we
+ // hit start.
if (target.GetArchitecture().GetTriple().getArch() == llvm::Triple::hexagon) {
// If we didn't find a branch, find the last packet start.
if (next_branch == UINT32_MAX) {
@@ -1128,8 +1122,8 @@ InstructionList::GetIndexOfNextBranchIns
// If we have an error reading memory, return start
if (!error.Success())
return start;
- // check if this is the last instruction in a packet
- // bits 15:14 will be 11b or 00b for a duplex
+ // check if this is the last instruction in a packet bits 15:14 will be
+ // 11b or 00b for a duplex
if (((inst_bytes & 0xC000) == 0xC000) ||
((inst_bytes & 0xC000) == 0x0000)) {
// instruction after this should be the start of next packet
@@ -1257,8 +1251,7 @@ Disassembler::Disassembler(const ArchSpe
m_flavor.assign(flavor);
// If this is an arm variant that can only include thumb (T16, T32)
- // instructions, force the arch triple to be "thumbv.." instead of
- // "armv..."
+ // instructions, force the arch triple to be "thumbv.." instead of "armv..."
if (arch.IsAlwaysThumbInstructions()) {
std::string thumb_arch_name(arch.GetTriple().getArchName().str());
// Replace "arm" with "thumb" so we get all thumb variants correct
Modified: lldb/trunk/source/Core/DumpDataExtractor.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/DumpDataExtractor.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Core/DumpDataExtractor.cpp (original)
+++ lldb/trunk/source/Core/DumpDataExtractor.cpp Mon Apr 30 09:49:04 2018
@@ -239,8 +239,8 @@ lldb::offset_t lldb_private::DumpDataExt
if (item_byte_size <= 8) {
uint64_t uval64 = DE.GetMaxU64Bitfield(&offset, item_byte_size,
item_bit_size, item_bit_offset);
- // Avoid std::bitset<64>::to_string() since it is missing in
- // earlier C++ libraries
+ // Avoid std::bitset<64>::to_string() since it is missing in earlier
+ // C++ libraries
std::string binary_value(64, '0');
std::bitset<64> bits(uval64);
for (uint32_t i = 0; i < 64; ++i)
@@ -263,8 +263,8 @@ lldb::offset_t lldb_private::DumpDataExt
s->Printf("%2.2x", DE.GetU8(&offset));
}
- // Put an extra space between the groups of bytes if more than one
- // is being dumped in a group (item_byte_size is more than 1).
+ // Put an extra space between the groups of bytes if more than one is
+ // being dumped in a group (item_byte_size is more than 1).
if (item_byte_size > 1)
s->PutChar(' ');
break;
@@ -279,8 +279,7 @@ lldb::offset_t lldb_private::DumpDataExt
return offset;
}
- // If we are only printing one character surround it with single
- // quotes
+ // If we are only printing one character surround it with single quotes
if (item_count == 1 && item_format == eFormatChar)
s->PutChar('\'');
@@ -693,10 +692,9 @@ lldb::offset_t lldb_private::DumpDataExt
break;
// please keep the single-item formats below in sync with
- // FormatManager::GetSingleItemFormat
- // if you fail to do so, users will start getting different outputs
- // depending on internal
- // implementation details they should not care about ||
+ // FormatManager::GetSingleItemFormat if you fail to do so, users will
+ // start getting different outputs depending on internal implementation
+ // details they should not care about ||
case eFormatVectorOfChar: // ||
s->PutChar('{'); // \/
offset =
Modified: lldb/trunk/source/Core/DynamicLoader.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/DynamicLoader.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Core/DynamicLoader.cpp (original)
+++ lldb/trunk/source/Core/DynamicLoader.cpp Mon Apr 30 09:49:04 2018
@@ -64,8 +64,8 @@ DynamicLoader::DynamicLoader(Process *pr
DynamicLoader::~DynamicLoader() = default;
//----------------------------------------------------------------------
-// Accessosors to the global setting as to whether to stop at image
-// (shared library) loading/unloading.
+// Accessosors to the global setting as to whether to stop at image (shared
+// library) loading/unloading.
//----------------------------------------------------------------------
bool DynamicLoader::GetStopWhenImagesChange() const {
@@ -86,8 +86,8 @@ ModuleSP DynamicLoader::GetTargetExecuta
executable->GetArchitecture());
auto module_sp = std::make_shared<Module>(module_spec);
- // Check if the executable has changed and set it to the target executable
- // if they differ.
+ // Check if the executable has changed and set it to the target
+ // executable if they differ.
if (module_sp && module_sp->GetUUID().IsValid() &&
executable->GetUUID().IsValid()) {
if (module_sp->GetUUID() != executable->GetUUID())
@@ -99,8 +99,8 @@ ModuleSP DynamicLoader::GetTargetExecuta
if (!executable) {
executable = target.GetSharedModule(module_spec);
if (executable.get() != target.GetExecutableModulePointer()) {
- // Don't load dependent images since we are in dyld where we will know
- // and find out about all images that are loaded
+ // Don't load dependent images since we are in dyld where we will
+ // know and find out about all images that are loaded
const bool get_dependent_images = false;
target.SetExecutableModule(executable, get_dependent_images);
}
@@ -177,8 +177,8 @@ ModuleSP DynamicLoader::LoadModuleAtAddr
bool check_alternative_file_name = true;
if (base_addr_is_offset) {
// Try to fetch the load address of the file from the process as we need
- // absolute load
- // address to read the file out of the memory instead of a load bias.
+ // absolute load address to read the file out of the memory instead of a
+ // load bias.
bool is_loaded = false;
lldb::addr_t load_addr;
Status error = m_process->GetFileLoadAddress(file, is_loaded, load_addr);
@@ -188,9 +188,8 @@ ModuleSP DynamicLoader::LoadModuleAtAddr
}
}
- // We failed to find the module based on its name. Lets try to check if we can
- // find a
- // different name based on the memory region info.
+ // We failed to find the module based on its name. Lets try to check if we
+ // can find a different name based on the memory region info.
if (check_alternative_file_name) {
MemoryRegionInfo memory_info;
Status error = m_process->GetMemoryRegionInfo(base_addr, memory_info);
Modified: lldb/trunk/source/Core/FileLineResolver.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/FileLineResolver.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Core/FileLineResolver.cpp (original)
+++ lldb/trunk/source/Core/FileLineResolver.cpp Mon Apr 30 09:49:04 2018
@@ -54,8 +54,8 @@ FileLineResolver::SearchCallback(SearchF
while (file_idx != UINT32_MAX) {
line_table->FineLineEntriesForFileIndex(file_idx, append,
m_sc_list);
- // Get the next file index in case we have multiple file
- // entries for the same file
+ // Get the next file index in case we have multiple file entries
+ // for the same file
file_idx = cu->GetSupportFiles().FindFileIndex(file_idx + 1,
m_file_spec, false);
}
Modified: lldb/trunk/source/Core/FileSpecList.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/FileSpecList.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Core/FileSpecList.cpp (original)
+++ lldb/trunk/source/Core/FileSpecList.cpp Mon Apr 30 09:49:04 2018
@@ -42,11 +42,10 @@ void FileSpecList::Append(const FileSpec
}
//------------------------------------------------------------------
-// Only append the "file_spec" if this list doesn't already contain
-// it.
+// Only append the "file_spec" if this list doesn't already contain it.
//
-// Returns true if "file_spec" was added, false if this list already
-// contained a copy of "file_spec".
+// Returns true if "file_spec" was added, false if this list already contained
+// a copy of "file_spec".
//------------------------------------------------------------------
bool FileSpecList::AppendIfUnique(const FileSpec &file_spec) {
collection::iterator end = m_files.end();
@@ -75,18 +74,18 @@ void FileSpecList::Dump(Stream *s, const
}
//------------------------------------------------------------------
-// Find the index of the file in the file spec list that matches
-// "file_spec" starting "start_idx" entries into the file spec list.
+// Find the index of the file in the file spec list that matches "file_spec"
+// starting "start_idx" entries into the file spec list.
//
-// Returns the valid index of the file that matches "file_spec" if
-// it is found, else std::numeric_limits<uint32_t>::max() is returned.
+// Returns the valid index of the file that matches "file_spec" if it is found,
+// else std::numeric_limits<uint32_t>::max() is returned.
//------------------------------------------------------------------
size_t FileSpecList::FindFileIndex(size_t start_idx, const FileSpec &file_spec,
bool full) const {
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
+ // 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 (size_t idx = start_idx; idx < num_files; ++idx) {
@@ -106,8 +105,8 @@ size_t FileSpecList::FindFileIndex(size_
}
//------------------------------------------------------------------
-// Returns the FileSpec object at index "idx". If "idx" is out of
-// range, then an empty FileSpec object will be returned.
+// Returns the FileSpec object at index "idx". If "idx" is out of range, then
+// an empty FileSpec object will be returned.
//------------------------------------------------------------------
const FileSpec &FileSpecList::GetFileSpecAtIndex(size_t idx) const {
if (idx < m_files.size())
@@ -123,11 +122,10 @@ const FileSpec *FileSpecList::GetFileSpe
}
//------------------------------------------------------------------
-// Return the size in bytes that this object takes in memory. This
-// returns the size in bytes of this object's member variables and
-// any FileSpec objects its member variables contain, the result
-// doesn't not include the string values for the directories any
-// filenames as those are in shared string pools.
+// Return the size in bytes that this object takes in memory. This returns the
+// size in bytes of this object's member variables and any FileSpec objects its
+// member variables contain, the result doesn't not include the string values
+// for the directories any filenames as those are in shared string pools.
//------------------------------------------------------------------
size_t FileSpecList::MemorySize() const {
size_t mem_size = sizeof(FileSpecList);
Modified: lldb/trunk/source/Core/FormatEntity.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/FormatEntity.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Core/FormatEntity.cpp (original)
+++ lldb/trunk/source/Core/FormatEntity.cpp Mon Apr 30 09:49:04 2018
@@ -467,10 +467,9 @@ static bool DumpAddressOffsetFromFunctio
if (sc->function) {
func_addr = sc->function->GetAddressRange().GetBaseAddress();
if (sc->block && !concrete_only) {
- // Check to make sure we aren't in an inline
- // function. If we are, use the inline block
- // range that contains "format_addr" since
- // blocks can be discontiguous.
+ // Check to make sure we aren't in an inline function. If we are, use
+ // the inline block range that contains "format_addr" since blocks
+ // can be discontiguous.
Block *inline_block = sc->block->GetContainingInlinedBlock();
AddressRange inline_range;
if (inline_block &&
@@ -822,8 +821,7 @@ static bool DumpValue(Stream &s, const S
if (do_deref_pointer && !is_array_range) {
// I have not deref-ed yet, let's do it
// this happens when we are not going through
- // GetValueForVariableExpressionPath
- // to get to the target ValueObject
+ // GetValueForVariableExpressionPath to get to the target ValueObject
Status error;
target = target->Dereference(error).get();
if (error.Fail()) {
@@ -842,9 +840,9 @@ static bool DumpValue(Stream &s, const S
return false;
}
- // we do not want to use the summary for a bitfield of type T:n
- // if we were originally dealing with just a T - that would get
- // us into an endless recursion
+ // we do not want to use the summary for a bitfield of type T:n if we were
+ // originally dealing with just a T - that would get us into an endless
+ // recursion
if (target->IsBitfield() && was_var_indexed) {
// TODO: check for a (T:n)-specific summary - we should still obey that
StreamString bitfield_name;
@@ -905,8 +903,7 @@ static bool DumpValue(Stream &s, const S
}
// if directly trying to print ${var}, and this is an aggregate, display a
- // nice
- // type @ location message
+ // nice type @ location message
if (is_aggregate && was_plain_var) {
s << target->GetTypeName() << " @ " << target->GetLocationAsCString();
return true;
@@ -1142,8 +1139,8 @@ bool FormatEntity::Format(const Entry &e
if (!success)
break;
}
- // Only if all items in a scope succeed, then do we
- // print the output into the main stream
+ // Only if all items in a scope succeed, then do we print the output into
+ // the main stream
if (success)
s.Write(scope_stream.GetString().data(), scope_stream.GetString().size());
}
@@ -1206,9 +1203,8 @@ bool FormatEntity::Format(const Entry &e
// Watch for the special "tid" format...
if (entry.printf_format == "tid") {
// TODO(zturner): Rather than hardcoding this to be platform
- // specific, it should be controlled by a
- // setting and the default value of the setting can be different
- // depending on the platform.
+ // specific, it should be controlled by a setting and the default
+ // value of the setting can be different depending on the platform.
Target &target = thread->GetProcess()->GetTarget();
ArchSpec arch(target.GetArchitecture());
llvm::Triple::OSType ostype = arch.IsValid()
@@ -1914,9 +1910,9 @@ static Status ParseEntry(const llvm::Str
error.SetErrorStringWithFormat("%s", error_strm.GetData());
} else if (sep_char == ':') {
// Any value whose separator is a with a ':' means this value has a
- // string argument
- // that needs to be stored in the entry (like "${script.var:}").
- // In this case the string value is the empty string which is ok.
+ // string argument that needs to be stored in the entry (like
+ // "${script.var:}"). In this case the string value is the empty
+ // string which is ok.
} else {
error.SetErrorStringWithFormat("%s", "invalid entry definitions");
}
@@ -1926,8 +1922,7 @@ static Status ParseEntry(const llvm::Str
error = ParseEntry(value, entry_def, entry);
} else if (sep_char == ':') {
// Any value whose separator is a with a ':' means this value has a
- // string argument
- // that needs to be stored in the entry (like
+ // string argument that needs to be stored in the entry (like
// "${script.var:modulename.function}")
entry.string = value.str();
} else {
@@ -2065,17 +2060,17 @@ Status FormatEntity::ParseInternal(llvm:
case '0':
// 1 to 3 octal chars
{
- // Make a string that can hold onto the initial zero char,
- // up to 3 octal digits, and a terminating NULL.
+ // Make a string that can hold onto the initial zero char, up to 3
+ // octal digits, and a terminating NULL.
char oct_str[5] = {0, 0, 0, 0, 0};
int i;
for (i = 0; (format[i] >= '0' && format[i] <= '7') && i < 4; ++i)
oct_str[i] = format[i];
- // We don't want to consume the last octal character since
- // the main for loop will do this for us, so we advance p by
- // one less than i (even if i is zero)
+ // We don't want to consume the last octal character since the main
+ // for loop will do this for us, so we advance p by one less than i
+ // (even if i is zero)
format = format.drop_front(i);
unsigned long octal_value = ::strtoul(oct_str, nullptr, 8);
if (octal_value <= UINT8_MAX) {
@@ -2115,8 +2110,8 @@ Status FormatEntity::ParseInternal(llvm:
break;
default:
- // Just desensitize any other character by just printing what
- // came after the '\'
+ // Just desensitize any other character by just printing what came
+ // after the '\'
parent_entry.AppendChar(desens_char);
break;
}
@@ -2142,10 +2137,9 @@ Status FormatEntity::ParseInternal(llvm:
if (!variable_format.empty()) {
entry.printf_format = variable_format.str();
- // If the format contains a '%' we are going to assume this is
- // a printf style format. So if you want to format your thread ID
- // using "0x%llx" you can use:
- // ${thread.id%0x%llx}
+ // If the format contains a '%' we are going to assume this is a
+ // printf style format. So if you want to format your thread ID
+ // using "0x%llx" you can use: ${thread.id%0x%llx}
//
// If there is no '%' in the format, then it is assumed to be a
// LLDB format name, or one of the extended formats specified in
@@ -2264,9 +2258,9 @@ Status FormatEntity::ParseInternal(llvm:
return error;
}
}
- // Check if this entry just wants to insert a constant string
- // value into the parent_entry, if so, insert the string with
- // AppendText, else append the entry to the parent_entry.
+ // Check if this entry just wants to insert a constant string value
+ // into the parent_entry, if so, insert the string with AppendText,
+ // else append the entry to the parent_entry.
if (entry.type == Entry::Type::InsertString)
parent_entry.AppendText(entry.string.c_str());
else
Modified: lldb/trunk/source/Core/IOHandler.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/IOHandler.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Core/IOHandler.cpp (original)
+++ lldb/trunk/source/Core/IOHandler.cpp Mon Apr 30 09:49:04 2018
@@ -256,9 +256,8 @@ int IOHandlerDelegate::IOHandlerComplete
matches.LongestCommonPrefix(common_prefix);
const size_t partial_name_len = strlen(word_start);
- // If we matched a unique single command, add a space...
- // Only do this if the completer told us this was a complete word,
- // however...
+ // If we matched a unique single command, add a space... Only do this if
+ // the completer told us this was a complete word, however...
if (num_matches == 1 && word_complete) {
common_prefix.push_back(' ');
}
@@ -321,8 +320,7 @@ IOHandlerEditline::IOHandlerEditline(
const char *indent_chars = delegate.IOHandlerGetFixIndentationCharacters();
if (indent_chars) {
// The delegate does support indentation, hook it up so when any
- // indentation
- // character is typed, the delegate gets a chance to fix it
+ // indentation character is typed, the delegate gets a chance to fix it
m_editline_ap->SetFixIndentationCallback(FixIndentationCallback, this,
indent_chars);
}
@@ -408,8 +406,8 @@ bool IOHandlerEditline::GetLine(std::str
}
}
m_editing = false;
- // We might have gotten a newline on a line by itself
- // make sure to return true in this case.
+ // We might have gotten a newline on a line by itself make sure to return
+ // true in this case.
return got_line;
} else {
// No more input file, we are done...
@@ -545,9 +543,8 @@ bool IOHandlerEditline::GetLines(StringL
return success;
}
-// Each IOHandler gets to run until it is done. It should read data
-// from the "in" and place output into "out" and "err and return
-// when done.
+// Each IOHandler gets to run until it is done. It should read data from the
+// "in" and place output into "out" and "err and return when done.
void IOHandlerEditline::Run() {
std::string line;
while (IsActive()) {
@@ -635,8 +632,7 @@ void IOHandlerEditline::PrintAsync(Strea
}
}
-// we may want curses to be disabled for some builds
-// for instance, windows
+// we may want curses to be disabled for some builds for instance, windows
#ifndef LLDB_DISABLE_CURSES
#define KEY_RETURN 10
@@ -738,9 +734,8 @@ struct Rect {
origin.y += h;
}
- // Return a status bar rectangle which is the last line of
- // this rectangle. This rectangle will be modified to not
- // include the status bar area.
+ // Return a status bar rectangle which is the last line of this rectangle.
+ // This rectangle will be modified to not include the status bar area.
Rect MakeStatusBar() {
Rect status_bar;
if (size.height > 1) {
@@ -753,9 +748,8 @@ struct Rect {
return status_bar;
}
- // Return a menubar rectangle which is the first line of
- // this rectangle. This rectangle will be modified to not
- // include the menubar area.
+ // Return a menubar rectangle which is the first line of this rectangle. This
+ // rectangle will be modified to not include the menubar area.
Rect MakeMenuBar() {
Rect menubar;
if (size.height > 1) {
@@ -1204,12 +1198,10 @@ public:
return result;
}
- // Then check for any windows that want any keys
- // that weren't handled. This is typically only
- // for a menubar.
- // Make a copy of the subwindows in case any HandleChar()
- // functions muck with the subwindows. If we don't do this,
- // we can crash when iterating over the subwindows.
+ // Then check for any windows that want any keys that weren't handled. This
+ // is typically only for a menubar. Make a copy of the subwindows in case
+ // any HandleChar() functions muck with the subwindows. If we don't do
+ // this, we can crash when iterating over the subwindows.
Windows subwindows(m_subwindows);
for (auto subwindow_sp : subwindows) {
if (!subwindow_sp->m_can_activate) {
@@ -1396,8 +1388,8 @@ public:
}
MenuActionResult Action() {
- // Call the recursive action so it can try to handle it
- // with the menu delegate, and if not, try our parent menu
+ // Call the recursive action so it can try to handle it with the menu
+ // delegate, and if not, try our parent menu
return ActionPrivate(*this);
}
@@ -1666,9 +1658,9 @@ HandleCharResult Menu::WindowDelegateHan
}
if (run_menu_sp) {
- // Run the action on this menu in case we need to populate the
- // menu with dynamic content and also in case check marks, and
- // any other menu decorations need to be calculated
+ // Run the action on this menu in case we need to populate the menu with
+ // dynamic content and also in case check marks, and any other menu
+ // decorations need to be calculated
if (run_menu_sp->Action() == MenuActionResult::Quit)
return eQuitApplication;
@@ -1782,12 +1774,11 @@ public:
bool done = false;
int delay_in_tenths_of_a_second = 1;
- // Alas the threading model in curses is a bit lame so we need to
- // resort to polling every 0.5 seconds. We could poll for stdin
- // ourselves and then pass the keys down but then we need to
- // translate all of the escape sequences ourselves. So we resort to
- // polling for input because we need to receive async process events
- // while in this loop.
+ // Alas the threading model in curses is a bit lame so we need to resort to
+ // polling every 0.5 seconds. We could poll for stdin ourselves and then
+ // pass the keys down but then we need to translate all of the escape
+ // sequences ourselves. So we resort to polling for input because we need
+ // to receive async process events while in this loop.
halfdelay(delay_in_tenths_of_a_second); // Poll using some number of tenths
// of seconds seconds when calling
@@ -1808,9 +1799,9 @@ public:
while (!done) {
if (update) {
m_window_sp->Draw(false);
- // All windows should be calling Window::DeferredRefresh() instead
- // of Window::Refresh() so we can do a single update and avoid
- // any screen blinking
+ // All windows should be calling Window::DeferredRefresh() instead of
+ // Window::Refresh() so we can do a single update and avoid any screen
+ // blinking
update_panels();
// Cursor hiding isn't working on MacOSX, so hide it in the top left
@@ -1822,8 +1813,8 @@ public:
}
#if defined(__APPLE__)
- // Terminal.app doesn't map its function keys correctly, F1-F4 default to:
- // \033OP, \033OQ, \033OR, \033OS, so lets take care of this here if
+ // Terminal.app doesn't map its function keys correctly, F1-F4 default
+ // to: \033OP, \033OQ, \033OR, \033OS, so lets take care of this here if
// possible
int ch;
if (escape_chars.empty())
@@ -1986,8 +1977,8 @@ struct Row {
parent->DrawTreeForChild(window, this, 0);
if (might_have_children) {
- // It we can get UTF8 characters to work we should try to use the "symbol"
- // UTF8 string below
+ // It we can get UTF8 characters to work we should try to use the
+ // "symbol" UTF8 string below
// const char *symbol = "";
// if (row.expanded)
// symbol = "\xe2\x96\xbd ";
@@ -1995,14 +1986,14 @@ struct Row {
// symbol = "\xe2\x96\xb7 ";
// window.PutCString (symbol);
- // The ACS_DARROW and ACS_RARROW don't look very nice they are just a
- // 'v' or '>' character...
+ // The ACS_DARROW and ACS_RARROW don't look very nice they are just a 'v'
+ // or '>' character...
// if (expanded)
// window.PutChar (ACS_DARROW);
// else
// window.PutChar (ACS_RARROW);
- // Since we can't find any good looking right arrow/down arrow
- // symbols, just use a diamond...
+ // Since we can't find any good looking right arrow/down arrow symbols,
+ // just use a diamond...
window.PutChar(ACS_DIAMOND);
window.PutChar(ACS_HLINE);
}
@@ -2102,9 +2093,8 @@ public:
const bool expanded = IsExpanded();
- // The root item must calculate its children,
- // or we must calculate the number of children
- // if the item is expanded
+ // The root item must calculate its children, or we must calculate the
+ // number of children if the item is expanded
if (m_parent == nullptr || expanded)
GetNumChildren();
@@ -2137,8 +2127,7 @@ public:
if (m_might_have_children) {
// It we can get UTF8 characters to work we should try to use the
- // "symbol"
- // UTF8 string below
+ // "symbol" UTF8 string below
// const char *symbol = "";
// if (row.expanded)
// symbol = "\xe2\x96\xbd ";
@@ -2152,8 +2141,8 @@ public:
// window.PutChar (ACS_DARROW);
// else
// window.PutChar (ACS_RARROW);
- // Since we can't find any good looking right arrow/down arrow
- // symbols, just use a diamond...
+ // Since we can't find any good looking right arrow/down arrow symbols,
+ // just use a diamond...
window.PutChar(ACS_DIAMOND);
window.PutChar(ACS_HLINE);
}
@@ -2176,8 +2165,8 @@ public:
if (IsExpanded()) {
for (auto &item : m_children) {
- // If we displayed all the rows and item.Draw() returns
- // false we are done drawing and can exit this for loop
+ // If we displayed all the rows and item.Draw() returns false we are
+ // done drawing and can exit this for loop
if (!item.Draw(window, first_visible_row, selected_row_idx, row_idx,
num_rows_left))
break;
@@ -2287,10 +2276,9 @@ public:
m_num_rows = 0;
m_root.CalculateRowIndexes(m_num_rows);
- // If we unexpanded while having something selected our
- // total number of rows is less than the num visible rows,
- // then make sure we show all the rows by setting the first
- // visible row accordingly.
+ // If we unexpanded while having something selected our total number of
+ // rows is less than the num visible rows, then make sure we show all the
+ // rows by setting the first visible row accordingly.
if (m_first_visible_row > 0 && m_num_rows < num_visible_rows)
m_first_visible_row = 0;
@@ -2696,10 +2684,9 @@ public:
const int num_visible_rows = NumVisibleRows();
const int num_rows = CalculateTotalNumberRows(m_rows);
- // If we unexpanded while having something selected our
- // total number of rows is less than the num visible rows,
- // then make sure we show all the rows by setting the first
- // visible row accordingly.
+ // If we unexpanded while having something selected our total number of
+ // rows is less than the num visible rows, then make sure we show all the
+ // rows by setting the first visible row accordingly.
if (m_first_visible_row > 0 && num_rows < num_visible_rows)
m_first_visible_row = 0;
@@ -2715,8 +2702,8 @@ public:
// Get the selected row
m_selected_row = GetRowForRowIndex(m_selected_row_idx);
- // Keep the cursor on the selected row so the highlight and the cursor
- // are always on the same line
+ // Keep the cursor on the selected row so the highlight and the cursor are
+ // always on the same line
if (m_selected_row)
window.MoveCursor(m_selected_row->x, m_selected_row->y);
@@ -3128,8 +3115,8 @@ public:
if (process && process->IsAlive())
return true; // Don't do any updating if we are running
else {
- // Update the values with an empty list if there
- // is no process or the process isn't alive anymore
+ // Update the values with an empty list if there is no process or the
+ // process isn't alive anymore
SetValues(value_list);
}
}
@@ -3393,8 +3380,8 @@ HandleCharResult HelpDialogDelegate::Win
if (num_lines <= num_visible_lines) {
done = true;
- // If we have all lines visible and don't need scrolling, then any
- // key press will cause us to exit
+ // If we have all lines visible and don't need scrolling, then any key
+ // press will cause us to exit
} else {
switch (key) {
case KEY_UP:
@@ -3607,8 +3594,8 @@ public:
case eMenuID_Process: {
// Populate the menu with all of the threads if the process is stopped
- // when
- // the Process menu gets selected and is about to display its submenu.
+ // when the Process menu gets selected and is about to display its
+ // submenu.
Menus &submenus = menu.GetSubmenus();
ExecutionContext exe_ctx =
m_debugger.GetCommandInterpreter().GetExecutionContext();
@@ -3643,8 +3630,8 @@ public:
nullptr, menu_char, thread_sp->GetID())));
}
} else if (submenus.size() > 7) {
- // Remove the separator and any other thread submenu items
- // that were previously added
+ // Remove the separator and any other thread submenu items that were
+ // previously added
submenus.erase(submenus.begin() + 7, submenus.end());
}
// Since we are adding and removing items we need to recalculate the name
@@ -3672,8 +3659,8 @@ public:
registers_bounds.size.width = source_bounds.size.width;
registers_window_sp->SetBounds(registers_bounds);
} else {
- // We have no registers window showing so give the bottom
- // area back to the source view
+ // We have no registers window showing so give the bottom area back
+ // to the source view
source_window_sp->Resize(source_bounds.size.width,
source_bounds.size.height +
variables_bounds.size.height);
@@ -3722,8 +3709,8 @@ public:
registers_window_sp->GetWidth(),
variables_bounds.size.height);
} else {
- // We have no variables window showing so give the bottom
- // area back to the source view
+ // We have no variables window showing so give the bottom area back
+ // to the source view
source_window_sp->Resize(source_bounds.size.width,
source_bounds.size.height +
registers_window_sp->GetHeight());
@@ -3732,9 +3719,9 @@ public:
} else {
Rect new_regs_rect;
if (variables_window_sp) {
- // We have a variables window, split it into two columns
- // where the left hand side will be the variables and the
- // right hand side will be the registers
+ // We have a variables window, split it into two columns where the
+ // left hand side will be the variables and the right hand side will
+ // be the registers
const Rect variables_bounds = variables_window_sp->GetBounds();
Rect new_vars_rect;
variables_bounds.VerticalSplitPercentage(0.50, new_vars_rect,
@@ -3946,8 +3933,8 @@ public:
m_selected_line = m_pc_line;
if (m_file_sp && m_file_sp->FileSpecMatches(m_sc.line_entry.file)) {
- // Same file, nothing to do, we should either have the
- // lines or not (source file missing)
+ // Same file, nothing to do, we should either have the lines or not
+ // (source file missing)
if (m_selected_line >= static_cast<size_t>(m_first_visible_line)) {
if (m_selected_line >= m_first_visible_line + num_visible_lines)
m_first_visible_line = m_selected_line - 10;
@@ -4628,8 +4615,8 @@ void IOHandlerCursesGUI::Activate() {
WindowSP menubar_window_sp =
main_window_sp->CreateSubWindow("Menubar", menubar_bounds, false);
- // Let the menubar get keys if the active window doesn't handle the
- // keys that are typed so it can respond to menubar key presses.
+ // Let the menubar get keys if the active window doesn't handle the keys
+ // that are typed so it can respond to menubar key presses.
menubar_window_sp->SetCanBeActive(
false); // Don't let the menubar become the active window
menubar_window_sp->SetDelegate(menubar_sp);
Modified: lldb/trunk/source/Core/Listener.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Listener.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Core/Listener.cpp (original)
+++ lldb/trunk/source/Core/Listener.cpp Mon Apr 30 09:49:04 2018
@@ -304,11 +304,9 @@ bool Listener::FindNextEventInternal(
if (remove) {
m_events.erase(pos);
- // Unlock the event queue here. We've removed this event and are about to
- // return
- // it so it should be okay to get the next event off the queue here - and
- // it might
- // be useful to do that in the "DoOnRemoval".
+ // Unlock the event queue here. We've removed this event and are about
+ // to return it so it should be okay to get the next event off the queue
+ // here - and it might be useful to do that in the "DoOnRemoval".
lock.unlock();
event_sp->DoOnRemoval();
}
@@ -434,8 +432,8 @@ Listener::StartListeningForEventSpec(Bro
if (!manager_sp)
return 0;
- // The BroadcasterManager mutex must be locked before m_broadcasters_mutex
- // to avoid violating the lock hierarchy (manager before broadcasters).
+ // The BroadcasterManager mutex must be locked before m_broadcasters_mutex to
+ // avoid violating the lock hierarchy (manager before broadcasters).
std::lock_guard<std::recursive_mutex> manager_guard(
manager_sp->m_manager_mutex);
std::lock_guard<std::recursive_mutex> guard(m_broadcasters_mutex);
Modified: lldb/trunk/source/Core/Mangled.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Mangled.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Core/Mangled.cpp (original)
+++ lldb/trunk/source/Core/Mangled.cpp Mon Apr 30 09:49:04 2018
@@ -90,10 +90,8 @@ get_demangled_name_without_arguments(Con
g_most_recent_mangled_to_name_sans_args;
// Need to have the mangled & demangled names we're currently examining as
- // statics
- // so we can return a const ref to them at the end of the func if we don't
- // have
- // anything better.
+ // statics so we can return a const ref to them at the end of the func if we
+ // don't have anything better.
static ConstString g_last_mangled;
static ConstString g_last_demangled;
@@ -142,8 +140,8 @@ get_demangled_name_without_arguments(Con
Mangled::Mangled() : m_mangled(), m_demangled() {}
//----------------------------------------------------------------------
-// Constructor with an optional string and a boolean indicating if it is
-// the mangled version.
+// Constructor with an optional string and a boolean indicating if it is the
+// mangled version.
//----------------------------------------------------------------------
Mangled::Mangled(const ConstString &s, bool mangled)
: m_mangled(), m_demangled() {
@@ -172,8 +170,8 @@ Mangled::Mangled(llvm::StringRef name) {
Mangled::~Mangled() {}
//----------------------------------------------------------------------
-// Convert to pointer operator. This allows code to check any Mangled
-// objects to see if they contain anything valid using code such as:
+// Convert to pointer operator. This allows code to check any Mangled objects
+// to see if they contain anything valid using code such as:
//
// Mangled mangled(...);
// if (mangled)
@@ -184,8 +182,8 @@ Mangled::operator void *() const {
}
//----------------------------------------------------------------------
-// Logical NOT operator. This allows code to check any Mangled
-// objects to see if they are invalid using code such as:
+// Logical NOT operator. This allows code to check any Mangled objects to see
+// if they are invalid using code such as:
//
// Mangled mangled(...);
// if (!file_spec)
@@ -211,9 +209,8 @@ int Mangled::Compare(const Mangled &a, c
}
//----------------------------------------------------------------------
-// Set the string value in this objects. If "mangled" is true, then
-// the mangled named is set with the new value in "s", else the
-// demangled name is set.
+// Set the string value in this objects. If "mangled" is true, then the mangled
+// named is set with the new value in "s", else the demangled name is set.
//----------------------------------------------------------------------
void Mangled::SetValue(const ConstString &s, bool mangled) {
if (s) {
@@ -246,16 +243,15 @@ void Mangled::SetValue(const ConstString
}
//----------------------------------------------------------------------
-// Generate the demangled name on demand using this accessor. Code in
-// this class will need to use this accessor if it wishes to decode
-// the demangled name. The result is cached and will be kept until a
-// new string value is supplied to this object, or until the end of the
-// object's lifetime.
+// Generate the demangled name on demand using this accessor. Code in this
+// class will need to use this accessor if it wishes to decode the demangled
+// name. The result is cached and will be kept until a new string value is
+// supplied to this object, or until the end of the object's lifetime.
//----------------------------------------------------------------------
const ConstString &
Mangled::GetDemangledName(lldb::LanguageType language) const {
- // Check to make sure we have a valid mangled name and that we
- // haven't already decoded our mangled name.
+ // Check to make sure we have a valid mangled name and that we haven't
+ // already decoded our mangled name.
if (m_mangled && !m_demangled) {
// We need to generate and cache the demangled name.
static Timer::Category func_cat(LLVM_PRETTY_FUNCTION);
@@ -302,9 +298,8 @@ Mangled::GetDemangledName(lldb::Language
#ifdef LLDB_USE_BUILTIN_DEMANGLER
if (log)
log->Printf("demangle itanium: %s", mangled_name);
- // Try to use the fast-path demangler first for the
- // performance win, falling back to the full demangler only
- // when necessary
+ // Try to use the fast-path demangler first for the performance win,
+ // falling back to the full demangler only when necessary
demangled_name = FastDemangle(mangled_name, m_mangled.GetLength());
if (!demangled_name)
demangled_name =
@@ -331,8 +326,8 @@ Mangled::GetDemangledName(lldb::Language
}
}
if (!m_demangled) {
- // Set the demangled string to the empty string to indicate we
- // tried to parse it once and failed.
+ // Set the demangled string to the empty string to indicate we tried to
+ // parse it once and failed.
m_demangled.SetCString("");
}
}
@@ -370,8 +365,8 @@ ConstString Mangled::GetName(lldb::Langu
return get_demangled_name_without_arguments(m_mangled, demangled);
}
if (preference == ePreferDemangled) {
- // Call the accessor to make sure we get a demangled name in case
- // it hasn't been demangled yet...
+ // Call the accessor to make sure we get a demangled name in case it hasn't
+ // been demangled yet...
if (demangled)
return demangled;
return m_mangled;
@@ -380,8 +375,8 @@ ConstString Mangled::GetName(lldb::Langu
}
//----------------------------------------------------------------------
-// Dump a Mangled object to stream "s". We don't force our
-// demangled name to be computed currently (we don't use the accessor).
+// Dump a Mangled object to stream "s". We don't force our demangled name to be
+// computed currently (we don't use the accessor).
//----------------------------------------------------------------------
void Mangled::Dump(Stream *s) const {
if (m_mangled) {
@@ -394,8 +389,8 @@ void Mangled::Dump(Stream *s) const {
}
//----------------------------------------------------------------------
-// Dumps a debug version of this string with extra object and state
-// information to stream "s".
+// Dumps a debug version of this string with extra object and state information
+// to stream "s".
//----------------------------------------------------------------------
void Mangled::DumpDebug(Stream *s) const {
s->Printf("%*p: Mangled mangled = ", static_cast<int>(sizeof(void *) * 2),
@@ -406,21 +401,21 @@ void Mangled::DumpDebug(Stream *s) const
}
//----------------------------------------------------------------------
-// Return the size in byte that this object takes in memory. The size
-// includes the size of the objects it owns, and not the strings that
-// it references because they are shared strings.
+// Return the size in byte that this object takes in memory. The size includes
+// the size of the objects it owns, and not the strings that it references
+// because they are shared strings.
//----------------------------------------------------------------------
size_t Mangled::MemorySize() const {
return m_mangled.MemorySize() + m_demangled.MemorySize();
}
//----------------------------------------------------------------------
-// We "guess" the language because we can't determine a symbol's language
-// from it's name. For example, a Pascal symbol can be mangled using the
-// C++ Itanium scheme, and defined in a compilation unit within the same
-// module as other C++ units. In addition, different targets could have
-// different ways of mangling names from a given language, likewise the
-// compilation units within those targets.
+// We "guess" the language because we can't determine a symbol's language from
+// it's name. For example, a Pascal symbol can be mangled using the C++
+// Itanium scheme, and defined in a compilation unit within the same module as
+// other C++ units. In addition, different targets could have different ways
+// of mangling names from a given language, likewise the compilation units
+// within those targets.
//----------------------------------------------------------------------
lldb::LanguageType Mangled::GuessLanguage() const {
ConstString mangled = GetMangledName();
@@ -433,7 +428,7 @@ lldb::LanguageType Mangled::GuessLanguag
return lldb::eLanguageTypeObjC;
}
} else {
- // ObjC names aren't really mangled, so they won't necessarily be in the
+ // ObjC names aren't really mangled, so they won't necessarily be in the
// mangled name slot.
ConstString demangled_name = GetDemangledName(lldb::eLanguageTypeUnknown);
if (demangled_name
Modified: lldb/trunk/source/Core/Module.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Module.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Core/Module.cpp (original)
+++ lldb/trunk/source/Core/Module.cpp Mon Apr 30 09:49:04 2018
@@ -79,21 +79,17 @@ class VariableList;
using namespace lldb;
using namespace lldb_private;
-// Shared pointers to modules track module lifetimes in
-// targets and in the global module, but this collection
-// will track all module objects that are still alive
+// Shared pointers to modules track module lifetimes in targets and in the
+// global module, but this collection will track all module objects that are
+// still alive
typedef std::vector<Module *> ModuleCollection;
static ModuleCollection &GetModuleCollection() {
// This module collection needs to live past any module, so we could either
- // make it a
- // shared pointer in each module or just leak is. Since it is only an empty
- // vector by
- // the time all the modules have gone away, we just leak it for now. If we
- // decide this
- // is a big problem we can introduce a Finalize method that will tear
- // everything down in
- // a predictable order.
+ // make it a shared pointer in each module or just leak is. Since it is only
+ // an empty vector by the time all the modules have gone away, we just leak
+ // it for now. If we decide this is a big problem we can introduce a
+ // Finalize method that will tear everything down in a predictable order.
static ModuleCollection *g_module_collection = nullptr;
if (g_module_collection == nullptr)
@@ -104,9 +100,9 @@ static ModuleCollection &GetModuleCollec
std::recursive_mutex &Module::GetAllocationModuleCollectionMutex() {
// NOTE: The mutex below must be leaked since the global module list in
- // the ModuleList class will get torn at some point, and we can't know
- // if it will tear itself down before the "g_module_collection_mutex" below
- // will. So we leak a Mutex object below to safeguard against that
+ // the ModuleList class will get torn at some point, and we can't know if it
+ // will tear itself down before the "g_module_collection_mutex" below will.
+ // So we leak a Mutex object below to safeguard against that
static std::recursive_mutex *g_module_collection_mutex = nullptr;
if (g_module_collection_mutex == nullptr)
@@ -151,8 +147,8 @@ Module::Module(const ModuleSpec &module_
: module_spec.GetObjectName().AsCString(""),
module_spec.GetObjectName().IsEmpty() ? "" : ")");
- // First extract all module specifications from the file using the local
- // file path. If there are no specifications, then don't fill anything in
+ // First extract all module specifications from the file using the local file
+ // path. If there are no specifications, then don't fill anything in
ModuleSpecList modules_specs;
if (ObjectFile::GetModuleSpecifications(module_spec.GetFileSpec(), 0, 0,
modules_specs) == 0)
@@ -160,9 +156,8 @@ Module::Module(const ModuleSpec &module_
// Now make sure that one of the module specifications matches what we just
// extract. We might have a module specification that specifies a file
- // "/usr/lib/dyld"
- // with UUID XXX, but we might have a local version of "/usr/lib/dyld" that
- // has
+ // "/usr/lib/dyld" with UUID XXX, but we might have a local version of
+ // "/usr/lib/dyld" that has
// UUID YYY and we don't want those to match. If they don't match, just don't
// fill any ivars in so we don't accidentally grab the wrong file later since
// they don't match...
@@ -177,8 +172,8 @@ Module::Module(const ModuleSpec &module_
m_mod_time =
FileSystem::GetModificationTime(matching_module_spec.GetFileSpec());
- // Copy the architecture from the actual spec if we got one back, else use the
- // one that was specified
+ // Copy the architecture from the actual spec if we got one back, else use
+ // the one that was specified
if (matching_module_spec.GetArchitecture().IsValid())
m_arch = matching_module_spec.GetArchitecture();
else if (module_spec.GetArchitecture().IsValid())
@@ -210,9 +205,9 @@ Module::Module(const ModuleSpec &module_
else
m_object_name = module_spec.GetObjectName();
- // Always trust the object offset (file offset) and object modification
- // time (for mod time in a BSD static archive) of from the matching
- // module specification
+ // Always trust the object offset (file offset) and object modification time
+ // (for mod time in a BSD static archive) of from the matching module
+ // specification
m_object_offset = matching_module_spec.GetObjectOffset();
m_object_mod_time = matching_module_spec.GetObjectModificationTime();
}
@@ -253,8 +248,8 @@ Module::Module()
}
Module::~Module() {
- // Lock our module down while we tear everything down to make sure
- // we don't get any access to the module while it is being destroyed
+ // Lock our module down while we tear everything down to make sure we don't
+ // get any access to the module while it is being destroyed
std::lock_guard<std::recursive_mutex> guard(m_mutex);
// Scope for locker below...
{
@@ -308,9 +303,8 @@ ObjectFile *Module::GetMemoryObjectFile(
m_object_name.SetString(s.GetString());
// Once we get the object file, update our module with the object
- // file's
- // architecture since it might differ in vendor/os if some parts were
- // unknown.
+ // file's architecture since it might differ in vendor/os if some
+ // parts were unknown.
m_objfile_sp->GetArchitecture(m_arch);
} else {
error.SetErrorString("unable to find suitable object file plug-in");
@@ -441,8 +435,8 @@ uint32_t Module::ResolveSymbolContextFor
// Make sure the section matches this module before we try and match anything
if (section_sp && section_sp->GetModule().get() == this) {
- // If the section offset based address resolved itself, then this
- // is the right module.
+ // If the section offset based address resolved itself, then this is the
+ // right module.
sc.module_sp = shared_from_this();
resolved_flags |= eSymbolContextModule;
@@ -450,8 +444,8 @@ uint32_t Module::ResolveSymbolContextFor
if (!sym_vendor)
return resolved_flags;
- // Resolve the compile unit, function, block, line table or line
- // entry if requested.
+ // Resolve the compile unit, function, block, line table or line entry if
+ // requested.
if (resolve_scope & eSymbolContextCompUnit ||
resolve_scope & eSymbolContextFunction ||
resolve_scope & eSymbolContextBlock ||
@@ -461,8 +455,8 @@ uint32_t Module::ResolveSymbolContextFor
sym_vendor->ResolveSymbolContext(so_addr, resolve_scope, sc);
}
- // Resolve the symbol if requested, but don't re-look it up if we've already
- // found it.
+ // Resolve the symbol if requested, but don't re-look it up if we've
+ // already found it.
if (resolve_scope & eSymbolContextSymbol &&
!(resolved_flags & eSymbolContextSymbol)) {
Symtab *symtab = sym_vendor->GetSymtab();
@@ -491,12 +485,11 @@ uint32_t Module::ResolveSymbolContextFor
if (sc.symbol) {
if (sc.symbol->IsSynthetic()) {
- // We have a synthetic symbol so lets check if the object file
- // from the symbol file in the symbol vendor is different than
- // the object file for the module, and if so search its symbol
- // table to see if we can come up with a better symbol. For example
- // dSYM files on MacOSX have an unstripped symbol table inside of
- // them.
+ // We have a synthetic symbol so lets check if the object file from
+ // the symbol file in the symbol vendor is different than the
+ // object file for the module, and if so search its symbol table to
+ // see if we can come up with a better symbol. For example dSYM
+ // files on MacOSX have an unstripped symbol table inside of them.
ObjectFile *symtab_objfile = symtab->GetObjectFile();
if (symtab_objfile && symtab_objfile->IsStripped()) {
SymbolFile *symfile = sym_vendor->GetSymbolFile();
@@ -522,10 +515,8 @@ uint32_t Module::ResolveSymbolContextFor
}
// For function symbols, so_addr may be off by one. This is a convention
- // consistent
- // with FDE row indices in eh_frame sections, but requires extra logic here
- // to permit
- // symbol lookup for disassembly and unwind.
+ // consistent with FDE row indices in eh_frame sections, but requires extra
+ // logic here to permit symbol lookup for disassembly and unwind.
if (resolve_scope & eSymbolContextSymbol &&
!(resolved_flags & eSymbolContextSymbol) && resolve_tail_call_address &&
so_addr.IsSectionOffset()) {
@@ -542,10 +533,9 @@ uint32_t Module::ResolveSymbolContextFor
if (addr_range.GetBaseAddress().GetSection() ==
so_addr.GetSection()) {
// If the requested address is one past the address range of a
- // function (i.e. a tail call),
- // or the decremented address is the start of a function (i.e. some
- // forms of trampoline),
- // indicate that the symbol has been resolved.
+ // function (i.e. a tail call), or the decremented address is the
+ // start of a function (i.e. some forms of trampoline), indicate
+ // that the symbol has been resolved.
if (so_addr.GetOffset() ==
addr_range.GetBaseAddress().GetOffset() ||
so_addr.GetOffset() ==
@@ -677,25 +667,22 @@ Module::LookupInfo::LookupInfo(const Con
if (name_type_mask & eFunctionNameTypeMethod ||
name_type_mask & eFunctionNameTypeBase) {
// If they've asked for a CPP method or function name and it can't be
- // that, we don't
- // even need to search for CPP methods or names.
+ // that, we don't even need to search for CPP methods or names.
CPlusPlusLanguage::MethodName cpp_method(name);
if (cpp_method.IsValid()) {
basename = cpp_method.GetBasename();
if (!cpp_method.GetQualifiers().empty()) {
// There is a "const" or other qualifier following the end of the
- // function parens,
- // this can't be a eFunctionNameTypeBase
+ // function parens, this can't be a eFunctionNameTypeBase
m_name_type_mask &= ~(eFunctionNameTypeBase);
if (m_name_type_mask == eFunctionNameTypeNone)
return;
}
} else {
// If the CPP method parser didn't manage to chop this up, try to fill
- // in the base name if we can.
- // If a::b::c is passed in, we need to just look up "c", and then we'll
- // filter the result later.
+ // in the base name if we can. If a::b::c is passed in, we need to just
+ // look up "c", and then we'll filter the result later.
CPlusPlusLanguage::ExtractContextAndIdentifier(name_cstr, context,
basename);
}
@@ -724,19 +711,15 @@ Module::LookupInfo::LookupInfo(const Con
}
if (!basename.empty()) {
- // The name supplied was a partial C++ path like "a::count". In this case we
- // want to do a
- // lookup on the basename "count" and then make sure any matching results
- // contain "a::count"
- // so that it would match "b::a::count" and "a::count". This is why we set
- // "match_name_after_lookup"
- // to true
+ // The name supplied was a partial C++ path like "a::count". In this case
+ // we want to do a lookup on the basename "count" and then make sure any
+ // matching results contain "a::count" so that it would match "b::a::count"
+ // and "a::count". This is why we set "match_name_after_lookup" to true
m_lookup_name.SetString(basename);
m_match_name_after_lookup = true;
} else {
// The name is already correct, just use the exact name as supplied, and we
- // won't need
- // to check if any matches contain "name"
+ // won't need to check if any matches contain "name"
m_lookup_name = name;
m_match_name_after_lookup = false;
}
@@ -770,8 +753,8 @@ void Module::LookupInfo::Prune(SymbolCon
while (i < sc_list.GetSize()) {
if (!sc_list.GetContextAtIndex(i, sc))
break;
- // Make sure the mangled and demangled names don't match before we try
- // to pull anything out
+ // Make sure the mangled and demangled names don't match before we try to
+ // pull anything out
ConstString mangled_name(sc.GetFunctionName(Mangled::ePreferMangled));
ConstString full_name(sc.GetFunctionName());
if (mangled_name != m_name && full_name != m_name)
@@ -867,7 +850,8 @@ size_t Module::FindFunctions(const Regul
if (symbols) {
symbols->FindFunctions(regex, include_inlines, append, sc_list);
- // Now check our symbol table for symbols that are code symbols if requested
+ // Now check our symbol table for symbols that are code symbols if
+ // requested
if (include_symbols) {
Symtab *symtab = symbols->GetSymtab();
if (symtab) {
@@ -882,7 +866,8 @@ size_t Module::FindFunctions(const Regul
size_t num_functions_added_to_sc_list =
end_functions_added_index - start_size;
if (num_functions_added_to_sc_list == 0) {
- // No functions were added, just symbols, so we can just append them
+ // No functions were added, just symbols, so we can just append
+ // them
for (size_t i = 0; i < num_matches; ++i) {
sc.symbol = symtab->SymbolAtIndex(symbol_indexes[i]);
SymbolType sym_type = sc.symbol->GetType();
@@ -1021,8 +1006,7 @@ size_t Module::FindTypes(
// basename
if (type_class != eTypeClassAny) {
// The "type_name_cstr" will have been modified if we have a valid type
- // class
- // prefix (like "struct", "class", "union", "typedef" etc).
+ // class prefix (like "struct", "class", "union", "typedef" etc).
FindTypes_Impl(sc, ConstString(type_basename), nullptr, append,
max_matches, searched_symbol_files, typesmap);
typesmap.RemoveMismatchedTypes(type_class);
@@ -1057,8 +1041,8 @@ SymbolVendor *Module::GetSymbolVendor(bo
void Module::SetFileSpecAndObjectName(const FileSpec &file,
const ConstString &object_name) {
- // Container objects whose paths do not specify a file directly can call
- // this function to correct the file and object names.
+ // Container objects whose paths do not specify a file directly can call this
+ // function to correct the file and object names.
m_file = file;
m_mod_time = FileSystem::GetModificationTime(file);
m_object_name = object_name;
@@ -1258,12 +1242,10 @@ ObjectFile *Module::GetObjectFile() {
file_size - m_object_offset, data_sp, data_offset);
if (m_objfile_sp) {
// Once we get the object file, update our module with the object
- // file's
- // architecture since it might differ in vendor/os if some parts were
- // unknown. But since the matching arch might already be more
- // specific
- // than the generic COFF architecture, only merge in those values that
- // overwrite unspecified unknown values.
+ // file's architecture since it might differ in vendor/os if some
+ // parts were unknown. But since the matching arch might already be
+ // more specific than the generic COFF architecture, only merge in
+ // those values that overwrite unspecified unknown values.
ArchSpec new_arch;
m_objfile_sp->GetArchitecture(new_arch);
m_arch.MergeFrom(new_arch);
@@ -1427,9 +1409,8 @@ void Module::SetSymbolFileFileSpec(const
if (section_list && symbol_file) {
ObjectFile *obj_file = symbol_file->GetObjectFile();
// Make sure we have an object file and that the symbol vendor's objfile
- // isn't
- // the same as the module's objfile before we remove any sections for
- // it...
+ // isn't the same as the module's objfile before we remove any sections
+ // for it...
if (obj_file) {
// Check to make sure we aren't trying to specify the file we already
// have
@@ -1444,8 +1425,7 @@ void Module::SetSymbolFileFileSpec(const
obj_file->ClearSymtab();
// The symbol file might be a directory bundle ("/tmp/a.out.dSYM")
- // instead
- // of a full path to the symbol file within the bundle
+ // instead of a full path to the symbol file within the bundle
// ("/tmp/a.out.dSYM/Contents/Resources/DWARF/a.out"). So we need to
// check this
@@ -1472,8 +1452,7 @@ void Module::SetSymbolFileFileSpec(const
}
}
// Keep all old symbol files around in case there are any lingering type
- // references in
- // any SBValue objects that might have been handed out.
+ // references in any SBValue objects that might have been handed out.
m_old_symfiles.push_back(std::move(m_symfile_ap));
}
m_symfile_spec = file;
@@ -1658,10 +1637,9 @@ uint32_t Module::GetVersion(uint32_t *ve
ModuleSP
Module::CreateJITModule(const lldb::ObjectFileJITDelegateSP &delegate_sp) {
if (delegate_sp) {
- // Must create a module and place it into a shared pointer before
- // we can create an object file since it has a std::weak_ptr back
- // to the module, so we need to control the creation carefully in
- // this static function
+ // Must create a module and place it into a shared pointer before we can
+ // create an object file since it has a std::weak_ptr back to the module,
+ // so we need to control the creation carefully in this static function
ModuleSP module_sp(new Module());
module_sp->m_objfile_sp =
std::make_shared<ObjectFileJIT>(module_sp, delegate_sp);
Modified: lldb/trunk/source/Core/ModuleList.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ModuleList.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Core/ModuleList.cpp (original)
+++ lldb/trunk/source/Core/ModuleList.cpp Mon Apr 30 09:49:04 2018
@@ -132,8 +132,8 @@ const ModuleList &ModuleList::operator=(
// in thread A: | in thread B:
// x = y; | y = x;
//
- // This establishes correct(same) lock taking order and thus
- // avoids priority inversion.
+ // This establishes correct(same) lock taking order and thus avoids
+ // priority inversion.
if (uintptr_t(this) > uintptr_t(&rhs)) {
std::lock_guard<std::recursive_mutex> lhs_guard(m_modules_mutex);
std::lock_guard<std::recursive_mutex> rhs_guard(rhs.m_modules_mutex);
@@ -545,8 +545,8 @@ ModuleList::FindTypes(const SymbolContex
size_t total_matches = 0;
collection::const_iterator pos, end = m_modules.end();
if (sc.module_sp) {
- // The symbol context "sc" contains a module so we want to search that
- // one first if it is in our list...
+ // The symbol context "sc" contains a module so we want to search that one
+ // first if it is in our list...
for (pos = m_modules.begin(); pos != end; ++pos) {
if (sc.module_sp.get() == (*pos).get()) {
total_matches +=
@@ -563,8 +563,8 @@ ModuleList::FindTypes(const SymbolContex
SymbolContext world_sc;
for (pos = m_modules.begin(); pos != end; ++pos) {
// Search the module if the module is not equal to the one in the symbol
- // context "sc". If "sc" contains a empty module shared pointer, then
- // the comparison will always be true (valid_module_ptr != nullptr).
+ // context "sc". If "sc" contains a empty module shared pointer, then the
+ // comparison will always be true (valid_module_ptr != nullptr).
if (sc.module_sp.get() != (*pos).get())
total_matches +=
(*pos)->FindTypes(world_sc, name, name_is_fully_qualified,
@@ -791,8 +791,8 @@ Status ModuleList::GetSharedModule(const
const ArchSpec &arch = module_spec.GetArchitecture();
// Make sure no one else can try and get or create a module while this
- // function is actively working on it by doing an extra lock on the
- // global mutex list.
+ // function is actively working on it by doing an extra lock on the global
+ // mutex list.
if (!always_create) {
ModuleList matching_module_list;
const size_t num_matching_modules =
@@ -815,8 +815,8 @@ Status ModuleList::GetSharedModule(const
shared_module_list.Remove(module_sp);
module_sp.reset();
} else {
- // The module matches and the module was not modified from
- // when it was last loaded.
+ // The module matches and the module was not modified from when it
+ // was last loaded.
return error;
}
}
@@ -827,12 +827,12 @@ Status ModuleList::GetSharedModule(const
return error;
module_sp.reset(new Module(module_spec));
- // Make sure there are a module and an object file since we can specify
- // a valid file path with an architecture that might not be in that file.
- // By getting the object file we can guarantee that the architecture matches
+ // Make sure there are a module and an object file since we can specify a
+ // valid file path with an architecture that might not be in that file. By
+ // getting the object file we can guarantee that the architecture matches
if (module_sp->GetObjectFile()) {
- // If we get in here we got the correct arch, now we just need
- // to verify the UUID if one was given
+ // If we get in here we got the correct arch, now we just need to verify
+ // the UUID if one was given
if (uuid_ptr && *uuid_ptr != module_sp->GetUUID()) {
module_sp.reset();
} else {
@@ -871,8 +871,8 @@ Status ModuleList::GetSharedModule(const
resolved_module_spec.GetFileSpec() = search_path_spec;
module_sp.reset(new Module(resolved_module_spec));
if (module_sp->GetObjectFile()) {
- // If we get in here we got the correct arch, now we just need
- // to verify the UUID if one was given
+ // If we get in here we got the correct arch, now we just need to
+ // verify the UUID if one was given
if (uuid_ptr && *uuid_ptr != module_sp->GetUUID()) {
module_sp.reset();
} else {
@@ -897,8 +897,8 @@ Status ModuleList::GetSharedModule(const
// we now have to use more extreme measures to try and find the appropriate
// module.
- // Fixup the incoming path in case the path points to a valid file, yet
- // the arch or UUID (if one was passed in) don't match.
+ // Fixup the incoming path in case the path points to a valid file, yet the
+ // arch or UUID (if one was passed in) don't match.
ModuleSpec located_binary_modulespec =
Symbols::LocateExecutableObjectFile(module_spec);
@@ -935,8 +935,8 @@ Status ModuleList::GetSharedModule(const
}
// Make sure no one else can try and get or create a module while this
- // function is actively working on it by doing an extra lock on the
- // global mutex list.
+ // function is actively working on it by doing an extra lock on the global
+ // mutex list.
ModuleSpec platform_module_spec(module_spec);
platform_module_spec.GetFileSpec() =
located_binary_modulespec.GetFileSpec();
@@ -967,8 +967,8 @@ Status ModuleList::GetSharedModule(const
if (!module_sp) {
module_sp.reset(new Module(platform_module_spec));
- // Make sure there are a module and an object file since we can specify
- // a valid file path with an architecture that might not be in that file.
+ // Make sure there are a module and an object file since we can specify a
+ // valid file path with an architecture that might not be in that file.
// By getting the object file we can guarantee that the architecture
// matches
if (module_sp && module_sp->GetObjectFile()) {
Modified: lldb/trunk/source/Core/Opcode.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Opcode.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Core/Opcode.cpp (original)
+++ lldb/trunk/source/Core/Opcode.cpp Mon Apr 30 09:49:04 2018
@@ -52,8 +52,8 @@ int Opcode::Dump(Stream *s, uint32_t min
break;
}
- // Add spaces to make sure bytes dispay comes out even in case opcodes
- // aren't all the same size
+ // Add spaces to make sure bytes dispay comes out even in case opcodes aren't
+ // all the same size
if (static_cast<uint32_t>(bytes_written) < min_byte_width)
bytes_written = s->Printf("%*s", min_byte_width - bytes_written, "");
return bytes_written;
Modified: lldb/trunk/source/Core/PluginManager.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/PluginManager.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Core/PluginManager.cpp (original)
+++ lldb/trunk/source/Core/PluginManager.cpp Mon Apr 30 09:49:04 2018
@@ -96,8 +96,8 @@ LoadPluginCallback(void *baton, llvm::sy
Status error;
namespace fs = llvm::sys::fs;
- // If we have a regular file, a symbolic link or unknown file type, try
- // and process the file. We must handle unknown as sometimes the directory
+ // If we have a regular file, a symbolic link or unknown file type, try and
+ // process the file. We must handle unknown as sometimes the directory
// enumeration might be enumerating a file system that doesn't have correct
// file type information.
if (ft == fs::file_type::regular_file || ft == fs::file_type::symlink_file ||
@@ -128,17 +128,14 @@ LoadPluginCallback(void *baton, llvm::sy
plugin_info.library.getAddressOfSymbol("LLDBPluginTerminate"));
} else {
// The initialize function returned FALSE which means the plug-in
- // might not be
- // compatible, or might be too new or too old, or might not want to
- // run on this
- // machine. Set it to a default-constructed instance to invalidate
- // it.
+ // might not be compatible, or might be too new or too old, or might
+ // not want to run on this machine. Set it to a default-constructed
+ // instance to invalidate it.
plugin_info = PluginInfo();
}
- // Regardless of success or failure, cache the plug-in load
- // in our plug-in info so we don't try to load it again and
- // again.
+ // Regardless of success or failure, cache the plug-in load in our
+ // plug-in info so we don't try to load it again and again.
SetPluginInfo(plugin_file_spec, plugin_info);
return FileSpec::eEnumerateDirectoryResultNext;
@@ -148,9 +145,9 @@ LoadPluginCallback(void *baton, llvm::sy
if (ft == fs::file_type::directory_file ||
ft == fs::file_type::symlink_file || ft == fs::file_type::type_unknown) {
- // Try and recurse into anything that a directory or symbolic link.
- // We must also do this for unknown as sometimes the directory enumeration
- // might be enumerating a file system that doesn't have correct file type
+ // Try and recurse into anything that a directory or symbolic link. We must
+ // also do this for unknown as sometimes the directory enumeration might be
+ // enumerating a file system that doesn't have correct file type
// information.
return FileSpec::eEnumerateDirectoryResultEnter;
}
@@ -187,8 +184,8 @@ void PluginManager::Terminate() {
PluginTerminateMap::const_iterator pos, end = plugin_map.end();
for (pos = plugin_map.begin(); pos != end; ++pos) {
- // Call the plug-in "void LLDBPluginTerminate (void)" function if there
- // is one (if the symbol was not nullptr).
+ // Call the plug-in "void LLDBPluginTerminate (void)" function if there is
+ // one (if the symbol was not nullptr).
if (pos->second.library.isValid()) {
if (pos->second.plugin_term_callback)
pos->second.plugin_term_callback();
@@ -2397,8 +2394,8 @@ static lldb::OptionValuePropertiesSP Get
}
// This is deprecated way to register plugin specific settings. e.g.
-// "<plugin_type_name>.plugin.<plugin_type_desc>.SETTINGNAME"
-// and Platform generic settings would be under "platform.SETTINGNAME".
+// "<plugin_type_name>.plugin.<plugin_type_desc>.SETTINGNAME" and Platform
+// generic settings would be under "platform.SETTINGNAME".
static lldb::OptionValuePropertiesSP GetDebuggerPropertyForPluginsOldStyle(
Debugger &debugger, const ConstString &plugin_type_name,
const ConstString &plugin_type_desc, bool can_create) {
Modified: lldb/trunk/source/Core/RegisterValue.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/RegisterValue.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Core/RegisterValue.cpp (original)
+++ lldb/trunk/source/Core/RegisterValue.cpp Mon Apr 30 09:49:04 2018
@@ -41,8 +41,8 @@ bool RegisterValue::Dump(Stream *s, cons
DataExtractor data;
if (GetData(data)) {
bool name_printed = false;
- // For simplicity, alignment of the register name printing applies only
- // in the most common case where:
+ // For simplicity, alignment of the register name printing applies only in
+ // the most common case where:
//
// prefix_with_name^prefix_with_alt_name is true
//
@@ -375,9 +375,9 @@ static bool ParseVectorEncoding(const Re
std::vector<uint8_t> bytes;
unsigned byte = 0;
- // Using radix auto-sensing by passing 0 as the radix.
- // Keep on processing the vector elements as long as the parsing succeeds and
- // the vector size is < byte_size.
+ // Using radix auto-sensing by passing 0 as the radix. Keep on processing the
+ // vector elements as long as the parsing succeeds and the vector size is <
+ // byte_size.
while (!car.getAsInteger(0, byte) && bytes.size() < byte_size) {
bytes.push_back(byte);
std::tie(car, cdr) = cdr.split(Sep);
@@ -812,10 +812,9 @@ bool RegisterValue::SetUInt(uint64_t uin
void RegisterValue::SetBytes(const void *bytes, size_t length,
lldb::ByteOrder byte_order) {
- // If this assertion fires off we need to increase the size of
- // buffer.bytes, or make it something that is allocated on
- // the heap. Since the data buffer is in a union, we can't make it
- // a collection class like SmallVector...
+ // If this assertion fires off we need to increase the size of buffer.bytes,
+ // or make it something that is allocated on the heap. Since the data buffer
+ // is in a union, we can't make it a collection class like SmallVector...
if (bytes && length > 0) {
assert(length <= sizeof(buffer.bytes) &&
"Storing too many bytes in a RegisterValue.");
Modified: lldb/trunk/source/Core/Scalar.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Scalar.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Core/Scalar.cpp (original)
+++ lldb/trunk/source/Core/Scalar.cpp Mon Apr 30 09:49:04 2018
@@ -25,8 +25,8 @@ using namespace lldb;
using namespace lldb_private;
//----------------------------------------------------------------------
-// Promote to max type currently follows the ANSI C rule for type
-// promotion in expressions.
+// Promote to max type currently follows the ANSI C rule for type promotion in
+// expressions.
//----------------------------------------------------------------------
static Scalar::Type PromoteToMaxType(
const Scalar &lhs, // The const left hand side object
@@ -41,10 +41,9 @@ static Scalar::Type PromoteToMaxType(
// lhs/rhs will get promoted)
) {
Scalar result;
- // Initialize the promoted values for both the right and left hand side values
- // to be the objects themselves. If no promotion is needed (both right and
- // left
- // have the same type), then the temp_value will not get used.
+ // Initialize the promoted values for both the right and left hand side
+ // values to be the objects themselves. If no promotion is needed (both right
+ // and left have the same type), then the temp_value will not get used.
promoted_lhs_ptr = &lhs;
promoted_rhs_ptr = &rhs;
// Extract the types of both the right and left hand side values
@@ -128,14 +127,13 @@ bool Scalar::GetData(DataExtractor &data
if (limit_byte_size < byte_size) {
if (endian::InlHostByteOrder() == eByteOrderLittle) {
- // On little endian systems if we want fewer bytes from the
- // current type we just specify fewer bytes since the LSByte
- // is first...
+ // On little endian systems if we want fewer bytes from the current
+ // type we just specify fewer bytes since the LSByte is first...
byte_size = limit_byte_size;
} else if (endian::InlHostByteOrder() == eByteOrderBig) {
- // On big endian systems if we want fewer bytes from the
- // current type have to advance our initial byte pointer and
- // trim down the number of bytes since the MSByte is first
+ // On big endian systems if we want fewer bytes from the current type
+ // have to advance our initial byte pointer and trim down the number of
+ // bytes since the MSByte is first
bytes += byte_size - limit_byte_size;
byte_size = limit_byte_size;
}
@@ -164,9 +162,8 @@ const void *Scalar::GetBytes() const {
case e_slonglong:
case e_ulonglong:
bytes = reinterpret_cast<const uint8_t *>(m_integer.getRawData());
- // getRawData always returns a pointer to an uint64_t. If we have a smaller
- // type,
- // we need to update the pointer on big-endian systems.
+ // getRawData always returns a pointer to an uint64_t. If we have a
+ // smaller type, we need to update the pointer on big-endian systems.
if (endian::InlHostByteOrder() == eByteOrderBig) {
size_t byte_size = m_integer.getBitWidth() / 8;
if (byte_size < 8)
@@ -2065,8 +2062,7 @@ const Scalar lldb_private::operator/(con
}
}
// For division only, the only way it should make it here is if a promotion
- // failed,
- // or if we are trying to do a divide by zero.
+ // failed, or if we are trying to do a divide by zero.
result.m_type = Scalar::e_void;
return result;
}
Modified: lldb/trunk/source/Core/Section.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Section.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Core/Section.cpp (original)
+++ lldb/trunk/source/Core/Section.cpp Mon Apr 30 09:49:04 2018
@@ -177,9 +177,9 @@ Section::~Section() {
addr_t Section::GetFileAddress() const {
SectionSP parent_sp(GetParent());
if (parent_sp) {
- // This section has a parent which means m_file_addr is an offset into
- // the parent section, so the file address for this section is the file
- // address of the parent plus the offset
+ // This section has a parent which means m_file_addr is an offset into the
+ // parent section, so the file address for this section is the file address
+ // of the parent plus the offset
return parent_sp->GetFileAddress() + m_file_addr;
}
// This section has no parent, so m_file_addr is the file base address
@@ -558,10 +558,8 @@ SectionSP SectionList::FindSectionContai
Section *sect = sect_iter->get();
if (sect->ContainsFileAddress(vm_addr)) {
// The file address is in this section. We need to make sure one of our
- // child
- // sections doesn't contain this address as well as obeying the depth
- // limit
- // that was passed in.
+ // child sections doesn't contain this address as well as obeying the
+ // depth limit that was passed in.
if (depth > 0)
sect_sp = sect->GetChildren().FindSectionContainingFileAddress(
vm_addr, depth - 1);
Modified: lldb/trunk/source/Core/SourceManager.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/SourceManager.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Core/SourceManager.cpp (original)
+++ lldb/trunk/source/Core/SourceManager.cpp Mon Apr 30 09:49:04 2018
@@ -109,8 +109,8 @@ static bool should_show_stop_column_with
if (!debugger_sp)
return false;
- // We don't use ANSI stop column formatting if the debugger doesn't think
- // it should be using color.
+ // We don't use ANSI stop column formatting if the debugger doesn't think it
+ // should be using color.
if (!debugger_sp->GetUseColor())
return false;
@@ -128,8 +128,8 @@ static bool should_show_stop_column_with
if (!debugger_sp)
return false;
- // If we're asked to show the first available of ANSI or caret, then
- // we do show the caret when ANSI is not available.
+ // If we're asked to show the first available of ANSI or caret, then we do
+ // show the caret when ANSI is not available.
const auto value = debugger_sp->GetStopShowColumn();
if ((value == eStopShowColumnAnsiOrCaret) && !debugger_sp->GetUseColor())
return true;
@@ -255,9 +255,9 @@ size_t SourceManager::DisplayMoreWithLin
if (m_last_line > 0) {
if (reverse) {
- // If this is the first time we've done a reverse, then back up one more
- // time so we end
- // up showing the chunk before the last one we've shown:
+ // If this is the first time we've done a reverse, then back up one
+ // more time so we end up showing the chunk before the last one we've
+ // shown:
if (m_last_line > m_last_count)
m_last_line -= m_last_count;
else
@@ -299,10 +299,9 @@ bool SourceManager::GetDefaultFileAndLin
if (target_sp) {
// If nobody has set the default file and line then try here. If there's
- // no executable, then we
- // will try again later when there is one. Otherwise, if we can't find it
- // we won't look again,
- // somebody will have to set it (for instance when we stop somewhere...)
+ // no executable, then we will try again later when there is one.
+ // Otherwise, if we can't find it we won't look again, somebody will have
+ // to set it (for instance when we stop somewhere...)
Module *executable_ptr = target_sp->GetExecutableModulePointer();
if (executable_ptr) {
SymbolContextList sc_list;
@@ -410,9 +409,7 @@ void SourceManager::File::CommonInitiali
FileSpec new_file_spec;
// Check target specific source remappings first, then fall back to
// modules objects can have individual path remappings that were
- // detected
- // when the debug info for a module was found.
- // then
+ // detected when the debug info for a module was found. then
if (target->GetSourcePathMap().FindFile(m_file_spec, new_file_spec) ||
target->GetImages().FindSourceFile(m_file_spec, new_file_spec)) {
m_file_spec = new_file_spec;
@@ -538,8 +535,8 @@ size_t SourceManager::File::DisplaySourc
if (column && (column < count)) {
auto debugger_sp = m_debugger_wp.lock();
if (should_show_stop_column_with_ansi(debugger_sp) && debugger_sp) {
- // Check if we have any ANSI codes with which to mark this column.
- // If not, no need to do this work.
+ // Check if we have any ANSI codes with which to mark this column. If
+ // not, no need to do this work.
auto ansi_prefix_entry = debugger_sp->GetStopShowColumnAnsiPrefix();
auto ansi_suffix_entry = debugger_sp->GetStopShowColumnAnsiSuffix();
Modified: lldb/trunk/source/Core/Value.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Value.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Core/Value.cpp (original)
+++ lldb/trunk/source/Core/Value.cpp Mon Apr 30 09:49:04 2018
@@ -365,11 +365,10 @@ Status Value::GetValueAsData(ExecutionCo
if (process == NULL || !process->IsAlive()) {
Target *target = exe_ctx->GetTargetPtr();
if (target) {
- // Allow expressions to run and evaluate things when the target
- // has memory sections loaded. This allows you to use "target modules
- // load"
- // to load your executable and any shared libraries, then execute
- // commands where you can look at types in data sections.
+ // Allow expressions to run and evaluate things when the target has
+ // memory sections loaded. This allows you to use "target modules
+ // load" to load your executable and any shared libraries, then
+ // execute commands where you can look at types in data sections.
const SectionLoadList &target_sections = target->GetSectionLoadList();
if (!target_sections.IsEmpty()) {
address = m_value.ULongLong(LLDB_INVALID_ADDRESS);
@@ -406,8 +405,8 @@ Status Value::GetValueAsData(ExecutionCo
error.SetErrorString("invalid file address");
} else {
if (module == NULL) {
- // The only thing we can currently lock down to a module so that
- // we can resolve a file address, is a variable.
+ // The only thing we can currently lock down to a module so that we
+ // can resolve a file address, is a variable.
Variable *variable = GetVariable();
if (variable) {
SymbolContext var_sc;
@@ -541,12 +540,11 @@ Status Value::GetValueAsData(ExecutionCo
} else if ((address_type == eAddressTypeLoad) ||
(address_type == eAddressTypeFile)) {
if (file_so_addr.IsValid()) {
- // We have a file address that we were able to translate into a
- // section offset address so we might be able to read this from
- // the object files if we don't have a live process. Lets always
- // try and read from the process if we have one though since we
- // want to read the actual value by setting "prefer_file_cache"
- // to false.
+ // We have a file address that we were able to translate into a section
+ // offset address so we might be able to read this from the object
+ // files if we don't have a live process. Lets always try and read from
+ // the process if we have one though since we want to read the actual
+ // value by setting "prefer_file_cache" to false.
const bool prefer_file_cache = false;
if (exe_ctx->GetTargetRef().ReadMemory(file_so_addr, prefer_file_cache,
dst, byte_size,
@@ -555,10 +553,10 @@ Status Value::GetValueAsData(ExecutionCo
"read memory from 0x%" PRIx64 " failed", (uint64_t)address);
}
} else {
- // The execution context might have a NULL process, but it
- // might have a valid process in the exe_ctx->target, so use
- // the ExecutionContext::GetProcess accessor to ensure we
- // get the process if there is one.
+ // The execution context might have a NULL process, but it might have a
+ // valid process in the exe_ctx->target, so use the
+ // ExecutionContext::GetProcess accessor to ensure we get the process
+ // if there is one.
Process *process = exe_ctx->GetProcessPtr();
if (process) {
Modified: lldb/trunk/source/Core/ValueObject.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ValueObject.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Core/ValueObject.cpp (original)
+++ lldb/trunk/source/Core/ValueObject.cpp Mon Apr 30 09:49:04 2018
@@ -146,16 +146,15 @@ bool ValueObject::UpdateValueIfNeeded(bo
if (update_format)
did_change_formats = UpdateFormatsIfNeeded();
- // If this is a constant value, then our success is predicated on whether
- // we have an error or not
+ // If this is a constant value, then our success is predicated on whether we
+ // have an error or not
if (GetIsConstant()) {
// if you are constant, things might still have changed behind your back
// (e.g. you are a frozen object and things have changed deeper than you
- // cared to freeze-dry yourself)
- // in this case, your value has not changed, but "computed" entries might
- // have, so you might now have
- // a different summary, or a different object description. clear these so we
- // will recompute them
+ // cared to freeze-dry yourself) in this case, your value has not changed,
+ // but "computed" entries might have, so you might now have a different
+ // summary, or a different object description. clear these so we will
+ // recompute them
if (update_format && !did_change_formats)
ClearUserVisibleData(eClearUserVisibleDataItemsSummary |
eClearUserVisibleDataItemsDescription);
@@ -167,8 +166,8 @@ bool ValueObject::UpdateValueIfNeeded(bo
if (NeedsUpdating()) {
m_update_point.SetUpdated();
- // Save the old value using swap to avoid a string copy which
- // also will clear our m_value_str
+ // Save the old value using swap to avoid a string copy which also will
+ // clear our m_value_str
if (m_value_str.empty()) {
m_old_value_valid = false;
} else {
@@ -215,8 +214,8 @@ bool ValueObject::UpdateValueIfNeeded(bo
if (first_update)
SetValueDidChange(false);
else if (!m_value_did_change && success == false) {
- // The value wasn't gotten successfully, so we mark this
- // as changed if the value used to be valid and now isn't
+ // The value wasn't gotten successfully, so we mark this as changed if
+ // the value used to be valid and now isn't
SetValueDidChange(value_was_valid);
} else if (need_compare_checksums) {
SetValueDidChange(memcmp(&old_checksum[0], &m_value_checksum[0],
@@ -261,8 +260,7 @@ bool ValueObject::UpdateFormatsIfNeeded(
void ValueObject::SetNeedsUpdate() {
m_update_point.SetNeedsUpdate();
// We have to clear the value string here so ConstResult children will notice
- // if their values are
- // changed by hand (i.e. with SetValueAsCString).
+ // if their values are changed by hand (i.e. with SetValueAsCString).
ClearUserVisibleData(eClearUserVisibleDataItemsValue);
}
@@ -556,9 +554,9 @@ size_t ValueObject::GetIndexOfChildWithN
ValueObjectSP ValueObject::GetChildMemberWithName(const ConstString &name,
bool can_create) {
- // when getting a child by name, it could be buried inside some base
- // classes (which really aren't part of the expression path), so we
- // need a vector of indexes that can get us down to the correct child
+ // when getting a child by name, it could be buried inside some base classes
+ // (which really aren't part of the expression path), so we need a vector of
+ // indexes that can get us down to the correct child
ValueObjectSP child_sp;
// We may need to update our value if we are dynamic
@@ -682,8 +680,8 @@ bool ValueObject::GetSummaryAsCString(Ty
const TypeSummaryOptions &options) {
destination.clear();
- // ideally we would like to bail out if passing NULL, but if we do so
- // we end up not providing the summary for function pointers anymore
+ // ideally we would like to bail out if passing NULL, but if we do so we end
+ // up not providing the summary for function pointers anymore
if (/*summary_ptr == NULL ||*/ m_is_getting_summary)
return false;
@@ -695,9 +693,8 @@ bool ValueObject::GetSummaryAsCString(Ty
actual_options.SetLanguage(GetPreferredDisplayLanguage());
// this is a hot path in code and we prefer to avoid setting this string all
- // too often also clearing out other
- // information that we might care to see in a crash log. might be useful in
- // very specific situations though.
+ // too often also clearing out other information that we might care to see in
+ // a crash log. might be useful in very specific situations though.
/*Host::SetCrashDescriptionWithFormat("Trying to fetch a summary for %s %s.
Summary provider's description is %s",
GetTypeName().GetCString(),
@@ -925,7 +922,8 @@ bool ValueObject::SetData(DataExtractor
break;
}
- // If we have reached this point, then we have successfully changed the value.
+ // If we have reached this point, then we have successfully changed the
+ // value.
SetNeedsUpdate();
return true;
}
@@ -1010,9 +1008,9 @@ ValueObject::ReadPointedString(lldb::Dat
DataExtractor data;
if (cstr_len > 0 && honor_array) {
// I am using GetPointeeData() here to abstract the fact that some
- // ValueObjects are actually frozen pointers in the host
- // but the pointed-to data lives in the debuggee, and GetPointeeData()
- // automatically takes care of this
+ // ValueObjects are actually frozen pointers in the host but the pointed-
+ // to data lives in the debuggee, and GetPointeeData() automatically
+ // takes care of this
GetPointeeData(data, 0, cstr_len);
if ((bytes_read = data.GetByteSize()) > 0) {
@@ -1031,9 +1029,9 @@ ValueObject::ReadPointedString(lldb::Dat
int cstr_len_displayed = -1;
bool capped_cstr = false;
// I am using GetPointeeData() here to abstract the fact that some
- // ValueObjects are actually frozen pointers in the host
- // but the pointed-to data lives in the debuggee, and GetPointeeData()
- // automatically takes care of this
+ // ValueObjects are actually frozen pointers in the host but the pointed-
+ // to data lives in the debuggee, and GetPointeeData() automatically
+ // takes care of this
while ((bytes_read = GetPointeeData(data, offset, k_max_buf_size)) > 0) {
total_bytes_read += bytes_read;
const char *cstr = data.PeekCStr(0);
@@ -1175,8 +1173,8 @@ const char *ValueObject::GetValueAsCStri
format_sp.reset(new TypeFormatImpl_Format(my_format));
if (GetValueAsCString(*format_sp.get(), m_value_str)) {
if (!m_value_did_change && m_old_value_valid) {
- // The value was gotten successfully, so we consider the
- // value as changed if the value string differs
+ // The value was gotten successfully, so we consider the value as
+ // changed if the value string differs
SetValueDidChange(m_old_value_str != m_value_str);
}
}
@@ -1187,8 +1185,8 @@ const char *ValueObject::GetValueAsCStri
return m_value_str.c_str();
}
-// if > 8bytes, 0 is returned. this method should mostly be used
-// to read address values out of pointers
+// if > 8bytes, 0 is returned. this method should mostly be used to read
+// address values out of pointers
uint64_t ValueObject::GetValueAsUnsigned(uint64_t fail_value, bool *success) {
// If our byte size is zero this is an aggregate type that has children
if (CanProvideValue()) {
@@ -1224,10 +1222,9 @@ int64_t ValueObject::GetValueAsSigned(in
}
// if any more "special cases" are added to
-// ValueObject::DumpPrintableRepresentation() please keep
-// this call up to date by returning true for your new special cases. We will
-// eventually move
-// to checking this call result before trying to display special cases
+// ValueObject::DumpPrintableRepresentation() please keep this call up to date
+// by returning true for your new special cases. We will eventually move to
+// checking this call result before trying to display special cases
bool ValueObject::HasSpecialPrintableRepresentation(
ValueObjectRepresentationStyle val_obj_display, Format custom_format) {
Flags flags(GetTypeInfo());
@@ -1276,8 +1273,7 @@ bool ValueObject::DumpPrintableRepresent
if (flags.AnySet(eTypeIsArray | eTypeIsPointer) &&
val_obj_display == ValueObject::eValueObjectRepresentationStyleValue) {
// when being asked to get a printable display an array or pointer type
- // directly,
- // try to "do the right thing"
+ // directly, try to "do the right thing"
if (IsCStringContainer(true) &&
(custom_format == eFormatCString ||
@@ -1309,8 +1305,8 @@ bool ValueObject::DumpPrintableRepresent
if (custom_format == eFormatEnum)
return false;
- // this only works for arrays, because I have no way to know when
- // the pointed memory ends, and no special \0 end of data marker
+ // this only works for arrays, because I have no way to know when the
+ // pointed memory ends, and no special \0 end of data marker
if (flags.Test(eTypeIsArray)) {
if ((custom_format == eFormatBytes) ||
(custom_format == eFormatBytesWithASCII)) {
@@ -1406,8 +1402,8 @@ bool ValueObject::DumpPrintableRepresent
llvm::StringRef str;
// this is a local stream that we are using to ensure that the data pointed
- // to by cstr survives long enough for us to copy it to its destination - it
- // is necessary to have this temporary storage area for cases where our
+ // to by cstr survives long enough for us to copy it to its destination -
+ // it is necessary to have this temporary storage area for cases where our
// desired output is not backed by some other longer-term storage
StreamString strm;
@@ -1485,9 +1481,9 @@ bool ValueObject::DumpPrintableRepresent
s.PutCString("<no printable representation>");
}
- // we should only return false here if we could not do *anything*
- // even if we have an error message as output, that's a success
- // from our callers' perspective, so return true
+ // we should only return false here if we could not do *anything* even if
+ // we have an error message as output, that's a success from our callers'
+ // perspective, so return true
var_success = true;
if (custom_format != eFormatInvalid)
@@ -1590,9 +1586,8 @@ bool ValueObject::SetValueFromCString(co
switch (value_type) {
case Value::eValueTypeLoadAddress: {
// If it is a load address, then the scalar value is the storage
- // location
- // of the data, and we have to shove this value down to that load
- // location.
+ // location of the data, and we have to shove this value down to that
+ // load location.
ExecutionContext exe_ctx(GetExecutionContextRef());
Process *process = exe_ctx.GetProcessPtr();
if (process) {
@@ -1639,7 +1634,8 @@ bool ValueObject::SetValueFromCString(co
return false;
}
- // If we have reached this point, then we have successfully changed the value.
+ // If we have reached this point, then we have successfully changed the
+ // value.
SetNeedsUpdate();
return true;
}
@@ -1734,16 +1730,14 @@ bool ValueObject::IsUninitializedReferen
return false;
}
-// This allows you to create an array member using and index
-// that doesn't not fall in the normal bounds of the array.
-// Many times structure can be defined as:
-// struct Collection
-// {
+// This allows you to create an array member using and index that doesn't not
+// fall in the normal bounds of the array. Many times structure can be defined
+// as: struct Collection {
// uint32_t item_count;
// Item item_array[0];
// };
-// The size of the "item_array" is 1, but many times in practice
-// there are more items in "item_array".
+// The size of the "item_array" is 1, but many times in practice there are more
+// items in "item_array".
ValueObjectSP ValueObject::GetSyntheticArrayMember(size_t index,
bool can_create) {
@@ -1752,13 +1746,13 @@ ValueObjectSP ValueObject::GetSyntheticA
char index_str[64];
snprintf(index_str, sizeof(index_str), "[%" PRIu64 "]", (uint64_t)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.
+ // Check if we have already created a synthetic array member in this valid
+ // object. If we have we will re-use it.
synthetic_child_sp = GetSyntheticChild(index_const_str);
if (!synthetic_child_sp) {
ValueObject *synthetic_child;
- // We haven't made a synthetic array member for INDEX yet, so
- // lets make one and cache it for any future reference.
+ // We haven't made a synthetic array member for INDEX yet, so lets make
+ // one and cache it for any future reference.
synthetic_child = CreateChildAtIndex(0, true, index);
// Cache the value if we got one back...
@@ -1780,8 +1774,8 @@ ValueObjectSP ValueObject::GetSyntheticB
char index_str[64];
snprintf(index_str, sizeof(index_str), "[%i-%i]", from, to);
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.
+ // Check if we have already created a synthetic array member in this valid
+ // object. If we have we will re-use it.
synthetic_child_sp = GetSyntheticChild(index_const_str);
if (!synthetic_child_sp) {
uint32_t bit_field_size = to - from + 1;
@@ -1789,8 +1783,8 @@ ValueObjectSP ValueObject::GetSyntheticB
if (GetDataExtractor().GetByteOrder() == eByteOrderBig)
bit_field_offset =
GetByteSize() * 8 - bit_field_size - bit_field_offset;
- // We haven't made a synthetic array member for INDEX yet, so
- // lets make one and cache it for any future reference.
+ // We haven't made a synthetic array member for INDEX yet, so lets make
+ // one and cache it for any future reference.
ValueObjectChild *synthetic_child = new ValueObjectChild(
*this, GetCompilerType(), index_const_str, GetByteSize(), 0,
bit_field_size, bit_field_offset, false, false, eAddressTypeInvalid,
@@ -1820,8 +1814,8 @@ ValueObjectSP ValueObject::GetSyntheticC
name_const_str.SetCString(name_str);
}
- // Check if we have already created a synthetic array member in this
- // valid object. If we have we will re-use it.
+ // Check if we have already created a synthetic array member in this valid
+ // object. If we have we will re-use it.
synthetic_child_sp = GetSyntheticChild(name_const_str);
if (synthetic_child_sp.get())
@@ -1858,8 +1852,8 @@ ValueObjectSP ValueObject::GetSyntheticB
name_const_str.SetCString(name_str);
}
- // Check if we have already created a synthetic array member in this
- // valid object. If we have we will re-use it.
+ // Check if we have already created a synthetic array member in this valid
+ // object. If we have we will re-use it.
synthetic_child_sp = GetSyntheticChild(name_const_str);
if (synthetic_child_sp.get())
@@ -1884,11 +1878,10 @@ ValueObjectSP ValueObject::GetSyntheticB
return synthetic_child_sp;
}
-// your expression path needs to have a leading . or ->
-// (unless it somehow "looks like" an array, in which case it has
-// a leading [ symbol). while the [ is meaningful and should be shown
-// to the user, . and -> are just parser design, but by no means
-// added information for the user.. strip them off
+// your expression path needs to have a leading . or -> (unless it somehow
+// "looks like" an array, in which case it has a leading [ symbol). while the [
+// is meaningful and should be shown to the user, . and -> are just parser
+// design, but by no means added information for the user.. strip them off
static const char *SkipLeadingExpressionPathSeparators(const char *expression) {
if (!expression || !expression[0])
return expression;
@@ -1904,12 +1897,12 @@ ValueObject::GetSyntheticExpressionPathC
bool can_create) {
ValueObjectSP synthetic_child_sp;
ConstString name_const_string(expression);
- // Check if we have already created a synthetic array member in this
- // valid object. If we have we will re-use it.
+ // Check if we have already created a synthetic array member in this valid
+ // object. If we have we will re-use it.
synthetic_child_sp = GetSyntheticChild(name_const_string);
if (!synthetic_child_sp) {
- // We haven't made a synthetic array member for expression yet, so
- // lets make one and cache it for any future reference.
+ // We haven't made a synthetic array member for expression yet, so lets
+ // make one and cache it for any future reference.
synthetic_child_sp = GetValueForExpressionPath(
expression, NULL, NULL,
GetValueForExpressionPathOptions().SetSyntheticChildrenTraversal(
@@ -2055,10 +2048,9 @@ bool ValueObject::IsBaseClass(uint32_t &
void ValueObject::GetExpressionPath(Stream &s, bool qualify_cxx_base_classes,
GetExpressionPathFormat epformat) {
// synthetic children do not actually "exist" as part of the hierarchy, and
- // sometimes they are consed up in ways
- // that don't make sense from an underlying language/API standpoint. So, use a
- // special code path here to return
- // something that can hopefully be used in expression
+ // sometimes they are consed up in ways that don't make sense from an
+ // underlying language/API standpoint. So, use a special code path here to
+ // return something that can hopefully be used in expression
if (m_is_synthetic_children_generated) {
UpdateValueIfNeeded();
@@ -2092,11 +2084,10 @@ void ValueObject::GetExpressionPath(Stre
if (is_deref_of_parent &&
epformat == eGetExpressionPathFormatDereferencePointers) {
// this is the original format of GetExpressionPath() producing code like
- // *(a_ptr).memberName, which is entirely
- // fine, until you put this into
+ // *(a_ptr).memberName, which is entirely fine, until you put this into
// StackFrame::GetValueForVariableExpressionPath() which prefers to see
- // a_ptr->memberName.
- // the eHonorPointers mode is meant to produce strings in this latter format
+ // a_ptr->memberName. the eHonorPointers mode is meant to produce strings
+ // in this latter format
s.PutCString("*(");
}
@@ -2105,9 +2096,9 @@ void ValueObject::GetExpressionPath(Stre
if (parent)
parent->GetExpressionPath(s, qualify_cxx_base_classes, epformat);
- // if we are a deref_of_parent just because we are synthetic array
- // members made up to allow ptr[%d] syntax to work in variable
- // printing, then add our name ([%d]) to the expression path
+ // if we are a deref_of_parent just because we are synthetic array members
+ // made up to allow ptr[%d] syntax to work in variable printing, then add our
+ // name ([%d]) to the expression path
if (m_is_array_item_for_pointer &&
epformat == eGetExpressionPathFormatHonorPointers)
s.PutCString(m_name.AsCString());
@@ -2355,8 +2346,8 @@ ValueObjectSP ValueObject::GetValueForEx
}
// if we are here and options.m_no_synthetic_children is true,
- // child_valobj_sp is going to be a NULL SP,
- // so we hit the "else" branch, and return an error
+ // child_valobj_sp is going to be a NULL SP, so we hit the "else"
+ // branch, and return an error
if (child_valobj_sp.get()) // if it worked, just return
{
*reason_to_stop =
@@ -2424,8 +2415,8 @@ ValueObjectSP ValueObject::GetValueForEx
}
// if we are here and options.m_no_synthetic_children is true,
- // child_valobj_sp is going to be a NULL SP,
- // so we hit the "else" branch, and return an error
+ // child_valobj_sp is going to be a NULL SP, so we hit the "else"
+ // branch, and return an error
if (child_valobj_sp.get()) // if it worked, move on
{
root = child_valobj_sp;
@@ -2506,8 +2497,8 @@ ValueObjectSP ValueObject::GetValueForEx
assert(!bracket_expr.empty());
if (!bracket_expr.contains('-')) {
- // if no separator, this is of the form [N]. Note that this cannot
- // be an unbounded range of the form [], because that case was handled
+ // if no separator, this is of the form [N]. Note that this cannot be
+ // an unbounded range of the form [], because that case was handled
// above with an unconditional return.
unsigned long index = 0;
if (bracket_expr.getAsInteger(0, index)) {
@@ -2631,8 +2622,8 @@ ValueObjectSP ValueObject::GetValueForEx
*final_result = ValueObject::eExpressionPathEndResultTypeInvalid;
return nullptr;
}
- // if we are here, then root itself is a synthetic VO.. should be good
- // to go
+ // if we are here, then root itself is a synthetic VO.. should be
+ // good to go
if (!root) {
*reason_to_stop =
@@ -3031,20 +3022,17 @@ ValueObject::EvaluationPoint::Evaluation
ValueObject::EvaluationPoint::~EvaluationPoint() {}
// This function checks the EvaluationPoint against the current process state.
-// If the current
-// state matches the evaluation point, or the evaluation point is already
-// invalid, then we return
-// false, meaning "no change". If the current state is different, we update our
-// state, and return
-// true meaning "yes, change". If we did see a change, we also set
-// m_needs_update to true, so
-// future calls to NeedsUpdate will return true.
-// exe_scope will be set to the current execution context scope.
+// If the current state matches the evaluation point, or the evaluation point
+// is already invalid, then we return false, meaning "no change". If the
+// current state is different, we update our state, and return true meaning
+// "yes, change". If we did see a change, we also set m_needs_update to true,
+// so future calls to NeedsUpdate will return true. exe_scope will be set to
+// the current execution context scope.
bool ValueObject::EvaluationPoint::SyncWithProcessState(
bool accept_invalid_exe_ctx) {
- // Start with the target, if it is NULL, then we're obviously not going to get
- // any further:
+ // Start with the target, if it is NULL, then we're obviously not going to
+ // get any further:
const bool thread_and_frame_only_if_stopped = true;
ExecutionContext exe_ctx(
m_exe_ctx_ref.Lock(thread_and_frame_only_if_stopped));
@@ -3061,8 +3049,8 @@ bool ValueObject::EvaluationPoint::SyncW
ProcessModID current_mod_id = process->GetModID();
// If the current stop id is 0, either we haven't run yet, or the process
- // state has been cleared.
- // In either case, we aren't going to be able to sync with the process state.
+ // state has been cleared. In either case, we aren't going to be able to sync
+ // with the process state.
if (current_mod_id.GetStopID() == 0)
return false;
@@ -3070,8 +3058,8 @@ bool ValueObject::EvaluationPoint::SyncW
const bool was_valid = m_mod_id.IsValid();
if (was_valid) {
if (m_mod_id == current_mod_id) {
- // Everything is already up to date in this object, no need to
- // update the execution context scope.
+ // Everything is already up to date in this object, no need to update the
+ // execution context scope.
changed = false;
} else {
m_mod_id = current_mod_id;
@@ -3081,10 +3069,9 @@ bool ValueObject::EvaluationPoint::SyncW
}
// Now re-look up the thread and frame in case the underlying objects have
- // gone away & been recreated.
- // That way we'll be sure to return a valid exe_scope.
- // If we used to have a thread or a frame but can't find it anymore, then mark
- // ourselves as invalid.
+ // gone away & been recreated. That way we'll be sure to return a valid
+ // exe_scope. If we used to have a thread or a frame but can't find it
+ // anymore, then mark ourselves as invalid.
if (!accept_invalid_exe_ctx) {
if (m_exe_ctx_ref.HasThreadRef()) {
@@ -3299,11 +3286,9 @@ void ValueObject::SetPreferredDisplayLan
}
bool ValueObject::CanProvideValue() {
- // we need to support invalid types as providers of values because some
- // bare-board
- // debugging scenarios have no notion of types, but still manage to have raw
- // numeric
- // values for things like registers. sigh.
+ // we need to support invalid types as providers of values because some bare-
+ // board debugging scenarios have no notion of types, but still manage to
+ // have raw numeric values for things like registers. sigh.
const CompilerType &type(GetCompilerType());
return (false == type.IsValid()) ||
(0 != (type.GetTypeInfo() & eTypeHasValue));
Modified: lldb/trunk/source/Core/ValueObjectCast.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ValueObjectCast.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Core/ValueObjectCast.cpp (original)
+++ lldb/trunk/source/Core/ValueObjectCast.cpp Mon Apr 30 09:49:04 2018
@@ -71,9 +71,9 @@ bool ValueObjectCast::UpdateValue() {
m_value.SetCompilerType(compiler_type);
SetAddressTypeOfChildren(m_parent->GetAddressTypeOfChildren());
if (!CanProvideValue()) {
- // this value object represents an aggregate type whose
- // children have values, but this object does not. So we
- // say we are changed if our location has changed.
+ // this value object represents an aggregate type whose children have
+ // values, but this object does not. So we say we are changed if our
+ // location has changed.
SetValueDidChange(m_value.GetValueType() != old_value.GetValueType() ||
m_value.GetScalar() != old_value.GetScalar());
}
Modified: lldb/trunk/source/Core/ValueObjectChild.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ValueObjectChild.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Core/ValueObjectChild.cpp (original)
+++ lldb/trunk/source/Core/ValueObjectChild.cpp Mon Apr 30 09:49:04 2018
@@ -172,8 +172,8 @@ bool ValueObjectChild::UpdateValue() {
} else if (addr == 0) {
m_error.SetErrorString("parent is NULL");
} else {
- // Set this object's scalar value to the address of its
- // value by adding its byte offset to the parent address
+ // Set this object's scalar value to the address of its value by
+ // adding its byte offset to the parent address
m_value.GetScalar() += GetByteOffset();
}
} break;
Modified: lldb/trunk/source/Core/ValueObjectDynamicValue.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ValueObjectDynamicValue.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Core/ValueObjectDynamicValue.cpp (original)
+++ lldb/trunk/source/Core/ValueObjectDynamicValue.cpp Mon Apr 30 09:49:04 2018
@@ -122,8 +122,8 @@ bool ValueObjectDynamicValue::UpdateValu
return false;
}
- // Setting our type_sp to NULL will route everything back through our
- // parent which is equivalent to not using dynamic values.
+ // Setting our type_sp to NULL will route everything back through our parent
+ // which is equivalent to not using dynamic values.
if (m_use_dynamic == lldb::eNoDynamicValues) {
m_dynamic_type_info.Clear();
return true;
@@ -173,8 +173,7 @@ bool ValueObjectDynamicValue::UpdateValu
}
// Getting the dynamic value may have run the program a bit, and so marked us
- // as needing updating, but we really
- // don't...
+ // as needing updating, but we really don't...
m_update_point.SetUpdated();
@@ -192,8 +191,8 @@ bool ValueObjectDynamicValue::UpdateValu
}
// If we don't have a dynamic type, then make ourselves just a echo of our
- // parent.
- // Or we could return false, and make ourselves an echo of our parent?
+ // parent. Or we could return false, and make ourselves an echo of our
+ // parent?
if (!found_dynamic_type) {
if (m_dynamic_type_info)
SetValueDidChange(true);
@@ -248,14 +247,14 @@ bool ValueObjectDynamicValue::UpdateValu
static_cast<void *>(this), GetTypeName().GetCString());
if (m_address.IsValid() && m_dynamic_type_info) {
- // The variable value is in the Scalar value inside the m_value.
- // We can point our m_data right to it.
+ // The variable value is in the Scalar value inside the m_value. We can
+ // point our m_data right to it.
m_error = m_value.GetValueAsData(&exe_ctx, m_data, 0, GetModule().get());
if (m_error.Success()) {
if (!CanProvideValue()) {
- // this value object represents an aggregate type whose
- // children have values, but this object does not. So we
- // say we are changed if our location has changed.
+ // this value object represents an aggregate type whose children have
+ // values, but this object does not. So we say we are changed if our
+ // location has changed.
SetValueDidChange(m_value.GetValueType() != old_value.GetValueType() ||
m_value.GetScalar() != old_value.GetScalar());
}
@@ -287,13 +286,11 @@ bool ValueObjectDynamicValue::SetValueFr
return false;
}
- // if we are at an offset from our parent, in order to set ourselves correctly
- // we would need
- // to change the new value so that it refers to the correct dynamic type. we
- // choose not to deal
- // with that - if anything more than a value overwrite is required, you should
- // be using the
- // expression parser instead of the value editing facility
+ // if we are at an offset from our parent, in order to set ourselves
+ // correctly we would need to change the new value so that it refers to the
+ // correct dynamic type. we choose not to deal with that - if anything more
+ // than a value overwrite is required, you should be using the expression
+ // parser instead of the value editing facility
if (my_value != parent_value) {
// but NULL'ing out a value should always be allowed
if (strcmp(value_str, "0")) {
@@ -322,13 +319,11 @@ bool ValueObjectDynamicValue::SetData(Da
return false;
}
- // if we are at an offset from our parent, in order to set ourselves correctly
- // we would need
- // to change the new value so that it refers to the correct dynamic type. we
- // choose not to deal
- // with that - if anything more than a value overwrite is required, you should
- // be using the
- // expression parser instead of the value editing facility
+ // if we are at an offset from our parent, in order to set ourselves
+ // correctly we would need to change the new value so that it refers to the
+ // correct dynamic type. we choose not to deal with that - if anything more
+ // than a value overwrite is required, you should be using the expression
+ // parser instead of the value editing facility
if (my_value != parent_value) {
// but NULL'ing out a value should always be allowed
lldb::offset_t offset = 0;
Modified: lldb/trunk/source/Core/ValueObjectList.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ValueObjectList.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Core/ValueObjectList.cpp (original)
+++ lldb/trunk/source/Core/ValueObjectList.cpp Mon Apr 30 09:49:04 2018
@@ -87,8 +87,8 @@ ValueObjectSP ValueObjectList::FindValue
collection::iterator pos, end = m_value_objects.end();
for (pos = m_value_objects.begin(); pos != end; ++pos) {
- // Watch out for NULL objects in our list as the list
- // might get resized to a specific size and lazily filled in
+ // Watch out for NULL objects in our list as the list might get resized to
+ // a specific size and lazily filled in
ValueObject *valobj = (*pos).get();
if (valobj && valobj->GetID() == uid) {
valobj_sp = *pos;
Modified: lldb/trunk/source/Core/ValueObjectMemory.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ValueObjectMemory.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Core/ValueObjectMemory.cpp (original)
+++ lldb/trunk/source/Core/ValueObjectMemory.cpp Mon Apr 30 09:49:04 2018
@@ -165,21 +165,20 @@ bool ValueObjectMemory::UpdateValue() {
llvm_unreachable("Unhandled expression result value kind...");
case Value::eValueTypeScalar:
- // The variable value is in the Scalar value inside the m_value.
- // We can point our m_data right to it.
+ // The variable value is in the Scalar value inside the m_value. We can
+ // point our m_data right to it.
m_error = m_value.GetValueAsData(&exe_ctx, m_data, 0, GetModule().get());
break;
case Value::eValueTypeFileAddress:
case Value::eValueTypeLoadAddress:
case Value::eValueTypeHostAddress:
- // The DWARF expression result was an address in the inferior
- // process. If this variable is an aggregate type, we just need
- // the address as the main value as all child variable objects
- // will rely upon this location and add an offset and then read
- // their own values as needed. If this variable is a simple
- // type, we read all data for it into m_data.
- // Make sure this type has a value before we try and read it
+ // The DWARF expression result was an address in the inferior process. If
+ // this variable is an aggregate type, we just need the address as the
+ // main value as all child variable objects will rely upon this location
+ // and add an offset and then read their own values as needed. If this
+ // variable is a simple type, we read all data for it into m_data. Make
+ // sure this type has a value before we try and read it
// If we have a file address, convert it to a load address if we can.
if (value_type == Value::eValueTypeFileAddress &&
@@ -192,14 +191,14 @@ bool ValueObjectMemory::UpdateValue() {
}
if (!CanProvideValue()) {
- // this value object represents an aggregate type whose
- // children have values, but this object does not. So we
- // say we are changed if our location has changed.
+ // this value object represents an aggregate type whose children have
+ // values, but this object does not. So we say we are changed if our
+ // location has changed.
SetValueDidChange(value_type != old_value.GetValueType() ||
m_value.GetScalar() != old_value.GetScalar());
} else {
- // Copy the Value and set the context to use our Variable
- // so it can extract read its value into m_data appropriately
+ // Copy the Value and set the context to use our Variable so it can
+ // extract read its value into m_data appropriately
Value value(m_value);
if (m_type_sp)
value.SetContext(Value::eContextTypeLLDBType, m_type_sp.get());
Modified: lldb/trunk/source/Core/ValueObjectSyntheticFilter.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ValueObjectSyntheticFilter.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Core/ValueObjectSyntheticFilter.cpp (original)
+++ lldb/trunk/source/Core/ValueObjectSyntheticFilter.cpp Mon Apr 30 09:49:04 2018
@@ -171,10 +171,9 @@ bool ValueObjectSynthetic::UpdateValue()
m_children_byindex.Clear();
m_name_toindex.Clear();
// usually, an object's value can change but this does not alter its
- // children count
- // for a synthetic VO that might indeed happen, so we need to tell the upper
- // echelons
- // that they need to come back to us asking for children
+ // children count for a synthetic VO that might indeed happen, so we need
+ // to tell the upper echelons that they need to come back to us asking for
+ // children
m_children_count_valid = false;
m_synthetic_children_cache.Clear();
m_synthetic_children_count = UINT32_MAX;
Modified: lldb/trunk/source/Core/ValueObjectVariable.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ValueObjectVariable.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Core/ValueObjectVariable.cpp (original)
+++ lldb/trunk/source/Core/ValueObjectVariable.cpp Mon Apr 30 09:49:04 2018
@@ -175,9 +175,8 @@ bool ValueObjectVariable::UpdateValue()
switch (value_type) {
case Value::eValueTypeFileAddress:
// If this type is a pointer, then its children will be considered load
- // addresses
- // if the pointer or reference is dereferenced, but only if the process
- // is alive.
+ // addresses if the pointer or reference is dereferenced, but only if
+ // the process is alive.
//
// There could be global variables like in the following code:
// struct LinkedListNode { Foo* foo; LinkedListNode* next; };
@@ -187,14 +186,11 @@ bool ValueObjectVariable::UpdateValue()
// LinkedListNode g_first_node = { &g_foo1, &g_second_node };
//
// When we aren't running, we should be able to look at these variables
- // using
- // the "target variable" command. Children of the "g_first_node" always
- // will
- // be of the same address type as the parent. But children of the "next"
- // member of
- // LinkedListNode will become load addresses if we have a live process,
- // or remain
- // what a file address if it what a file address.
+ // using the "target variable" command. Children of the "g_first_node"
+ // always will be of the same address type as the parent. But children
+ // of the "next" member of LinkedListNode will become load addresses if
+ // we have a live process, or remain what a file address if it what a
+ // file address.
if (process_is_alive && is_pointer_or_ref)
SetAddressTypeOfChildren(eAddressTypeLoad);
else
@@ -202,11 +198,9 @@ bool ValueObjectVariable::UpdateValue()
break;
case Value::eValueTypeHostAddress:
// Same as above for load addresses, except children of pointer or refs
- // are always
- // load addresses. Host addresses are used to store freeze dried
- // variables. If this
- // type is a struct, the entire struct contents will be copied into the
- // heap of the
+ // are always load addresses. Host addresses are used to store freeze
+ // dried variables. If this type is a struct, the entire struct
+ // contents will be copied into the heap of the
// LLDB process, but we do not currrently follow any pointers.
if (is_pointer_or_ref)
SetAddressTypeOfChildren(eAddressTypeLoad);
@@ -224,8 +218,8 @@ bool ValueObjectVariable::UpdateValue()
case Value::eValueTypeVector:
// fall through
case Value::eValueTypeScalar:
- // The variable value is in the Scalar value inside the m_value.
- // We can point our m_data right to it.
+ // The variable value is in the Scalar value inside the m_value. We can
+ // point our m_data right to it.
m_error =
m_value.GetValueAsData(&exe_ctx, m_data, 0, GetModule().get());
break;
@@ -233,13 +227,12 @@ bool ValueObjectVariable::UpdateValue()
case Value::eValueTypeFileAddress:
case Value::eValueTypeLoadAddress:
case Value::eValueTypeHostAddress:
- // The DWARF expression result was an address in the inferior
- // process. If this variable is an aggregate type, we just need
- // the address as the main value as all child variable objects
- // will rely upon this location and add an offset and then read
- // their own values as needed. If this variable is a simple
- // type, we read all data for it into m_data.
- // Make sure this type has a value before we try and read it
+ // The DWARF expression result was an address in the inferior process.
+ // If this variable is an aggregate type, we just need the address as
+ // the main value as all child variable objects will rely upon this
+ // location and add an offset and then read their own values as needed.
+ // If this variable is a simple type, we read all data for it into
+ // m_data. Make sure this type has a value before we try and read it
// If we have a file address, convert it to a load address if we can.
if (value_type == Value::eValueTypeFileAddress && process_is_alive) {
@@ -263,14 +256,14 @@ bool ValueObjectVariable::UpdateValue()
}
if (!CanProvideValue()) {
- // this value object represents an aggregate type whose
- // children have values, but this object does not. So we
- // say we are changed if our location has changed.
+ // this value object represents an aggregate type whose children have
+ // values, but this object does not. So we say we are changed if our
+ // location has changed.
SetValueDidChange(value_type != old_value.GetValueType() ||
m_value.GetScalar() != old_value.GetScalar());
} else {
- // Copy the Value and set the context to use our Variable
- // so it can extract read its value into m_data appropriately
+ // Copy the Value and set the context to use our Variable so it can
+ // extract read its value into m_data appropriately
Value value(m_value);
value.SetContext(Value::eContextTypeVariable, variable);
m_error =
@@ -299,14 +292,13 @@ bool ValueObjectVariable::IsInScope() {
if (frame) {
return m_variable_sp->IsInScope(frame);
} else {
- // This ValueObject had a frame at one time, but now we
- // can't locate it, so return false since we probably aren't
- // in scope.
+ // This ValueObject had a frame at one time, but now we can't locate it,
+ // so return false since we probably aren't in scope.
return false;
}
}
- // We have a variable that wasn't tied to a frame, which
- // means it is a global and is always in scope.
+ // We have a variable that wasn't tied to a frame, which means it is a global
+ // and is always in scope.
return true;
}
Modified: lldb/trunk/source/DataFormatters/FormatManager.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/DataFormatters/FormatManager.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/DataFormatters/FormatManager.cpp (original)
+++ lldb/trunk/source/DataFormatters/FormatManager.cpp Mon Apr 30 09:49:04 2018
@@ -494,8 +494,8 @@ bool FormatManager::ShouldPrintAsOneLine
if (valobj.GetNumChildren() == 0)
return false;
- // ask the type if it has any opinion about this
- // eLazyBoolCalculate == no opinion; other values should be self explanatory
+ // ask the type if it has any opinion about this eLazyBoolCalculate == no
+ // opinion; other values should be self explanatory
CompilerType compiler_type(valobj.GetCompilerType());
if (compiler_type.IsValid()) {
switch (compiler_type.ShouldPrintAsOneLiner(&valobj)) {
@@ -532,8 +532,7 @@ bool FormatManager::ShouldPrintAsOneLine
}
// if we decided to define synthetic children for a type, we probably care
- // enough
- // to show them, but avoid nesting children in children
+ // enough to show them, but avoid nesting children in children
if (child_sp->GetSyntheticChildren().get() != nullptr) {
ValueObjectSP synth_sp(child_sp->GetSyntheticValue());
// wait.. wat? just get out of here..
Modified: lldb/trunk/source/DataFormatters/StringPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/DataFormatters/StringPrinter.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/DataFormatters/StringPrinter.cpp (original)
+++ lldb/trunk/source/DataFormatters/StringPrinter.cpp Mon Apr 30 09:49:04 2018
@@ -26,9 +26,8 @@ using namespace lldb;
using namespace lldb_private;
using namespace lldb_private::formatters;
-// we define this for all values of type but only implement it for those we care
-// about
-// that's good because we get linker errors for any unsupported type
+// we define this for all values of type but only implement it for those we
+// care about that's good because we get linker errors for any unsupported type
template <lldb_private::formatters::StringPrinter::StringElementType type>
static StringPrinter::StringPrinterBufferPointer<>
GetPrintableImpl(uint8_t *buffer, uint8_t *buffer_end, uint8_t *&next);
@@ -163,8 +162,8 @@ GetPrintableImpl<StringPrinter::StringEl
(unsigned char)*(buffer + 2), (unsigned char)*(buffer + 3));
break;
default:
- // this is probably some bogus non-character thing
- // just print it as-is and hope to sync up again soon
+ // this is probably some bogus non-character thing just print it as-is and
+ // hope to sync up again soon
retval = {buffer, 1};
next = buffer + 1;
return retval;
@@ -223,9 +222,9 @@ GetPrintableImpl<StringPrinter::StringEl
return retval;
}
-// Given a sequence of bytes, this function returns:
-// a sequence of bytes to actually print out + a length
-// the following unscanned position of the buffer is in next
+// Given a sequence of bytes, this function returns: a sequence of bytes to
+// actually print out + a length the following unscanned position of the buffer
+// is in next
static StringPrinter::StringPrinterBufferPointer<>
GetPrintable(StringPrinter::StringElementType type, uint8_t *buffer,
uint8_t *buffer_end, uint8_t *&next) {
@@ -321,8 +320,7 @@ static bool DumpUTFBufferToStream(
(llvm::UTF8 *)utf8_data_buffer_sp->GetBytes();
} else {
// just copy the pointers - the cast is necessary to make the compiler
- // happy
- // but this should only happen if we are reading UTF8 data
+ // happy but this should only happen if we are reading UTF8 data
utf8_data_ptr = const_cast<llvm::UTF8 *>(
reinterpret_cast<const llvm::UTF8 *>(data_ptr));
utf8_data_end_ptr = const_cast<llvm::UTF8 *>(
@@ -344,8 +342,8 @@ static bool DumpUTFBufferToStream(
}
// since we tend to accept partial data (and even partially malformed data)
- // we might end up with no NULL terminator before the end_ptr
- // hence we need to take a slower route and ensure we stay within boundaries
+ // we might end up with no NULL terminator before the end_ptr hence we need
+ // to take a slower route and ensure we stay within boundaries
for (; utf8_data_ptr < utf8_data_end_ptr;) {
if (zero_is_terminator && !*utf8_data_ptr)
break;
@@ -472,8 +470,8 @@ bool StringPrinter::ReadStringAndDumpToS
}
// since we tend to accept partial data (and even partially malformed data)
- // we might end up with no NULL terminator before the end_ptr
- // hence we need to take a slower route and ensure we stay within boundaries
+ // we might end up with no NULL terminator before the end_ptr hence we need
+ // to take a slower route and ensure we stay within boundaries
for (uint8_t *data = buffer_sp->GetBytes(); *data && (data < data_end);) {
if (escape_non_printables) {
uint8_t *next_data = nullptr;
Modified: lldb/trunk/source/DataFormatters/TypeFormat.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/DataFormatters/TypeFormat.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/DataFormatters/TypeFormat.cpp (original)
+++ lldb/trunk/source/DataFormatters/TypeFormat.cpp Mon Apr 30 09:49:04 2018
@@ -111,12 +111,12 @@ bool TypeFormatImpl_Format::FormatObject
valobj->GetBitfieldBitSize(), // Bitfield bit size
valobj->GetBitfieldBitOffset(), // Bitfield bit offset
exe_scope);
- // Given that we do not want to set the ValueObject's m_error
- // for a formatting error (or else we wouldn't be able to reformat
- // until a next update), an empty string is treated as a "false"
- // return from here, but that's about as severe as we get
- // CompilerType::DumpTypeValue() should always return
- // something, even if that something is an error message
+ // Given that we do not want to set the ValueObject's m_error for a
+ // formatting error (or else we wouldn't be able to reformat until a
+ // next update), an empty string is treated as a "false" return from
+ // here, but that's about as severe as we get
+ // CompilerType::DumpTypeValue() should always return something, even
+ // if that something is an error message
dest = sstr.GetString();
}
}
Modified: lldb/trunk/source/DataFormatters/ValueObjectPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/DataFormatters/ValueObjectPrinter.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/DataFormatters/ValueObjectPrinter.cpp (original)
+++ lldb/trunk/source/DataFormatters/ValueObjectPrinter.cpp Mon Apr 30 09:49:04 2018
@@ -244,8 +244,8 @@ void ValueObjectPrinter::PrintDecl() {
// always show the type at the root level if it is invalid
if (show_type) {
- // Some ValueObjects don't have types (like registers sets). Only print
- // the type if there is one to print
+ // Some ValueObjects don't have types (like registers sets). Only print the
+ // type if there is one to print
ConstString type_name;
if (m_compiler_type.IsValid()) {
if (m_options.m_use_type_display_name)
@@ -402,12 +402,10 @@ bool ValueObjectPrinter::PrintValueAndSu
}
if (m_error.size()) {
// we need to support scenarios in which it is actually fine for a value
- // to have no type
- // but - on the other hand - if we get an error *AND* have no type, we try
- // to get out
- // gracefully, since most often that combination means "could not resolve
- // a type"
- // and the default failure mode is quite ugly
+ // to have no type but - on the other hand - if we get an error *AND*
+ // have no type, we try to get out gracefully, since most often that
+ // combination means "could not resolve a type" and the default failure
+ // mode is quite ugly
if (!m_compiler_type.IsValid()) {
m_stream->Printf(" <could not resolve type>");
return false;
@@ -416,10 +414,10 @@ bool ValueObjectPrinter::PrintValueAndSu
error_printed = true;
m_stream->Printf(" <%s>\n", m_error.c_str());
} else {
- // Make sure we have a value and make sure the summary didn't
- // specify that the value should not be printed - and do not print
- // the value if this thing is nil
- // (but show the value if the user passes a format explicitly)
+ // Make sure we have a value and make sure the summary didn't specify
+ // that the value should not be printed - and do not print the value if
+ // this thing is nil (but show the value if the user passes a format
+ // explicitly)
TypeSummaryImpl *entry = GetSummaryFormatter();
if (!IsNil() && !IsUninitialized() && !m_value.empty() &&
(entry == NULL || (entry->DoesPrintValue(m_valobj) ||
@@ -494,8 +492,8 @@ bool ValueObjectPrinter::ShouldPrintChil
if (is_uninit)
return false;
- // if the user has specified an element count, always print children
- // as it is explicit user demand being honored
+ // if the user has specified an element count, always print children as it is
+ // explicit user demand being honored
if (m_options.m_pointer_as_array)
return true;
@@ -505,17 +503,16 @@ bool ValueObjectPrinter::ShouldPrintChil
return false;
if (is_failed_description || m_curr_depth < m_options.m_max_depth) {
- // We will show children for all concrete types. We won't show
- // pointer contents unless a pointer depth has been specified.
- // We won't reference contents unless the reference is the
- // root object (depth of zero).
+ // We will show children for all concrete types. We won't show pointer
+ // contents unless a pointer depth has been specified. We won't reference
+ // contents unless the reference is the root object (depth of zero).
- // Use a new temporary pointer depth in case we override the
- // current pointer depth below...
+ // Use a new temporary pointer depth in case we override the current
+ // pointer depth below...
if (is_ptr || is_ref) {
- // We have a pointer or reference whose value is an address.
- // Make sure that address is not NULL
+ // We have a pointer or reference whose value is an address. Make sure
+ // that address is not NULL
AddressType ptr_address_type;
if (m_valobj->GetPointerValue(&ptr_address_type) == 0)
return false;
@@ -523,10 +520,10 @@ bool ValueObjectPrinter::ShouldPrintChil
const bool is_root_level = m_curr_depth == 0;
if (is_ref && is_root_level) {
- // If this is the root object (depth is zero) that we are showing
- // and it is a reference, and no pointer depth has been supplied
- // print out what it references. Don't do this at deeper depths
- // otherwise we can end up with infinite recursion...
+ // If this is the root object (depth is zero) that we are showing and
+ // it is a reference, and no pointer depth has been supplied print out
+ // what it references. Don't do this at deeper depths otherwise we can
+ // end up with infinite recursion...
return true;
}
@@ -759,8 +756,7 @@ bool ValueObjectPrinter::PrintChildrenOn
void ValueObjectPrinter::PrintChildrenIfNeeded(bool value_printed,
bool summary_printed) {
// this flag controls whether we tried to display a description for this
- // object and failed
- // if that happens, we want to display the children, if any
+ // object and failed if that happens, we want to display the children, if any
bool is_failed_description =
!PrintObjectDescriptionIfNeeded(value_printed, summary_printed);
Modified: lldb/trunk/source/DataFormatters/VectorType.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/DataFormatters/VectorType.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/DataFormatters/VectorType.cpp (original)
+++ lldb/trunk/source/DataFormatters/VectorType.cpp Mon Apr 30 09:49:04 2018
@@ -157,9 +157,8 @@ static lldb::Format GetItemFormatForForm
case lldb::eFormatDefault: {
// special case the (default, char) combination to actually display as an
- // integer value
- // most often, you won't want to see the ASCII characters... (and if you do,
- // eFormatChar is a keystroke away)
+ // integer value most often, you won't want to see the ASCII characters...
+ // (and if you do, eFormatChar is a keystroke away)
bool is_char = element_type.IsCharType();
bool is_signed = false;
element_type.IsIntegerType(is_signed);
Modified: lldb/trunk/source/Expression/DWARFExpression.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/DWARFExpression.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Expression/DWARFExpression.cpp (original)
+++ lldb/trunk/source/Expression/DWARFExpression.cpp Mon Apr 30 09:49:04 2018
@@ -679,8 +679,8 @@ static bool ReadRegisterValueAsScalar(Re
error_ptr->Clear();
return true;
} else {
- // If we get this error, then we need to implement a value
- // buffer in the dwarf expression evaluation function...
+ // If we get this error, then we need to implement a value buffer in
+ // the dwarf expression evaluation function...
if (error_ptr)
error_ptr->SetErrorStringWithFormat(
"register %s can't be converted to a scalar value",
@@ -991,17 +991,17 @@ bool DWARFExpression::Update_DW_OP_addr(
if (op == DW_OP_addr) {
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,
- // we then replace the data for this expression
+ // 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, we then replace the data
+ // for this expression
// So first we copy the data into a heap buffer
std::unique_ptr<DataBufferHeap> head_data_ap(
new DataBufferHeap(m_data.GetDataStart(), m_data.GetByteSize()));
- // Make en encoder so we can write the address into the buffer using
- // the correct byte order (endianness)
+ // Make en encoder so we can write the address into the buffer using the
+ // correct byte order (endianness)
DataEncoder encoder(head_data_ap->GetBytes(), head_data_ap->GetByteSize(),
m_data.GetByteOrder(), addr_byte_size);
@@ -1009,9 +1009,8 @@ bool DWARFExpression::Update_DW_OP_addr(
if (encoder.PutMaxU64(offset, addr_byte_size, file_addr) == UINT32_MAX)
return false;
- // All went well, so now we can reset the data using a shared
- // pointer to the heap data so "m_data" will now correctly
- // manage the heap data.
+ // All went well, so now we can reset the data using a shared pointer to
+ // the heap data so "m_data" will now correctly manage the heap data.
m_data.SetData(DataBufferSP(head_data_ap.release()));
return true;
} else {
@@ -1025,9 +1024,9 @@ bool DWARFExpression::Update_DW_OP_addr(
}
bool DWARFExpression::ContainsThreadLocalStorage() const {
- // We are assuming for now that any thread local variable will not
- // have a location list. This has been true for all thread local
- // variables we have seen so far produced by any compiler.
+ // We are assuming for now that any thread local variable will not have a
+ // location list. This has been true for all thread local variables we have
+ // seen so far produced by any compiler.
if (IsLocationList())
return false;
lldb::offset_t offset = 0;
@@ -1048,24 +1047,24 @@ bool DWARFExpression::LinkThreadLocalSto
lldb::ModuleSP new_module_sp,
std::function<lldb::addr_t(lldb::addr_t file_addr)> const
&link_address_callback) {
- // We are assuming for now that any thread local variable will not
- // have a location list. This has been true for all thread local
- // variables we have seen so far produced by any compiler.
+ // We are assuming for now that any thread local variable will not have a
+ // location list. This has been true for all thread local variables we have
+ // seen so far produced by any compiler.
if (IsLocationList())
return false;
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,
- // we then replace the data for this expression
+ // 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, we then replace the data for this
+ // expression
// So first we copy the data into a heap buffer
std::shared_ptr<DataBufferHeap> heap_data_sp(
new DataBufferHeap(m_data.GetDataStart(), m_data.GetByteSize()));
- // Make en encoder so we can write the address into the buffer using
- // the correct byte order (endianness)
+ // Make en encoder so we can write the address into the buffer using the
+ // correct byte order (endianness)
DataEncoder encoder(heap_data_sp->GetBytes(), heap_data_sp->GetByteSize(),
m_data.GetByteOrder(), addr_byte_size);
@@ -1080,8 +1079,7 @@ bool DWARFExpression::LinkThreadLocalSto
switch (op) {
case DW_OP_const4u:
// Remember the const offset in case we later have a
- // DW_OP_form_tls_address
- // or DW_OP_GNU_push_tls_address
+ // DW_OP_form_tls_address or DW_OP_GNU_push_tls_address
const_offset = offset;
const_value = m_data.GetU32(&offset);
decoded_data = true;
@@ -1090,8 +1088,7 @@ bool DWARFExpression::LinkThreadLocalSto
case DW_OP_const8u:
// Remember the const offset in case we later have a
- // DW_OP_form_tls_address
- // or DW_OP_GNU_push_tls_address
+ // DW_OP_form_tls_address or DW_OP_GNU_push_tls_address
const_offset = offset;
const_value = m_data.GetU64(&offset);
decoded_data = true;
@@ -1101,21 +1098,15 @@ bool DWARFExpression::LinkThreadLocalSto
case DW_OP_form_tls_address:
case DW_OP_GNU_push_tls_address:
// DW_OP_form_tls_address and DW_OP_GNU_push_tls_address must be preceded
- // by
- // a file address on the stack. We assume that DW_OP_const4u or
- // DW_OP_const8u
- // is used for these values, and we check that the last opcode we got
- // before
- // either of these was DW_OP_const4u or DW_OP_const8u. If so, then we can
- // link
- // the value accodingly. For Darwin, the value in the DW_OP_const4u or
- // DW_OP_const8u is the file address of a structure that contains a
- // function
- // pointer, the pthread key and the offset into the data pointed to by the
- // pthread key. So we must link this address and also set the module of
- // this
- // expression to the new_module_sp so we can resolve the file address
- // correctly
+ // by a file address on the stack. We assume that DW_OP_const4u or
+ // DW_OP_const8u is used for these values, and we check that the last
+ // opcode we got before either of these was DW_OP_const4u or
+ // DW_OP_const8u. If so, then we can link the value accodingly. For
+ // Darwin, the value in the DW_OP_const4u or DW_OP_const8u is the file
+ // address of a structure that contains a function pointer, the pthread
+ // key and the offset into the data pointed to by the pthread key. So we
+ // must link this address and also set the module of this expression to
+ // the new_module_sp so we can resolve the file address correctly
if (const_byte_size > 0) {
lldb::addr_t linked_file_addr = link_address_callback(const_value);
if (linked_file_addr == LLDB_INVALID_ADDRESS)
@@ -1144,8 +1135,8 @@ bool DWARFExpression::LinkThreadLocalSto
}
// If we linked the TLS address correctly, update the module so that when the
- // expression
- // is evaluated it can resolve the file address to a load address and read the
+ // expression is evaluated it can resolve the file address to a load address
+ // and read the
// TLS data
m_module_wp = new_module_sp;
m_data.SetData(heap_data_sp);
@@ -1397,11 +1388,11 @@ bool DWARFExpression::Evaluate(
// The DW_OP_addr_sect_offset4 is used for any location expressions in
// shared libraries that have a location like:
// DW_OP_addr(0x1000)
- // If this address resides in a shared library, then this virtual
- // address won't make sense when it is evaluated in the context of a
- // running process where shared libraries have been slid. To account for
- // this, this new address type where we can store the section pointer
- // and a 4 byte offset.
+ // If this address resides in a shared library, then this virtual address
+ // won't make sense when it is evaluated in the context of a running
+ // process where shared libraries have been slid. To account for this, this
+ // new address type where we can store the section pointer and a 4 byte
+ // offset.
//----------------------------------------------------------------------
// case DW_OP_addr_sect_offset4:
// {
@@ -1436,9 +1427,9 @@ bool DWARFExpression::Evaluate(
// OPCODE: DW_OP_deref
// OPERANDS: none
// DESCRIPTION: Pops the top stack entry and treats it as an address.
- // The value retrieved from that address is pushed. The size of the
- // data retrieved from the dereferenced address is the size of an
- // address on the target machine.
+ // The value retrieved from that address is pushed. The size of the data
+ // retrieved from the dereferenced address is the size of an address on the
+ // target machine.
//----------------------------------------------------------------------
case DW_OP_deref: {
if (stack.empty()) {
@@ -1500,13 +1491,13 @@ bool DWARFExpression::Evaluate(
// 1 - uint8_t that specifies the size of the data to dereference.
// DESCRIPTION: Behaves like the DW_OP_deref operation: it pops the top
// stack entry and treats it as an address. The value retrieved from that
- // address is pushed. In the DW_OP_deref_size operation, however, the
- // size in bytes of the data retrieved from the dereferenced address is
+ // address is pushed. In the DW_OP_deref_size operation, however, the size
+ // in bytes of the data retrieved from the dereferenced address is
// specified by the single operand. This operand is a 1-byte unsigned
// integral constant whose value may not be larger than the size of an
- // address on the target machine. The data retrieved is zero extended
- // to the size of an address on the target machine before being pushed
- // on the expression stack.
+ // address on the target machine. The data retrieved is zero extended to
+ // the size of an address on the target machine before being pushed on the
+ // expression stack.
//----------------------------------------------------------------------
case DW_OP_deref_size: {
if (stack.empty()) {
@@ -1525,8 +1516,7 @@ bool DWARFExpression::Evaluate(
// I can't decide whether the size operand should apply to the bytes in
// their
// lldb-host endianness or the target endianness.. I doubt this'll ever
- // come up
- // but I'll opt for assuming big endian regardless.
+ // come up but I'll opt for assuming big endian regardless.
switch (size) {
case 1:
ptr = ptr & 0xff;
@@ -1622,18 +1612,17 @@ bool DWARFExpression::Evaluate(
// OPERANDS: 1
// 1 - uint8_t that specifies the size of the data to dereference.
// DESCRIPTION: Behaves like the DW_OP_xderef operation: the entry at
- // the top of the stack is treated as an address. The second stack
- // entry is treated as an "address space identifier" for those
- // architectures that support multiple address spaces. The top two
- // stack elements are popped, a data item is retrieved through an
- // implementation-defined address calculation and pushed as the new
- // stack top. In the DW_OP_xderef_size operation, however, the size in
- // bytes of the data retrieved from the dereferenced address is
- // specified by the single operand. This operand is a 1-byte unsigned
- // integral constant whose value may not be larger than the size of an
- // address on the target machine. The data retrieved is zero extended
- // to the size of an address on the target machine before being pushed
- // on the expression stack.
+ // the top of the stack is treated as an address. The second stack entry is
+ // treated as an "address space identifier" for those architectures that
+ // support multiple address spaces. The top two stack elements are popped,
+ // a data item is retrieved through an implementation-defined address
+ // calculation and pushed as the new stack top. In the DW_OP_xderef_size
+ // operation, however, the size in bytes of the data retrieved from the
+ // dereferenced address is specified by the single operand. This operand is
+ // a 1-byte unsigned integral constant whose value may not be larger than
+ // the size of an address on the target machine. The data retrieved is zero
+ // extended to the size of an address on the target machine before being
+ // pushed on the expression stack.
//----------------------------------------------------------------------
case DW_OP_xderef_size:
if (error_ptr)
@@ -1643,13 +1632,13 @@ bool DWARFExpression::Evaluate(
// OPCODE: DW_OP_xderef
// OPERANDS: none
// DESCRIPTION: Provides an extended dereference mechanism. The entry at
- // the top of the stack is treated as an address. The second stack entry
- // is treated as an "address space identifier" for those architectures
- // that support multiple address spaces. The top two stack elements are
- // popped, a data item is retrieved through an implementation-defined
- // address calculation and pushed as the new stack top. The size of the
- // data retrieved from the dereferenced address is the size of an address
- // on the target machine.
+ // the top of the stack is treated as an address. The second stack entry is
+ // treated as an "address space identifier" for those architectures that
+ // support multiple address spaces. The top two stack elements are popped,
+ // a data item is retrieved through an implementation-defined address
+ // calculation and pushed as the new stack top. The size of the data
+ // retrieved from the dereferenced address is the size of an address on the
+ // target machine.
//----------------------------------------------------------------------
case DW_OP_xderef:
if (error_ptr)
@@ -1661,16 +1650,13 @@ bool DWARFExpression::Evaluate(
//
// Opcode Operand 1
// --------------- ----------------------------------------------------
- // DW_OP_const1u 1-byte unsigned integer constant
- // DW_OP_const1s 1-byte signed integer constant
- // DW_OP_const2u 2-byte unsigned integer constant
- // DW_OP_const2s 2-byte signed integer constant
- // DW_OP_const4u 4-byte unsigned integer constant
- // DW_OP_const4s 4-byte signed integer constant
- // DW_OP_const8u 8-byte unsigned integer constant
- // DW_OP_const8s 8-byte signed integer constant
- // DW_OP_constu unsigned LEB128 integer constant
- // DW_OP_consts signed LEB128 integer constant
+ // DW_OP_const1u 1-byte unsigned integer constant DW_OP_const1s
+ // 1-byte signed integer constant DW_OP_const2u 2-byte unsigned integer
+ // constant DW_OP_const2s 2-byte signed integer constant DW_OP_const4u
+ // 4-byte unsigned integer constant DW_OP_const4s 4-byte signed integer
+ // constant DW_OP_const8u 8-byte unsigned integer constant DW_OP_const8s
+ // 8-byte signed integer constant DW_OP_constu unsigned LEB128 integer
+ // constant DW_OP_consts signed LEB128 integer constant
//----------------------------------------------------------------------
case DW_OP_const1u:
stack.push_back(Scalar((uint8_t)opcodes.GetU8(&offset)));
@@ -1789,9 +1775,9 @@ bool DWARFExpression::Evaluate(
// OPCODE: DW_OP_rot
// OPERANDS: none
// DESCRIPTION: Rotates the first three stack entries. The entry at
- // the top of the stack becomes the third stack entry, the second
- // entry becomes the top of the stack, and the third entry becomes
- // the second entry.
+ // the top of the stack becomes the third stack entry, the second entry
+ // becomes the top of the stack, and the third entry becomes the second
+ // entry.
//----------------------------------------------------------------------
case DW_OP_rot:
if (stack.size() < 3) {
@@ -1853,8 +1839,8 @@ bool DWARFExpression::Evaluate(
// OPCODE: DW_OP_div
// OPERANDS: none
// DESCRIPTION: pops the top two stack values, divides the former second
- // entry by the former top of the stack using signed division, and
- // pushes the result.
+ // entry by the former top of the stack using signed division, and pushes
+ // the result.
//----------------------------------------------------------------------
case DW_OP_div:
if (stack.size() < 2) {
@@ -1905,8 +1891,8 @@ bool DWARFExpression::Evaluate(
// OPCODE: DW_OP_mod
// OPERANDS: none
// DESCRIPTION: pops the top two stack values and pushes the result of
- // the calculation: former second stack entry modulo the former top of
- // the stack.
+ // the calculation: former second stack entry modulo the former top of the
+ // stack.
//----------------------------------------------------------------------
case DW_OP_mod:
if (stack.size() < 2) {
@@ -2050,8 +2036,8 @@ bool DWARFExpression::Evaluate(
// OPCODE: DW_OP_shl
// OPERANDS: none
// DESCRIPTION: pops the top two stack entries, shifts the former
- // second entry left by the number of bits specified by the former top
- // of the stack, and pushes the result.
+ // second entry left by the number of bits specified by the former top of
+ // the stack, and pushes the result.
//----------------------------------------------------------------------
case DW_OP_shl:
if (stack.size() < 2) {
@@ -2096,8 +2082,8 @@ bool DWARFExpression::Evaluate(
// OPERANDS: none
// DESCRIPTION: pops the top two stack entries, shifts the former second
// entry right arithmetically (divide the magnitude by 2, keep the same
- // sign for the result) by the number of bits specified by the former
- // top of the stack, and pushes the result.
+ // sign for the result) by the number of bits specified by the former top
+ // of the stack, and pushes the result.
//----------------------------------------------------------------------
case DW_OP_shra:
if (stack.size() < 2) {
@@ -2136,8 +2122,8 @@ bool DWARFExpression::Evaluate(
// OPCODE: DW_OP_skip
// OPERANDS: int16_t
// DESCRIPTION: An unconditional branch. Its single operand is a 2-byte
- // signed integer constant. The 2-byte constant is the number of bytes
- // of the DWARF expression to skip forward or backward from the current
+ // signed integer constant. The 2-byte constant is the number of bytes of
+ // the DWARF expression to skip forward or backward from the current
// operation, beginning after the 2-byte constant.
//----------------------------------------------------------------------
case DW_OP_skip: {
@@ -2156,11 +2142,10 @@ bool DWARFExpression::Evaluate(
// OPCODE: DW_OP_bra
// OPERANDS: int16_t
// DESCRIPTION: A conditional branch. Its single operand is a 2-byte
- // signed integer constant. This operation pops the top of stack. If
- // the value popped is not the constant 0, the 2-byte constant operand
- // is the number of bytes of the DWARF expression to skip forward or
- // backward from the current operation, beginning after the 2-byte
- // constant.
+ // signed integer constant. This operation pops the top of stack. If the
+ // value popped is not the constant 0, the 2-byte constant operand is the
+ // number of bytes of the DWARF expression to skip forward or backward from
+ // the current operation, beginning after the 2-byte constant.
//----------------------------------------------------------------------
case DW_OP_bra:
if (stack.empty()) {
@@ -2537,15 +2522,15 @@ bool DWARFExpression::Evaluate(
// OPERANDS: 1
// ULEB128: byte size of the piece
// DESCRIPTION: The operand describes the size in bytes of the piece of
- // the object referenced by the DWARF expression whose result is at the
- // top of the stack. If the piece is located in a register, but does not
- // occupy the entire register, the placement of the piece within that
- // register is defined by the ABI.
+ // the object referenced by the DWARF expression whose result is at the top
+ // of the stack. If the piece is located in a register, but does not occupy
+ // the entire register, the placement of the piece within that register is
+ // defined by the ABI.
//
- // Many compilers store a single variable in sets of registers, or store
- // a variable partially in memory and partially in registers.
- // DW_OP_piece provides a way of describing how large a part of a
- // variable a particular DWARF expression refers to.
+ // Many compilers store a single variable in sets of registers, or store a
+ // variable partially in memory and partially in registers. DW_OP_piece
+ // provides a way of describing how large a part of a variable a particular
+ // DWARF expression refers to.
//----------------------------------------------------------------------
case DW_OP_piece: {
const uint64_t piece_byte_size = opcodes.GetULEB128(&offset);
@@ -2555,8 +2540,8 @@ bool DWARFExpression::Evaluate(
if (stack.empty()) {
// In a multi-piece expression, this means that the current piece is
- // not available.
- // Fill with zeros for now by resizing the data and appending it
+ // not available. Fill with zeros for now by resizing the data and
+ // appending it
curr_piece.ResizeData(piece_byte_size);
::memset(curr_piece.GetBuffer().GetBytes(), 0, piece_byte_size);
pieces.AppendDataToHostBuffer(curr_piece);
@@ -2646,9 +2631,9 @@ bool DWARFExpression::Evaluate(
// Check if this is the first piece?
if (op_piece_offset == 0) {
- // This is the first piece, we should push it back onto the stack so
- // subsequent
- // pieces will be able to access this piece and add to it
+ // This is the first piece, we should push it back onto the stack
+ // so subsequent pieces will be able to access this piece and add
+ // to it
if (pieces.AppendDataToHostBuffer(curr_piece) == 0) {
if (error_ptr)
error_ptr->SetErrorString("failed to append piece data");
@@ -2727,11 +2712,11 @@ bool DWARFExpression::Evaluate(
// OPCODE: DW_OP_push_object_address
// OPERANDS: none
// DESCRIPTION: Pushes the address of the object currently being
- // evaluated as part of evaluation of a user presented expression.
- // This object may correspond to an independent variable described by
- // its own DIE or it may be a component of an array, structure, or class
- // whose address has been dynamically determined by an earlier step
- // during user expression evaluation.
+ // evaluated as part of evaluation of a user presented expression. This
+ // object may correspond to an independent variable described by its own
+ // DIE or it may be a component of an array, structure, or class whose
+ // address has been dynamically determined by an earlier step during user
+ // expression evaluation.
//----------------------------------------------------------------------
case DW_OP_push_object_address:
if (object_address_ptr)
@@ -2749,21 +2734,20 @@ bool DWARFExpression::Evaluate(
// OPERANDS:
// uint16_t compile unit relative offset of a DIE
// DESCRIPTION: Performs subroutine calls during evaluation
- // of a DWARF expression. The operand is the 2-byte unsigned offset
- // of a debugging information entry in the current compilation unit.
+ // of a DWARF expression. The operand is the 2-byte unsigned offset of a
+ // debugging information entry in the current compilation unit.
//
// Operand interpretation is exactly like that for DW_FORM_ref2.
//
- // This operation transfers control of DWARF expression evaluation
- // to the DW_AT_location attribute of the referenced DIE. If there is
- // no such attribute, then there is no effect. Execution of the DWARF
- // expression of a DW_AT_location attribute may add to and/or remove from
- // values on the stack. Execution returns to the point following the call
- // when the end of the attribute is reached. Values on the stack at the
- // time of the call may be used as parameters by the called expression
- // and values left on the stack by the called expression may be used as
- // return values by prior agreement between the calling and called
- // expressions.
+ // This operation transfers control of DWARF expression evaluation to the
+ // DW_AT_location attribute of the referenced DIE. If there is no such
+ // attribute, then there is no effect. Execution of the DWARF expression of
+ // a DW_AT_location attribute may add to and/or remove from values on the
+ // stack. Execution returns to the point following the call when the end of
+ // the attribute is reached. Values on the stack at the time of the call
+ // may be used as parameters by the called expression and values left on
+ // the stack by the called expression may be used as return values by prior
+ // agreement between the calling and called expressions.
//----------------------------------------------------------------------
case DW_OP_call2:
if (error_ptr)
@@ -2774,22 +2758,21 @@ bool DWARFExpression::Evaluate(
// OPERANDS: 1
// uint32_t compile unit relative offset of a DIE
// DESCRIPTION: Performs a subroutine call during evaluation of a DWARF
- // expression. For DW_OP_call4, the operand is a 4-byte unsigned offset
- // of a debugging information entry in the current compilation unit.
+ // expression. For DW_OP_call4, the operand is a 4-byte unsigned offset of
+ // a debugging information entry in the current compilation unit.
//
// Operand interpretation DW_OP_call4 is exactly like that for
// DW_FORM_ref4.
//
- // This operation transfers control of DWARF expression evaluation
- // to the DW_AT_location attribute of the referenced DIE. If there is
- // no such attribute, then there is no effect. Execution of the DWARF
- // expression of a DW_AT_location attribute may add to and/or remove from
- // values on the stack. Execution returns to the point following the call
- // when the end of the attribute is reached. Values on the stack at the
- // time of the call may be used as parameters by the called expression
- // and values left on the stack by the called expression may be used as
- // return values by prior agreement between the calling and called
- // expressions.
+ // This operation transfers control of DWARF expression evaluation to the
+ // DW_AT_location attribute of the referenced DIE. If there is no such
+ // attribute, then there is no effect. Execution of the DWARF expression of
+ // a DW_AT_location attribute may add to and/or remove from values on the
+ // stack. Execution returns to the point following the call when the end of
+ // the attribute is reached. Values on the stack at the time of the call
+ // may be used as parameters by the called expression and values left on
+ // the stack by the called expression may be used as return values by prior
+ // agreement between the calling and called expressions.
//----------------------------------------------------------------------
case DW_OP_call4:
if (error_ptr)
@@ -2800,9 +2783,8 @@ bool DWARFExpression::Evaluate(
// OPCODE: DW_OP_stack_value
// OPERANDS: None
// DESCRIPTION: Specifies that the object does not exist in memory but
- // rather is a constant value. The value from the top of the stack is
- // the value to be used. This is the actual object value and not the
- // location.
+ // rather is a constant value. The value from the top of the stack is the
+ // value to be used. This is the actual object value and not the location.
//----------------------------------------------------------------------
case DW_OP_stack_value:
stack.back().SetValueType(Value::eValueTypeScalar);
@@ -2841,8 +2823,8 @@ bool DWARFExpression::Evaluate(
// opcode, DW_OP_GNU_push_tls_address)
// OPERANDS: none
// DESCRIPTION: Pops a TLS offset from the stack, converts it to
- // an address in the current thread's thread-local storage block,
- // and pushes it on the stack.
+ // an address in the current thread's thread-local storage block, and
+ // pushes it on the stack.
//----------------------------------------------------------------------
case DW_OP_form_tls_address:
case DW_OP_GNU_push_tls_address: {
@@ -2893,8 +2875,8 @@ bool DWARFExpression::Evaluate(
// OPERANDS: 1
// ULEB128: index to the .debug_addr section
// DESCRIPTION: Pushes an address to the stack from the .debug_addr
- // section with the base address specified by the DW_AT_addr_base
- // attribute and the 0 based index is the ULEB128 encoded index.
+ // section with the base address specified by the DW_AT_addr_base attribute
+ // and the 0 based index is the ULEB128 encoded index.
//----------------------------------------------------------------------
case DW_OP_GNU_addr_index: {
if (!dwarf_cu) {
Modified: lldb/trunk/source/Expression/DiagnosticManager.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/DiagnosticManager.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Expression/DiagnosticManager.cpp (original)
+++ lldb/trunk/source/Expression/DiagnosticManager.cpp Mon Apr 30 09:49:04 2018
@@ -22,9 +22,8 @@ void DiagnosticManager::Dump(Log *log) {
std::string str = GetString();
- // GetString() puts a separator after each diagnostic.
- // We want to remove the last '\n' because log->PutCString will add one for
- // us.
+ // GetString() puts a separator after each diagnostic. We want to remove the
+ // last '\n' because log->PutCString will add one for us.
if (str.size() && str.back() == '\n') {
str.pop_back();
Modified: lldb/trunk/source/Expression/ExpressionSourceCode.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/ExpressionSourceCode.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Expression/ExpressionSourceCode.cpp (original)
+++ lldb/trunk/source/Expression/ExpressionSourceCode.cpp Mon Apr 30 09:49:04 2018
@@ -93,15 +93,15 @@ public:
m_state = CURRENT_FILE_POPPED;
}
- // An entry is valid if it occurs before the current line in
- // the current file.
+ // An entry is valid if it occurs before the current line in the current
+ // file.
bool IsValidEntry(uint32_t line) {
switch (m_state) {
case CURRENT_FILE_NOT_YET_PUSHED:
return true;
case CURRENT_FILE_PUSHED:
- // If we are in file included in the current file,
- // the entry should be added.
+ // If we are in file included in the current file, the entry should be
+ // added.
if (m_file_stack.back() != m_current_file)
return true;
Modified: lldb/trunk/source/Expression/ExpressionVariable.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/ExpressionVariable.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Expression/ExpressionVariable.cpp (original)
+++ lldb/trunk/source/Expression/ExpressionVariable.cpp Mon Apr 30 09:49:04 2018
@@ -69,8 +69,8 @@ void PersistentExpressionState::Register
execution_unit_sp->GetJittedGlobalVariables()) {
if (global_var.m_remote_addr != LLDB_INVALID_ADDRESS) {
// Demangle the name before inserting it, so that lookups by the ConstStr
- // of the demangled name
- // will find the mangled one (needed for looking up metadata pointers.)
+ // of the demangled name will find the mangled one (needed for looking up
+ // metadata pointers.)
Mangled mangler(global_var.m_name);
mangler.GetDemangledName(lldb::eLanguageTypeUnknown);
m_symbol_map[global_var.m_name.GetCString()] = global_var.m_remote_addr;
Modified: lldb/trunk/source/Expression/FunctionCaller.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/FunctionCaller.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Expression/FunctionCaller.cpp (original)
+++ lldb/trunk/source/Expression/FunctionCaller.cpp Mon Apr 30 09:49:04 2018
@@ -318,9 +318,9 @@ lldb::ExpressionResults FunctionCaller::
DiagnosticManager &diagnostic_manager, Value &results) {
lldb::ExpressionResults return_value = lldb::eExpressionSetupError;
- // FunctionCaller::ExecuteFunction execution is always just to get the result.
- // Do make sure we ignore
- // breakpoints, unwind on error, and don't try to debug it.
+ // FunctionCaller::ExecuteFunction execution is always just to get the
+ // result. Do make sure we ignore breakpoints, unwind on error, and don't try
+ // to debug it.
EvaluateExpressionOptions real_options = options;
real_options.SetDebug(false);
real_options.SetUnwindOnError(true);
@@ -355,9 +355,8 @@ lldb::ExpressionResults FunctionCaller::
return lldb::eExpressionSetupError;
// We need to make sure we record the fact that we are running an expression
- // here
- // otherwise this fact will fail to be recorded when fetching an Objective-C
- // object description
+ // here otherwise this fact will fail to be recorded when fetching an
+ // Objective-C object description
if (exe_ctx.GetProcessPtr())
exe_ctx.GetProcessPtr()->SetRunningUserExpression(true);
Modified: lldb/trunk/source/Expression/IRExecutionUnit.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/IRExecutionUnit.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Expression/IRExecutionUnit.cpp (original)
+++ lldb/trunk/source/Expression/IRExecutionUnit.cpp Mon Apr 30 09:49:04 2018
@@ -362,13 +362,10 @@ void IRExecutionUnit::GetRunnableInfo(St
ReportAllocations(*m_execution_engine_ap);
// We have to do this after calling ReportAllocations because for the MCJIT,
- // getGlobalValueAddress
- // will cause the JIT to perform all relocations. That can only be done once,
- // and has to happen
- // after we do the remapping from local -> remote.
- // That means we don't know the local address of the Variables, but we don't
- // need that for anything,
- // so that's okay.
+ // getGlobalValueAddress will cause the JIT to perform all relocations. That
+ // can only be done once, and has to happen after we do the remapping from
+ // local -> remote. That means we don't know the local address of the
+ // Variables, but we don't need that for anything, so that's okay.
std::function<void(llvm::GlobalValue &)> RegisterOneValue = [this](
llvm::GlobalValue &val) {
@@ -379,8 +376,8 @@ void IRExecutionUnit::GetRunnableInfo(St
lldb::addr_t remote_addr = GetRemoteAddressForLocal(var_ptr_addr);
// This is a really unfortunae API that sometimes returns local addresses
- // and sometimes returns remote addresses, based on whether
- // the variable was relocated during ReportAllocations or not.
+ // and sometimes returns remote addresses, based on whether the variable
+ // was relocated during ReportAllocations or not.
if (remote_addr == LLDB_INVALID_ADDRESS) {
remote_addr = var_ptr_addr;
@@ -882,8 +879,8 @@ lldb::addr_t IRExecutionUnit::FindInSymb
if (get_external_load_address(load_address, sc_list, sc)) {
return load_address;
}
- // if there are any searches we try after this, add an sc_list.Clear() in an
- // "else" clause here
+ // if there are any searches we try after this, add an sc_list.Clear() in
+ // an "else" clause here
if (best_internal_load_address != LLDB_INVALID_ADDRESS) {
return best_internal_load_address;
Modified: lldb/trunk/source/Expression/IRInterpreter.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/IRInterpreter.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Expression/IRInterpreter.cpp (original)
+++ lldb/trunk/source/Expression/IRInterpreter.cpp Mon Apr 30 09:49:04 2018
@@ -1567,8 +1567,8 @@ bool IRInterpreter::Interpret(llvm::Modu
return false;
}
- // Push all function arguments to the argument list that will
- // be passed to the call function thread plan
+ // Push all function arguments to the argument list that will be passed
+ // to the call function thread plan
for (int i = 0; i < numArgs; i++) {
// Get details of this argument
llvm::Value *arg_op = call_inst->getArgOperand(i);
Modified: lldb/trunk/source/Expression/IRMemoryMap.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/IRMemoryMap.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Expression/IRMemoryMap.cpp (original)
+++ lldb/trunk/source/Expression/IRMemoryMap.cpp Mon Apr 30 09:49:04 2018
@@ -49,8 +49,8 @@ lldb::addr_t IRMemoryMap::FindSpace(size
//
// The memory returned by this function will never be written to. The only
// point is that it should not shadow process memory if possible, so that
- // expressions processing real values from the process do not use the
- // wrong data.
+ // expressions processing real values from the process do not use the wrong
+ // data.
//
// If the process can in fact allocate memory (CanJIT() lets us know this)
// then this can be accomplished just be allocating memory in the inferior.
@@ -93,8 +93,8 @@ lldb::addr_t IRMemoryMap::FindSpace(size
}
// Now, if it's possible to use the GetMemoryRegionInfo API to detect mapped
- // regions, walk forward through memory until a region is found that
- // has adequate space for our allocation.
+ // regions, walk forward through memory until a region is found that has
+ // adequate space for our allocation.
if (process_is_alive) {
const uint64_t end_of_memory = process_sp->GetAddressByteSize() == 8
? 0xffffffffffffffffull
@@ -188,16 +188,12 @@ bool IRMemoryMap::IntersectsAllocation(l
AllocationMap::const_iterator iter = m_allocations.lower_bound(addr);
// Since we only know that the returned interval begins at a location greater
- // than or
- // equal to where the given interval begins, it's possible that the given
- // interval
- // intersects either the returned interval or the previous interval. Thus, we
- // need to
- // check both. Note that we only need to check these two intervals. Since all
- // intervals
- // are disjoint it is not possible that an adjacent interval does not
- // intersect, but a
- // non-adjacent interval does intersect.
+ // than or equal to where the given interval begins, it's possible that the
+ // given interval intersects either the returned interval or the previous
+ // interval. Thus, we need to check both. Note that we only need to check
+ // these two intervals. Since all intervals are disjoint it is not possible
+ // that an adjacent interval does not intersect, but a non-adjacent interval
+ // does intersect.
if (iter != m_allocations.end()) {
if (AllocationsIntersect(addr, size, iter->second.m_process_start,
iter->second.m_size))
@@ -217,16 +213,15 @@ bool IRMemoryMap::IntersectsAllocation(l
bool IRMemoryMap::AllocationsIntersect(lldb::addr_t addr1, size_t size1,
lldb::addr_t addr2, size_t size2) {
// Given two half open intervals [A, B) and [X, Y), the only 6 permutations
- // that satisfy
- // A<B and X<Y are the following:
+ // that satisfy A<B and X<Y are the following:
// A B X Y
// A X B Y (intersects)
// A X Y B (intersects)
// X A B Y (intersects)
// X A Y B (intersects)
// X Y A B
- // The first is B <= X, and the last is Y <= A.
- // So the condition is !(B <= X || Y <= A)), or (X < B && A < Y)
+ // The first is B <= X, and the last is Y <= A. So the condition is !(B <= X
+ // || Y <= A)), or (X < B && A < Y)
return (addr2 < (addr1 + size1)) && (addr1 < (addr2 + size2));
}
Modified: lldb/trunk/source/Expression/LLVMUserExpression.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/LLVMUserExpression.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Expression/LLVMUserExpression.cpp (original)
+++ lldb/trunk/source/Expression/LLVMUserExpression.cpp Mon Apr 30 09:49:04 2018
@@ -74,9 +74,8 @@ LLVMUserExpression::DoExecute(Diagnostic
lldb::UserExpressionSP &shared_ptr_to_me,
lldb::ExpressionVariableSP &result) {
// The expression log is quite verbose, and if you're just tracking the
- // execution of the
- // expression, it's quite convenient to have these logs come out with the STEP
- // log as well.
+ // execution of the expression, it's quite convenient to have these logs come
+ // out with the STEP log as well.
Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_EXPRESSIONS |
LIBLLDB_LOG_STEP));
Modified: lldb/trunk/source/Expression/Materializer.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/Materializer.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Expression/Materializer.cpp (original)
+++ lldb/trunk/source/Expression/Materializer.cpp Mon Apr 30 09:49:04 2018
@@ -77,7 +77,8 @@ public:
void MakeAllocation(IRMemoryMap &map, Status &err) {
Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS));
- // Allocate a spare memory area to store the persistent variable's contents.
+ // Allocate a spare memory area to store the persistent variable's
+ // contents.
Status allocate_error;
const bool zero_memory = false;
@@ -230,8 +231,8 @@ public:
ExpressionVariable::EVIsProgramReference &&
!m_persistent_variable_sp->m_live_sp) {
// If the reference comes from the program, then the
- // ClangExpressionVariable's
- // live variable data hasn't been set up yet. Do this now.
+ // ClangExpressionVariable's live variable data hasn't been set up yet.
+ // Do this now.
lldb::addr_t location;
Status read_error;
@@ -256,10 +257,8 @@ public:
frame_bottom != LLDB_INVALID_ADDRESS && location >= frame_bottom &&
location <= frame_top) {
// If the variable is resident in the stack frame created by the
- // expression,
- // then it cannot be relied upon to stay around. We treat it as
- // needing
- // reallocation.
+ // expression, then it cannot be relied upon to stay around. We
+ // treat it as needing reallocation.
m_persistent_variable_sp->m_flags |=
ExpressionVariable::EVIsLLDBAllocated;
m_persistent_variable_sp->m_flags |=
Modified: lldb/trunk/source/Expression/REPL.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/REPL.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Expression/REPL.cpp (original)
+++ lldb/trunk/source/Expression/REPL.cpp Mon Apr 30 09:49:04 2018
@@ -243,10 +243,8 @@ void REPL::IOHandlerInputComplete(IOHand
IOHandler::Type::REPL, IOHandler::Type::CommandInterpreter)) {
// We typed "quit" or an alias to quit so we need to check if the
// command interpreter is above us and tell it that it is done as
- // well
- // so we don't drop back into the command interpreter if we have
- // already
- // quit
+ // well so we don't drop back into the command interpreter if we
+ // have already quit
lldb::IOHandlerSP io_handler_sp(ci.GetIOHandler());
if (io_handler_sp)
io_handler_sp->SetIsDone(true);
@@ -444,8 +442,8 @@ void REPL::IOHandlerInputComplete(IOHand
}
}
- // Don't complain about the REPL process going away if we are in the process
- // of quitting.
+ // Don't complain about the REPL process going away if we are in the
+ // process of quitting.
if (!did_quit && (!process_sp || !process_sp->IsAlive())) {
error_sp->Printf(
"error: REPL process is no longer alive, exiting REPL\n");
@@ -542,11 +540,9 @@ Status REPL::RunLoop() {
debugger.PushIOHandler(io_handler_sp);
- // Check if we are in dedicated REPL mode where LLDB was start with the
- // "--repl" option
- // from the command line. Currently we know this by checking if the debugger
- // already
- // has a IOHandler thread.
+ // Check if we are in dedicated REPL mode where LLDB was start with the "--
+ // repl" option from the command line. Currently we know this by checking if
+ // the debugger already has a IOHandler thread.
if (!debugger.HasIOHandlerThread()) {
// The debugger doesn't have an existing IOHandler thread, so this must be
// dedicated REPL mode...
@@ -566,8 +562,8 @@ Status REPL::RunLoop() {
io_handler_sp->WaitForPop();
if (m_dedicated_repl_mode) {
- // If we were in dedicated REPL mode we would have started the
- // IOHandler thread, and we should kill our process
+ // If we were in dedicated REPL mode we would have started the IOHandler
+ // thread, and we should kill our process
lldb::ProcessSP process_sp = m_target.GetProcessSP();
if (process_sp && process_sp->IsAlive())
process_sp->Destroy(false);
Modified: lldb/trunk/source/Expression/UserExpression.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/UserExpression.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Expression/UserExpression.cpp (original)
+++ lldb/trunk/source/Expression/UserExpression.cpp Mon Apr 30 09:49:04 2018
@@ -179,9 +179,8 @@ lldb::ExpressionResults UserExpression::
execution_policy = eExecutionPolicyNever;
// We need to set the expression execution thread here, turns out parse can
- // call functions in the process of
- // looking up symbols, which will escape the context set by exe_ctx passed to
- // Execute.
+ // call functions in the process of looking up symbols, which will escape the
+ // context set by exe_ctx passed to Execute.
lldb::ThreadSP thread_sp = exe_ctx.GetThreadSP();
ThreadList::ExpressionExecutionThreadPusher execution_thread_pusher(
thread_sp);
@@ -198,9 +197,9 @@ lldb::ExpressionResults UserExpression::
else
full_prefix = option_prefix;
- // If the language was not specified in the expression command,
- // set it to the language in the target's properties if
- // specified, else default to the langage for the frame.
+ // If the language was not specified in the expression command, set it to the
+ // language in the target's properties if specified, else default to the
+ // langage for the frame.
if (language == lldb::eLanguageTypeUnknown) {
if (target->GetLanguage() != lldb::eLanguageTypeUnknown)
language = target->GetLanguage();
Modified: lldb/trunk/source/Host/android/HostInfoAndroid.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/android/HostInfoAndroid.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Host/android/HostInfoAndroid.cpp (original)
+++ lldb/trunk/source/Host/android/HostInfoAndroid.cpp Mon Apr 30 09:49:04 2018
@@ -79,13 +79,10 @@ bool HostInfoAndroid::ComputeTempFileBas
bool success = HostInfoLinux::ComputeTempFileBaseDirectory(file_spec);
// On Android, there is no path which is guaranteed to be writable. If the
- // user has not
- // provided a path via an environment variable, the generic algorithm will
- // deduce /tmp, which
- // is plain wrong. In that case we have an invalid directory, we substitute
- // the path with
- // /data/local/tmp, which is correct at least in some cases (i.e., when
- // running as shell user).
+ // user has not provided a path via an environment variable, the generic
+ // algorithm will deduce /tmp, which is plain wrong. In that case we have an
+ // invalid directory, we substitute the path with /data/local/tmp, which is
+ // correct at least in some cases (i.e., when running as shell user).
if (!success || !file_spec.Exists())
file_spec = FileSpec("/data/local/tmp", false);
Modified: lldb/trunk/source/Host/common/Editline.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/Editline.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Host/common/Editline.cpp (original)
+++ lldb/trunk/source/Host/common/Editline.cpp Mon Apr 30 09:49:04 2018
@@ -33,8 +33,8 @@ using namespace lldb_private::line_edito
// doesn't explicitly initialize the curses termcap library, which it gets away
// with until TERM is set to VT100 where it stumbles over an implementation
// assumption that may not exist on other platforms. The setupterm() function
-// would normally require headers that don't work gracefully in this context, so
-// the function declaraction has been hoisted here.
+// would normally require headers that don't work gracefully in this context,
+// so the function declaraction has been hoisted here.
#if defined(__APPLE__)
extern "C" {
int setupterm(char *term, int fildes, int *errret);
@@ -43,12 +43,10 @@ int setupterm(char *term, int fildes, in
#endif
// Editline uses careful cursor management to achieve the illusion of editing a
-// multi-line block of text
-// with a single line editor. Preserving this illusion requires fairly careful
-// management of cursor
-// state. Read and understand the relationship between DisplayInput(),
-// MoveCursor(), SetCurrentLine(),
-// and SaveEditedLine() before making changes.
+// multi-line block of text with a single line editor. Preserving this
+// illusion requires fairly careful management of cursor state. Read and
+// understand the relationship between DisplayInput(), MoveCursor(),
+// SetCurrentLine(), and SaveEditedLine() before making changes.
#define ESCAPE "\x1b"
#define ANSI_FAINT ESCAPE "[2m"
@@ -70,8 +68,7 @@ int setupterm(char *term, int fildes, in
#define EditLineStringFormatSpec "%s"
// use #defines so wide version functions and structs will resolve to old
-// versions
-// for case of libedit not built with wide char support
+// versions for case of libedit not built with wide char support
#define history_w history
#define history_winit history_init
#define history_wend history_end
@@ -145,10 +142,8 @@ bool IsInputPending(FILE *file) {
// FIXME: This will be broken on Windows if we ever re-enable Editline. You
// can't use select
// on something that isn't a socket. This will have to be re-written to not
- // use a FILE*, but
- // instead use some kind of yet-to-be-created abstraction that select-like
- // functionality on
- // non-socket objects.
+ // use a FILE*, but instead use some kind of yet-to-be-created abstraction
+ // that select-like functionality on non-socket objects.
const int fd = fileno(file);
SelectHelper select_helper;
select_helper.SetTimeout(std::chrono::microseconds(0));
@@ -160,13 +155,13 @@ namespace lldb_private {
namespace line_editor {
typedef std::weak_ptr<EditlineHistory> EditlineHistoryWP;
-// EditlineHistory objects are sometimes shared between multiple
-// Editline instances with the same program name.
+// EditlineHistory objects are sometimes shared between multiple Editline
+// instances with the same program name.
class EditlineHistory {
private:
- // Use static GetHistory() function to get a EditlineHistorySP to one of these
- // objects
+ // Use static GetHistory() function to get a EditlineHistorySP to one of
+ // these objects
EditlineHistory(const std::string &prefix, uint32_t size, bool unique_entries)
: m_history(NULL), m_event(), m_prefix(prefix), m_path() {
m_history = history_winit();
@@ -436,11 +431,10 @@ unsigned char Editline::RecallHistory(bo
if (history_w(pHistory, &history_event, H_FIRST) == -1)
return CC_ERROR;
- // Save any edits to the "live" entry in case we return by moving forward in
- // history
- // (it would be more bash-like to save over any current entry, but libedit
- // doesn't
- // offer the ability to add entries anywhere except the end.)
+ // Save any edits to the "live" entry in case we return by moving forward
+ // in history (it would be more bash-like to save over any current entry,
+ // but libedit doesn't offer the ability to add entries anywhere except the
+ // end.)
SaveEditedLine();
m_live_history_lines = m_input_lines;
m_in_history = true;
@@ -466,8 +460,7 @@ unsigned char Editline::RecallHistory(bo
DisplayInput();
// Prepare to edit the last line when moving to previous entry, or the first
- // line
- // when moving to next entry
+ // line when moving to next entry
SetCurrentLine(m_current_line_index =
earlier ? (int)m_input_lines.size() - 1 : 0);
MoveCursor(CursorLocation::BlockEnd, CursorLocation::EditingPrompt);
@@ -490,8 +483,8 @@ int Editline::GetCharacter(EditLineGetCh
}
if (m_multiline_enabled) {
- // Detect when the number of rows used for this input line changes due to an
- // edit
+ // Detect when the number of rows used for this input line changes due to
+ // an edit
int lineLength = (int)((info->lastchar - info->buffer) + GetPromptWidth());
int new_line_rows = (lineLength / m_terminal_width) + 1;
if (m_current_line_rows != -1 && new_line_rows != m_current_line_rows) {
@@ -510,12 +503,10 @@ int Editline::GetCharacter(EditLineGetCh
char ch = 0;
// This mutex is locked by our caller (GetLine). Unlock it while we read a
- // character
- // (blocking operation), so we do not hold the mutex indefinitely. This
- // gives a chance
- // for someone to interrupt us. After Read returns, immediately lock the
- // mutex again and
- // check if we were interrupted.
+ // character (blocking operation), so we do not hold the mutex
+ // indefinitely. This gives a chance for someone to interrupt us. After
+ // Read returns, immediately lock the mutex again and check if we were
+ // interrupted.
m_output_mutex.unlock();
int read_count = m_input_connection.Read(&ch, 1, llvm::None, status, NULL);
m_output_mutex.lock();
@@ -614,7 +605,8 @@ unsigned char Editline::EndOrAddLineComm
// Save any edits to this line
SaveEditedLine();
- // If this is the end of the last line, consider whether to add a line instead
+ // If this is the end of the last line, consider whether to add a line
+ // instead
const LineInfoW *info = el_wline(m_editline);
if (m_current_line_index == m_input_lines.size() - 1 &&
info->cursor == info->lastchar) {
@@ -653,8 +645,8 @@ unsigned char Editline::DeleteNextCharCo
return CC_REFRESH;
}
- // Fail when at the end of the last line, except when ^D is pressed on
- // the line is empty, in which case it is treated as EOF
+ // Fail when at the end of the last line, except when ^D is pressed on the
+ // line is empty, in which case it is treated as EOF
if (m_current_line_index == m_input_lines.size() - 1) {
if (ch == 4 && info->buffer == info->lastchar) {
fprintf(m_output_file, "^D\n");
@@ -685,7 +677,8 @@ unsigned char Editline::DeleteNextCharCo
unsigned char Editline::DeletePreviousCharCommand(int ch) {
LineInfoW *info = const_cast<LineInfoW *>(el_wline(m_editline));
- // Just delete the previous character normally when not at the start of a line
+ // Just delete the previous character normally when not at the start of a
+ // line
if (info->cursor > info->buffer) {
el_deletestr(m_editline, 1);
return CC_REFRESH;
@@ -709,8 +702,7 @@ unsigned char Editline::DeletePreviousCh
DisplayInput(m_current_line_index);
// Put the cursor back where libedit expects it to be before returning to
- // editing
- // by telling libedit about the newly inserted text
+ // editing by telling libedit about the newly inserted text
MoveCursor(CursorLocation::BlockEnd, CursorLocation::EditingPrompt);
el_winsertstr(m_editline, priorLine.c_str());
return CC_REDISPLAY;
@@ -762,7 +754,8 @@ unsigned char Editline::NextLineCommand(
EditLineStringType(indentation, EditLineCharType(' ')));
}
- // Move down past the current line using newlines to force scrolling if needed
+ // Move down past the current line using newlines to force scrolling if
+ // needed
SetCurrentLine(m_current_line_index + 1);
const LineInfoW *info = el_wline(m_editline);
int cursor_position = (int)((info->cursor - info->buffer) + GetPromptWidth());
@@ -824,8 +817,7 @@ unsigned char Editline::FixIndentationCo
DisplayInput(m_current_line_index);
// Reposition the cursor back on the original line and prepare to restart
- // editing
- // with a new cursor position
+ // editing with a new cursor position
SetCurrentLine(m_current_line_index);
MoveCursor(CursorLocation::BlockEnd, CursorLocation::EditingPrompt);
m_revert_cursor_index = cursor_position + indent_correction;
@@ -945,9 +937,9 @@ void Editline::ConfigureEditor(bool mult
m_multiline_enabled = multiline;
if (m_editline) {
- // Disable edit mode to stop the terminal from flushing all input
- // during the call to el_end() since we expect to have multiple editline
- // instances in this program.
+ // Disable edit mode to stop the terminal from flushing all input during
+ // the call to el_end() since we expect to have multiple editline instances
+ // in this program.
el_set(m_editline, EL_EDITMODE, 0);
el_end(m_editline);
}
@@ -973,7 +965,8 @@ void Editline::ConfigureEditor(bool mult
return Editline::InstanceFor(editline)->GetCharacter(c);
}));
- // Commands used for multiline support, registered whether or not they're used
+ // Commands used for multiline support, registered whether or not they're
+ // used
el_wset(m_editline, EL_ADDFN, EditLineConstString("lldb-break-line"),
EditLineConstString("Insert a line break"),
(EditlineCommandCallbackType)([](EditLine *editline, int ch) {
@@ -1031,13 +1024,11 @@ void Editline::ConfigureEditor(bool mult
return Editline::InstanceFor(editline)->FixIndentationCommand(ch);
}));
- // Register the complete callback under two names for compatibility with older
- // clients using
- // custom .editrc files (largely because libedit has a bad bug where if you
- // have a bind command
- // that tries to bind to a function name that doesn't exist, it can corrupt
- // the heap and
- // crash your process later.)
+ // Register the complete callback under two names for compatibility with
+ // older clients using custom .editrc files (largely because libedit has a
+ // bad bug where if you have a bind command that tries to bind to a function
+ // name that doesn't exist, it can corrupt the heap and crash your process
+ // later.)
EditlineCommandCallbackType complete_callback = [](EditLine *editline,
int ch) {
return Editline::InstanceFor(editline)->TabCommand(ch);
@@ -1118,8 +1109,7 @@ void Editline::ConfigureEditor(bool mult
NULL);
// Escape is absorbed exiting edit mode, so re-register important
- // sequences
- // without the prefix
+ // sequences without the prefix
el_set(m_editline, EL_BIND, "-a", "[A", "lldb-previous-line", NULL);
el_set(m_editline, EL_BIND, "-a", "[B", "lldb-next-line", NULL);
el_set(m_editline, EL_BIND, "-a", "[\\^", "lldb-revert-line", NULL);
@@ -1176,18 +1166,18 @@ Editline::Editline(const char *editline_
Editline::~Editline() {
if (m_editline) {
- // Disable edit mode to stop the terminal from flushing all input
- // during the call to el_end() since we expect to have multiple editline
- // instances in this program.
+ // Disable edit mode to stop the terminal from flushing all input during
+ // the call to el_end() since we expect to have multiple editline instances
+ // in this program.
el_set(m_editline, EL_EDITMODE, 0);
el_end(m_editline);
m_editline = nullptr;
}
- // EditlineHistory objects are sometimes shared between multiple
- // Editline instances with the same program name. So just release
- // our shared pointer and if we are the last owner, it will save the
- // history to the history save file automatically.
+ // EditlineHistory objects are sometimes shared between multiple Editline
+ // instances with the same program name. So just release our shared pointer
+ // and if we are the last owner, it will save the history to the history save
+ // file automatically.
m_history_sp.reset();
}
@@ -1313,8 +1303,8 @@ bool Editline::GetLines(int first_line_n
bool &interrupted) {
ConfigureEditor(true);
- // Print the initial input lines, then move the cursor back up to the start of
- // input
+ // Print the initial input lines, then move the cursor back up to the start
+ // of input
SetBaseLineNumber(first_line_number);
m_input_lines = std::vector<EditLineStringType>();
m_input_lines.insert(m_input_lines.begin(), EditLineConstString(""));
Modified: lldb/trunk/source/Host/common/File.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/File.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Host/common/File.cpp (original)
+++ lldb/trunk/source/Host/common/File.cpp Mon Apr 30 09:49:04 2018
@@ -126,8 +126,8 @@ FILE *File::GetStream() {
const char *mode = GetStreamOpenModeFromOptions(m_options);
if (mode) {
if (!m_should_close_fd) {
-// We must duplicate the file descriptor if we don't own it because
-// when you call fdopen, the stream will own the fd
+// We must duplicate the file descriptor if we don't own it because when you
+// call fdopen, the stream will own the fd
#ifdef _WIN32
m_descriptor = ::_dup(GetDescriptor());
#else
@@ -139,8 +139,8 @@ FILE *File::GetStream() {
m_stream =
llvm::sys::RetryAfterSignal(nullptr, ::fdopen, m_descriptor, mode);
- // If we got a stream, then we own the stream and should no
- // longer own the descriptor because fclose() will close it for us
+ // If we got a stream, then we own the stream and should no longer own
+ // the descriptor because fclose() will close it for us
if (m_stream) {
m_own_stream = true;
Modified: lldb/trunk/source/Host/common/Host.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/Host.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Host/common/Host.cpp (original)
+++ lldb/trunk/source/Host/common/Host.cpp Mon Apr 30 09:49:04 2018
@@ -119,9 +119,8 @@ HostThread Host::StartMonitoringChildPro
#ifndef __linux__
//------------------------------------------------------------------
-// Scoped class that will disable thread canceling when it is
-// constructed, and exception safely restore the previous value it
-// when it goes out of scope.
+// Scoped class that will disable thread canceling when it is constructed, and
+// exception safely restore the previous value it when it goes out of scope.
//------------------------------------------------------------------
class ScopedPThreadCancelDisabler {
public:
@@ -270,8 +269,7 @@ static thread_result_t MonitorChildProce
__FUNCTION__, arg);
break;
}
- // If the callback returns true, it means this process should
- // exit
+ // If the callback returns true, it means this process should exit
if (callback_return) {
if (log)
log->Printf("%s (arg = %p) thread exiting because callback "
@@ -497,9 +495,9 @@ Status Host::RunShellCommand(const Args
llvm::SmallString<PATH_MAX> output_file_path;
if (command_output_ptr) {
- // Create a temporary file to get the stdout/stderr and redirect the
- // output of the command into this file. We will later read this file
- // if all goes well and fill the data into "command_output_ptr"
+ // Create a temporary file to get the stdout/stderr and redirect the output
+ // of the command into this file. We will later read this file if all goes
+ // well and fill the data into "command_output_ptr"
FileSpec tmpdir_file_spec;
if (HostInfo::GetLLDBPath(ePathTypeLLDBTempSystemDir, tmpdir_file_spec)) {
tmpdir_file_spec.AppendPathComponent("lldb-shell-output.%%%%%%");
@@ -580,7 +578,8 @@ Status Host::RunShellCommand(const Args
return error;
}
-// The functions below implement process launching for non-Apple-based platforms
+// The functions below implement process launching for non-Apple-based
+// platforms
#if !defined(__APPLE__)
Status Host::LaunchProcess(ProcessLaunchInfo &launch_info) {
std::unique_ptr<ProcessLauncher> delegate_launcher;
@@ -595,8 +594,7 @@ Status Host::LaunchProcess(ProcessLaunch
HostProcess process = launcher.LaunchProcess(launch_info, error);
// TODO(zturner): It would be better if the entire HostProcess were returned
- // instead of writing
- // it into this structure.
+ // instead of writing it into this structure.
launch_info.SetProcessID(process.GetProcessId());
return error;
Modified: lldb/trunk/source/Host/common/HostInfoBase.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/HostInfoBase.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Host/common/HostInfoBase.cpp (original)
+++ lldb/trunk/source/Host/common/HostInfoBase.cpp Mon Apr 30 09:49:04 2018
@@ -33,19 +33,19 @@ using namespace lldb_private;
namespace {
//----------------------------------------------------------------------
-// The HostInfoBaseFields is a work around for windows not supporting
-// static variables correctly in a thread safe way. Really each of the
-// variables in HostInfoBaseFields should live in the functions in which
-// they are used and each one should be static, but the work around is
-// in place to avoid this restriction. Ick.
+// The HostInfoBaseFields is a work around for windows not supporting static
+// variables correctly in a thread safe way. Really each of the variables in
+// HostInfoBaseFields should live in the functions in which they are used and
+// each one should be static, but the work around is in place to avoid this
+// restriction. Ick.
//----------------------------------------------------------------------
struct HostInfoBaseFields {
~HostInfoBaseFields() {
if (m_lldb_process_tmp_dir.Exists()) {
// Remove the LLDB temporary directory if we have one. Set "recurse" to
- // true to all files that were created for the LLDB process can be cleaned
- // up.
+ // true to all files that were created for the LLDB process can be
+ // cleaned up.
llvm::sys::fs::remove_directories(m_lldb_process_tmp_dir.GetPath());
}
}
@@ -354,8 +354,8 @@ bool HostInfoBase::ComputeSystemPluginsD
bool HostInfoBase::ComputeClangDirectory(FileSpec &file_spec) { return false; }
bool HostInfoBase::ComputeUserPluginsDirectory(FileSpec &file_spec) {
- // TODO(zturner): Figure out how to compute the user plugins directory for all
- // platforms.
+ // TODO(zturner): Figure out how to compute the user plugins directory for
+ // all platforms.
return false;
}
Modified: lldb/trunk/source/Host/common/MainLoop.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/MainLoop.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Host/common/MainLoop.cpp (original)
+++ lldb/trunk/source/Host/common/MainLoop.cpp Mon Apr 30 09:49:04 2018
@@ -209,8 +209,8 @@ Status MainLoop::RunImpl::Poll() {
void MainLoop::RunImpl::ProcessEvents() {
#ifdef __ANDROID__
- // Collect first all readable file descriptors into a separate vector and then
- // iterate over it to invoke callbacks. Iterating directly over
+ // Collect first all readable file descriptors into a separate vector and
+ // then iterate over it to invoke callbacks. Iterating directly over
// loop.m_read_fds is not possible because the callbacks can modify the
// container which could invalidate the iterator.
std::vector<IOObject::WaitableHandle> fds;
@@ -285,8 +285,7 @@ MainLoop::ReadHandleUP MainLoop::Registe
}
// We shall block the signal, then install the signal handler. The signal will
-// be unblocked in
-// the Run() function to check for signal delivery.
+// be unblocked in the Run() function to check for signal delivery.
MainLoop::SignalHandleUP
MainLoop::RegisterSignal(int signo, const Callback &callback, Status &error) {
#ifdef SIGNAL_POLLING_UNSUPPORTED
@@ -321,9 +320,9 @@ MainLoop::RegisterSignal(int signo, cons
assert(ret == 0);
#endif
- // If we're using kqueue, the signal needs to be unblocked in order to recieve
- // it. If using pselect/ppoll, we need to block it, and later unblock it as a
- // part of the system call.
+ // If we're using kqueue, the signal needs to be unblocked in order to
+ // recieve it. If using pselect/ppoll, we need to block it, and later unblock
+ // it as a part of the system call.
ret = pthread_sigmask(HAVE_SYS_EVENT_H ? SIG_UNBLOCK : SIG_BLOCK,
&new_action.sa_mask, &old_set);
assert(ret == 0 && "pthread_sigmask failed");
Modified: lldb/trunk/source/Host/common/NativeBreakpointList.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/NativeBreakpointList.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Host/common/NativeBreakpointList.cpp (original)
+++ lldb/trunk/source/Host/common/NativeBreakpointList.cpp Mon Apr 30 09:49:04 2018
@@ -104,8 +104,8 @@ Status NativeBreakpointList::DecRef(lldb
return error;
}
- // Breakpoint has no more references. Disable it if it's not
- // already disabled.
+ // Breakpoint has no more references. Disable it if it's not already
+ // disabled.
if (log)
log->Printf("NativeBreakpointList::%s addr = 0x%" PRIx64
" -- removing due to no remaining references",
Modified: lldb/trunk/source/Host/common/NativeProcessProtocol.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/NativeProcessProtocol.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Host/common/NativeProcessProtocol.cpp (original)
+++ lldb/trunk/source/Host/common/NativeProcessProtocol.cpp Mon Apr 30 09:49:04 2018
@@ -137,29 +137,28 @@ NativeProcessProtocol::GetHardwareDebugS
Status NativeProcessProtocol::SetWatchpoint(lldb::addr_t addr, size_t size,
uint32_t watch_flags,
bool hardware) {
- // This default implementation assumes setting the watchpoint for
- // the process will require setting the watchpoint for each of the
- // threads. Furthermore, it will track watchpoints set for the
- // process and will add them to each thread that is attached to
- // via the (FIXME implement) OnThreadAttached () method.
+ // This default implementation assumes setting the watchpoint for the process
+ // will require setting the watchpoint for each of the threads. Furthermore,
+ // it will track watchpoints set for the process and will add them to each
+ // thread that is attached to via the (FIXME implement) OnThreadAttached ()
+ // method.
Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
// Update the thread list
UpdateThreads();
- // Keep track of the threads we successfully set the watchpoint
- // for. If one of the thread watchpoint setting operations fails,
- // back off and remove the watchpoint for all the threads that
- // were successfully set so we get back to a consistent state.
+ // Keep track of the threads we successfully set the watchpoint for. If one
+ // of the thread watchpoint setting operations fails, back off and remove the
+ // watchpoint for all the threads that were successfully set so we get back
+ // to a consistent state.
std::vector<NativeThreadProtocol *> watchpoint_established_threads;
- // Tell each thread to set a watchpoint. In the event that
- // hardware watchpoints are requested but the SetWatchpoint fails,
- // try to set a software watchpoint as a fallback. It's
- // conceivable that if there are more threads than hardware
- // watchpoints available, some of the threads will fail to set
- // hardware watchpoints while software ones may be available.
+ // Tell each thread to set a watchpoint. In the event that hardware
+ // watchpoints are requested but the SetWatchpoint fails, try to set a
+ // software watchpoint as a fallback. It's conceivable that if there are
+ // more threads than hardware watchpoints available, some of the threads will
+ // fail to set hardware watchpoints while software ones may be available.
std::lock_guard<std::recursive_mutex> guard(m_threads_mutex);
for (const auto &thread : m_threads) {
assert(thread && "thread list should not have a NULL thread!");
@@ -167,8 +166,8 @@ Status NativeProcessProtocol::SetWatchpo
Status thread_error =
thread->SetWatchpoint(addr, size, watch_flags, hardware);
if (thread_error.Fail() && hardware) {
- // Try software watchpoints since we failed on hardware watchpoint setting
- // and we may have just run out of hardware watchpoints.
+ // Try software watchpoints since we failed on hardware watchpoint
+ // setting and we may have just run out of hardware watchpoints.
thread_error = thread->SetWatchpoint(addr, size, watch_flags, false);
if (thread_error.Success())
LLDB_LOG(log,
@@ -176,13 +175,12 @@ Status NativeProcessProtocol::SetWatchpo
}
if (thread_error.Success()) {
- // Remember that we set this watchpoint successfully in
- // case we need to clear it later.
+ // Remember that we set this watchpoint successfully in case we need to
+ // clear it later.
watchpoint_established_threads.push_back(thread.get());
} else {
- // Unset the watchpoint for each thread we successfully
- // set so that we get back to a consistent state of "not
- // set" for the watchpoint.
+ // Unset the watchpoint for each thread we successfully set so that we
+ // get back to a consistent state of "not set" for the watchpoint.
for (auto unwatch_thread_sp : watchpoint_established_threads) {
Status remove_error = unwatch_thread_sp->RemoveWatchpoint(addr);
if (remove_error.Fail())
@@ -208,9 +206,9 @@ Status NativeProcessProtocol::RemoveWatc
const Status thread_error = thread->RemoveWatchpoint(addr);
if (thread_error.Fail()) {
- // Keep track of the first thread error if any threads
- // fail. We want to try to remove the watchpoint from
- // every thread, though, even if one or more have errors.
+ // Keep track of the first thread error if any threads fail. We want to
+ // try to remove the watchpoint from every thread, though, even if one or
+ // more have errors.
if (!overall_error.Fail())
overall_error = thread_error;
}
@@ -226,9 +224,9 @@ NativeProcessProtocol::GetHardwareBreakp
Status NativeProcessProtocol::SetHardwareBreakpoint(lldb::addr_t addr,
size_t size) {
- // This default implementation assumes setting a hardware breakpoint for
- // this process will require setting same hardware breakpoint for each
- // of its existing threads. New thread will do the same once created.
+ // This default implementation assumes setting a hardware breakpoint for this
+ // process will require setting same hardware breakpoint for each of its
+ // existing threads. New thread will do the same once created.
Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
// Update the thread list
@@ -254,13 +252,13 @@ Status NativeProcessProtocol::SetHardwar
Status thread_error = thread->SetHardwareBreakpoint(addr, size);
if (thread_error.Success()) {
- // Remember that we set this breakpoint successfully in
- // case we need to clear it later.
+ // Remember that we set this breakpoint successfully in case we need to
+ // clear it later.
breakpoint_established_threads.push_back(thread.get());
} else {
- // Unset the breakpoint for each thread we successfully
- // set so that we get back to a consistent state of "not
- // set" for this hardware breakpoint.
+ // Unset the breakpoint for each thread we successfully set so that we
+ // get back to a consistent state of "not set" for this hardware
+ // breakpoint.
for (auto rollback_thread_sp : breakpoint_established_threads) {
Status remove_error =
rollback_thread_sp->RemoveHardwareBreakpoint(addr);
@@ -320,8 +318,8 @@ bool NativeProcessProtocol::UnregisterNa
remove(m_delegates.begin(), m_delegates.end(), &native_delegate),
m_delegates.end());
- // We removed the delegate if the count of delegates shrank after
- // removing all copies of the given native_delegate from the vector.
+ // We removed the delegate if the count of delegates shrank after removing
+ // all copies of the given native_delegate from the vector.
return m_delegates.size() < initial_size;
}
@@ -410,8 +408,8 @@ void NativeProcessProtocol::SetState(lld
// Give process a chance to do any stop id bump processing, such as
// clearing cached data that is invalidated each time the process runs.
- // Note if/when we support some threads running, we'll end up needing
- // to manage this per thread and per process.
+ // Note if/when we support some threads running, we'll end up needing to
+ // manage this per thread and per process.
DoStopIDBumped(m_stop_id);
}
Modified: lldb/trunk/source/Host/common/NativeRegisterContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/NativeRegisterContext.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Host/common/NativeRegisterContext.cpp (original)
+++ lldb/trunk/source/Host/common/NativeRegisterContext.cpp Mon Apr 30 09:49:04 2018
@@ -28,13 +28,12 @@ NativeRegisterContext::NativeRegisterCon
NativeRegisterContext::~NativeRegisterContext() {}
// FIXME revisit invalidation, process stop ids, etc. Right now we don't
-// support caching in NativeRegisterContext. We can do this later by
-// utilizing NativeProcessProtocol::GetStopID () and adding a stop id to
+// support caching in NativeRegisterContext. We can do this later by utilizing
+// NativeProcessProtocol::GetStopID () and adding a stop id to
// NativeRegisterContext.
// void
-// NativeRegisterContext::InvalidateIfNeeded (bool force)
-// {
+// NativeRegisterContext::InvalidateIfNeeded (bool force) {
// ProcessSP process_sp (m_thread.GetProcess());
// bool invalidate = force;
// uint32_t process_stop_id = UINT32_MAX;
@@ -365,8 +364,8 @@ Status NativeRegisterContext::ReadRegist
// We now have a memory buffer that contains the part or all of the register
// value. Set the register value using this memory data.
// TODO: we might need to add a parameter to this function in case the byte
- // order of the memory data doesn't match the process. For now we are assuming
- // they are the same.
+ // order of the memory data doesn't match the process. For now we are
+ // assuming they are the same.
reg_value.SetFromMemoryData(reg_info, src, src_len, process.GetByteOrder(),
error);
@@ -385,8 +384,7 @@ Status NativeRegisterContext::WriteRegis
// TODO: we might need to add a parameter to this function in case the byte
// order of the memory data doesn't match the process. For now we are
- // assuming
- // they are the same.
+ // assuming they are the same.
const size_t bytes_copied = reg_value.GetAsMemoryData(
reg_info, dst, dst_len, process.GetByteOrder(), error);
Modified: lldb/trunk/source/Host/common/PseudoTerminal.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/PseudoTerminal.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Host/common/PseudoTerminal.cpp (original)
+++ lldb/trunk/source/Host/common/PseudoTerminal.cpp Mon Apr 30 09:49:04 2018
@@ -35,10 +35,10 @@ PseudoTerminal::PseudoTerminal()
//----------------------------------------------------------------------
// Destructor
//
-// The destructor will close the master and slave file descriptors
-// if they are valid and ownership has not been released using the
-// ReleaseMasterFileDescriptor() or the ReleaseSaveFileDescriptor()
-// member functions.
+// The destructor will close the master and slave file descriptors if they are
+// valid and ownership has not been released using the
+// ReleaseMasterFileDescriptor() or the ReleaseSaveFileDescriptor() member
+// functions.
//----------------------------------------------------------------------
PseudoTerminal::~PseudoTerminal() {
CloseMasterFileDescriptor();
@@ -66,15 +66,14 @@ void PseudoTerminal::CloseSlaveFileDescr
}
//----------------------------------------------------------------------
-// Open the first available pseudo terminal with OFLAG as the
-// permissions. The file descriptor is stored in this object and can
-// be accessed with the MasterFileDescriptor() accessor. The
-// ownership of the master file descriptor can be released using
-// the ReleaseMasterFileDescriptor() accessor. If this object has
-// a valid master files descriptor when its destructor is called, it
-// will close the master file descriptor, therefore clients must
-// call ReleaseMasterFileDescriptor() if they wish to use the master
-// file descriptor after this object is out of scope or destroyed.
+// Open the first available pseudo terminal with OFLAG as the permissions. The
+// file descriptor is stored in this object and can be accessed with the
+// MasterFileDescriptor() accessor. The ownership of the master file descriptor
+// can be released using the ReleaseMasterFileDescriptor() accessor. If this
+// object has a valid master files descriptor when its destructor is called, it
+// will close the master file descriptor, therefore clients must call
+// ReleaseMasterFileDescriptor() if they wish to use the master file descriptor
+// after this object is out of scope or destroyed.
//
// RETURNS:
// True when successful, false indicating an error occurred.
@@ -118,12 +117,12 @@ bool PseudoTerminal::OpenFirstAvailableM
}
//----------------------------------------------------------------------
-// Open the slave pseudo terminal for the current master pseudo
-// terminal. A master pseudo terminal should already be valid prior to
-// calling this function (see OpenFirstAvailableMaster()).
-// The file descriptor is stored this object's member variables and can
-// be accessed via the GetSlaveFileDescriptor(), or released using the
-// ReleaseSlaveFileDescriptor() member function.
+// Open the slave pseudo terminal for the current master pseudo terminal. A
+// master pseudo terminal should already be valid prior to calling this
+// function (see OpenFirstAvailableMaster()). The file descriptor is stored
+// this object's member variables and can be accessed via the
+// GetSlaveFileDescriptor(), or released using the ReleaseSlaveFileDescriptor()
+// member function.
//
// RETURNS:
// True when successful, false indicating an error occurred.
@@ -152,8 +151,8 @@ bool PseudoTerminal::OpenSlave(int oflag
}
//----------------------------------------------------------------------
-// Get the name of the slave pseudo terminal. A master pseudo terminal
-// should already be valid prior to calling this function (see
+// Get the name of the slave pseudo terminal. A master pseudo terminal should
+// already be valid prior to calling this function (see
// OpenFirstAvailableMaster()).
//
// RETURNS:
@@ -185,18 +184,16 @@ const char *PseudoTerminal::GetSlaveName
// Fork a child process and have its stdio routed to a pseudo terminal.
//
// In the parent process when a valid pid is returned, the master file
-// descriptor can be used as a read/write access to stdio of the
-// child process.
+// descriptor can be used as a read/write access to stdio of the child process.
//
-// In the child process the stdin/stdout/stderr will already be routed
-// to the slave pseudo terminal and the master file descriptor will be
-// closed as it is no longer needed by the child process.
+// In the child process the stdin/stdout/stderr will already be routed to the
+// slave pseudo terminal and the master file descriptor will be closed as it is
+// no longer needed by the child process.
//
-// This class will close the file descriptors for the master/slave
-// when the destructor is called, so be sure to call
-// ReleaseMasterFileDescriptor() or ReleaseSlaveFileDescriptor() if any
-// file descriptors are going to be used past the lifespan of this
-// object.
+// This class will close the file descriptors for the master/slave when the
+// destructor is called, so be sure to call ReleaseMasterFileDescriptor() or
+// ReleaseSlaveFileDescriptor() if any file descriptors are going to be used
+// past the lifespan of this object.
//
// RETURNS:
// in the parent process: the pid of the child, or -1 if fork fails
@@ -261,49 +258,47 @@ lldb::pid_t PseudoTerminal::Fork(char *e
}
//----------------------------------------------------------------------
-// The master file descriptor accessor. This object retains ownership
-// of the master file descriptor when this accessor is used. Use
-// ReleaseMasterFileDescriptor() if you wish this object to release
-// ownership of the master file descriptor.
+// The master file descriptor accessor. This object retains ownership of the
+// master file descriptor when this accessor is used. Use
+// ReleaseMasterFileDescriptor() if you wish this object to release ownership
+// of the master file descriptor.
//
-// Returns the master file descriptor, or -1 if the master file
-// descriptor is not currently valid.
+// Returns the master file descriptor, or -1 if the master file descriptor is
+// not currently valid.
//----------------------------------------------------------------------
int PseudoTerminal::GetMasterFileDescriptor() const { return m_master_fd; }
//----------------------------------------------------------------------
// The slave file descriptor accessor.
//
-// Returns the slave file descriptor, or -1 if the slave file
-// descriptor is not currently valid.
+// Returns the slave file descriptor, or -1 if the slave file descriptor is not
+// currently valid.
//----------------------------------------------------------------------
int PseudoTerminal::GetSlaveFileDescriptor() const { return m_slave_fd; }
//----------------------------------------------------------------------
-// Release ownership of the master pseudo terminal file descriptor
-// without closing it. The destructor for this class will close the
-// master file descriptor if the ownership isn't released using this
-// call and the master file descriptor has been opened.
+// Release ownership of the master pseudo terminal file descriptor without
+// closing it. The destructor for this class will close the master file
+// descriptor if the ownership isn't released using this call and the master
+// file descriptor has been opened.
//----------------------------------------------------------------------
int PseudoTerminal::ReleaseMasterFileDescriptor() {
- // Release ownership of the master pseudo terminal file
- // descriptor without closing it. (the destructor for this
- // class will close it otherwise!)
+ // Release ownership of the master pseudo terminal file descriptor without
+ // closing it. (the destructor for this class will close it otherwise!)
int fd = m_master_fd;
m_master_fd = invalid_fd;
return fd;
}
//----------------------------------------------------------------------
-// Release ownership of the slave pseudo terminal file descriptor
-// without closing it. The destructor for this class will close the
-// slave file descriptor if the ownership isn't released using this
-// call and the slave file descriptor has been opened.
+// Release ownership of the slave pseudo terminal file descriptor without
+// closing it. The destructor for this class will close the slave file
+// descriptor if the ownership isn't released using this call and the slave
+// file descriptor has been opened.
//----------------------------------------------------------------------
int PseudoTerminal::ReleaseSlaveFileDescriptor() {
- // Release ownership of the slave pseudo terminal file
- // descriptor without closing it (the destructor for this
- // class will close it otherwise!)
+ // Release ownership of the slave pseudo terminal file descriptor without
+ // closing it (the destructor for this class will close it otherwise!)
int fd = m_slave_fd;
m_slave_fd = invalid_fd;
return fd;
Modified: lldb/trunk/source/Host/common/Socket.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/Socket.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Host/common/Socket.cpp (original)
+++ lldb/trunk/source/Host/common/Socket.cpp Mon Apr 30 09:49:04 2018
@@ -160,18 +160,17 @@ Status Socket::TcpListen(llvm::StringRef
error = listen_socket->Listen(host_and_port, backlog);
if (error.Success()) {
- // We were asked to listen on port zero which means we
- // must now read the actual port that was given to us
- // as port zero is a special code for "find an open port
- // for me".
+ // We were asked to listen on port zero which means we must now read the
+ // actual port that was given to us as port zero is a special code for
+ // "find an open port for me".
if (port == 0)
port = listen_socket->GetLocalPortNumber();
- // Set the port predicate since when doing a listen://<host>:<port>
- // it often needs to accept the incoming connection which is a blocking
- // system call. Allowing access to the bound port using a predicate allows
- // us to wait for the port predicate to be set to a non-zero value from
- // another thread in an efficient manor.
+ // Set the port predicate since when doing a listen://<host>:<port> it
+ // often needs to accept the incoming connection which is a blocking system
+ // call. Allowing access to the bound port using a predicate allows us to
+ // wait for the port predicate to be set to a non-zero value from another
+ // thread in an efficient manor.
if (predicate)
predicate->SetValue(port, eBroadcastAlways);
socket = listen_socket.release();
@@ -282,8 +281,7 @@ bool Socket::DecodeHostAndPort(llvm::Str
}
// If this was unsuccessful, then check if it's simply a signed 32-bit
- // integer, representing
- // a port with an empty host.
+ // integer, representing a port with an empty host.
host_str.clear();
port_str.clear();
bool ok = false;
@@ -436,8 +434,8 @@ NativeSocket Socket::AcceptSocket(Native
error.Clear();
#if defined(ANDROID_USE_ACCEPT_WORKAROUND)
// Hack:
- // This enables static linking lldb-server to an API 21 libc, but still having
- // it run on older devices. It is necessary because API 21 libc's
+ // This enables static linking lldb-server to an API 21 libc, but still
+ // having it run on older devices. It is necessary because API 21 libc's
// implementation of accept() uses the accept4 syscall(), which is not
// available in older kernels. Using an older libc would fix this issue, but
// introduce other ones, as the old libraries were quite buggy.
Modified: lldb/trunk/source/Host/common/SoftwareBreakpoint.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/SoftwareBreakpoint.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Host/common/SoftwareBreakpoint.cpp (original)
+++ lldb/trunk/source/Host/common/SoftwareBreakpoint.cpp Mon Apr 30 09:49:04 2018
@@ -17,9 +17,8 @@
using namespace lldb_private;
-// -------------------------------------------------------------------
-// static members
-// -------------------------------------------------------------------
+// ------------------------------------------------------------------- static
+// members -------------------------------------------------------------------
Status SoftwareBreakpoint::CreateSoftwareBreakpoint(
NativeProcessProtocol &process, lldb::addr_t addr, size_t size_hint,
@@ -34,8 +33,7 @@ Status SoftwareBreakpoint::CreateSoftwar
__FUNCTION__);
// Ask the NativeProcessProtocol subclass to fill in the correct software
- // breakpoint
- // trap for the breakpoint site.
+ // breakpoint trap for the breakpoint site.
size_t bp_opcode_size = 0;
const uint8_t *bp_opcode_bytes = NULL;
Status error = process.GetSoftwareBreakpointTrapOpcode(
@@ -98,9 +96,8 @@ Status SoftwareBreakpoint::CreateSoftwar
log->Printf("SoftwareBreakpoint::%s addr = 0x%" PRIx64 " -- SUCCESS",
__FUNCTION__, addr);
- // Set the breakpoint and verified it was written properly. Now
- // create a breakpoint remover that understands how to undo this
- // breakpoint.
+ // Set the breakpoint and verified it was written properly. Now create a
+ // breakpoint remover that understands how to undo this breakpoint.
breakpoint_sp.reset(new SoftwareBreakpoint(process, addr, saved_opcode_bytes,
bp_opcode_bytes, bp_opcode_size));
return Status();
@@ -280,8 +277,8 @@ Status SoftwareBreakpoint::DoDisable() {
// Make sure the breakpoint opcode exists at this address
if (::memcmp(curr_break_op, m_trap_opcodes, m_opcode_size) == 0) {
break_op_found = true;
- // We found a valid breakpoint opcode at this address, now restore
- // the saved opcode.
+ // We found a valid breakpoint opcode at this address, now restore the
+ // saved opcode.
size_t bytes_written = 0;
error = m_process.WriteMemory(m_addr, m_saved_opcodes, m_opcode_size,
bytes_written);
Modified: lldb/trunk/source/Host/common/Symbols.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/Symbols.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Host/common/Symbols.cpp (original)
+++ lldb/trunk/source/Host/common/Symbols.cpp Mon Apr 30 09:49:04 2018
@@ -111,15 +111,15 @@ static bool LocateDSYMInVincinityOfExecu
// Add a ".dSYM" name to each directory component of the path,
// stripping off components. e.g. we may have a binary like
- // /S/L/F/Foundation.framework/Versions/A/Foundation
- // and
+ // /S/L/F/Foundation.framework/Versions/A/Foundation and
// /S/L/F/Foundation.framework.dSYM
//
- // so we'll need to start with /S/L/F/Foundation.framework/Versions/A,
- // add the .dSYM part to the "A", and if that doesn't exist, strip off
- // the "A" and try it again with "Versions", etc., until we find a
- // dSYM bundle or we've stripped off enough path components that
- // there's no need to continue.
+ // so we'll need to start with
+ // /S/L/F/Foundation.framework/Versions/A, add the .dSYM part to the
+ // "A", and if that doesn't exist, strip off the "A" and try it again
+ // with "Versions", etc., until we find a dSYM bundle or we've
+ // stripped off enough path components that there's no need to
+ // continue.
for (int i = 0; i < 4; i++) {
// Does this part of the path have a "." character - could it be a
@@ -131,7 +131,8 @@ static bool LocateDSYMInVincinityOfExecu
dsym_fspec = parent_dirs;
dsym_fspec.RemoveLastPathComponent();
- // If the current directory name is "Foundation.framework", see if
+ // If the current directory name is "Foundation.framework", see
+ // if
// "Foundation.framework.dSYM/Contents/Resources/DWARF/Foundation"
// exists & has the right uuid.
std::string dsym_fn = fn;
@@ -293,10 +294,9 @@ FileSpec Symbols::LocateExecutableSymbol
if (num_specs == 1) {
ModuleSpec mspec;
if (specs.GetModuleSpecAtIndex(0, mspec)) {
- // Skip the uuids check if module_uuid is invalid.
- // For example, this happens for *.dwp files since
- // at the moment llvm-dwp doesn't output build ids,
- // nor does binutils dwp.
+ // Skip the uuids check if module_uuid is invalid. For example,
+ // this happens for *.dwp files since at the moment llvm-dwp
+ // doesn't output build ids, nor does binutils dwp.
if (!module_uuid.IsValid() || module_uuid == mspec.GetUUID())
return file_spec;
}
Modified: lldb/trunk/source/Host/common/TaskPool.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/TaskPool.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Host/common/TaskPool.cpp (original)
+++ lldb/trunk/source/Host/common/TaskPool.cpp Mon Apr 30 09:49:04 2018
@@ -49,8 +49,8 @@ void TaskPool::AddTaskImpl(std::function
TaskPoolImpl::TaskPoolImpl() : m_thread_count(0) {}
unsigned GetHardwareConcurrencyHint() {
- // std::thread::hardware_concurrency may return 0
- // if the value is not well defined or not computable.
+ // std::thread::hardware_concurrency may return 0 if the value is not well
+ // defined or not computable.
static const unsigned g_hardware_concurrency =
std::max(1u, std::thread::hardware_concurrency());
return g_hardware_concurrency;
@@ -64,9 +64,8 @@ void TaskPoolImpl::AddTask(std::function
if (m_thread_count < GetHardwareConcurrencyHint()) {
m_thread_count++;
// Note that this detach call needs to happen with the m_tasks_mutex held.
- // This prevents the thread
- // from exiting prematurely and triggering a linux libc bug
- // (https://sourceware.org/bugzilla/show_bug.cgi?id=19951).
+ // This prevents the thread from exiting prematurely and triggering a linux
+ // libc bug (https://sourceware.org/bugzilla/show_bug.cgi?id=19951).
lldb_private::ThreadLauncher::LaunchThread("task-pool.worker", WorkerPtr,
this, nullptr, min_stack_size)
.Release();
Modified: lldb/trunk/source/Host/common/Terminal.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/Terminal.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Host/common/Terminal.cpp (original)
+++ lldb/trunk/source/Host/common/Terminal.cpp Mon Apr 30 09:49:04 2018
@@ -107,9 +107,9 @@ void TerminalState::Clear() {
}
//----------------------------------------------------------------------
-// Save the current state of the TTY for the file descriptor "fd"
-// and if "save_process_group" is true, attempt to save the process
-// group info for the TTY.
+// Save the current state of the TTY for the file descriptor "fd" and if
+// "save_process_group" is true, attempt to save the process group info for the
+// TTY.
//----------------------------------------------------------------------
bool TerminalState::Save(int fd, bool save_process_group) {
m_tty.SetFileDescriptor(fd);
@@ -142,8 +142,8 @@ bool TerminalState::Save(int fd, bool sa
}
//----------------------------------------------------------------------
-// Restore the state of the TTY using the cached values from a
-// previous call to Save().
+// Restore the state of the TTY using the cached values from a previous call to
+// Save().
//----------------------------------------------------------------------
bool TerminalState::Restore() const {
#ifndef LLDB_DISABLE_POSIX
@@ -173,8 +173,8 @@ bool TerminalState::Restore() const {
}
//----------------------------------------------------------------------
-// Returns true if this object has valid saved TTY state settings
-// that can be used to restore a previous state.
+// Returns true if this object has valid saved TTY state settings that can be
+// used to restore a previous state.
//----------------------------------------------------------------------
bool TerminalState::IsValid() const {
return m_tty.FileDescriptorIsValid() &&
@@ -236,21 +236,20 @@ bool TerminalStateSwitcher::Restore(uint
m_ttystates[idx].IsValid())
return true;
- // Set the state to match the index passed in and only update the
- // current state if there are no errors.
+ // Set the state to match the index passed in and only update the current
+ // state if there are no errors.
if (m_ttystates[idx].Restore()) {
m_currentState = idx;
return true;
}
- // We failed to set the state. The tty state was invalid or not
- // initialized.
+ // We failed to set the state. The tty state was invalid or not initialized.
return false;
}
//------------------------------------------------------------------
-// Save the state at index "idx" for file descriptor "fd" and
-// save the process group if requested.
+// Save the state at index "idx" for file descriptor "fd" and save the process
+// group if requested.
//
// Returns true if the restore was successful, false otherwise.
//------------------------------------------------------------------
Modified: lldb/trunk/source/Host/common/UDPSocket.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/UDPSocket.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Host/common/UDPSocket.cpp (original)
+++ lldb/trunk/source/Host/common/UDPSocket.cpp Mon Apr 30 09:49:04 2018
@@ -69,8 +69,8 @@ Status UDPSocket::Connect(llvm::StringRe
if (!DecodeHostAndPort(name, host_str, port_str, port, &error))
return error;
- // At this point we have setup the receive port, now we need to
- // setup the UDP send socket
+ // At this point we have setup the receive port, now we need to setup the UDP
+ // send socket
struct addrinfo hints;
struct addrinfo *service_info_list = nullptr;
Modified: lldb/trunk/source/Host/common/XML.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/XML.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Host/common/XML.cpp (original)
+++ lldb/trunk/source/Host/common/XML.cpp Mon Apr 30 09:49:04 2018
@@ -252,8 +252,8 @@ void XMLNode::ForEachSiblingElementWithN
if (node->type != XML_ELEMENT_NODE)
continue;
- // If name is nullptr, we take all nodes of type "t", else
- // just the ones whose name matches
+ // If name is nullptr, we take all nodes of type "t", else just the ones
+ // whose name matches
if (name) {
if (strcmp((const char *)node->name, name) != 0)
continue; // Name mismatch, ignore this one
Modified: lldb/trunk/source/Host/freebsd/Host.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/freebsd/Host.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Host/freebsd/Host.cpp (original)
+++ lldb/trunk/source/Host/freebsd/Host.cpp Mon Apr 30 09:49:04 2018
@@ -192,9 +192,8 @@ uint32_t Host::FindProcesses(const Proce
continue;
// Every thread is a process in FreeBSD, but all the threads of a single
- // process have the same pid. Do not store the process info in the
- // result list if a process with given identifier is already registered
- // there.
+ // process have the same pid. Do not store the process info in the result
+ // list if a process with given identifier is already registered there.
bool already_registered = false;
for (uint32_t pi = 0;
!already_registered && (const int)kinfo.ki_numthreads > 1 &&
Modified: lldb/trunk/source/Host/linux/Host.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/linux/Host.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Host/linux/Host.cpp (original)
+++ lldb/trunk/source/Host/linux/Host.cpp Mon Apr 30 09:49:04 2018
@@ -246,8 +246,8 @@ uint32_t Host::FindProcesses(const Proce
if (State == ProcessState::Zombie)
continue;
- // Check for user match if we're not matching all users and not running as
- // root.
+ // Check for user match if we're not matching all users and not running
+ // as root.
if (!all_users && (our_uid != 0) && (process_info.GetUserID() != our_uid))
continue;
Modified: lldb/trunk/source/Host/linux/HostInfoLinux.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/linux/HostInfoLinux.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Host/linux/HostInfoLinux.cpp (original)
+++ lldb/trunk/source/Host/linux/HostInfoLinux.cpp Mon Apr 30 09:49:04 2018
@@ -57,8 +57,7 @@ bool HostInfoLinux::GetOSVersion(uint32_
success = true;
else {
// Some kernels omit the update version, so try looking for just "X.Y"
- // and
- // set update to 0.
+ // and set update to 0.
g_fields->m_os_update = 0;
status = sscanf(un.release, "%u.%u", &g_fields->m_os_major,
&g_fields->m_os_minor);
@@ -100,8 +99,8 @@ bool HostInfoLinux::GetOSKernelDescripti
}
llvm::StringRef HostInfoLinux::GetDistributionId() {
- // Try to run 'lbs_release -i', and use that response
- // for the distribution id.
+ // Try to run 'lbs_release -i', and use that response for the distribution
+ // id.
static llvm::once_flag g_once_flag;
llvm::call_once(g_once_flag, []() {
@@ -109,8 +108,7 @@ llvm::StringRef HostInfoLinux::GetDistri
if (log)
log->Printf("attempting to determine Linux distribution...");
- // check if the lsb_release command exists at one of the
- // following paths
+ // check if the lsb_release command exists at one of the following paths
const char *const exe_paths[] = {"/bin/lsb_release",
"/usr/bin/lsb_release"};
@@ -212,8 +210,8 @@ bool HostInfoLinux::ComputeSystemPlugins
bool HostInfoLinux::ComputeUserPluginsDirectory(FileSpec &file_spec) {
// XDG Base Directory Specification
- // http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html
- // If XDG_DATA_HOME exists, use that, otherwise use ~/.local/share/lldb.
+ // http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html If
+ // XDG_DATA_HOME exists, use that, otherwise use ~/.local/share/lldb.
const char *xdg_data_home = getenv("XDG_DATA_HOME");
if (xdg_data_home && xdg_data_home[0]) {
std::string user_plugin_dir(xdg_data_home);
Modified: lldb/trunk/source/Host/macosx/Symbols.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/macosx/Symbols.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Host/macosx/Symbols.cpp (original)
+++ lldb/trunk/source/Host/macosx/Symbols.cpp Mon Apr 30 09:49:04 2018
@@ -340,9 +340,8 @@ static bool GetModuleSpecInfoFromUUIDDic
std::string DBGBuildSourcePath;
std::string DBGSourcePath;
- // If DBGVersion value 2 or higher, look for
- // DBGSourcePathRemapping dictionary and append the key-value pairs
- // to our remappings.
+ // If DBGVersion value 2 or higher, look for DBGSourcePathRemapping
+ // dictionary and append the key-value pairs to our remappings.
cf_dict = (CFDictionaryRef)CFDictionaryGetValue(
(CFDictionaryRef)uuid_dict, CFSTR("DBGSourcePathRemapping"));
if (cf_dict && CFGetTypeID(cf_dict) == CFDictionaryGetTypeID()) {
@@ -389,10 +388,9 @@ static bool GetModuleSpecInfoFromUUIDDic
}
if (!DBGBuildSourcePath.empty() && !DBGSourcePath.empty()) {
// In the "old style" DBGSourcePathRemapping dictionary, the
- // DBGSourcePath values
- // (the "values" half of key-value path pairs) were wrong. Ignore
- // them and use the
- // universal DBGSourcePath string from earlier.
+ // DBGSourcePath values (the "values" half of key-value path pairs)
+ // were wrong. Ignore them and use the universal DBGSourcePath
+ // string from earlier.
if (new_style_source_remapping_dictionary == true &&
!original_DBGSourcePath_value.empty()) {
DBGSourcePath = original_DBGSourcePath_value;
@@ -402,9 +400,9 @@ static bool GetModuleSpecInfoFromUUIDDic
DBGSourcePath = resolved_source_path.GetPath();
}
// With version 2 of DBGSourcePathRemapping, we can chop off the
- // last two filename parts from the source remapping and get a
- // more general source remapping that still works. Add this as
- // another option in addition to the full source path remap.
+ // last two filename parts from the source remapping and get a more
+ // general source remapping that still works. Add this as another
+ // option in addition to the full source path remap.
module_spec.GetSourceMappingList().Append(
ConstString(DBGBuildSourcePath.c_str()),
ConstString(DBGSourcePath.c_str()), true);
@@ -429,8 +427,8 @@ static bool GetModuleSpecInfoFromUUIDDic
}
- // If we have a DBGBuildSourcePath + DBGSourcePath pair,
- // append them to the source remappings list.
+ // If we have a DBGBuildSourcePath + DBGSourcePath pair, append them to the
+ // source remappings list.
cf_str = (CFStringRef)CFDictionaryGetValue((CFDictionaryRef)uuid_dict,
CFSTR("DBGBuildSourcePath"));
@@ -464,8 +462,7 @@ bool Symbols::DownloadObjectAndSymbolFil
const FileSpec *file_spec_ptr = module_spec.GetFileSpecPtr();
// It's expensive to check for the DBGShellCommands defaults setting, only do
- // it once per
- // lldb run and cache the result.
+ // it once per lldb run and cache the result.
static bool g_have_checked_for_dbgshell_command = false;
static const char *g_dbgshell_command = NULL;
if (g_have_checked_for_dbgshell_command == false) {
@@ -487,8 +484,7 @@ bool Symbols::DownloadObjectAndSymbolFil
}
// When g_dbgshell_command is NULL, the user has not enabled the use of an
- // external program
- // to find the symbols, don't run it for them.
+ // external program to find the symbols, don't run it for them.
if (force_lookup == false && g_dbgshell_command == NULL) {
return false;
}
Modified: lldb/trunk/source/Host/macosx/cfcpp/CFCMutableDictionary.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/macosx/cfcpp/CFCMutableDictionary.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Host/macosx/cfcpp/CFCMutableDictionary.cpp (original)
+++ lldb/trunk/source/Host/macosx/cfcpp/CFCMutableDictionary.cpp Mon Apr 30 09:49:04 2018
@@ -352,9 +352,8 @@ bool CFCMutableDictionary::AddValueUInt6
CFMutableDictionaryRef dict = Dictionary(can_create);
if (dict != NULL) {
// The number may appear negative if the MSBit is set in "value". Due to a
- // limitation of
- // CFNumber, there isn't a way to have it show up otherwise as of this
- // writing.
+ // limitation of CFNumber, there isn't a way to have it show up otherwise
+ // as of this writing.
CFCReleaser<CFNumberRef> cf_number(
::CFNumberCreate(kCFAllocatorDefault, kCFNumberSInt64Type, &value));
if (cf_number.get()) {
@@ -371,9 +370,8 @@ bool CFCMutableDictionary::SetValueUInt6
CFMutableDictionaryRef dict = Dictionary(can_create);
if (dict != NULL) {
// The number may appear negative if the MSBit is set in "value". Due to a
- // limitation of
- // CFNumber, there isn't a way to have it show up otherwise as of this
- // writing.
+ // limitation of CFNumber, there isn't a way to have it show up otherwise
+ // as of this writing.
CFCReleaser<CFNumberRef> cf_number(
::CFNumberCreate(kCFAllocatorDefault, kCFNumberSInt64Type, &value));
if (cf_number.get()) {
@@ -390,9 +388,8 @@ bool CFCMutableDictionary::AddValueDoubl
CFMutableDictionaryRef dict = Dictionary(can_create);
if (dict != NULL) {
// The number may appear negative if the MSBit is set in "value". Due to a
- // limitation of
- // CFNumber, there isn't a way to have it show up otherwise as of this
- // writing.
+ // limitation of CFNumber, there isn't a way to have it show up otherwise
+ // as of this writing.
CFCReleaser<CFNumberRef> cf_number(
::CFNumberCreate(kCFAllocatorDefault, kCFNumberDoubleType, &value));
if (cf_number.get()) {
@@ -409,9 +406,8 @@ bool CFCMutableDictionary::SetValueDoubl
CFMutableDictionaryRef dict = Dictionary(can_create);
if (dict != NULL) {
// The number may appear negative if the MSBit is set in "value". Due to a
- // limitation of
- // CFNumber, there isn't a way to have it show up otherwise as of this
- // writing.
+ // limitation of CFNumber, there isn't a way to have it show up otherwise
+ // as of this writing.
CFCReleaser<CFNumberRef> cf_number(
::CFNumberCreate(kCFAllocatorDefault, kCFNumberDoubleType, &value));
if (cf_number.get()) {
Modified: lldb/trunk/source/Host/macosx/cfcpp/CFCString.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/macosx/cfcpp/CFCString.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Host/macosx/cfcpp/CFCString.cpp (original)
+++ lldb/trunk/source/Host/macosx/cfcpp/CFCString.cpp Mon Apr 30 09:49:04 2018
@@ -88,9 +88,8 @@ const char *CFCString::UTF8(std::string
return CFCString::UTF8(get(), str);
}
-// Static function that puts a copy of the UTF8 contents of CF_STR into STR
-// and returns the C string pointer that is contained in STR when successful,
-// else
+// Static function that puts a copy of the UTF8 contents of CF_STR into STR and
+// returns the C string pointer that is contained in STR when successful, else
// NULL is returned. This allows the std::string parameter to own the extracted
// string,
// and also allows that string to be returned as a C string pointer that can be
@@ -129,9 +128,9 @@ const char *CFCString::ExpandTildeInPath
// Static function that puts a copy of the file system representation of CF_STR
// into STR and returns the C string pointer that is contained in STR when
-// successful, else NULL is returned. This allows the std::string parameter
-// to own the extracted string, and also allows that string to be returned as
-// a C string pointer that can be used.
+// successful, else NULL is returned. This allows the std::string parameter to
+// own the extracted string, and also allows that string to be returned as a C
+// string pointer that can be used.
const char *CFCString::FileSystemRepresentation(CFStringRef cf_str,
std::string &str) {
Modified: lldb/trunk/source/Host/netbsd/Host.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/netbsd/Host.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Host/netbsd/Host.cpp (original)
+++ lldb/trunk/source/Host/netbsd/Host.cpp Mon Apr 30 09:49:04 2018
@@ -192,9 +192,8 @@ uint32_t Host::FindProcesses(const Proce
continue;
// Every thread is a process in NetBSD, but all the threads of a single
- // process have the same pid. Do not store the process info in the
- // result list if a process with given identifier is already registered
- // there.
+ // process have the same pid. Do not store the process info in the result
+ // list if a process with given identifier is already registered there.
if (proc_kinfo[i].p_nlwps > 1) {
bool already_registered = false;
for (size_t pi = 0; pi < process_infos.GetSize(); pi++) {
Modified: lldb/trunk/source/Host/posix/ConnectionFileDescriptorPosix.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/posix/ConnectionFileDescriptorPosix.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Host/posix/ConnectionFileDescriptorPosix.cpp (original)
+++ lldb/trunk/source/Host/posix/ConnectionFileDescriptorPosix.cpp Mon Apr 30 09:49:04 2018
@@ -189,15 +189,14 @@ ConnectionStatus ConnectionFileDescripto
}
#ifndef LLDB_DISABLE_POSIX
else if ((addr = GetURLAddress(path, FD_SCHEME))) {
- // Just passing a native file descriptor within this current process
- // that is already opened (possibly from a service or other source).
+ // Just passing a native file descriptor within this current process that
+ // is already opened (possibly from a service or other source).
int fd = -1;
if (!addr->getAsInteger(0, fd)) {
- // We have what looks to be a valid file descriptor, but we
- // should make sure it is. We currently are doing this by trying to
- // get the flags from the file descriptor and making sure it
- // isn't a bad fd.
+ // We have what looks to be a valid file descriptor, but we should make
+ // sure it is. We currently are doing this by trying to get the flags
+ // from the file descriptor and making sure it isn't a bad fd.
errno = 0;
int flags = ::fcntl(fd, F_GETFL, 0);
if (flags == -1 || errno == EBADF) {
@@ -208,20 +207,18 @@ ConnectionStatus ConnectionFileDescripto
m_write_sp.reset();
return eConnectionStatusError;
} else {
- // Don't take ownership of a file descriptor that gets passed
- // to us since someone else opened the file descriptor and
- // handed it to us.
+ // Don't take ownership of a file descriptor that gets passed to us
+ // since someone else opened the file descriptor and handed it to us.
// TODO: Since are using a URL to open connection we should
- // eventually parse options using the web standard where we
- // have "fd://123?opt1=value;opt2=value" and we can have an
- // option be "owns=1" or "owns=0" or something like this to
- // allow us to specify this. For now, we assume we must
- // assume we don't own it.
+ // eventually parse options using the web standard where we have
+ // "fd://123?opt1=value;opt2=value" and we can have an option be
+ // "owns=1" or "owns=0" or something like this to allow us to specify
+ // this. For now, we assume we must assume we don't own it.
std::unique_ptr<TCPSocket> tcp_socket;
tcp_socket.reset(new TCPSocket(fd, false, false));
- // Try and get a socket option from this file descriptor to
- // see if this is a socket and set m_is_socket accordingly.
+ // Try and get a socket option from this file descriptor to see if
+ // this is a socket and set m_is_socket accordingly.
int resuse;
bool is_socket =
!!tcp_socket->GetOption(SOL_SOCKET, SO_REUSEADDR, resuse);
@@ -320,13 +317,11 @@ ConnectionStatus ConnectionFileDescripto
m_read_sp->GetFdType() == IOObject::eFDTypeSocket)
static_cast<Socket &>(*m_read_sp).PreDisconnect();
- // Try to get the ConnectionFileDescriptor's mutex. If we fail, that is quite
- // likely
- // because somebody is doing a blocking read on our file descriptor. If
- // that's the case,
- // then send the "q" char to the command file channel so the read will wake up
- // and the connection
- // will then know to shut down.
+ // Try to get the ConnectionFileDescriptor's mutex. If we fail, that is
+ // quite likely because somebody is doing a blocking read on our file
+ // descriptor. If that's the case, then send the "q" char to the command
+ // file channel so the read will wake up and the connection will then know to
+ // shut down.
m_shutting_down = true;
@@ -430,11 +425,11 @@ size_t ConnectionFileDescriptor::Read(vo
case EINVAL: // The pointer associated with fildes was negative.
case EIO: // An I/O error occurred while reading from the file system.
// The process group is orphaned.
- // The file is a regular file, nbyte is greater than 0,
- // the starting position is before the end-of-file, and
- // the starting position is greater than or equal to the
- // offset maximum established for the open file
- // descriptor associated with fildes.
+ // The file is a regular file, nbyte is greater than 0, the
+ // starting position is before the end-of-file, and the
+ // starting position is greater than or equal to the offset
+ // maximum established for the open file descriptor
+ // associated with fildes.
case EISDIR: // An attempt is made to read a directory.
case ENOBUFS: // An attempt to allocate a memory buffer fails.
case ENOMEM: // Insufficient memory is available.
@@ -550,15 +545,15 @@ ConnectionStatus
ConnectionFileDescriptor::BytesAvailable(const Timeout<std::micro> &timeout,
Status *error_ptr) {
// Don't need to take the mutex here separately since we are only called from
- // Read. If we
- // ever get used more generally we will need to lock here as well.
+ // Read. If we ever get used more generally we will need to lock here as
+ // well.
Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_CONNECTION));
LLDB_LOG(log, "this = {0}, timeout = {1}", this, timeout);
- // Make a copy of the file descriptors to make sure we don't
- // have another thread change these values out from under us
- // and cause problems in the loop below where like in FS_SET()
+ // Make a copy of the file descriptors to make sure we don't have another
+ // thread change these values out from under us and cause problems in the
+ // loop below where like in FS_SET()
const IOObject::WaitableHandle handle = m_read_sp->GetWaitableHandle();
const int pipe_fd = m_pipe.GetReadFileDescriptor();
@@ -570,10 +565,9 @@ ConnectionFileDescriptor::BytesAvailable
select_helper.FDSetRead(handle);
#if defined(_MSC_VER)
// select() won't accept pipes on Windows. The entire Windows codepath
- // needs to be
- // converted over to using WaitForMultipleObjects and event HANDLEs, but for
- // now at least
- // this will allow ::select() to not return an error.
+ // needs to be converted over to using WaitForMultipleObjects and event
+ // HANDLEs, but for now at least this will allow ::select() to not return
+ // an error.
const bool have_pipe_fd = false;
#else
const bool have_pipe_fd = pipe_fd >= 0;
@@ -603,11 +597,10 @@ ConnectionFileDescriptor::BytesAvailable
return eConnectionStatusTimedOut;
case EAGAIN: // The kernel was (perhaps temporarily) unable to
- // allocate the requested number of file descriptors,
- // or we have non-blocking IO
+ // allocate the requested number of file descriptors, or
+ // we have non-blocking IO
case EINTR: // A signal was delivered before the time limit
- // expired and before any of the selected events
- // occurred.
+ // expired and before any of the selected events occurred.
break; // Lets keep reading to until we timeout
}
} else {
@@ -615,8 +608,8 @@ ConnectionFileDescriptor::BytesAvailable
return eConnectionStatusSuccess;
if (select_helper.FDIsSetRead(pipe_fd)) {
- // There is an interrupt or exit command in the command pipe
- // Read the data from that pipe:
+ // There is an interrupt or exit command in the command pipe Read the
+ // data from that pipe:
char c;
ssize_t bytes_read = llvm::sys::RetryAfterSignal(-1, ::read, pipe_fd, &c, 1);
Modified: lldb/trunk/source/Host/posix/HostInfoPosix.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/posix/HostInfoPosix.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Host/posix/HostInfoPosix.cpp (original)
+++ lldb/trunk/source/Host/posix/HostInfoPosix.cpp Mon Apr 30 09:49:04 2018
@@ -103,8 +103,7 @@ const char *HostInfoPosix::LookupGroupNa
}
} else {
// The threadsafe version isn't currently working for me on darwin, but the
- // non-threadsafe version
- // is, so I am calling it below.
+ // non-threadsafe version is, so I am calling it below.
group_info_ptr = ::getgrgid(gid);
if (group_info_ptr) {
group_name.assign(group_info_ptr->gr_name);
@@ -141,8 +140,8 @@ bool HostInfoPosix::ComputePathRelativeT
llvm::StringRef parent_path = llvm::sys::path::parent_path(raw_path);
// Most Posix systems (e.g. Linux/*BSD) will attempt to replace a */lib with
- // */bin as the base directory for helper exe programs. This will fail if the
- // /lib and /bin directories are rooted in entirely different trees.
+ // */bin as the base directory for helper exe programs. This will fail if
+ // the /lib and /bin directories are rooted in entirely different trees.
if (log)
log->Printf("HostInfoPosix::ComputePathRelativeToLibrary() attempting to "
"derive the %s path from this path: %s",
@@ -192,9 +191,9 @@ bool HostInfoPosix::ComputePythonDirecto
lldb_file_spec.GetPath(raw_path, sizeof(raw_path));
#if defined(LLDB_PYTHON_RELATIVE_LIBDIR)
- // Build the path by backing out of the lib dir, then building
- // with whatever the real python interpreter uses. (e.g. lib
- // for most, lib64 on RHEL x86_64).
+ // Build the path by backing out of the lib dir, then building with whatever
+ // the real python interpreter uses. (e.g. lib for most, lib64 on RHEL
+ // x86_64).
char python_path[PATH_MAX];
::snprintf(python_path, sizeof(python_path), "%s/../%s", raw_path,
LLDB_PYTHON_RELATIVE_LIBDIR);
Modified: lldb/trunk/source/Host/posix/PipePosix.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/posix/PipePosix.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Host/posix/PipePosix.cpp (original)
+++ lldb/trunk/source/Host/posix/PipePosix.cpp Mon Apr 30 09:49:04 2018
@@ -137,8 +137,8 @@ Status PipePosix::CreateWithUniqueName(l
}
// It's possible that another process creates the target path after we've
- // verified it's available but before we create it, in which case we
- // should try again.
+ // verified it's available but before we create it, in which case we should
+ // try again.
Status error;
do {
llvm::sys::fs::createUniqueFile(tmpdir_file_spec.GetPath(),
Modified: lldb/trunk/source/Host/posix/ProcessLauncherPosixFork.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/posix/ProcessLauncherPosixFork.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Host/posix/ProcessLauncherPosixFork.cpp (original)
+++ lldb/trunk/source/Host/posix/ProcessLauncherPosixFork.cpp Mon Apr 30 09:49:04 2018
@@ -131,8 +131,8 @@ static void LLVM_ATTRIBUTE_NORETURN Chil
FixupEnvironment(env);
Environment::Envp envp = env.getEnvp();
- // Clear the signal mask to prevent the child from being affected by
- // any masking done by the parent.
+ // Clear the signal mask to prevent the child from being affected by any
+ // masking done by the parent.
sigset_t set;
if (sigemptyset(&set) != 0 ||
pthread_sigmask(SIG_SETMASK, &set, nullptr) != 0)
@@ -142,8 +142,7 @@ static void LLVM_ATTRIBUTE_NORETURN Chil
// HACK:
// Close everything besides stdin, stdout, and stderr that has no file
// action to avoid leaking. Only do this when debugging, as elsewhere we
- // actually rely on
- // passing open descriptors to child processes.
+ // actually rely on passing open descriptors to child processes.
for (int fd = 3; fd < sysconf(_SC_OPEN_MAX); ++fd)
if (!info.GetFileActionForFD(fd) && fd != error_fd)
close(fd);
@@ -158,18 +157,14 @@ static void LLVM_ATTRIBUTE_NORETURN Chil
#if defined(__linux__)
if (errno == ETXTBSY) {
- // On android M and earlier we can get this error because the adb deamon can
- // hold a write
- // handle on the executable even after it has finished uploading it. This
- // state lasts
- // only a short time and happens only when there are many concurrent adb
- // commands being
- // issued, such as when running the test suite. (The file remains open when
- // someone does
- // an "adb shell" command in the fork() child before it has had a chance to
- // exec.) Since
- // this state should clear up quickly, wait a while and then give it one
- // more go.
+ // On android M and earlier we can get this error because the adb deamon
+ // can hold a write handle on the executable even after it has finished
+ // uploading it. This state lasts only a short time and happens only when
+ // there are many concurrent adb commands being issued, such as when
+ // running the test suite. (The file remains open when someone does an "adb
+ // shell" command in the fork() child before it has had a chance to exec.)
+ // Since this state should clear up quickly, wait a while and then give it
+ // one more go.
usleep(50000);
execve(argv[0], const_cast<char *const *>(argv), envp);
}
Modified: lldb/trunk/source/Host/windows/ConnectionGenericFileWindows.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/windows/ConnectionGenericFileWindows.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Host/windows/ConnectionGenericFileWindows.cpp (original)
+++ lldb/trunk/source/Host/windows/ConnectionGenericFileWindows.cpp Mon Apr 30 09:49:04 2018
@@ -21,12 +21,10 @@ using namespace lldb_private;
namespace {
// This is a simple helper class to package up the information needed to return
-// from a Read/Write
-// operation function. Since there is a lot of code to be run before exit
-// regardless of whether the
-// operation succeeded or failed, combined with many possible return paths, this
-// is the cleanest
-// way to represent it.
+// from a Read/Write operation function. Since there is a lot of code to be
+// run before exit regardless of whether the operation succeeded or failed,
+// combined with many possible return paths, this is the cleanest way to
+// represent it.
class ReturnInfo {
public:
void Set(size_t bytes, ConnectionStatus status, DWORD error_code) {
@@ -78,11 +76,9 @@ void ConnectionGenericFile::InitializeEv
m_event_handles[kInterruptEvent] = CreateEvent(NULL, FALSE, FALSE, NULL);
// Note, we should use a manual reset event for the hEvent argument of the
- // OVERLAPPED. This
- // is because both WaitForMultipleObjects and GetOverlappedResult (if you set
- // the bWait
- // argument to TRUE) will wait for the event to be signalled. If we use an
- // auto-reset event,
+ // OVERLAPPED. This is because both WaitForMultipleObjects and
+ // GetOverlappedResult (if you set the bWait argument to TRUE) will wait for
+ // the event to be signalled. If we use an auto-reset event,
// WaitForMultipleObjects will reset the event, return successfully, and then
// GetOverlappedResult will block since the event is no longer signalled.
m_event_handles[kBytesAvailableEvent] =
@@ -147,8 +143,7 @@ lldb::ConnectionStatus ConnectionGeneric
return eConnectionStatusSuccess;
// Reset the handle so that after we unblock any pending reads, subsequent
- // calls to Read() will
- // see a disconnected state.
+ // calls to Read() will see a disconnected state.
HANDLE old_file = m_file;
m_file = INVALID_HANDLE_VALUE;
@@ -157,8 +152,7 @@ lldb::ConnectionStatus ConnectionGeneric
::CancelIoEx(old_file, &m_overlapped);
// Close the file handle if we owned it, but don't close the event handles.
- // We could always
- // reconnect with the same Connection instance.
+ // We could always reconnect with the same Connection instance.
if (m_owns_file)
::CloseHandle(old_file);
@@ -190,8 +184,7 @@ size_t ConnectionGenericFile::Read(void
if (result || ::GetLastError() == ERROR_IO_PENDING) {
if (!result) {
// The expected return path. The operation is pending. Wait for the
- // operation to complete
- // or be interrupted.
+ // operation to complete or be interrupted.
DWORD milliseconds =
timeout
? std::chrono::duration_cast<std::chrono::milliseconds>(*timeout)
@@ -219,11 +212,9 @@ size_t ConnectionGenericFile::Read(void
// The data is ready. Figure out how much was read and return;
if (!::GetOverlappedResult(m_file, &m_overlapped, &bytes_read, FALSE)) {
DWORD result_error = ::GetLastError();
- // ERROR_OPERATION_ABORTED occurs when someone calls Disconnect() during a
- // blocking read.
- // This triggers a call to CancelIoEx, which causes the operation to
- // complete and the
- // result to be ERROR_OPERATION_ABORTED.
+ // ERROR_OPERATION_ABORTED occurs when someone calls Disconnect() during
+ // a blocking read. This triggers a call to CancelIoEx, which causes the
+ // operation to complete and the result to be ERROR_OPERATION_ABORTED.
if (result_error == ERROR_HANDLE_EOF ||
result_error == ERROR_OPERATION_ABORTED ||
result_error == ERROR_BROKEN_PIPE)
@@ -250,9 +241,9 @@ finish:
if (error_ptr)
*error_ptr = return_info.GetError();
- // kBytesAvailableEvent is a manual reset event. Make sure it gets reset here
- // so that any
- // subsequent operations don't immediately see bytes available.
+ // kBytesAvailableEvent is a manual reset event. Make sure it gets reset
+ // here so that any subsequent operations don't immediately see bytes
+ // available.
ResetEvent(m_event_handles[kBytesAvailableEvent]);
IncrementFilePointer(return_info.GetBytes());
@@ -284,7 +275,8 @@ size_t ConnectionGenericFile::Write(cons
m_overlapped.hEvent = NULL;
- // Writes are not interruptible like reads are, so just block until it's done.
+ // Writes are not interruptible like reads are, so just block until it's
+ // done.
result = ::WriteFile(m_file, src, src_len, NULL, &m_overlapped);
if (!result && ::GetLastError() != ERROR_IO_PENDING) {
return_info.Set(0, eConnectionStatusError, ::GetLastError());
Modified: lldb/trunk/source/Host/windows/EditLineWin.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/windows/EditLineWin.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Host/windows/EditLineWin.cpp (original)
+++ lldb/trunk/source/Host/windows/EditLineWin.cpp Mon Apr 30 09:49:04 2018
@@ -316,8 +316,8 @@ int el_get(EditLine *el, int code, ...)
}
int el_source(EditLine *el, const char *file) {
- // init edit line by reading the contents of 'file'
- // nothing to do here on windows...
+ // init edit line by reading the contents of 'file' nothing to do here on
+ // windows...
return 0;
}
@@ -342,8 +342,8 @@ void history_end(History *) {
}
int history(History *, HistEvent *, int op, ...) {
- // perform operation 'op' on the history list with
- // optional arguments as needed by the operation.
+ // perform operation 'op' on the history list with optional arguments as
+ // needed by the operation.
return 0;
}
Modified: lldb/trunk/source/Host/windows/Host.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/windows/Host.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Host/windows/Host.cpp (original)
+++ lldb/trunk/source/Host/windows/Host.cpp Mon Apr 30 09:49:04 2018
@@ -35,8 +35,7 @@ using namespace lldb_private;
namespace {
bool GetTripleForProcess(const FileSpec &executable, llvm::Triple &triple) {
// Open the PE File as a binary file, and parse just enough information to
- // determine the
- // machine type.
+ // determine the machine type.
File imageBinary(executable.GetPath().c_str(), File::eOpenOptionRead,
lldb::eFilePermissionsUserRead);
imageBinary.SeekFromStart(0x3c);
@@ -63,8 +62,8 @@ bool GetTripleForProcess(const FileSpec
}
bool GetExecutableForProcess(const AutoHandle &handle, std::string &path) {
- // Get the process image path. MAX_PATH isn't long enough, paths can actually
- // be up to 32KB.
+ // Get the process image path. MAX_PATH isn't long enough, paths can
+ // actually be up to 32KB.
std::vector<wchar_t> buffer(PATH_MAX);
DWORD dwSize = buffer.size();
if (!::QueryFullProcessImageNameW(handle.get(), 0, &buffer[0], &dwSize))
@@ -75,10 +74,9 @@ bool GetExecutableForProcess(const AutoH
void GetProcessExecutableAndTriple(const AutoHandle &handle,
ProcessInstanceInfo &process) {
// We may not have permissions to read the path from the process. So start
- // off by
- // setting the executable file to whatever Toolhelp32 gives us, and then try
- // to
- // enhance this with more detailed information, but fail gracefully.
+ // off by setting the executable file to whatever Toolhelp32 gives us, and
+ // then try to enhance this with more detailed information, but fail
+ // gracefully.
std::string executable;
llvm::Triple triple;
triple.setVendor(llvm::Triple::PC);
Modified: lldb/trunk/source/Host/windows/HostInfoWindows.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/windows/HostInfoWindows.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Host/windows/HostInfoWindows.cpp (original)
+++ lldb/trunk/source/Host/windows/HostInfoWindows.cpp Mon Apr 30 09:49:04 2018
@@ -50,11 +50,10 @@ bool HostInfoWindows::GetOSVersion(uint3
info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX);
#pragma warning(push)
#pragma warning(disable : 4996)
- // Starting with Microsoft SDK for Windows 8.1, this function is deprecated in
- // favor of the
- // new Windows Version Helper APIs. Since we don't specify a minimum SDK
- // version, it's easier
- // to simply disable the warning rather than try to support both APIs.
+ // Starting with Microsoft SDK for Windows 8.1, this function is deprecated
+ // in favor of the new Windows Version Helper APIs. Since we don't specify a
+ // minimum SDK version, it's easier to simply disable the warning rather than
+ // try to support both APIs.
if (GetVersionEx((LPOSVERSIONINFO)&info) == 0) {
return false;
}
Modified: lldb/trunk/source/Host/windows/HostProcessWindows.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/windows/HostProcessWindows.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Host/windows/HostProcessWindows.cpp (original)
+++ lldb/trunk/source/Host/windows/HostProcessWindows.cpp Mon Apr 30 09:49:04 2018
@@ -88,8 +88,8 @@ HostThread HostProcessWindows::StartMoni
info->callback = callback;
// Since the life of this HostProcessWindows instance and the life of the
- // process may be different, duplicate the handle so that
- // the monitor thread can have ownership over its own copy of the handle.
+ // process may be different, duplicate the handle so that the monitor thread
+ // can have ownership over its own copy of the handle.
HostThread result;
if (::DuplicateHandle(GetCurrentProcess(), m_process, GetCurrentProcess(),
&info->process_handle, 0, FALSE, DUPLICATE_SAME_ACCESS))
Modified: lldb/trunk/source/Host/windows/PipeWindows.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/windows/PipeWindows.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Host/windows/PipeWindows.cpp (original)
+++ lldb/trunk/source/Host/windows/PipeWindows.cpp Mon Apr 30 09:49:04 2018
@@ -40,11 +40,9 @@ PipeWindows::PipeWindows() {
PipeWindows::~PipeWindows() { Close(); }
Status PipeWindows::CreateNew(bool child_process_inherit) {
- // Even for anonymous pipes, we open a named pipe. This is because you cannot
- // get
- // overlapped i/o on Windows without using a named pipe. So we synthesize a
- // unique
- // name.
+ // Even for anonymous pipes, we open a named pipe. This is because you
+ // cannot get overlapped i/o on Windows without using a named pipe. So we
+ // synthesize a unique name.
uint32_t serial = g_pipe_serial.fetch_add(1);
std::string pipe_name;
llvm::raw_string_ostream pipe_name_stream(pipe_name);
@@ -65,8 +63,8 @@ Status PipeWindows::CreateNew(llvm::Stri
std::string pipe_path = "\\\\.\\Pipe\\";
pipe_path.append(name);
- // Always open for overlapped i/o. We implement blocking manually in Read and
- // Write.
+ // Always open for overlapped i/o. We implement blocking manually in Read
+ // and Write.
DWORD read_mode = FILE_FLAG_OVERLAPPED;
m_read = ::CreateNamedPipeA(
pipe_path.c_str(), PIPE_ACCESS_INBOUND | read_mode,
@@ -250,12 +248,10 @@ Status PipeWindows::ReadWithTimeout(void
DWORD wait_result = ::WaitForSingleObject(m_read_overlapped.hEvent, timeout);
if (wait_result != WAIT_OBJECT_0) {
// The operation probably failed. However, if it timed out, we need to
- // cancel the I/O.
- // Between the time we returned from WaitForSingleObject and the time we
- // call CancelIoEx,
- // the operation may complete. If that hapens, CancelIoEx will fail and
- // return ERROR_NOT_FOUND.
- // If that happens, the original operation should be considered to have been
+ // cancel the I/O. Between the time we returned from WaitForSingleObject
+ // and the time we call CancelIoEx, the operation may complete. If that
+ // hapens, CancelIoEx will fail and return ERROR_NOT_FOUND. If that
+ // happens, the original operation should be considered to have been
// successful.
bool failed = true;
DWORD failure_error = ::GetLastError();
@@ -268,9 +264,8 @@ Status PipeWindows::ReadWithTimeout(void
return Status(failure_error, eErrorTypeWin32);
}
- // Now we call GetOverlappedResult setting bWait to false, since we've already
- // waited
- // as long as we're willing to.
+ // Now we call GetOverlappedResult setting bWait to false, since we've
+ // already waited as long as we're willing to.
if (!GetOverlappedResult(m_read, &m_read_overlapped, &sys_bytes_read, FALSE))
return Status(::GetLastError(), eErrorTypeWin32);
Modified: lldb/trunk/source/Interpreter/CommandAlias.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/CommandAlias.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/CommandAlias.cpp (original)
+++ lldb/trunk/source/Interpreter/CommandAlias.cpp Mon Apr 30 09:49:04 2018
@@ -196,8 +196,8 @@ bool CommandAlias::IsDashDashCommand() {
}
}
- // if this is a nested alias, it may be adding arguments on top of an
- // already dash-dash alias
+ // if this is a nested alias, it may be adding arguments on top of an already
+ // dash-dash alias
if ((m_is_dashdash_alias == eLazyBoolNo) && IsNestedAlias())
m_is_dashdash_alias =
(GetUnderlyingCommand()->IsDashDashCommand() ? eLazyBoolYes
@@ -228,8 +228,7 @@ std::pair<lldb::CommandObjectSP, OptionA
}
// allow CommandAlias objects to provide their own help, but fallback to the
-// info
-// for the underlying command if no customization has been provided
+// info for the underlying command if no customization has been provided
void CommandAlias::SetHelp(llvm::StringRef str) {
this->CommandObject::SetHelp(str);
m_did_set_help = true;
Modified: lldb/trunk/source/Interpreter/CommandInterpreter.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/CommandInterpreter.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/CommandInterpreter.cpp (original)
+++ lldb/trunk/source/Interpreter/CommandInterpreter.cpp Mon Apr 30 09:49:04 2018
@@ -681,10 +681,9 @@ void CommandInterpreter::LoadCommandDict
"bt [<digit> | all]", 2, 0, false));
if (bt_regex_cmd_ap.get()) {
// accept but don't document "bt -c <number>" -- before bt was a regex
- // command if you wanted to backtrace
- // three frames you would do "bt -c 3" but the intention is to have this
- // emulate the gdb "bt" command and
- // so now "bt 3" is the preferred form, in line with gdb.
+ // command if you wanted to backtrace three frames you would do "bt -c 3"
+ // but the intention is to have this emulate the gdb "bt" command and so
+ // now "bt 3" is the preferred form, in line with gdb.
if (bt_regex_cmd_ap->AddRegexCommand("^([[:digit:]]+)$",
"thread backtrace -c %1") &&
bt_regex_cmd_ap->AddRegexCommand("^-c ([[:digit:]]+)$",
@@ -825,9 +824,8 @@ CommandObjectSP CommandInterpreter::GetC
unsigned int num_user_matches = 0;
// Look through the command dictionaries one by one, and if we get only one
- // match from any of
- // them in toto, then return that, otherwise return an empty CommandObjectSP
- // and the list of matches.
+ // match from any of them in toto, then return that, otherwise return an
+ // empty CommandObjectSP and the list of matches.
if (HasCommands()) {
num_cmd_matches =
@@ -953,10 +951,9 @@ CommandObjectSP CommandInterpreter::GetC
CommandObjectSP cmd_obj_sp = GetCommandSP(llvm::StringRef(cmd_words.GetArgumentAtIndex(0)),
include_aliases, true, nullptr);
if (cmd_obj_sp.get() != nullptr) {
- // Loop through the rest of the words in the command (everything passed in
- // was supposed to be part of a
- // command name), and find the appropriate sub-command SP for each command
- // word....
+ // Loop through the rest of the words in the command (everything passed
+ // in was supposed to be part of a command name), and find the
+ // appropriate sub-command SP for each command word....
size_t end = cmd_words.GetArgumentCount();
for (size_t j = 1; j < end; ++j) {
if (cmd_obj_sp->IsMultiwordObject()) {
@@ -986,8 +983,7 @@ CommandObject *CommandInterpreter::GetCo
GetCommandSP(cmd_str, false, true, matches).get();
// If we didn't find an exact match to the command string in the commands,
- // look in
- // the aliases.
+ // look in the aliases.
if (command_obj)
return command_obj;
@@ -1002,8 +998,7 @@ CommandObject *CommandInterpreter::GetCo
command_obj = GetCommandSP(cmd_str, false, false, nullptr).get();
// Finally, if there wasn't an inexact match among the commands, look for an
- // inexact
- // match in both the commands and aliases.
+ // inexact match in both the commands and aliases.
if (command_obj) {
if (matches)
@@ -1166,8 +1161,8 @@ void CommandInterpreter::GetHelp(Command
CommandObject *CommandInterpreter::GetCommandObjectForCommand(
llvm::StringRef &command_string) {
// This function finds the final, lowest-level, alias-resolved command object
- // whose 'Execute' function will
- // eventually be invoked by the given command line.
+ // whose 'Execute' function will eventually be invoked by the given command
+ // line.
CommandObject *cmd_obj = nullptr;
size_t start = command_string.find_first_not_of(k_white_space);
@@ -1238,8 +1233,8 @@ static size_t FindArgumentTerminator(con
break;
if (pos > 0) {
if (isspace(s[pos - 1])) {
- // Check if the string ends "\s--" (where \s is a space character)
- // or if we have "\s--\s".
+ // Check if the string ends "\s--" (where \s is a space character) or
+ // if we have "\s--\s".
if ((pos + 2 >= s_len) || isspace(s[pos + 2])) {
return pos;
}
@@ -1374,20 +1369,19 @@ CommandObject *CommandInterpreter::Build
}
Status CommandInterpreter::PreprocessCommand(std::string &command) {
- // The command preprocessor needs to do things to the command
- // line before any parsing of arguments or anything else is done.
- // The only current stuff that gets preprocessed is anything enclosed
- // in backtick ('`') characters is evaluated as an expression and
- // the result of the expression must be a scalar that can be substituted
- // into the command. An example would be:
+ // The command preprocessor needs to do things to the command line before any
+ // parsing of arguments or anything else is done. The only current stuff that
+ // gets preprocessed is anything enclosed in backtick ('`') characters is
+ // evaluated as an expression and the result of the expression must be a
+ // scalar that can be substituted into the command. An example would be:
// (lldb) memory read `$rsp + 20`
Status error; // Status for any expressions that might not evaluate
size_t start_backtick;
size_t pos = 0;
while ((start_backtick = command.find('`', pos)) != std::string::npos) {
if (start_backtick > 0 && command[start_backtick - 1] == '\\') {
- // The backtick was preceded by a '\' character, remove the slash
- // and don't treat the backtick as the start of an expression
+ // The backtick was preceded by a '\' character, remove the slash and
+ // don't treat the backtick as the start of an expression
command.erase(start_backtick - 1, 1);
// No need to add one to start_backtick since we just deleted a char
pos = start_backtick;
@@ -1406,8 +1400,8 @@ Status CommandInterpreter::PreprocessCom
ExecutionContext exe_ctx(GetExecutionContext());
Target *target = exe_ctx.GetTargetPtr();
// Get a dummy target to allow for calculator mode while processing
- // backticks.
- // This also helps break the infinite loop caused when target is null.
+ // backticks. This also helps break the infinite loop caused when
+ // target is null.
if (!target)
target = m_debugger.GetDummyTarget();
if (target) {
@@ -1559,8 +1553,8 @@ bool CommandInterpreter::HandleCommand(c
const char *k_space_characters = "\t\n\v\f\r ";
size_t non_space = command_string.find_first_not_of(k_space_characters);
- // Check for empty line or comment line (lines whose first
- // non-space character is the comment character for this interpreter)
+ // Check for empty line or comment line (lines whose first non-space
+ // character is the comment character for this interpreter)
if (non_space == std::string::npos)
empty_command = true;
else if (command_string[non_space] == m_comment_char)
@@ -1633,8 +1627,8 @@ bool CommandInterpreter::HandleCommand(c
CommandObject *cmd_obj = ResolveCommandImpl(command_string, result);
// Although the user may have abbreviated the command, the command_string now
- // has the command expanded to the full name. For example, if the input
- // was "br s -n main", command_string is now "breakpoint set -n main".
+ // has the command expanded to the full name. For example, if the input was
+ // "br s -n main", command_string is now "breakpoint set -n main".
if (log) {
llvm::StringRef command_name = cmd_obj ? cmd_obj->GetCommandName() : "<not found>";
log->Printf("HandleCommand, cmd_obj : '%s'", command_name.str().c_str());
@@ -1648,8 +1642,8 @@ bool CommandInterpreter::HandleCommand(c
// Phase 2.
// Take care of things like setting up the history command & calling the
- // appropriate Execute method on the
- // CommandObject, with the appropriate arguments.
+ // appropriate Execute method on the CommandObject, with the appropriate
+ // arguments.
if (cmd_obj != nullptr) {
if (add_to_history) {
@@ -1759,9 +1753,8 @@ int CommandInterpreter::HandleCompletion
if (cursor_index > 0 || look_for_subcommand) {
// We are completing further on into a commands arguments, so find the
- // command and tell it
- // to complete the command.
- // First see if there is a matching initial command:
+ // command and tell it to complete the command. First see if there is a
+ // matching initial command:
CommandObject *command_object =
GetCommandObject(parsed_line.GetArgumentAtIndex(0));
if (command_object == nullptr) {
@@ -1781,17 +1774,16 @@ int CommandInterpreter::HandleCompletion
int CommandInterpreter::HandleCompletion(
const char *current_line, const char *cursor, const char *last_char,
int match_start_point, int max_return_elements, StringList &matches) {
- // We parse the argument up to the cursor, so the last argument in parsed_line
- // is
- // the one containing the cursor, and the cursor is after the last character.
+ // We parse the argument up to the cursor, so the last argument in
+ // parsed_line is the one containing the cursor, and the cursor is after the
+ // last character.
Args parsed_line(llvm::StringRef(current_line, last_char - current_line));
Args partial_parsed_line(
llvm::StringRef(current_line, cursor - current_line));
// Don't complete comments, and if the line we are completing is just the
- // history repeat character,
- // substitute the appropriate history line.
+ // history repeat character, substitute the appropriate history line.
const char *first_arg = parsed_line.GetArgumentAtIndex(0);
if (first_arg) {
if (first_arg[0] == m_comment_char)
@@ -1818,12 +1810,9 @@ int CommandInterpreter::HandleCompletion
if (cursor > current_line && cursor[-1] == ' ') {
// We are just after a space. If we are in an argument, then we will
- // continue
- // parsing, but if we are between arguments, then we have to complete
- // whatever the next
- // element would be.
- // We can distinguish the two cases because if we are in an argument (e.g.
- // because the space is
+ // continue parsing, but if we are between arguments, then we have to
+ // complete whatever the next element would be. We can distinguish the two
+ // cases because if we are in an argument (e.g. because the space is
// protected by a quote) then the space will also be in the parsed
// argument...
@@ -1857,8 +1846,7 @@ int CommandInterpreter::HandleCompletion
matches.InsertStringAtIndex(0, "");
} else {
// Now figure out if there is a common substring, and if so put that in
- // element 0, otherwise
- // put an empty string in element 0.
+ // element 0, otherwise put an empty string in element 0.
std::string command_partial_str;
if (cursor_index >= 0)
command_partial_str =
@@ -1869,9 +1857,8 @@ int CommandInterpreter::HandleCompletion
const size_t partial_name_len = command_partial_str.size();
common_prefix.erase(0, partial_name_len);
- // If we matched a unique single command, add a space...
- // Only do this if the completer told us this was a complete word,
- // however...
+ // If we matched a unique single command, add a space... Only do this if
+ // the completer told us this was a complete word, however...
if (num_command_matches == 1 && word_complete) {
char quote_char = parsed_line[cursor_index].quote;
common_prefix =
@@ -1949,8 +1936,8 @@ void CommandInterpreter::BuildAliasComma
if (option_arg_vector_sp.get()) {
if (wants_raw_input) {
// We have a command that both has command options and takes raw input.
- // Make *sure* it has a
- // " -- " in the right place in the raw_input_string.
+ // Make *sure* it has a " -- " in the right place in the
+ // raw_input_string.
size_t pos = raw_input_string.find(" -- ");
if (pos == std::string::npos) {
// None found; assume it goes at the beginning of the raw input string
@@ -2034,10 +2021,9 @@ void CommandInterpreter::BuildAliasComma
} else {
result.SetStatus(eReturnStatusSuccessFinishNoResult);
// This alias was not created with any options; nothing further needs to be
- // done, unless it is a command that
- // wants raw input, in which case we need to clear the rest of the data from
- // cmd_args, since its in the raw
- // input string.
+ // done, unless it is a command that wants raw input, in which case we need
+ // to clear the rest of the data from cmd_args, since its in the raw input
+ // string.
if (wants_raw_input) {
cmd_args.Clear();
cmd_args.SetArguments(new_args.GetArgumentCount(),
@@ -2067,7 +2053,8 @@ int CommandInterpreter::GetOptionArgumen
while (isdigit(cptr[0]))
++cptr;
- // We've gotten to the end of the digits; are we at the end of the string?
+ // We've gotten to the end of the digits; are we at the end of the
+ // string?
if (cptr[0] == '\0')
position = atoi(start);
}
@@ -2119,12 +2106,12 @@ void CommandInterpreter::SourceInitFile(
}
}
} else {
- // If we aren't looking in the current working directory we are looking
- // in the home directory. We will first see if there is an application
- // specific ".lldbinit" file whose name is "~/.lldbinit" followed by a
- // "-" and the name of the program. If this file doesn't exist, we fall
- // back to just the "~/.lldbinit" file. We also obey any requests to not
- // load the init files.
+ // If we aren't looking in the current working directory we are looking in
+ // the home directory. We will first see if there is an application
+ // specific ".lldbinit" file whose name is "~/.lldbinit" followed by a "-"
+ // and the name of the program. If this file doesn't exist, we fall back to
+ // just the "~/.lldbinit" file. We also obey any requests to not load the
+ // init files.
llvm::SmallString<64> home_dir_path;
llvm::sys::path::home_directory(home_dir_path);
FileSpec profilePath(home_dir_path.c_str(), false);
@@ -2150,8 +2137,7 @@ void CommandInterpreter::SourceInitFile(
}
// If the file exists, tell HandleCommand to 'source' it; this will do the
- // actual broadcasting
- // of the commands back to any appropriate listener (see
+ // actual broadcasting of the commands back to any appropriate listener (see
// CommandObjectSource::Execute for more details).
if (init_file.Exists()) {
@@ -2197,15 +2183,14 @@ void CommandInterpreter::HandleCommands(
size_t num_lines = commands.GetSize();
// If we are going to continue past a "continue" then we need to run the
- // commands synchronously.
- // Make sure you reset this value anywhere you return from the function.
+ // commands synchronously. Make sure you reset this value anywhere you return
+ // from the function.
bool old_async_execution = m_debugger.GetAsyncExecution();
// If we've been given an execution context, set it at the start, but don't
- // keep resetting it or we will
- // cause series of commands that change the context, then do an operation that
- // relies on that context to fail.
+ // keep resetting it or we will cause series of commands that change the
+ // context, then do an operation that relies on that context to fail.
if (override_context != nullptr)
UpdateExecutionContext(override_context);
@@ -2230,9 +2215,8 @@ void CommandInterpreter::HandleCommands(
// HandleCommand() since we updated our context already.
// We might call into a regex or alias command, in which case the
- // add_to_history will get lost. This
- // m_command_source_depth dingus is the way we turn off adding to the
- // history in that case, so set it up here.
+ // add_to_history will get lost. This m_command_source_depth dingus is the
+ // way we turn off adding to the history in that case, so set it up here.
if (!options.GetAddToHistory())
m_command_source_depth++;
bool success =
@@ -2273,18 +2257,17 @@ void CommandInterpreter::HandleCommands(
if (result.GetImmediateErrorStream())
result.GetImmediateErrorStream()->Flush();
- // N.B. Can't depend on DidChangeProcessState, because the state coming into
- // the command execution
- // could be running (for instance in Breakpoint Commands.
- // So we check the return value to see if it is has running in it.
+ // N.B. Can't depend on DidChangeProcessState, because the state coming
+ // into the command execution could be running (for instance in Breakpoint
+ // Commands. So we check the return value to see if it is has running in
+ // it.
if ((tmp_result.GetStatus() == eReturnStatusSuccessContinuingNoResult) ||
(tmp_result.GetStatus() == eReturnStatusSuccessContinuingResult)) {
if (options.GetStopOnContinue()) {
// If we caused the target to proceed, and we're going to stop in that
- // case, set the
- // status in our real result before returning. This is an error if the
- // continue was not the
- // last command in the set of commands to be run.
+ // case, set the status in our real result before returning. This is
+ // an error if the continue was not the last command in the set of
+ // commands to be run.
if (idx != num_lines - 1)
result.AppendErrorWithFormat(
"Aborting reading of commands after command #%" PRIu64
@@ -2432,8 +2415,8 @@ void CommandInterpreter::HandleCommandsF
cmd_file_path.c_str());
}
- // Used for inheriting the right settings when "command source" might have
- // nested "command source" commands
+ // Used for inheriting the right settings when "command source" might
+ // have nested "command source" commands
lldb::StreamFileSP empty_stream_sp;
m_command_source_flags.push_back(flags);
IOHandlerSP io_handler_sp(new IOHandlerEditline(
@@ -2746,18 +2729,14 @@ void CommandInterpreter::IOHandlerInputC
if (is_interactive == false) {
// When we are not interactive, don't execute blank lines. This will happen
// sourcing a commands file. We don't want blank lines to repeat the
- // previous
- // command and cause any errors to occur (like redefining an alias, get an
- // error
- // and stop parsing the commands file).
+ // previous command and cause any errors to occur (like redefining an
+ // alias, get an error and stop parsing the commands file).
if (line.empty())
return;
// When using a non-interactive file handle (like when sourcing commands
- // from a file)
- // we need to echo the command out so we don't just see the command output
- // and no
- // command...
+ // from a file) we need to echo the command out so we don't just see the
+ // command output and no command...
if (io_handler.GetFlags().Test(eHandleCommandFlagEchoCommand))
io_handler.GetOutputStreamFile()->Printf("%s%s\n", io_handler.GetPrompt(),
line.c_str());
@@ -2914,13 +2893,13 @@ bool CommandInterpreter::IsActive() {
lldb::IOHandlerSP
CommandInterpreter::GetIOHandler(bool force_create,
CommandInterpreterRunOptions *options) {
- // Always re-create the IOHandlerEditline in case the input
- // changed. The old instance might have had a non-interactive
- // input and now it does or vice versa.
+ // Always re-create the IOHandlerEditline in case the input changed. The old
+ // instance might have had a non-interactive input and now it does or vice
+ // versa.
if (force_create || !m_command_io_handler_sp) {
- // Always re-create the IOHandlerEditline in case the input
- // changed. The old instance might have had a non-interactive
- // input and now it does or vice versa.
+ // Always re-create the IOHandlerEditline in case the input changed. The
+ // old instance might have had a non-interactive input and now it does or
+ // vice versa.
uint32_t flags = 0;
if (options) {
@@ -2954,8 +2933,8 @@ CommandInterpreter::GetIOHandler(bool fo
void CommandInterpreter::RunCommandInterpreter(
bool auto_handle_events, bool spawn_thread,
CommandInterpreterRunOptions &options) {
- // Always re-create the command interpreter when we run it in case
- // any file handles have changed.
+ // Always re-create the command interpreter when we run it in case any file
+ // handles have changed.
bool force_create = true;
m_debugger.PushIOHandler(GetIOHandler(force_create, &options));
m_stopped_for_crash = false;
@@ -3023,8 +3002,8 @@ CommandInterpreter::ResolveCommandImpl(s
CommandObject *sub_cmd_obj =
cmd_obj->GetSubcommandObject(next_word.c_str());
if (sub_cmd_obj) {
- // The subcommand's name includes the parent command's name,
- // so restart rather than append to the revised_command_line.
+ // The subcommand's name includes the parent command's name, so
+ // restart rather than append to the revised_command_line.
llvm::StringRef sub_cmd_name = sub_cmd_obj->GetCommandName();
actual_cmd_name_len = sub_cmd_name.size() + 1;
revised_command_line.Clear();
Modified: lldb/trunk/source/Interpreter/CommandObject.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/CommandObject.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/CommandObject.cpp (original)
+++ lldb/trunk/source/Interpreter/CommandObject.cpp Mon Apr 30 09:49:04 2018
@@ -90,8 +90,8 @@ void CommandObject::SetHelpLong(llvm::St
void CommandObject::SetSyntax(llvm::StringRef str) { m_cmd_syntax = str; }
Options *CommandObject::GetOptions() {
- // By default commands don't have options unless this virtual function
- // is overridden by base classes.
+ // By default commands don't have options unless this virtual function is
+ // overridden by base classes.
return nullptr;
}
@@ -138,10 +138,10 @@ bool CommandObject::ParseOptions(Args &a
bool CommandObject::CheckRequirements(CommandReturnObject &result) {
#ifdef LLDB_CONFIGURATION_DEBUG
- // Nothing should be stored in m_exe_ctx between running commands as m_exe_ctx
- // has shared pointers to the target, process, thread and frame and we don't
- // want any CommandObject instances to keep any of these objects around
- // longer than for a single command. Every command should call
+ // Nothing should be stored in m_exe_ctx between running commands as
+ // m_exe_ctx has shared pointers to the target, process, thread and frame and
+ // we don't want any CommandObject instances to keep any of these objects
+ // around longer than for a single command. Every command should call
// CommandObject::Cleanup() after it has completed
assert(m_exe_ctx.GetTargetPtr() == NULL);
assert(m_exe_ctx.GetProcessPtr() == NULL);
@@ -149,9 +149,9 @@ bool CommandObject::CheckRequirements(Co
assert(m_exe_ctx.GetFramePtr() == NULL);
#endif
- // Lock down the interpreter's execution context prior to running the
- // command so we guarantee the selected target, process, thread and frame
- // can't go away during the execution
+ // Lock down the interpreter's execution context prior to running the command
+ // so we guarantee the selected target, process, thread and frame can't go
+ // away during the execution
m_exe_ctx = m_interpreter.GetExecutionContext();
const uint32_t flags = GetFlags().Get();
@@ -266,9 +266,8 @@ int CommandObject::HandleCompletion(Args
int max_return_elements,
bool &word_complete, StringList &matches) {
// Default implementation of WantsCompletion() is !WantsRawCommandString().
- // Subclasses who want raw command string but desire, for example,
- // argument completion should override WantsCompletion() to return true,
- // instead.
+ // Subclasses who want raw command string but desire, for example, argument
+ // completion should override WantsCompletion() to return true, instead.
if (WantsRawCommandString() && !WantsCompletion()) {
// FIXME: Abstract telling the completion to insert the completion
// character.
@@ -424,9 +423,10 @@ OptSetFiltered(uint32_t opt_set_mask,
return ret_val;
}
-// Default parameter value of opt_set_mask is LLDB_OPT_SET_ALL, which means take
-// all the argument data into account. On rare cases where some argument sticks
-// with certain option sets, this function returns the option set filtered args.
+// Default parameter value of opt_set_mask is LLDB_OPT_SET_ALL, which means
+// take all the argument data into account. On rare cases where some argument
+// sticks with certain option sets, this function returns the option set
+// filtered args.
void CommandObject::GetFormattedCommandArguments(Stream &str,
uint32_t opt_set_mask) {
int num_args = m_arguments.size();
@@ -466,8 +466,7 @@ void CommandObject::GetFormattedCommandA
first_name, second_name);
break;
// Explicitly test for all the rest of the cases, so if new types get
- // added we will notice the
- // missing case statement(s).
+ // added we will notice the missing case statement(s).
case eArgRepeatPlain:
case eArgRepeatOptional:
case eArgRepeatPlus:
@@ -503,8 +502,7 @@ void CommandObject::GetFormattedCommandA
str.Printf("<%s_1> .. <%s_n>", name_str.c_str(), name_str.c_str());
break;
// Explicitly test for all the rest of the cases, so if new types get
- // added we will notice the
- // missing case statement(s).
+ // added we will notice the missing case statement(s).
case eArgRepeatPairPlain:
case eArgRepeatPairOptional:
case eArgRepeatPairPlus:
@@ -512,8 +510,8 @@ void CommandObject::GetFormattedCommandA
case eArgRepeatPairRange:
case eArgRepeatPairRangeOptional:
// These should not be hit, as they should pass the IsPairType test
- // above, and control should
- // have gone into the other branch of the if statement.
+ // above, and control should have gone into the other branch of the if
+ // statement.
break;
}
}
@@ -857,9 +855,8 @@ void CommandObject::GenerateHelpText(Str
if (!IsDashDashCommand() && options && options->NumCommandOptions() > 0) {
if (WantsRawCommandString() && !WantsCompletion()) {
// Emit the message about using ' -- ' between the end of the command
- // options and the raw input
- // conditionally, i.e., only if the command object does not want
- // completion.
+ // options and the raw input conditionally, i.e., only if the command
+ // object does not want completion.
interpreter.OutputFormattedHelpText(
output_strm, "", "",
"\nImportant Note: Because this command takes 'raw' input, if you "
@@ -899,8 +896,8 @@ void CommandObject::AddIDsArgumentData(C
id_range_arg.arg_repetition = eArgRepeatOptional;
// The first (and only) argument for this command could be either an id or an
- // id_range.
- // Push both variants into the entry for the first argument for this command.
+ // id_range. Push both variants into the entry for the first argument for
+ // this command.
arg.push_back(id_arg);
arg.push_back(id_range_arg);
}
Modified: lldb/trunk/source/Interpreter/CommandObjectRegexCommand.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/CommandObjectRegexCommand.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/CommandObjectRegexCommand.cpp (original)
+++ lldb/trunk/source/Interpreter/CommandObjectRegexCommand.cpp Mon Apr 30 09:49:04 2018
@@ -63,8 +63,8 @@ bool CommandObjectRegexCommand::DoExecut
if (m_interpreter.GetExpandRegexAliases())
result.GetOutputStream().Printf("%s\n", new_command.c_str());
// Pass in true for "no context switching". The command that called us
- // should have set up the context
- // appropriately, we shouldn't have to redo that.
+ // should have set up the context appropriately, we shouldn't have to
+ // redo that.
return m_interpreter.HandleCommand(new_command.c_str(),
eLazyBoolCalculate, result, nullptr,
true, true);
Modified: lldb/trunk/source/Interpreter/CommandReturnObject.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/CommandReturnObject.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/CommandReturnObject.cpp (original)
+++ lldb/trunk/source/Interpreter/CommandReturnObject.cpp Mon Apr 30 09:49:04 2018
@@ -25,8 +25,8 @@ static void DumpStringToStreamWithNewlin
if (s.empty()) {
add_newline = add_newline_if_empty;
} else {
- // We already checked for empty above, now make sure there is a newline
- // in the error, and if there isn't one, add one.
+ // We already checked for empty above, now make sure there is a newline in
+ // the error, and if there isn't one, add one.
strm.Write(s.c_str(), s.size());
const char last_char = *s.rbegin();
@@ -127,8 +127,8 @@ void CommandReturnObject::SetError(llvm:
SetStatus(eReturnStatusFailed);
}
-// Similar to AppendError, but do not prepend 'Status: ' to message, and
-// don't append "\n" to the end of it.
+// Similar to AppendError, but do not prepend 'Status: ' to message, and don't
+// append "\n" to the end of it.
void CommandReturnObject::AppendRawError(llvm::StringRef in_string) {
if (in_string.empty())
Modified: lldb/trunk/source/Interpreter/OptionArgParser.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/OptionArgParser.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/OptionArgParser.cpp (original)
+++ lldb/trunk/source/Interpreter/OptionArgParser.cpp Mon Apr 30 09:49:04 2018
@@ -205,9 +205,9 @@ lldb::addr_t OptionArgParser::ToAddress(
}
} else {
- // Since the compiler can't handle things like "main + 12" we should
- // try to do this for now. The compiler doesn't like adding offsets
- // to function pointer types.
+ // Since the compiler can't handle things like "main + 12" we should try to
+ // do this for now. The compiler doesn't like adding offsets to function
+ // pointer types.
static RegularExpression g_symbol_plus_offset_regex(
"^(.*)([-\\+])[[:space:]]*(0x[0-9A-Fa-f]+|[0-9]+)[[:space:]]*$");
RegularExpression::Match regex_match(3);
Modified: lldb/trunk/source/Interpreter/OptionGroupBoolean.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/OptionGroupBoolean.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/OptionGroupBoolean.cpp (original)
+++ lldb/trunk/source/Interpreter/OptionGroupBoolean.cpp Mon Apr 30 09:49:04 2018
@@ -45,8 +45,8 @@ Status OptionGroupBoolean::SetOptionValu
ExecutionContext *execution_context) {
Status error;
if (m_option_definition.option_has_arg == OptionParser::eNoArgument) {
- // Not argument, toggle the default value and mark the option as having been
- // set
+ // Not argument, toggle the default value and mark the option as having
+ // been set
m_value.SetCurrentValue(!m_value.GetDefaultValue());
m_value.SetOptionWasSet();
} else {
Modified: lldb/trunk/source/Interpreter/OptionGroupFormat.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/OptionGroupFormat.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/OptionGroupFormat.cpp (original)
+++ lldb/trunk/source/Interpreter/OptionGroupFormat.cpp Mon Apr 30 09:49:04 2018
@@ -102,8 +102,8 @@ Status OptionGroupFormat::SetOptionValue
// We the first character of the "gdb_format_str" is not the
// NULL terminator, we didn't consume the entire string and
- // something is wrong. Also, if none of the format, size or count
- // was specified correctly, then abort.
+ // something is wrong. Also, if none of the format, size or count was
+ // specified correctly, then abort.
if (!gdb_format_str.empty() ||
(format == eFormatInvalid && byte_size == 0 && count == 0)) {
// Nothing got set correctly
@@ -112,9 +112,8 @@ Status OptionGroupFormat::SetOptionValue
return error;
}
- // At least one of the format, size or count was set correctly.
- // Anything that wasn't set correctly should be set to the
- // previous default
+ // At least one of the format, size or count was set correctly. Anything
+ // that wasn't set correctly should be set to the previous default
if (format == eFormatInvalid)
ParserGDBFormatLetter(execution_context, m_prev_gdb_format, format,
byte_size);
@@ -127,9 +126,8 @@ Status OptionGroupFormat::SetOptionValue
ParserGDBFormatLetter(execution_context, m_prev_gdb_size, format,
byte_size);
} else {
- // Byte size is disabled, make sure it wasn't specified
- // but if this is an address, it's actually necessary to
- // specify one so don't error out
+ // Byte size is disabled, make sure it wasn't specified but if this is an
+ // address, it's actually necessary to specify one so don't error out
if (byte_size > 0 && format != lldb::eFormatAddressInfo) {
error.SetErrorString(
"this command doesn't support specifying a byte size");
@@ -235,10 +233,9 @@ bool OptionGroupFormat::ParserGDBFormatL
case 'w':
case 'g':
{
- // Size isn't used for printing instructions, so if a size is specified, and
- // the previous format was
- // 'i', then we should reset it to the default ('x'). Otherwise we'll
- // continue to print as instructions,
+ // Size isn't used for printing instructions, so if a size is specified,
+ // and the previous format was 'i', then we should reset it to the
+ // default ('x'). Otherwise we'll continue to print as instructions,
// which isn't expected.
if (format_letter == 'b')
byte_size = 1;
Modified: lldb/trunk/source/Interpreter/OptionGroupVariable.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/OptionGroupVariable.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/OptionGroupVariable.cpp (original)
+++ lldb/trunk/source/Interpreter/OptionGroupVariable.cpp Mon Apr 30 09:49:04 2018
@@ -132,12 +132,12 @@ void OptionGroupVariable::OptionParsingS
llvm::ArrayRef<OptionDefinition> OptionGroupVariable::GetDefinitions() {
auto result = llvm::makeArrayRef(g_variable_options);
- // Show the "--no-args", "--no-locals" and "--show-globals"
- // options if we are showing frame specific options
+ // Show the "--no-args", "--no-locals" and "--show-globals" options if we are
+ // showing frame specific options
if (include_frame_options)
return result;
- // Skip the "--no-args", "--no-locals" and "--show-globals"
- // options if we are not showing frame specific options (globals only)
+ // Skip the "--no-args", "--no-locals" and "--show-globals" options if we are
+ // not showing frame specific options (globals only)
return result.drop_front(NUM_FRAME_OPTS);
}
Modified: lldb/trunk/source/Interpreter/OptionValue.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/OptionValue.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/OptionValue.cpp (original)
+++ lldb/trunk/source/Interpreter/OptionValue.cpp Mon Apr 30 09:49:04 2018
@@ -20,9 +20,8 @@ using namespace lldb;
using namespace lldb_private;
//-------------------------------------------------------------------------
-// Get this value as a uint64_t value if it is encoded as a boolean,
-// uint64_t or int64_t. Other types will cause "fail_value" to be
-// returned
+// Get this value as a uint64_t value if it is encoded as a boolean, uint64_t
+// or int64_t. Other types will cause "fail_value" to be returned
//-------------------------------------------------------------------------
uint64_t OptionValue::GetUInt64Value(uint64_t fail_value, bool *success_ptr) {
if (success_ptr)
@@ -508,8 +507,8 @@ const char *OptionValue::GetBuiltinTypeA
lldb::OptionValueSP OptionValue::CreateValueFromCStringForTypeMask(
const char *value_cstr, uint32_t type_mask, Status &error) {
- // If only 1 bit is set in the type mask for a dictionary or array
- // then we know how to decode a value from a cstring
+ // If only 1 bit is set in the type mask for a dictionary or array then we
+ // know how to decode a value from a cstring
lldb::OptionValueSP value_sp;
switch (type_mask) {
case 1u << eTypeArch:
Modified: lldb/trunk/source/Interpreter/OptionValueDictionary.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/OptionValueDictionary.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/OptionValueDictionary.cpp (original)
+++ lldb/trunk/source/Interpreter/OptionValueDictionary.cpp Mon Apr 30 09:49:04 2018
@@ -128,9 +128,7 @@ Status OptionValueDictionary::SetArgs(co
if (key.front() == '[') {
// Key name starts with '[', so the key value must be in single or
- // double quotes like:
- // ['<key>']
- // ["<key>"]
+ // double quotes like: ['<key>'] ["<key>"]
if ((key.size() > 2) && (key.back() == ']')) {
// Strip leading '[' and trailing ']'
key = key.substr(1, key.size() - 2);
@@ -286,8 +284,8 @@ OptionValueDictionary::GetValueForKey(co
bool OptionValueDictionary::SetValueForKey(const ConstString &key,
const lldb::OptionValueSP &value_sp,
bool can_replace) {
- // Make sure the value_sp object is allowed to contain
- // values of the type passed in...
+ // Make sure the value_sp object is allowed to contain values of the type
+ // passed in...
if (value_sp && (m_type_mask & value_sp->GetTypeAsMask())) {
if (!can_replace) {
collection::const_iterator pos = m_values.find(key);
Modified: lldb/trunk/source/Interpreter/OptionValueFileSpec.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/OptionValueFileSpec.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/OptionValueFileSpec.cpp (original)
+++ lldb/trunk/source/Interpreter/OptionValueFileSpec.cpp Mon Apr 30 09:49:04 2018
@@ -67,13 +67,10 @@ Status OptionValueFileSpec::SetValueFrom
case eVarSetOperationAssign:
if (value.size() > 0) {
// The setting value may have whitespace, double-quotes, or single-quotes
- // around the file
- // path to indicate that internal spaces are not word breaks. Strip off
- // any ws & quotes
- // from the start and end of the file path - we aren't doing any word //
- // breaking here so
- // the quoting is unnecessary. NB this will cause a problem if someone
- // tries to specify
+ // around the file path to indicate that internal spaces are not word
+ // breaks. Strip off any ws & quotes from the start and end of the file
+ // path - we aren't doing any word // breaking here so the quoting is
+ // unnecessary. NB this will cause a problem if someone tries to specify
// a file path that legitimately begins or ends with a " or ' character,
// or whitespace.
value = value.trim("\"' \t");
Modified: lldb/trunk/source/Interpreter/OptionValueFormatEntity.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/OptionValueFormatEntity.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/OptionValueFormatEntity.cpp (original)
+++ lldb/trunk/source/Interpreter/OptionValueFormatEntity.cpp Mon Apr 30 09:49:04 2018
@@ -64,12 +64,10 @@ Status OptionValueFormatEntity::SetValue
case eVarSetOperationReplace:
case eVarSetOperationAssign: {
// Check if the string starts with a quote character after removing leading
- // and trailing spaces.
- // If it does start with a quote character, make sure it ends with the same
- // quote character
- // and remove the quotes before we parse the format string. If the string
- // doesn't start with
- // a quote, leave the string alone and parse as is.
+ // and trailing spaces. If it does start with a quote character, make sure
+ // it ends with the same quote character and remove the quotes before we
+ // parse the format string. If the string doesn't start with a quote, leave
+ // the string alone and parse as is.
llvm::StringRef trimmed_value_str = value_str.trim();
if (!trimmed_value_str.empty()) {
const char first_char = trimmed_value_str[0];
Modified: lldb/trunk/source/Interpreter/OptionValueProperties.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/OptionValueProperties.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/OptionValueProperties.cpp (original)
+++ lldb/trunk/source/Interpreter/OptionValueProperties.cpp Mon Apr 30 09:49:04 2018
@@ -35,15 +35,13 @@ OptionValueProperties::OptionValueProper
m_name(global_properties.m_name),
m_properties(global_properties.m_properties),
m_name_to_index(global_properties.m_name_to_index) {
- // We now have an exact copy of "global_properties". We need to now
- // find all non-global settings and copy the property values so that
- // all non-global settings get new OptionValue instances created for
- // them.
+ // We now have an exact copy of "global_properties". We need to now find all
+ // non-global settings and copy the property values so that all non-global
+ // settings get new OptionValue instances created for them.
const size_t num_properties = m_properties.size();
for (size_t i = 0; i < num_properties; ++i) {
// Duplicate any values that are not global when constructing properties
- // from
- // a global copy
+ // from a global copy
if (m_properties[i].IsGlobal() == false) {
lldb::OptionValueSP new_value_sp(m_properties[i].GetValue()->DeepCopy());
m_properties[i].SetOptionValue(new_value_sp);
@@ -157,15 +155,13 @@ OptionValueProperties::GetSubValue(const
case '{':
// Predicate matching for predicates like
// "<setting-name>{<predicate>}"
- // strings are parsed by the current OptionValueProperties subclass
- // to mean whatever they want to. For instance a subclass of
- // OptionValueProperties for a lldb_private::Target might implement:
- // "target.run-args{arch==i386}" -- only set run args if the arch is
- // i386
- // "target.run-args{path=/tmp/a/b/c/a.out}" -- only set run args if the
- // path matches
- // "target.run-args{basename==test&&arch==x86_64}" -- only set run args
- // if executable basename is "test" and arch is "x86_64"
+ // strings are parsed by the current OptionValueProperties subclass to mean
+ // whatever they want to. For instance a subclass of OptionValueProperties
+ // for a lldb_private::Target might implement: "target.run-
+ // args{arch==i386}" -- only set run args if the arch is i386 "target
+ // .run-args{path=/tmp/a/b/c/a.out}" -- only set run args if the path
+ // matches "target.run-args{basename==test&&arch==x86_64}" -- only set run
+ // args if executable basename is "test" and arch is "x86_64"
if (sub_name[1]) {
llvm::StringRef predicate_start = sub_name.drop_front();
size_t pos = predicate_start.find_first_of('}');
@@ -189,9 +185,8 @@ OptionValueProperties::GetSubValue(const
break;
case '[':
- // Array or dictionary access for subvalues like:
- // "[12]" -- access 12th array element
- // "['hello']" -- dictionary access of key named hello
+ // Array or dictionary access for subvalues like: "[12]" -- access
+ // 12th array element "['hello']" -- dictionary access of key named hello
return value_sp->GetSubValue(exe_ctx, sub_name, will_modify, error);
default:
Modified: lldb/trunk/source/Interpreter/OptionValueSInt64.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/OptionValueSInt64.cpp?rev=331197&r1=331196&r2=331197&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/OptionValueSInt64.cpp (original)
+++ lldb/trunk/source/Interpreter/OptionValueSInt64.cpp Mon Apr 30 09:49:04 2018
@@ -21,7 +21,8 @@ using namespace lldb_private;
void OptionValueSInt64::DumpValue(const ExecutionContext *exe_ctx, Stream &strm,
uint32_t dump_mask) {
- // printf ("%p: DumpValue (exe_ctx=%p, strm, mask) m_current_value = %" PRIi64
+ // printf ("%p: DumpValue (exe_ctx=%p, strm, mask) m_current_value = %"
+ // PRIi64
// "\n", this, exe_ctx, m_current_value);
if (dump_mask & eDumpOptionType)
strm.Printf("(%s)", GetTypeAsCString());
More information about the lldb-commits
mailing list