summaryrefslogtreecommitdiffstats
path: root/lldb/include
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/include')
-rw-r--r--lldb/include/lldb/API/SBAddress.h6
-rw-r--r--lldb/include/lldb/API/SBBroadcaster.h14
-rw-r--r--lldb/include/lldb/API/SBCommandInterpreter.h31
-rw-r--r--lldb/include/lldb/API/SBCommandReturnObject.h3
-rw-r--r--lldb/include/lldb/API/SBData.h14
-rw-r--r--lldb/include/lldb/API/SBExpressionOptions.h6
-rw-r--r--lldb/include/lldb/API/SBFrame.h8
-rw-r--r--lldb/include/lldb/API/SBInstruction.h3
-rw-r--r--lldb/include/lldb/API/SBInstructionList.h4
-rw-r--r--lldb/include/lldb/API/SBProcess.h8
-rw-r--r--lldb/include/lldb/API/SBStream.h13
-rw-r--r--lldb/include/lldb/API/SBSymbol.h4
-rw-r--r--lldb/include/lldb/API/SBTarget.h7
-rw-r--r--lldb/include/lldb/API/SBValue.h3
-rw-r--r--lldb/include/lldb/API/SBValueList.h4
-rw-r--r--lldb/include/lldb/Breakpoint/Breakpoint.h25
-rw-r--r--lldb/include/lldb/Breakpoint/BreakpointLocation.h3
-rw-r--r--lldb/include/lldb/Breakpoint/BreakpointLocationCollection.h4
-rw-r--r--lldb/include/lldb/Breakpoint/BreakpointLocationList.h12
-rw-r--r--lldb/include/lldb/Breakpoint/BreakpointName.h4
-rw-r--r--lldb/include/lldb/Breakpoint/BreakpointOptions.h34
-rw-r--r--lldb/include/lldb/Breakpoint/BreakpointResolver.h8
-rw-r--r--lldb/include/lldb/Breakpoint/BreakpointResolverAddress.h3
-rw-r--r--lldb/include/lldb/Breakpoint/BreakpointResolverName.h4
-rw-r--r--lldb/include/lldb/Breakpoint/BreakpointSite.h10
-rw-r--r--lldb/include/lldb/Breakpoint/StoppointLocation.h4
-rw-r--r--lldb/include/lldb/Breakpoint/Watchpoint.h12
-rw-r--r--lldb/include/lldb/Breakpoint/WatchpointList.h6
-rw-r--r--lldb/include/lldb/Breakpoint/WatchpointOptions.h20
-rw-r--r--lldb/include/lldb/Core/Address.h34
-rw-r--r--lldb/include/lldb/Core/AddressRange.h4
-rw-r--r--lldb/include/lldb/Core/AddressResolverName.h4
-rw-r--r--lldb/include/lldb/Core/Broadcaster.h32
-rw-r--r--lldb/include/lldb/Core/Debugger.h26
-rw-r--r--lldb/include/lldb/Core/Disassembler.h47
-rw-r--r--lldb/include/lldb/Core/EmulateInstruction.h17
-rw-r--r--lldb/include/lldb/Core/FormatEntity.h8
-rw-r--r--lldb/include/lldb/Core/IOHandler.h30
-rw-r--r--lldb/include/lldb/Core/MappedHash.h38
-rw-r--r--lldb/include/lldb/Core/Module.h33
-rw-r--r--lldb/include/lldb/Core/ModuleList.h6
-rw-r--r--lldb/include/lldb/Core/ModuleSpec.h4
-rw-r--r--lldb/include/lldb/Core/PluginManager.h10
-rw-r--r--lldb/include/lldb/Core/RangeMap.h75
-rw-r--r--lldb/include/lldb/Core/RegisterValue.h15
-rw-r--r--lldb/include/lldb/Core/STLUtils.h4
-rw-r--r--lldb/include/lldb/Core/Scalar.h46
-rw-r--r--lldb/include/lldb/Core/SearchFilter.h3
-rw-r--r--lldb/include/lldb/Core/Section.h7
-rw-r--r--lldb/include/lldb/Core/SourceManager.h5
-rw-r--r--lldb/include/lldb/Core/StreamBuffer.h5
-rw-r--r--lldb/include/lldb/Core/UniqueCStringMap.h73
-rw-r--r--lldb/include/lldb/Core/UserSettingsController.h19
-rw-r--r--lldb/include/lldb/Core/Value.h7
-rw-r--r--lldb/include/lldb/Core/ValueObject.h70
-rw-r--r--lldb/include/lldb/Core/ValueObjectSyntheticFilter.h6
-rw-r--r--lldb/include/lldb/DataFormatters/DataVisualization.h11
-rw-r--r--lldb/include/lldb/DataFormatters/FormatClasses.h4
-rw-r--r--lldb/include/lldb/DataFormatters/FormatManager.h47
-rw-r--r--lldb/include/lldb/DataFormatters/FormattersContainer.h10
-rw-r--r--lldb/include/lldb/DataFormatters/StringPrinter.h3
-rw-r--r--lldb/include/lldb/DataFormatters/TypeFormat.h7
-rw-r--r--lldb/include/lldb/DataFormatters/TypeSummary.h11
-rw-r--r--lldb/include/lldb/DataFormatters/TypeSynthetic.h35
-rw-r--r--lldb/include/lldb/DataFormatters/TypeValidator.h7
-rw-r--r--lldb/include/lldb/DataFormatters/ValueObjectPrinter.h8
-rw-r--r--lldb/include/lldb/Expression/ExpressionSourceCode.h5
-rw-r--r--lldb/include/lldb/Expression/ExpressionVariable.h15
-rw-r--r--lldb/include/lldb/Expression/IRMemoryMap.h4
-rw-r--r--lldb/include/lldb/Expression/LLVMUserExpression.h9
-rw-r--r--lldb/include/lldb/Expression/UtilityFunction.h11
-rw-r--r--lldb/include/lldb/Host/Debug.h10
-rw-r--r--lldb/include/lldb/Host/Editline.h13
-rw-r--r--lldb/include/lldb/Host/MainLoop.h26
-rw-r--r--lldb/include/lldb/Host/MainLoopBase.h21
-rw-r--r--lldb/include/lldb/Host/PosixApi.h4
-rw-r--r--lldb/include/lldb/Host/Predicate.h54
-rw-r--r--lldb/include/lldb/Host/Socket.h6
-rw-r--r--lldb/include/lldb/Host/SocketAddress.h28
-rw-r--r--lldb/include/lldb/Host/Symbols.h16
-rw-r--r--lldb/include/lldb/Host/TaskPool.h31
-rw-r--r--lldb/include/lldb/Host/XML.h19
-rw-r--r--lldb/include/lldb/Host/common/GetOptInc.h4
-rw-r--r--lldb/include/lldb/Host/common/NativeBreakpoint.h4
-rw-r--r--lldb/include/lldb/Host/common/NativeProcessProtocol.h31
-rw-r--r--lldb/include/lldb/Host/common/NativeRegisterContext.h17
-rw-r--r--lldb/include/lldb/Host/posix/ConnectionFileDescriptorPosix.h4
-rw-r--r--lldb/include/lldb/Interpreter/CommandAlias.h4
-rw-r--r--lldb/include/lldb/Interpreter/CommandCompletions.h16
-rw-r--r--lldb/include/lldb/Interpreter/CommandInterpreter.h47
-rw-r--r--lldb/include/lldb/Interpreter/CommandObject.h52
-rw-r--r--lldb/include/lldb/Interpreter/CommandObjectMultiword.h4
-rw-r--r--lldb/include/lldb/Interpreter/OptionGroupBoolean.h6
-rw-r--r--lldb/include/lldb/Interpreter/OptionValue.h21
-rw-r--r--lldb/include/lldb/Interpreter/OptionValueArray.h12
-rw-r--r--lldb/include/lldb/Interpreter/OptionValueProperties.h10
-rw-r--r--lldb/include/lldb/Interpreter/OptionValueUInt64.h6
-rw-r--r--lldb/include/lldb/Interpreter/Options.h32
-rw-r--r--lldb/include/lldb/Symbol/Block.h4
-rw-r--r--lldb/include/lldb/Symbol/ClangASTContext.h22
-rw-r--r--lldb/include/lldb/Symbol/ClangASTImporter.h11
-rw-r--r--lldb/include/lldb/Symbol/ClangExternalASTSourceCallbacks.h12
-rw-r--r--lldb/include/lldb/Symbol/CompactUnwindInfo.h33
-rw-r--r--lldb/include/lldb/Symbol/CompilerType.h72
-rw-r--r--lldb/include/lldb/Symbol/DWARFCallFrameInfo.h44
-rw-r--r--lldb/include/lldb/Symbol/DeclVendor.h5
-rw-r--r--lldb/include/lldb/Symbol/FuncUnwinders.h45
-rw-r--r--lldb/include/lldb/Symbol/GoASTContext.h11
-rw-r--r--lldb/include/lldb/Symbol/ObjectFile.h23
-rw-r--r--lldb/include/lldb/Symbol/Symbol.h70
-rw-r--r--lldb/include/lldb/Symbol/SymbolFile.h8
-rw-r--r--lldb/include/lldb/Symbol/SymbolVendor.h15
-rw-r--r--lldb/include/lldb/Symbol/Type.h38
-rw-r--r--lldb/include/lldb/Symbol/TypeSystem.h50
-rw-r--r--lldb/include/lldb/Symbol/UnwindPlan.h47
-rw-r--r--lldb/include/lldb/Symbol/UnwindTable.h21
-rw-r--r--lldb/include/lldb/Symbol/Variable.h10
-rw-r--r--lldb/include/lldb/Symbol/VariableList.h10
-rw-r--r--lldb/include/lldb/Target/ABI.h15
-rw-r--r--lldb/include/lldb/Target/DynamicLoader.h4
-rw-r--r--lldb/include/lldb/Target/ExecutionContext.h26
-rw-r--r--lldb/include/lldb/Target/Language.h19
-rw-r--r--lldb/include/lldb/Target/LanguageRuntime.h31
-rw-r--r--lldb/include/lldb/Target/Memory.h4
-rw-r--r--lldb/include/lldb/Target/MemoryRegionInfo.h8
-rw-r--r--lldb/include/lldb/Target/ObjCLanguageRuntime.h27
-rw-r--r--lldb/include/lldb/Target/Platform.h53
-rw-r--r--lldb/include/lldb/Target/Process.h153
-rw-r--r--lldb/include/lldb/Target/ProcessInfo.h11
-rw-r--r--lldb/include/lldb/Target/ProcessLaunchInfo.h7
-rw-r--r--lldb/include/lldb/Target/Queue.h13
-rw-r--r--lldb/include/lldb/Target/QueueItem.h11
-rw-r--r--lldb/include/lldb/Target/QueueList.h9
-rw-r--r--lldb/include/lldb/Target/RegisterCheckpoint.h15
-rw-r--r--lldb/include/lldb/Target/RegisterContext.h18
-rw-r--r--lldb/include/lldb/Target/RegisterNumber.h4
-rw-r--r--lldb/include/lldb/Target/SectionLoadHistory.h16
-rw-r--r--lldb/include/lldb/Target/SectionLoadList.h12
-rw-r--r--lldb/include/lldb/Target/StackFrame.h3
-rw-r--r--lldb/include/lldb/Target/StackID.h18
-rw-r--r--lldb/include/lldb/Target/StopInfo.h52
-rw-r--r--lldb/include/lldb/Target/Target.h104
-rw-r--r--lldb/include/lldb/Target/Thread.h138
-rw-r--r--lldb/include/lldb/Target/ThreadCollection.h6
-rw-r--r--lldb/include/lldb/Target/ThreadList.h11
-rw-r--r--lldb/include/lldb/Target/ThreadPlan.h62
-rw-r--r--lldb/include/lldb/Target/ThreadPlanCallFunction.h39
-rw-r--r--lldb/include/lldb/Target/ThreadPlanCallFunctionUsingABI.h8
-rw-r--r--lldb/include/lldb/Target/ThreadPlanShouldStopHere.h28
-rw-r--r--lldb/include/lldb/Target/ThreadPlanStepRange.h7
-rw-r--r--lldb/include/lldb/Target/UnixSignals.h35
-rw-r--r--lldb/include/lldb/Utility/ArchSpec.h9
-rw-r--r--lldb/include/lldb/Utility/Args.h10
-rw-r--r--lldb/include/lldb/Utility/ConstString.h4
-rw-r--r--lldb/include/lldb/Utility/DataBufferHeap.h4
-rw-r--r--lldb/include/lldb/Utility/History.h12
-rw-r--r--lldb/include/lldb/Utility/JSON.h5
-rw-r--r--lldb/include/lldb/Utility/Log.h20
-rw-r--r--lldb/include/lldb/Utility/SafeMachO.h17
-rw-r--r--lldb/include/lldb/Utility/SelectHelper.h31
-rw-r--r--lldb/include/lldb/Utility/SharedCluster.h6
-rw-r--r--lldb/include/lldb/Utility/SharingPtr.h6
-rw-r--r--lldb/include/lldb/Utility/Stream.h4
-rw-r--r--lldb/include/lldb/Utility/StreamTee.h21
-rw-r--r--lldb/include/lldb/Utility/StringExtractor.h10
-rw-r--r--lldb/include/lldb/Utility/StringExtractorGDBRemote.h4
-rw-r--r--lldb/include/lldb/Utility/StringList.h17
-rw-r--r--lldb/include/lldb/Utility/Timeout.h6
-rw-r--r--lldb/include/lldb/lldb-enumerations.h143
-rw-r--r--lldb/include/lldb/lldb-private-enumerations.h13
-rw-r--r--lldb/include/lldb/lldb-private-forward.h7
-rw-r--r--lldb/include/lldb/lldb-private-types.h35
-rw-r--r--lldb/include/lldb/lldb-types.h4
-rw-r--r--lldb/include/lldb/lldb-versioning.h4
174 files changed, 1591 insertions, 1909 deletions
diff --git a/lldb/include/lldb/API/SBAddress.h b/lldb/include/lldb/API/SBAddress.h
index 9e697beffdd..ce095aaaab1 100644
--- a/lldb/include/lldb/API/SBAddress.h
+++ b/lldb/include/lldb/API/SBAddress.h
@@ -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
diff --git a/lldb/include/lldb/API/SBBroadcaster.h b/lldb/include/lldb/API/SBBroadcaster.h
index 3fc47af6551..dc6c50ec0a8 100644
--- a/lldb/include/lldb/API/SBBroadcaster.h
+++ b/lldb/include/lldb/API/SBBroadcaster.h
@@ -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:
diff --git a/lldb/include/lldb/API/SBCommandInterpreter.h b/lldb/include/lldb/API/SBCommandInterpreter.h
index 80f24ceca7b..928e40bad28 100644
--- a/lldb/include/lldb/API/SBCommandInterpreter.h
+++ b/lldb/include/lldb/API/SBCommandInterpreter.h
@@ -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);
diff --git a/lldb/include/lldb/API/SBCommandReturnObject.h b/lldb/include/lldb/API/SBCommandReturnObject.h
index c73e3f7cf1f..a372ea2ad9e 100644
--- a/lldb/include/lldb/API/SBCommandReturnObject.h
+++ b/lldb/include/lldb/API/SBCommandReturnObject.h
@@ -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);
diff --git a/lldb/include/lldb/API/SBData.h b/lldb/include/lldb/API/SBData.h
index 7aa4ea0ff8d..7ff619e6866 100644
--- a/lldb/include/lldb/API/SBData.h
+++ b/lldb/include/lldb/API/SBData.h
@@ -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,
diff --git a/lldb/include/lldb/API/SBExpressionOptions.h b/lldb/include/lldb/API/SBExpressionOptions.h
index 370811d0c35..1459ba6fee2 100644
--- a/lldb/include/lldb/API/SBExpressionOptions.h
+++ b/lldb/include/lldb/API/SBExpressionOptions.h
@@ -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;
diff --git a/lldb/include/lldb/API/SBFrame.h b/lldb/include/lldb/API/SBFrame.h
index 58339750def..b8953dd1323 100644
--- a/lldb/include/lldb/API/SBFrame.h
+++ b/lldb/include/lldb/API/SBFrame.h
@@ -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);
diff --git a/lldb/include/lldb/API/SBInstruction.h b/lldb/include/lldb/API/SBInstruction.h
index 23daf1c5663..49dcc13bea2 100644
--- a/lldb/include/lldb/API/SBInstruction.h
+++ b/lldb/include/lldb/API/SBInstruction.h
@@ -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;
diff --git a/lldb/include/lldb/API/SBInstructionList.h b/lldb/include/lldb/API/SBInstructionList.h
index 0323a3c80c0..c8fed5c8319 100644
--- a/lldb/include/lldb/API/SBInstructionList.h
+++ b/lldb/include/lldb/API/SBInstructionList.h
@@ -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,
diff --git a/lldb/include/lldb/API/SBProcess.h b/lldb/include/lldb/API/SBProcess.h
index 2e8925941fb..332794f4259 100644
--- a/lldb/include/lldb/API/SBProcess.h
+++ b/lldb/include/lldb/API/SBProcess.h
@@ -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);
diff --git a/lldb/include/lldb/API/SBStream.h b/lldb/include/lldb/API/SBStream.h
index a75afc7ee37..7364ca7797f 100644
--- a/lldb/include/lldb/API/SBStream.h
+++ b/lldb/include/lldb/API/SBStream.h
@@ -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:
diff --git a/lldb/include/lldb/API/SBSymbol.h b/lldb/include/lldb/API/SBSymbol.h
index d17a4ccffe0..a29ac61d291 100644
--- a/lldb/include/lldb/API/SBSymbol.h
+++ b/lldb/include/lldb/API/SBSymbol.h
@@ -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();
diff --git a/lldb/include/lldb/API/SBTarget.h b/lldb/include/lldb/API/SBTarget.h
index 961a49bf7d6..e26d846fa99 100644
--- a/lldb/include/lldb/API/SBTarget.h
+++ b/lldb/include/lldb/API/SBTarget.h
@@ -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;
diff --git a/lldb/include/lldb/API/SBValue.h b/lldb/include/lldb/API/SBValue.h
index 5ef8915b58f..ab5bdfea993 100644
--- a/lldb/include/lldb/API/SBValue.h
+++ b/lldb/include/lldb/API/SBValue.h
@@ -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);
diff --git a/lldb/include/lldb/API/SBValueList.h b/lldb/include/lldb/API/SBValueList.h
index 495b0140cad..0242dd7f71a 100644
--- a/lldb/include/lldb/API/SBValueList.h
+++ b/lldb/include/lldb/API/SBValueList.h
@@ -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:
diff --git a/lldb/include/lldb/Breakpoint/Breakpoint.h b/lldb/include/lldb/Breakpoint/Breakpoint.h
index 9a798090a59..57eb2adce79 100644
--- a/lldb/include/lldb/Breakpoint/Breakpoint.h
+++ b/lldb/include/lldb/Breakpoint/Breakpoint.h
@@ -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
diff --git a/lldb/include/lldb/Breakpoint/BreakpointLocation.h b/lldb/include/lldb/Breakpoint/BreakpointLocation.h
index b68a9ffad04..288d44df990 100644
--- a/lldb/include/lldb/Breakpoint/BreakpointLocation.h
+++ b/lldb/include/lldb/Breakpoint/BreakpointLocation.h
@@ -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.
//------------------------------------------------------------------
//------------------------------------------------------------------
diff --git a/lldb/include/lldb/Breakpoint/BreakpointLocationCollection.h b/lldb/include/lldb/Breakpoint/BreakpointLocationCollection.h
index 4b2d9d4b344..579d468647f 100644
--- a/lldb/include/lldb/Breakpoint/BreakpointLocationCollection.h
+++ b/lldb/include/lldb/Breakpoint/BreakpointLocationCollection.h
@@ -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:
diff --git a/lldb/include/lldb/Breakpoint/BreakpointLocationList.h b/lldb/include/lldb/Breakpoint/BreakpointLocationList.h
index a91b51383a9..c05c198f02c 100644
--- a/lldb/include/lldb/Breakpoint/BreakpointLocationList.h
+++ b/lldb/include/lldb/Breakpoint/BreakpointLocationList.h
@@ -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:
diff --git a/lldb/include/lldb/Breakpoint/BreakpointName.h b/lldb/include/lldb/Breakpoint/BreakpointName.h
index 1cfa141011a..292a0de4f48 100644
--- a/lldb/include/lldb/Breakpoint/BreakpointName.h
+++ b/lldb/include/lldb/Breakpoint/BreakpointName.h
@@ -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);
diff --git a/lldb/include/lldb/Breakpoint/BreakpointOptions.h b/lldb/include/lldb/Breakpoint/BreakpointOptions.h
index 0229d52df47..385aef3e8c7 100644
--- a/lldb/include/lldb/Breakpoint/BreakpointOptions.h
+++ b/lldb/include/lldb/Breakpoint/BreakpointOptions.h
@@ -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.
diff --git a/lldb/include/lldb/Breakpoint/BreakpointResolver.h b/lldb/include/lldb/Breakpoint/BreakpointResolver.h
index 7bcd889ce78..92b74d2b8ea 100644
--- a/lldb/include/lldb/Breakpoint/BreakpointResolver.h
+++ b/lldb/include/lldb/Breakpoint/BreakpointResolver.h
@@ -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,
diff --git a/lldb/include/lldb/Breakpoint/BreakpointResolverAddress.h b/lldb/include/lldb/Breakpoint/BreakpointResolverAddress.h
index 9d757c8853b..cc4ab49aae7 100644
--- a/lldb/include/lldb/Breakpoint/BreakpointResolverAddress.h
+++ b/lldb/include/lldb/Breakpoint/BreakpointResolverAddress.h
@@ -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);
};
diff --git a/lldb/include/lldb/Breakpoint/BreakpointResolverName.h b/lldb/include/lldb/Breakpoint/BreakpointResolverName.h
index c7716d5146e..fe2c3dd152a 100644
--- a/lldb/include/lldb/Breakpoint/BreakpointResolverName.h
+++ b/lldb/include/lldb/Breakpoint/BreakpointResolverName.h
@@ -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);
diff --git a/lldb/include/lldb/Breakpoint/BreakpointSite.h b/lldb/include/lldb/Breakpoint/BreakpointSite.h
index 6e9875615fd..479e4212b4d 100644
--- a/lldb/include/lldb/Breakpoint/BreakpointSite.h
+++ b/lldb/include/lldb/Breakpoint/BreakpointSite.h
@@ -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
diff --git a/lldb/include/lldb/Breakpoint/StoppointLocation.h b/lldb/include/lldb/Breakpoint/StoppointLocation.h
index f64035bbb94..5c717bbc3b0 100644
--- a/lldb/include/lldb/Breakpoint/StoppointLocation.h
+++ b/lldb/include/lldb/Breakpoint/StoppointLocation.h
@@ -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
diff --git a/lldb/include/lldb/Breakpoint/Watchpoint.h b/lldb/include/lldb/Breakpoint/Watchpoint.h
index 69067a56762..10df18a5c26 100644
--- a/lldb/include/lldb/Breakpoint/Watchpoint.h
+++ b/lldb/include/lldb/Breakpoint/Watchpoint.h
@@ -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
diff --git a/lldb/include/lldb/Breakpoint/WatchpointList.h b/lldb/include/lldb/Breakpoint/WatchpointList.h
index 9abac9167b0..ffb8df8d9eb 100644
--- a/lldb/include/lldb/Breakpoint/WatchpointList.h
+++ b/lldb/include/lldb/Breakpoint/WatchpointList.h
@@ -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;
diff --git a/lldb/include/lldb/Breakpoint/WatchpointOptions.h b/lldb/include/lldb/Breakpoint/WatchpointOptions.h
index 6ab1264a1c7..8e71e304554 100644
--- a/lldb/include/lldb/Breakpoint/WatchpointOptions.h
+++ b/lldb/include/lldb/Breakpoint/WatchpointOptions.h
@@ -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.
diff --git a/lldb/include/lldb/Core/Address.h b/lldb/include/lldb/Core/Address.h
index 4c77458061d..f672524416f 100644
--- a/lldb/include/lldb/Core/Address.h
+++ b/lldb/include/lldb/Core/Address.h
@@ -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);
diff --git a/lldb/include/lldb/Core/AddressRange.h b/lldb/include/lldb/Core/AddressRange.h
index e787d1d5740..5198278fa4e 100644
--- a/lldb/include/lldb/Core/AddressRange.h
+++ b/lldb/include/lldb/Core/AddressRange.h
@@ -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);
}
diff --git a/lldb/include/lldb/Core/AddressResolverName.h b/lldb/include/lldb/Core/AddressResolverName.h
index aadc0549599..616fbeba861 100644
--- a/lldb/include/lldb/Core/AddressResolverName.h
+++ b/lldb/include/lldb/Core/AddressResolverName.h
@@ -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,
diff --git a/lldb/include/lldb/Core/Broadcaster.h b/lldb/include/lldb/Core/Broadcaster.h
index 825287db598..90bd62c2d82 100644
--- a/lldb/include/lldb/Core/Broadcaster.h
+++ b/lldb/include/lldb/Core/Broadcaster.h
@@ -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;
diff --git a/lldb/include/lldb/Core/Debugger.h b/lldb/include/lldb/Core/Debugger.h
index 34d35ffe7c8..1b403cba705 100644
--- a/lldb/include/lldb/Core/Debugger.h
+++ b/lldb/include/lldb/Core/Debugger.h
@@ -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);
diff --git a/lldb/include/lldb/Core/Disassembler.h b/lldb/include/lldb/Core/Disassembler.h
index fa5e6a636aa..6d51a8aa224 100644
--- a/lldb/include/lldb/Core/Disassembler.h
+++ b/lldb/include/lldb/Core/Disassembler.h
@@ -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);
diff --git a/lldb/include/lldb/Core/EmulateInstruction.h b/lldb/include/lldb/Core/EmulateInstruction.h
index b0a4267a00a..4bc6e7a1bea 100644
--- a/lldb/include/lldb/Core/EmulateInstruction.h
+++ b/lldb/include/lldb/Core/EmulateInstruction.h
@@ -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 &reg_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;
diff --git a/lldb/include/lldb/Core/FormatEntity.h b/lldb/include/lldb/Core/FormatEntity.h
index aa5ccb48e56..7b111127b56 100644
--- a/lldb/include/lldb/Core/FormatEntity.h
+++ b/lldb/include/lldb/Core/FormatEntity.h
@@ -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,
diff --git a/lldb/include/lldb/Core/IOHandler.h b/lldb/include/lldb/Core/IOHandler.h
index e8cfbade5c6..2170ad10674 100644
--- a/lldb/include/lldb/Core/IOHandler.h
+++ b/lldb/include/lldb/Core/IOHandler.h
@@ -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,
diff --git a/lldb/include/lldb/Core/MappedHash.h b/lldb/include/lldb/Core/MappedHash.h
index f826ef261dd..1bdf59c7364 100644
--- a/lldb/include/lldb/Core/MappedHash.h
+++ b/lldb/include/lldb/Core/MappedHash.h
@@ -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;
diff --git a/lldb/include/lldb/Core/Module.h b/lldb/include/lldb/Core/Module.h
index 8ea024c25b5..6adcc52d0c4 100644
--- a/lldb/include/lldb/Core/Module.h
+++ b/lldb/include/lldb/Core/Module.h
@@ -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; }
diff --git a/lldb/include/lldb/Core/ModuleList.h b/lldb/include/lldb/Core/ModuleList.h
index 72a22fb5182..b7c2bac064c 100644
--- a/lldb/include/lldb/Core/ModuleList.h
+++ b/lldb/include/lldb/Core/ModuleList.h
@@ -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;
diff --git a/lldb/include/lldb/Core/ModuleSpec.h b/lldb/include/lldb/Core/ModuleSpec.h
index cc95bd0a063..dbc768d7a93 100644
--- a/lldb/include/lldb/Core/ModuleSpec.h
+++ b/lldb/include/lldb/Core/ModuleSpec.h
@@ -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 {
diff --git a/lldb/include/lldb/Core/PluginManager.h b/lldb/include/lldb/Core/PluginManager.h
index 68e6ca20b26..b782294f1f6 100644
--- a/lldb/include/lldb/Core/PluginManager.h
+++ b/lldb/include/lldb/Core/PluginManager.h
@@ -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);
diff --git a/lldb/include/lldb/Core/RangeMap.h b/lldb/include/lldb/Core/RangeMap.h
index 91fd409fb4e..45bda26e265 100644
--- a/lldb/include/lldb/Core/RangeMap.h
+++ b/lldb/include/lldb/Core/RangeMap.h
@@ -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;
diff --git a/lldb/include/lldb/Core/RegisterValue.h b/lldb/include/lldb/Core/RegisterValue.h
index 7c36d66b8ff..1262ed1c595 100644
--- a/lldb/include/lldb/Core/RegisterValue.h
+++ b/lldb/include/lldb/Core/RegisterValue.h
@@ -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;
diff --git a/lldb/include/lldb/Core/STLUtils.h b/lldb/include/lldb/Core/STLUtils.h
index d851ed5464c..55f1ac05c97 100644
--- a/lldb/include/lldb/Core/STLUtils.h
+++ b/lldb/include/lldb/Core/STLUtils.h
@@ -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:
diff --git a/lldb/include/lldb/Core/Scalar.h b/lldb/include/lldb/Core/Scalar.h
index 07425f95076..40671a242ec 100644
--- a/lldb/include/lldb/Core/Scalar.h
+++ b/lldb/include/lldb/Core/Scalar.h
@@ -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);
diff --git a/lldb/include/lldb/Core/SearchFilter.h b/lldb/include/lldb/Core/SearchFilter.h
index 5861afc801c..c6434208215 100644
--- a/lldb/include/lldb/Core/SearchFilter.h
+++ b/lldb/include/lldb/Core/SearchFilter.h
@@ -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);
diff --git a/lldb/include/lldb/Core/Section.h b/lldb/include/lldb/Core/Section.h
index 9b6674f0748..8e275ce3199 100644
--- a/lldb/include/lldb/Core/Section.h
+++ b/lldb/include/lldb/Core/Section.h
@@ -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
diff --git a/lldb/include/lldb/Core/SourceManager.h b/lldb/include/lldb/Core/SourceManager.h
index 053badf64dd..ef652531244 100644
--- a/lldb/include/lldb/Core/SourceManager.h
+++ b/lldb/include/lldb/Core/SourceManager.h
@@ -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;
diff --git a/lldb/include/lldb/Core/StreamBuffer.h b/lldb/include/lldb/Core/StreamBuffer.h
index 3b18573021b..307dc7e18a5 100644
--- a/lldb/include/lldb/Core/StreamBuffer.h
+++ b/lldb/include/lldb/Core/StreamBuffer.h
@@ -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(); }
diff --git a/lldb/include/lldb/Core/UniqueCStringMap.h b/lldb/include/lldb/Core/UniqueCStringMap.h
index e8c6c7c1353..fe3e831a604 100644
--- a/lldb/include/lldb/Core/UniqueCStringMap.h
+++ b/lldb/include/lldb/Core/UniqueCStringMap.h
@@ -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()) {
diff --git a/lldb/include/lldb/Core/UserSettingsController.h b/lldb/include/lldb/Core/UserSettingsController.h
index 67bc9b2c071..aefd42e751a 100644
--- a/lldb/include/lldb/Core/UserSettingsController.h
+++ b/lldb/include/lldb/Core/UserSettingsController.h
@@ -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);
diff --git a/lldb/include/lldb/Core/Value.h b/lldb/include/lldb/Core/Value.h
index 678b56fc49f..6ef2b7d9667 100644
--- a/lldb/include/lldb/Core/Value.h
+++ b/lldb/include/lldb/Core/Value.h
@@ -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,
diff --git a/lldb/include/lldb/Core/ValueObject.h b/lldb/include/lldb/Core/ValueObject.h
index fa1d14870b0..1e0cb86907f 100644
--- a/lldb/include/lldb/Core/ValueObject.h
+++ b/lldb/include/lldb/Core/ValueObject.h
@@ -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 {
diff --git a/lldb/include/lldb/Core/ValueObjectSyntheticFilter.h b/lldb/include/lldb/Core/ValueObjectSyntheticFilter.h
index e32e1403041..b3af6c0ae82 100644
--- a/lldb/include/lldb/Core/ValueObjectSyntheticFilter.h
+++ b/lldb/include/lldb/Core/ValueObjectSyntheticFilter.h
@@ -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:
diff --git a/lldb/include/lldb/DataFormatters/DataVisualization.h b/lldb/include/lldb/DataFormatters/DataVisualization.h
index 343099bf2a7..369fa686a9f 100644
--- a/lldb/include/lldb/DataFormatters/DataVisualization.h
+++ b/lldb/include/lldb/DataFormatters/DataVisualization.h
@@ -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();
diff --git a/lldb/include/lldb/DataFormatters/FormatClasses.h b/lldb/include/lldb/DataFormatters/FormatClasses.h
index c559c212c2d..458477578d3 100644
--- a/lldb/include/lldb/DataFormatters/FormatClasses.h
+++ b/lldb/include/lldb/DataFormatters/FormatClasses.h
@@ -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;
diff --git a/lldb/include/lldb/DataFormatters/FormatManager.h b/lldb/include/lldb/DataFormatters/FormatManager.h
index 924ef0cdf6b..e973c8b3e84 100644
--- a/lldb/include/lldb/DataFormatters/FormatManager.h
+++ b/lldb/include/lldb/DataFormatters/FormatManager.h
@@ -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();
diff --git a/lldb/include/lldb/DataFormatters/FormattersContainer.h b/lldb/include/lldb/DataFormatters/FormattersContainer.h
index 2df5bf4efcf..df88e88011f 100644
--- a/lldb/include/lldb/DataFormatters/FormattersContainer.h
+++ b/lldb/include/lldb/DataFormatters/FormattersContainer.h
@@ -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;
diff --git a/lldb/include/lldb/DataFormatters/StringPrinter.h b/lldb/include/lldb/DataFormatters/StringPrinter.h
index 8d4a099fbec..18207921bb7 100644
--- a/lldb/include/lldb/DataFormatters/StringPrinter.h
+++ b/lldb/include/lldb/DataFormatters/StringPrinter.h
@@ -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>
diff --git a/lldb/include/lldb/DataFormatters/TypeFormat.h b/lldb/include/lldb/DataFormatters/TypeFormat.h
index 8cfe021da3e..77e3542f552 100644
--- a/lldb/include/lldb/DataFormatters/TypeFormat.h
+++ b/lldb/include/lldb/DataFormatters/TypeFormat.h
@@ -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;
diff --git a/lldb/include/lldb/DataFormatters/TypeSummary.h b/lldb/include/lldb/DataFormatters/TypeSummary.h
index 1bde565aa5c..17cd61ae8c1 100644
--- a/lldb/include/lldb/DataFormatters/TypeSummary.h
+++ b/lldb/include/lldb/DataFormatters/TypeSummary.h
@@ -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;
diff --git a/lldb/include/lldb/DataFormatters/TypeSynthetic.h b/lldb/include/lldb/DataFormatters/TypeSynthetic.h
index 59fb6d3fcdb..4778a1c7afe 100644
--- a/lldb/include/lldb/DataFormatters/TypeSynthetic.h
+++ b/lldb/include/lldb/DataFormatters/TypeSynthetic.h
@@ -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;
diff --git a/lldb/include/lldb/DataFormatters/TypeValidator.h b/lldb/include/lldb/DataFormatters/TypeValidator.h
index 3c414e39353..fa2a8914811 100644
--- a/lldb/include/lldb/DataFormatters/TypeValidator.h
+++ b/lldb/include/lldb/DataFormatters/TypeValidator.h
@@ -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;
diff --git a/lldb/include/lldb/DataFormatters/ValueObjectPrinter.h b/lldb/include/lldb/DataFormatters/ValueObjectPrinter.h
index 41851436873..67048a4932c 100644
--- a/lldb/include/lldb/DataFormatters/ValueObjectPrinter.h
+++ b/lldb/include/lldb/DataFormatters/ValueObjectPrinter.h
@@ -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,
diff --git a/lldb/include/lldb/Expression/ExpressionSourceCode.h b/lldb/include/lldb/Expression/ExpressionSourceCode.h
index 02fc72aaf25..b5a6187bf3c 100644
--- a/lldb/include/lldb/Expression/ExpressionSourceCode.h
+++ b/lldb/include/lldb/Expression/ExpressionSourceCode.h
@@ -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);
diff --git a/lldb/include/lldb/Expression/ExpressionVariable.h b/lldb/include/lldb/Expression/ExpressionVariable.h
index c7570932c15..d0692f7afaf 100644
--- a/lldb/include/lldb/Expression/ExpressionVariable.h
+++ b/lldb/include/lldb/Expression/ExpressionVariable.h
@@ -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;
diff --git a/lldb/include/lldb/Expression/IRMemoryMap.h b/lldb/include/lldb/Expression/IRMemoryMap.h
index abb5cd74505..ebe297534ca 100644
--- a/lldb/include/lldb/Expression/IRMemoryMap.h
+++ b/lldb/include/lldb/Expression/IRMemoryMap.h
@@ -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; }
diff --git a/lldb/include/lldb/Expression/LLVMUserExpression.h b/lldb/include/lldb/Expression/LLVMUserExpression.h
index 745d413e077..b302bf773f3 100644
--- a/lldb/include/lldb/Expression/LLVMUserExpression.h
+++ b/lldb/include/lldb/Expression/LLVMUserExpression.h
@@ -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;
diff --git a/lldb/include/lldb/Expression/UtilityFunction.h b/lldb/include/lldb/Expression/UtilityFunction.h
index 9c54db35fa3..2187edbc22b 100644
--- a/lldb/include/lldb/Expression/UtilityFunction.h
+++ b/lldb/include/lldb/Expression/UtilityFunction.h
@@ -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,
diff --git a/lldb/include/lldb/Host/Debug.h b/lldb/include/lldb/Host/Debug.h
index fc190a4eca8..ed8e633c113 100644
--- a/lldb/include/lldb/Host/Debug.h
+++ b/lldb/include/lldb/Host/Debug.h
@@ -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:
diff --git a/lldb/include/lldb/Host/Editline.h b/lldb/include/lldb/Host/Editline.h
index 0b75e9c923c..f06fc06f9ca 100644
--- a/lldb/include/lldb/Host/Editline.h
+++ b/lldb/include/lldb/Host/Editline.h
@@ -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
diff --git a/lldb/include/lldb/Host/MainLoop.h b/lldb/include/lldb/Host/MainLoop.h
index c59a5aa5b0e..13d1ff0212f 100644
--- a/lldb/include/lldb/Host/MainLoop.h
+++ b/lldb/include/lldb/Host/MainLoop.h
@@ -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);
diff --git a/lldb/include/lldb/Host/MainLoopBase.h b/lldb/include/lldb/Host/MainLoopBase.h
index a87d262e945..bf01ba16db0 100644
--- a/lldb/include/lldb/Host/MainLoopBase.h
+++ b/lldb/include/lldb/Host/MainLoopBase.h
@@ -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.
diff --git a/lldb/include/lldb/Host/PosixApi.h b/lldb/include/lldb/Host/PosixApi.h
index ceb41ee040f..dae2bb48009 100644
--- a/lldb/include/lldb/Host/PosixApi.h
+++ b/lldb/include/lldb/Host/PosixApi.h
@@ -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"
diff --git a/lldb/include/lldb/Host/Predicate.h b/lldb/include/lldb/Host/Predicate.h
index 3ee27e74b4b..c9dfefa0dec 100644
--- a/lldb/include/lldb/Host/Predicate.h
+++ b/lldb/include/lldb/Host/Predicate.h
@@ -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
diff --git a/lldb/include/lldb/Host/Socket.h b/lldb/include/lldb/Host/Socket.h
index 37f468f23ce..f6e51fd4567 100644
--- a/lldb/include/lldb/Host/Socket.h
+++ b/lldb/include/lldb/Host/Socket.h
@@ -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);
diff --git a/lldb/include/lldb/Host/SocketAddress.h b/lldb/include/lldb/Host/SocketAddress.h
index ebc6f4e57ee..749a9c664c8 100644
--- a/lldb/include/lldb/Host/SocketAddress.h
+++ b/lldb/include/lldb/Host/SocketAddress.h
@@ -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; }
diff --git a/lldb/include/lldb/Host/Symbols.h b/lldb/include/lldb/Host/Symbols.h
index 5f8632d221f..ce95d91497f 100644
--- a/lldb/include/lldb/Host/Symbols.h
+++ b/lldb/include/lldb/Host/Symbols.h
@@ -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,
diff --git a/lldb/include/lldb/Host/TaskPool.h b/lldb/include/lldb/Host/TaskPool.h
index 13076e7eb70..fe171415107 100644
--- a/lldb/include/lldb/Host/TaskPool.h
+++ b/lldb/include/lldb/Host/TaskPool.h
@@ -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:
diff --git a/lldb/include/lldb/Host/XML.h b/lldb/include/lldb/Host/XML.h
index c274e83d370..5088f1f25b0 100644
--- a/lldb/include/lldb/Host/XML.h
+++ b/lldb/include/lldb/Host/XML.h
@@ -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);
diff --git a/lldb/include/lldb/Host/common/GetOptInc.h b/lldb/include/lldb/Host/common/GetOptInc.h
index 4d5cab5cbec..c69f7227a5c 100644
--- a/lldb/include/lldb/Host/common/GetOptInc.h
+++ b/lldb/include/lldb/Host/common/GetOptInc.h
@@ -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;
diff --git a/lldb/include/lldb/Host/common/NativeBreakpoint.h b/lldb/include/lldb/Host/common/NativeBreakpoint.h
index 73639d64c9e..681570aadef 100644
--- a/lldb/include/lldb/Host/common/NativeBreakpoint.h
+++ b/lldb/include/lldb/Host/common/NativeBreakpoint.h
@@ -45,8 +45,8 @@ protected:
private:
bool m_enabled;
- // -----------------------------------------------------------
- // interface for NativeBreakpointList
+ // ----------------------------------------------------------- interface for
+ // NativeBreakpointList
// -----------------------------------------------------------
void AddRef();
int32_t DecRef();
diff --git a/lldb/include/lldb/Host/common/NativeProcessProtocol.h b/lldb/include/lldb/Host/common/NativeProcessProtocol.h
index b1738f44890..d96835d7583 100644
--- a/lldb/include/lldb/Host/common/NativeProcessProtocol.h
+++ b/lldb/include/lldb/Host/common/NativeProcessProtocol.h
@@ -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);
diff --git a/lldb/include/lldb/Host/common/NativeRegisterContext.h b/lldb/include/lldb/Host/common/NativeRegisterContext.h
index a8c5fa17e26..26458db153c 100644
--- a/lldb/include/lldb/Host/common/NativeRegisterContext.h
+++ b/lldb/include/lldb/Host/common/NativeRegisterContext.h
@@ -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);
diff --git a/lldb/include/lldb/Host/posix/ConnectionFileDescriptorPosix.h b/lldb/include/lldb/Host/posix/ConnectionFileDescriptorPosix.h
index b7e08eb33af..49403a21cc8 100644
--- a/lldb/include/lldb/Host/posix/ConnectionFileDescriptorPosix.h
+++ b/lldb/include/lldb/Host/posix/ConnectionFileDescriptorPosix.h
@@ -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;
diff --git a/lldb/include/lldb/Interpreter/CommandAlias.h b/lldb/include/lldb/Interpreter/CommandAlias.h
index 5804323990d..4c59ad814a4 100644
--- a/lldb/include/lldb/Interpreter/CommandAlias.h
+++ b/lldb/include/lldb/Interpreter/CommandAlias.h
@@ -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:
diff --git a/lldb/include/lldb/Interpreter/CommandCompletions.h b/lldb/include/lldb/Interpreter/CommandCompletions.h
index 8bac3e8639d..4a8165be18c 100644
--- a/lldb/include/lldb/Interpreter/CommandCompletions.h
+++ b/lldb/include/lldb/Interpreter/CommandCompletions.h
@@ -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:
diff --git a/lldb/include/lldb/Interpreter/CommandInterpreter.h b/lldb/include/lldb/Interpreter/CommandInterpreter.h
index ff75aaa9bba..8ac5928b44a 100644
--- a/lldb/include/lldb/Interpreter/CommandInterpreter.h
+++ b/lldb/include/lldb/Interpreter/CommandInterpreter.h
@@ -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,
diff --git a/lldb/include/lldb/Interpreter/CommandObject.h b/lldb/include/lldb/Interpreter/CommandObject.h
index 88059f92d26..8848d5eeaee 100644
--- a/lldb/include/lldb/Interpreter/CommandObject.h
+++ b/lldb/include/lldb/Interpreter/CommandObject.h
@@ -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();
//------------------------------------------------------------------
diff --git a/lldb/include/lldb/Interpreter/CommandObjectMultiword.h b/lldb/include/lldb/Interpreter/CommandObjectMultiword.h
index 947272f4212..358023e2318 100644
--- a/lldb/include/lldb/Interpreter/CommandObjectMultiword.h
+++ b/lldb/include/lldb/Interpreter/CommandObjectMultiword.h
@@ -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;
diff --git a/lldb/include/lldb/Interpreter/OptionGroupBoolean.h b/lldb/include/lldb/Interpreter/OptionGroupBoolean.h
index 53d08d79d67..2489a648dd7 100644
--- a/lldb/include/lldb/Interpreter/OptionGroupBoolean.h
+++ b/lldb/include/lldb/Interpreter/OptionGroupBoolean.h
@@ -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,
diff --git a/lldb/include/lldb/Interpreter/OptionValue.h b/lldb/include/lldb/Interpreter/OptionValue.h
index 6008e1ea441..7694d68c9ba 100644
--- a/lldb/include/lldb/Interpreter/OptionValue.h
+++ b/lldb/include/lldb/Interpreter/OptionValue.h
@@ -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
diff --git a/lldb/include/lldb/Interpreter/OptionValueArray.h b/lldb/include/lldb/Interpreter/OptionValueArray.h
index bbf4e371a89..44709d00763 100644
--- a/lldb/include/lldb/Interpreter/OptionValueArray.h
+++ b/lldb/include/lldb/Interpreter/OptionValueArray.h
@@ -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;
diff --git a/lldb/include/lldb/Interpreter/OptionValueProperties.h b/lldb/include/lldb/Interpreter/OptionValueProperties.h
index 16d31aa4ea9..96bd93ab3d7 100644
--- a/lldb/include/lldb/Interpreter/OptionValueProperties.h
+++ b/lldb/include/lldb/Interpreter/OptionValueProperties.h
@@ -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,
diff --git a/lldb/include/lldb/Interpreter/OptionValueUInt64.h b/lldb/include/lldb/Interpreter/OptionValueUInt64.h
index be13ff07372..96404bed8e6 100644
--- a/lldb/include/lldb/Interpreter/OptionValueUInt64.h
+++ b/lldb/include/lldb/Interpreter/OptionValueUInt64.h
@@ -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);
diff --git a/lldb/include/lldb/Interpreter/Options.h b/lldb/include/lldb/Interpreter/Options.h
index 0fcd95294ff..62e8b4474ad 100644
--- a/lldb/include/lldb/Interpreter/Options.h
+++ b/lldb/include/lldb/Interpreter/Options.h
@@ -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;
}
diff --git a/lldb/include/lldb/Symbol/Block.h b/lldb/include/lldb/Symbol/Block.h
index a5387cca21c..c255b2285b7 100644
--- a/lldb/include/lldb/Symbol/Block.h
+++ b/lldb/include/lldb/Symbol/Block.h
@@ -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);
diff --git a/lldb/include/lldb/Symbol/ClangASTContext.h b/lldb/include/lldb/Symbol/ClangASTContext.h
index 6983b203fe0..9364149d98e 100644
--- a/lldb/include/lldb/Symbol/ClangASTContext.h
+++ b/lldb/include/lldb/Symbol/ClangASTContext.h
@@ -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;
diff --git a/lldb/include/lldb/Symbol/ClangASTImporter.h b/lldb/include/lldb/Symbol/ClangASTImporter.h
index 6823ad74828..52a164a1d2d 100644
--- a/lldb/include/lldb/Symbol/ClangASTImporter.h
+++ b/lldb/include/lldb/Symbol/ClangASTImporter.h
@@ -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,
diff --git a/lldb/include/lldb/Symbol/ClangExternalASTSourceCallbacks.h b/lldb/include/lldb/Symbol/ClangExternalASTSourceCallbacks.h
index 61bbc122dd5..ef0010314e1 100644
--- a/lldb/include/lldb/Symbol/ClangExternalASTSourceCallbacks.h
+++ b/lldb/include/lldb/Symbol/ClangExternalASTSourceCallbacks.h
@@ -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();
}
diff --git a/lldb/include/lldb/Symbol/CompactUnwindInfo.h b/lldb/include/lldb/Symbol/CompactUnwindInfo.h
index 63006724173..711420f66a4 100644
--- a/lldb/include/lldb/Symbol/CompactUnwindInfo.h
+++ b/lldb/include/lldb/Symbol/CompactUnwindInfo.h
@@ -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
diff --git a/lldb/include/lldb/Symbol/CompilerType.h b/lldb/include/lldb/Symbol/CompilerType.h
index 70d56db7fc2..1170832a739 100644
--- a/lldb/include/lldb/Symbol/CompilerType.h
+++ b/lldb/include/lldb/Symbol/CompilerType.h
@@ -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;
diff --git a/lldb/include/lldb/Symbol/DWARFCallFrameInfo.h b/lldb/include/lldb/Symbol/DWARFCallFrameInfo.h
index a1bd1bc8b1c..133c66d4ae4 100644
--- a/lldb/include/lldb/Symbol/DWARFCallFrameInfo.h
+++ b/lldb/include/lldb/Symbol/DWARFCallFrameInfo.h
@@ -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,
diff --git a/lldb/include/lldb/Symbol/DeclVendor.h b/lldb/include/lldb/Symbol/DeclVendor.h
index f0ce9157cfa..d1ccb4191cb 100644
--- a/lldb/include/lldb/Symbol/DeclVendor.h
+++ b/lldb/include/lldb/Symbol/DeclVendor.h
@@ -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:
diff --git a/lldb/include/lldb/Symbol/FuncUnwinders.h b/lldb/include/lldb/Symbol/FuncUnwinders.h
index 27f42cf425b..ae8bcc892ce 100644
--- a/lldb/include/lldb/Symbol/FuncUnwinders.h
+++ b/lldb/include/lldb/Symbol/FuncUnwinders.h
@@ -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,
diff --git a/lldb/include/lldb/Symbol/GoASTContext.h b/lldb/include/lldb/Symbol/GoASTContext.h
index ee111942c20..29c8cdceacf 100644
--- a/lldb/include/lldb/Symbol/GoASTContext.h
+++ b/lldb/include/lldb/Symbol/GoASTContext.h
@@ -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;
diff --git a/lldb/include/lldb/Symbol/ObjectFile.h b/lldb/include/lldb/Symbol/ObjectFile.h
index d96f32c5688..8946f5a0c18 100644
--- a/lldb/include/lldb/Symbol/ObjectFile.h
+++ b/lldb/include/lldb/Symbol/ObjectFile.h
@@ -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 &section_data);
diff --git a/lldb/include/lldb/Symbol/Symbol.h b/lldb/include/lldb/Symbol/Symbol.h
index 44c67f6f471..9523158e078 100644
--- a/lldb/include/lldb/Symbol/Symbol.h
+++ b/lldb/include/lldb/Symbol/Symbol.h
@@ -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
diff --git a/lldb/include/lldb/Symbol/SymbolFile.h b/lldb/include/lldb/Symbol/SymbolFile.h
index 69110dc68cd..b26be31b359 100644
--- a/lldb/include/lldb/Symbol/SymbolFile.h
+++ b/lldb/include/lldb/Symbol/SymbolFile.h
@@ -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),
diff --git a/lldb/include/lldb/Symbol/SymbolVendor.h b/lldb/include/lldb/Symbol/SymbolVendor.h
index 7db3de6e690..51fdc2718cc 100644
--- a/lldb/include/lldb/Symbol/SymbolVendor.h
+++ b/lldb/include/lldb/Symbol/SymbolVendor.h
@@ -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:
diff --git a/lldb/include/lldb/Symbol/Type.h b/lldb/include/lldb/Symbol/Type.h
index 9740dc25a58..fec2578c9fe 100644
--- a/lldb/include/lldb/Symbol/Type.h
+++ b/lldb/include/lldb/Symbol/Type.h
@@ -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:
diff --git a/lldb/include/lldb/Symbol/TypeSystem.h b/lldb/include/lldb/Symbol/TypeSystem.h
index ff85d842874..94d1b9cdf3f 100644
--- a/lldb/include/lldb/Symbol/TypeSystem.h
+++ b/lldb/include/lldb/Symbol/TypeSystem.h
@@ -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,
diff --git a/lldb/include/lldb/Symbol/UnwindPlan.h b/lldb/include/lldb/Symbol/UnwindPlan.h
index abb57a2c499..a76ea23b46b 100644
--- a/lldb/include/lldb/Symbol/UnwindPlan.h
+++ b/lldb/include/lldb/Symbol/UnwindPlan.h
@@ -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;
diff --git a/lldb/include/lldb/Symbol/UnwindTable.h b/lldb/include/lldb/Symbol/UnwindTable.h
index 851d24bea03..5c83e300319 100644
--- a/lldb/include/lldb/Symbol/UnwindTable.h
+++ b/lldb/include/lldb/Symbol/UnwindTable.h
@@ -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);
diff --git a/lldb/include/lldb/Symbol/Variable.h b/lldb/include/lldb/Symbol/Variable.h
index 507b4130904..5c74d3c7b74 100644
--- a/lldb/include/lldb/Symbol/Variable.h
+++ b/lldb/include/lldb/Symbol/Variable.h
@@ -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 &regex) const;
diff --git a/lldb/include/lldb/Symbol/VariableList.h b/lldb/include/lldb/Symbol/VariableList.h
index c9e0be89a3b..cee2a258513 100644
--- a/lldb/include/lldb/Symbol/VariableList.h
+++ b/lldb/include/lldb/Symbol/VariableList.h
@@ -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 &regex,
VariableList &var_list, size_t &total_matches);
diff --git a/lldb/include/lldb/Target/ABI.h b/lldb/include/lldb/Target/ABI.h
index 0418d683af6..343b3a74959 100644
--- a/lldb/include/lldb/Target/ABI.h
+++ b/lldb/include/lldb/Target/ABI.h
@@ -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;
}
diff --git a/lldb/include/lldb/Target/DynamicLoader.h b/lldb/include/lldb/Target/DynamicLoader.h
index b5890662d4e..35da9bb6af6 100644
--- a/lldb/include/lldb/Target/DynamicLoader.h
+++ b/lldb/include/lldb/Target/DynamicLoader.h
@@ -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:
diff --git a/lldb/include/lldb/Target/ExecutionContext.h b/lldb/include/lldb/Target/ExecutionContext.h
index 04af3ebc278..cfd52534955 100644
--- a/lldb/include/lldb/Target/ExecutionContext.h
+++ b/lldb/include/lldb/Target/ExecutionContext.h
@@ -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);
diff --git a/lldb/include/lldb/Target/Language.h b/lldb/include/lldb/Target/Language.h
index f81679f7812..dd7db26f3ba 100644
--- a/lldb/include/lldb/Target/Language.h
+++ b/lldb/include/lldb/Target/Language.h
@@ -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,
diff --git a/lldb/include/lldb/Target/LanguageRuntime.h b/lldb/include/lldb/Target/LanguageRuntime.h
index 98db941669c..6537a8f6dd5 100644
--- a/lldb/include/lldb/Target/LanguageRuntime.h
+++ b/lldb/include/lldb/Target/LanguageRuntime.h
@@ -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;
}
diff --git a/lldb/include/lldb/Target/Memory.h b/lldb/include/lldb/Target/Memory.h
index af6be15df9f..16d7b256a78 100644
--- a/lldb/include/lldb/Target/Memory.h
+++ b/lldb/include/lldb/Target/Memory.h
@@ -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:
diff --git a/lldb/include/lldb/Target/MemoryRegionInfo.h b/lldb/include/lldb/Target/MemoryRegionInfo.h
index 63a7b721701..505ecfcfc5a 100644
--- a/lldb/include/lldb/Target/MemoryRegionInfo.h
+++ b/lldb/include/lldb/Target/MemoryRegionInfo.h
@@ -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;
diff --git a/lldb/include/lldb/Target/ObjCLanguageRuntime.h b/lldb/include/lldb/Target/ObjCLanguageRuntime.h
index 97a2a731581..6f8354ea3a2 100644
--- a/lldb/include/lldb/Target/ObjCLanguageRuntime.h
+++ b/lldb/include/lldb/Target/ObjCLanguageRuntime.h
@@ -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
diff --git a/lldb/include/lldb/Target/Platform.h b/lldb/include/lldb/Target/Platform.h
index fcb9712e89c..c3d88c4b469 100644
--- a/lldb/include/lldb/Target/Platform.h
+++ b/lldb/include/lldb/Target/Platform.h
@@ -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);
diff --git a/lldb/include/lldb/Target/Process.h b/lldb/include/lldb/Target/Process.h
index 95116cb0013..a55e6cbcbdb 100644
--- a/lldb/include/lldb/Target/Process.h
+++ b/lldb/include/lldb/Target/Process.h
@@ -114,8 +114,8 @@ typedef std::shared_ptr<ProcessProperties> ProcessPropertiesSP;
//----------------------------------------------------------------------
// 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 &region);
//------------------------------------------------------------------
- // 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 &region);
//------------------------------------------------------------------
// 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);
diff --git a/lldb/include/lldb/Target/ProcessInfo.h b/lldb/include/lldb/Target/ProcessInfo.h
index 9b503444135..0e0d8548feb 100644
--- a/lldb/include/lldb/Target/ProcessInfo.h
+++ b/lldb/include/lldb/Target/ProcessInfo.h
@@ -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;
diff --git a/lldb/include/lldb/Target/ProcessLaunchInfo.h b/lldb/include/lldb/Target/ProcessLaunchInfo.h
index fc715f28544..fc7cdea04df 100644
--- a/lldb/include/lldb/Target/ProcessLaunchInfo.h
+++ b/lldb/include/lldb/Target/ProcessLaunchInfo.h
@@ -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;
diff --git a/lldb/include/lldb/Target/Queue.h b/lldb/include/lldb/Target/Queue.h
index 2df4d54a89b..62cc3ccf2e2 100644
--- a/lldb/include/lldb/Target/Queue.h
+++ b/lldb/include/lldb/Target/Queue.h
@@ -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> {
diff --git a/lldb/include/lldb/Target/QueueItem.h b/lldb/include/lldb/Target/QueueItem.h
index acbf94e1b0f..76bcea36a2f 100644
--- a/lldb/include/lldb/Target/QueueItem.h
+++ b/lldb/include/lldb/Target/QueueItem.h
@@ -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> {
diff --git a/lldb/include/lldb/Target/QueueList.h b/lldb/include/lldb/Target/QueueList.h
index 91cf3eb6d4c..b35de13aa1e 100644
--- a/lldb/include/lldb/Target/QueueList.h
+++ b/lldb/include/lldb/Target/QueueList.h
@@ -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 {
diff --git a/lldb/include/lldb/Target/RegisterCheckpoint.h b/lldb/include/lldb/Target/RegisterCheckpoint.h
index 578cf25eef2..e4b407124c9 100644
--- a/lldb/include/lldb/Target/RegisterCheckpoint.h
+++ b/lldb/include/lldb/Target/RegisterCheckpoint.h
@@ -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
};
diff --git a/lldb/include/lldb/Target/RegisterContext.h b/lldb/include/lldb/Target/RegisterContext.h
index c438a0cd12c..73a2930fd2b 100644
--- a/lldb/include/lldb/Target/RegisterContext.h
+++ b/lldb/include/lldb/Target/RegisterContext.h
@@ -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 &reg_checkpoint);
diff --git a/lldb/include/lldb/Target/RegisterNumber.h b/lldb/include/lldb/Target/RegisterNumber.h
index 5649c8022ee..1a0ab49bdce 100644
--- a/lldb/include/lldb/Target/RegisterNumber.h
+++ b/lldb/include/lldb/Target/RegisterNumber.h
@@ -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,
diff --git a/lldb/include/lldb/Target/SectionLoadHistory.h b/lldb/include/lldb/Target/SectionLoadHistory.h
index e1db141ea9e..0ed335a9d04 100644
--- a/lldb/include/lldb/Target/SectionLoadHistory.h
+++ b/lldb/include/lldb/Target/SectionLoadHistory.h
@@ -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 &section_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 &section_sp);
diff --git a/lldb/include/lldb/Target/SectionLoadList.h b/lldb/include/lldb/Target/SectionLoadList.h
index beb345b7129..1156c686df1 100644
--- a/lldb/include/lldb/Target/SectionLoadList.h
+++ b/lldb/include/lldb/Target/SectionLoadList.h
@@ -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 &section_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 &section_sp);
void Dump(Stream &s, Target *target);
diff --git a/lldb/include/lldb/Target/StackFrame.h b/lldb/include/lldb/Target/StackFrame.h
index d97043578ce..60b53c852b6 100644
--- a/lldb/include/lldb/Target/StackFrame.h
+++ b/lldb/include/lldb/Target/StackFrame.h
@@ -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();
//------------------------------------------------------------------
diff --git a/lldb/include/lldb/Target/StackID.h b/lldb/include/lldb/Target/StackID.h
index 7b7e9e5187b..51e51a6c074 100644
--- a/lldb/include/lldb/Target/StackID.h
+++ b/lldb/include/lldb/Target/StackID.h
@@ -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);
diff --git a/lldb/include/lldb/Target/StopInfo.h b/lldb/include/lldb/Target/StopInfo.h
index c99877cbd8a..b25bf7dd3d5 100644
--- a/lldb/include/lldb/Target/StopInfo.h
+++ b/lldb/include/lldb/Target/StopInfo.h
@@ -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();
diff --git a/lldb/include/lldb/Target/Target.h b/lldb/include/lldb/Target/Target.h
index 4c7b7ee84da..f96417da296 100644
--- a/lldb/include/lldb/Target/Target.h
+++ b/lldb/include/lldb/Target/Target.h
@@ -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;
diff --git a/lldb/include/lldb/Target/Thread.h b/lldb/include/lldb/Target/Thread.h
index 1b0b6ef557e..9ce73e0cbef 100644
--- a/lldb/include/lldb/Target/Thread.h
+++ b/lldb/include/lldb/Target/Thread.h
@@ -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
diff --git a/lldb/include/lldb/Target/ThreadCollection.h b/lldb/include/lldb/Target/ThreadCollection.h
index e3965b57e7a..dd5e81c1af4 100644
--- a/lldb/include/lldb/Target/ThreadCollection.h
+++ b/lldb/include/lldb/Target/ThreadCollection.h
@@ -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() {
diff --git a/lldb/include/lldb/Target/ThreadList.h b/lldb/include/lldb/Target/ThreadList.h
index 263d26a033e..6285cb1e0fb 100644
--- a/lldb/include/lldb/Target/ThreadList.h
+++ b/lldb/include/lldb/Target/ThreadList.h
@@ -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);
diff --git a/lldb/include/lldb/Target/ThreadPlan.h b/lldb/include/lldb/Target/ThreadPlan.h
index acc63ffe562..7591fa9c9d0 100644
--- a/lldb/include/lldb/Target/ThreadPlan.h
+++ b/lldb/include/lldb/Target/ThreadPlan.h
@@ -340,9 +340,8 @@ class ThreadPlan : public std::enable_shared_from_this<ThreadPlan>,
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 {
diff --git a/lldb/include/lldb/Target/ThreadPlanCallFunction.h b/lldb/include/lldb/Target/ThreadPlanCallFunction.h
index 1c75b0a3645..56bfc819320 100644
--- a/lldb/include/lldb/Target/ThreadPlanCallFunction.h
+++ b/lldb/include/lldb/Target/ThreadPlanCallFunction.h
@@ -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
diff --git a/lldb/include/lldb/Target/ThreadPlanCallFunctionUsingABI.h b/lldb/include/lldb/Target/ThreadPlanCallFunctionUsingABI.h
index 1c67ddd5cdd..d58f7f050db 100644
--- a/lldb/include/lldb/Target/ThreadPlanCallFunctionUsingABI.h
+++ b/lldb/include/lldb/Target/ThreadPlanCallFunctionUsingABI.h
@@ -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:
diff --git a/lldb/include/lldb/Target/ThreadPlanShouldStopHere.h b/lldb/include/lldb/Target/ThreadPlanShouldStopHere.h
index 60c0e386670..030d5e434bd 100644
--- a/lldb/include/lldb/Target/ThreadPlanShouldStopHere.h
+++ b/lldb/include/lldb/Target/ThreadPlanShouldStopHere.h
@@ -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,
diff --git a/lldb/include/lldb/Target/ThreadPlanStepRange.h b/lldb/include/lldb/Target/ThreadPlanStepRange.h
index ffb27d02e2d..65bc1671cb1 100644
--- a/lldb/include/lldb/Target/ThreadPlanStepRange.h
+++ b/lldb/include/lldb/Target/ThreadPlanStepRange.h
@@ -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();
diff --git a/lldb/include/lldb/Target/UnixSignals.h b/lldb/include/lldb/Target/UnixSignals.h
index a209f3549ae..7ec683585f8 100644
--- a/lldb/include/lldb/Target/UnixSignals.h
+++ b/lldb/include/lldb/Target/UnixSignals.h
@@ -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.
diff --git a/lldb/include/lldb/Utility/ArchSpec.h b/lldb/include/lldb/Utility/ArchSpec.h
index 1af3d79ac4c..7654af26ca2 100644
--- a/lldb/include/lldb/Utility/ArchSpec.h
+++ b/lldb/include/lldb/Utility/ArchSpec.h
@@ -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);
};
diff --git a/lldb/include/lldb/Utility/Args.h b/lldb/include/lldb/Utility/Args.h
index 4d26016ba38..4a94f09625d 100644
--- a/lldb/include/lldb/Utility/Args.h
+++ b/lldb/include/lldb/Utility/Args.h
@@ -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,
diff --git a/lldb/include/lldb/Utility/ConstString.h b/lldb/include/lldb/Utility/ConstString.h
index c4b32a62fd8..45c881a215c 100644
--- a/lldb/include/lldb/Utility/ConstString.h
+++ b/lldb/include/lldb/Utility/ConstString.h
@@ -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;
}
diff --git a/lldb/include/lldb/Utility/DataBufferHeap.h b/lldb/include/lldb/Utility/DataBufferHeap.h
index 20e27ef8950..22d3aea2dbb 100644
--- a/lldb/include/lldb/Utility/DataBufferHeap.h
+++ b/lldb/include/lldb/Utility/DataBufferHeap.h
@@ -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
diff --git a/lldb/include/lldb/Utility/History.h b/lldb/include/lldb/Utility/History.h
index c6882b65fd8..bbd4b65998b 100644
--- a/lldb/include/lldb/Utility/History.h
+++ b/lldb/include/lldb/Utility/History.h
@@ -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 HistorySource {
~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;
diff --git a/lldb/include/lldb/Utility/JSON.h b/lldb/include/lldb/Utility/JSON.h
index 8bf9c4b37b0..6fe1945ea22 100644
--- a/lldb/include/lldb/Utility/JSON.h
+++ b/lldb/include/lldb/Utility/JSON.h
@@ -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 &&
diff --git a/lldb/include/lldb/Utility/Log.h b/lldb/include/lldb/Utility/Log.h
index 6e401e13205..62776bdb281 100644
--- a/lldb/include/lldb/Utility/Log.h
+++ b/lldb/include/lldb/Utility/Log.h
@@ -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;
diff --git a/lldb/include/lldb/Utility/SafeMachO.h b/lldb/include/lldb/Utility/SafeMachO.h
index 791410a38b3..1565b313f42 100644
--- a/lldb/include/lldb/Utility/SafeMachO.h
+++ b/lldb/include/lldb/Utility/SafeMachO.h
@@ -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.
//
diff --git a/lldb/include/lldb/Utility/SelectHelper.h b/lldb/include/lldb/Utility/SelectHelper.h
index 12950d032fb..004952f1c59 100644
--- a/lldb/include/lldb/Utility/SelectHelper.h
+++ b/lldb/include/lldb/Utility/SelectHelper.h
@@ -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:
diff --git a/lldb/include/lldb/Utility/SharedCluster.h b/lldb/include/lldb/Utility/SharedCluster.h
index 8b5f7be470f..61b9804ad33 100644
--- a/lldb/include/lldb/Utility/SharedCluster.h
+++ b/lldb/include/lldb/Utility/SharedCluster.h
@@ -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();
}
diff --git a/lldb/include/lldb/Utility/SharingPtr.h b/lldb/include/lldb/Utility/SharingPtr.h
index 41fa0c8121d..691c92afaaa 100644
--- a/lldb/include/lldb/Utility/SharingPtr.h
+++ b/lldb/include/lldb/Utility/SharingPtr.h
@@ -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
diff --git a/lldb/include/lldb/Utility/Stream.h b/lldb/include/lldb/Utility/Stream.h
index 5a00f0a50ca..3cfb173b225 100644
--- a/lldb/include/lldb/Utility/Stream.h
+++ b/lldb/include/lldb/Utility/Stream.h
@@ -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,
diff --git a/lldb/include/lldb/Utility/StreamTee.h b/lldb/include/lldb/Utility/StreamTee.h
index 676178a0fe7..569ba197997 100644
--- a/lldb/include/lldb/Utility/StreamTee.h
+++ b/lldb/include/lldb/Utility/StreamTee.h
@@ -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;
diff --git a/lldb/include/lldb/Utility/StringExtractor.h b/lldb/include/lldb/Utility/StringExtractor.h
index 311cec87e69..4b75d5c5484 100644
--- a/lldb/include/lldb/Utility/StringExtractor.h
+++ b/lldb/include/lldb/Utility/StringExtractor.h
@@ -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_
diff --git a/lldb/include/lldb/Utility/StringExtractorGDBRemote.h b/lldb/include/lldb/Utility/StringExtractorGDBRemote.h
index d929f50137d..93e760b8811 100644
--- a/lldb/include/lldb/Utility/StringExtractorGDBRemote.h
+++ b/lldb/include/lldb/Utility/StringExtractorGDBRemote.h
@@ -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();
diff --git a/lldb/include/lldb/Utility/StringList.h b/lldb/include/lldb/Utility/StringList.h
index 6553e5dfdfb..1cb68885e77 100644
--- a/lldb/include/lldb/Utility/StringList.h
+++ b/lldb/include/lldb/Utility/StringList.h
@@ -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
diff --git a/lldb/include/lldb/Utility/Timeout.h b/lldb/include/lldb/Utility/Timeout.h
index 7b627a45fc6..ecb33b346e9 100644
--- a/lldb/include/lldb/Utility/Timeout.h
+++ b/lldb/include/lldb/Utility/Timeout.h
@@ -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:
diff --git a/lldb/include/lldb/lldb-enumerations.h b/lldb/include/lldb/lldb-enumerations.h
index 62e05c5546b..d5eaa8719db 100644
--- a/lldb/include/lldb/lldb-enumerations.h
+++ b/lldb/include/lldb/lldb-enumerations.h
@@ -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 = (0u),
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)};
diff --git a/lldb/include/lldb/lldb-private-enumerations.h b/lldb/include/lldb/lldb-private-enumerations.h
index cd16d14d979..fbf6c5f0ef9 100644
--- a/lldb/include/lldb/lldb-private-enumerations.h
+++ b/lldb/include/lldb/lldb-private-enumerations.h
@@ -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,
diff --git a/lldb/include/lldb/lldb-private-forward.h b/lldb/include/lldb/lldb-private-forward.h
index ea122525ef9..65d30328116 100644
--- a/lldb/include/lldb/lldb-private-forward.h
+++ b/lldb/include/lldb/lldb-private-forward.h
@@ -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;
}
diff --git a/lldb/include/lldb/lldb-private-types.h b/lldb/include/lldb/lldb-private-types.h
index fd21641218f..7ba7350e868 100644
--- a/lldb/include/lldb/lldb-private-types.h
+++ b/lldb/include/lldb/lldb-private-types.h
@@ -30,9 +30,8 @@ typedef llvm::sys::DynamicLibrary (*LoadPluginCallbackType)(
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.
diff --git a/lldb/include/lldb/lldb-types.h b/lldb/include/lldb/lldb-types.h
index fc445f55a9e..79f44156930 100644
--- a/lldb/include/lldb/lldb-types.h
+++ b/lldb/include/lldb/lldb-types.h
@@ -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
diff --git a/lldb/include/lldb/lldb-versioning.h b/lldb/include/lldb/lldb-versioning.h
index b0af5dc64b4..9d5fd164119 100644
--- a/lldb/include/lldb/lldb-versioning.h
+++ b/lldb/include/lldb/lldb-versioning.h
@@ -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))
OpenPOWER on IntegriCloud