aboutsummaryrefslogtreecommitdiff
path: root/source/Plugins/StructuredData
diff options
context:
space:
mode:
authorJonas Devlieghere <jonas@devlieghere.com>2019-04-10 20:48:55 +0000
committerJonas Devlieghere <jonas@devlieghere.com>2019-04-10 20:48:55 +0000
commit09b1fb72a77786f8c0d5ceef2068b27f379f8d63 (patch)
tree2cb9f5d4c5f3563a90db717f29dab808bdc85f44 /source/Plugins/StructuredData
parentbd94e351bd7a7c2ce6c83e85a5328fc292bae226 (diff)
downloadlldb-09b1fb72a77786f8c0d5ceef2068b27f379f8d63.tar.gz
[NFC] Remove ASCII lines from comments
A lot of comments in LLDB are surrounded by an ASCII line to delimit the begging and end of the comment. Its use is not really consistent across the code base, sometimes the lines are longer, sometimes they are shorter and sometimes they are omitted. Furthermore, it looks kind of weird with the 80 column limit, where the comment actually extends past the line, but not by much. Furthermore, when /// is used for Doxygen comments, it looks particularly odd. And when // is used, it incorrectly gives the impression that it's actually a Doxygen comment. I assume these lines were added to improve distinguishing between comments and code. However, given that todays editors and IDEs do a great job at highlighting comments, I think it's worth to drop this for the sake of consistency. The alternative is fixing all the inconsistencies, which would create a lot more churn. Differential revision: https://reviews.llvm.org/D60508 git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@358135 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'source/Plugins/StructuredData')
-rw-r--r--source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.cpp24
-rw-r--r--source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.h20
2 files changed, 0 insertions, 44 deletions
diff --git a/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.cpp b/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.cpp
index 3ab50613c..3994dd067 100644
--- a/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.cpp
+++ b/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.cpp
@@ -39,9 +39,7 @@ using namespace lldb_private;
#pragma mark -
#pragma mark Anonymous Namespace
-// -----------------------------------------------------------------------------
// Anonymous namespace
-// -----------------------------------------------------------------------------
namespace sddarwinlog_private {
const uint64_t NANOS_PER_MICRO = 1000;
@@ -52,13 +50,11 @@ const uint64_t NANOS_PER_HOUR = NANOS_PER_MINUTE * 60;
static bool DEFAULT_FILTER_FALLTHROUGH_ACCEPTS = true;
-//------------------------------------------------------------------
/// Global, sticky enable switch. If true, the user has explicitly
/// run the enable command. When a process launches or is attached to,
/// we will enable DarwinLog if either the settings for auto-enable is
/// on, or if the user had explicitly run enable at some point prior
/// to the launch/attach.
-//------------------------------------------------------------------
static bool s_is_explicitly_enabled;
class EnableOptions;
@@ -106,9 +102,7 @@ void SetGlobalEnableOptions(const DebuggerSP &debugger_sp,
#pragma mark -
#pragma mark Settings Handling
-//------------------------------------------------------------------
/// Code to handle the StructuredDataDarwinLog settings
-//------------------------------------------------------------------
static constexpr PropertyDefinition g_properties[] = {
{
@@ -391,12 +385,10 @@ static void RegisterFilterOperations() {
// Commands
// =========================================================================
-// -------------------------------------------------------------------------
/// Provides the main on-off switch for enabling darwin logging.
///
/// It is valid to run the enable command when logging is already enabled.
/// This resets the logging with whatever settings are currently set.
-// -------------------------------------------------------------------------
static constexpr OptionDefinition g_enable_option_table[] = {
// Source stream include/exclude options (the first-level filter). This one
@@ -890,9 +882,7 @@ private:
EnableOptionsSP m_options_sp;
};
-// -------------------------------------------------------------------------
/// Provides the status command.
-// -------------------------------------------------------------------------
class StatusCommand : public CommandObjectParsed {
public:
StatusCommand(CommandInterpreter &interpreter)
@@ -968,9 +958,7 @@ protected:
}
};
-// -------------------------------------------------------------------------
/// Provides the darwin-log base command
-// -------------------------------------------------------------------------
class BaseCommand : public CommandObjectMultiword {
public:
BaseCommand(CommandInterpreter &interpreter)
@@ -1082,9 +1070,7 @@ using namespace sddarwinlog_private;
#pragma mark -
#pragma mark Public static API
-// -----------------------------------------------------------------------------
// Public static API
-// -----------------------------------------------------------------------------
void StructuredDataDarwinLog::Initialize() {
RegisterFilterOperations();
@@ -1105,9 +1091,7 @@ ConstString StructuredDataDarwinLog::GetStaticPluginName() {
#pragma mark -
#pragma mark PluginInterface API
-// -----------------------------------------------------------------------------
// PluginInterface API
-// -----------------------------------------------------------------------------
ConstString StructuredDataDarwinLog::GetPluginName() {
return GetStaticPluginName();
@@ -1118,9 +1102,7 @@ uint32_t StructuredDataDarwinLog::GetPluginVersion() { return 1; }
#pragma mark -
#pragma mark StructuredDataPlugin API
-// -----------------------------------------------------------------------------
// StructuredDataPlugin API
-// -----------------------------------------------------------------------------
bool StructuredDataDarwinLog::SupportsStructuredDataType(
ConstString type_name) {
@@ -1370,9 +1352,7 @@ void StructuredDataDarwinLog::ModulesDidLoad(Process &process,
EnableNow();
}
-// -----------------------------------------------------------------------------
// public destructor
-// -----------------------------------------------------------------------------
StructuredDataDarwinLog::~StructuredDataDarwinLog() {
if (m_breakpoint_id != LLDB_INVALID_BREAK_ID) {
@@ -1387,9 +1367,7 @@ StructuredDataDarwinLog::~StructuredDataDarwinLog() {
#pragma mark -
#pragma mark Private instance methods
-// -----------------------------------------------------------------------------
// Private constructors
-// -----------------------------------------------------------------------------
StructuredDataDarwinLog::StructuredDataDarwinLog(const ProcessWP &process_wp)
: StructuredDataPlugin(process_wp), m_recorded_first_timestamp(false),
@@ -1397,9 +1375,7 @@ StructuredDataDarwinLog::StructuredDataDarwinLog(const ProcessWP &process_wp)
m_added_breakpoint_mutex(), m_added_breakpoint(),
m_breakpoint_id(LLDB_INVALID_BREAK_ID) {}
-// -----------------------------------------------------------------------------
// Private static methods
-// -----------------------------------------------------------------------------
StructuredDataPluginSP
StructuredDataDarwinLog::CreateInstance(Process &process) {
diff --git a/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.h b/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.h
index d17e3cbe2..7ff3721d5 100644
--- a/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.h
+++ b/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.h
@@ -24,9 +24,7 @@ class StructuredDataDarwinLog : public StructuredDataPlugin {
friend sddarwinlog_private::EnableCommand;
public:
- // -------------------------------------------------------------------------
// Public static API
- // -------------------------------------------------------------------------
static void Initialize();
@@ -34,7 +32,6 @@ public:
static ConstString GetStaticPluginName();
- // -------------------------------------------------------------------------
/// Return whether the DarwinLog functionality is enabled.
///
/// The DarwinLog functionality is enabled if the user expicitly enabled
@@ -45,20 +42,15 @@ public:
/// \return
/// True if DarwinLog support is/will be enabled for existing or
/// newly launched/attached processes.
- // -------------------------------------------------------------------------
static bool IsEnabled();
- // -------------------------------------------------------------------------
// PluginInterface API
- // -------------------------------------------------------------------------
ConstString GetPluginName() override;
uint32_t GetPluginVersion() override;
- // -------------------------------------------------------------------------
// StructuredDataPlugin API
- // -------------------------------------------------------------------------
bool SupportsStructuredDataType(ConstString type_name) override;
@@ -76,15 +68,11 @@ public:
~StructuredDataDarwinLog();
private:
- // -------------------------------------------------------------------------
// Private constructors
- // -------------------------------------------------------------------------
StructuredDataDarwinLog(const lldb::ProcessWP &process_wp);
- // -------------------------------------------------------------------------
// Private static methods
- // -------------------------------------------------------------------------
static lldb::StructuredDataPluginSP CreateInstance(Process &process);
@@ -98,16 +86,12 @@ private:
static Status FilterLaunchInfo(ProcessLaunchInfo &launch_info,
Target *target);
- // -------------------------------------------------------------------------
// Internal helper methods used by friend classes
- // -------------------------------------------------------------------------
void SetEnabled(bool enabled);
void AddInitCompletionHook(Process &process);
- // -------------------------------------------------------------------------
// Private methods
- // -------------------------------------------------------------------------
void DumpTimestamp(Stream &stream, uint64_t timestamp);
@@ -116,16 +100,12 @@ private:
size_t HandleDisplayOfEvent(const StructuredData::Dictionary &event,
Stream &stream);
- // -------------------------------------------------------------------------
/// Call the enable command again, using whatever settings were initially
/// made.
- // -------------------------------------------------------------------------
void EnableNow();
- // -------------------------------------------------------------------------
// Private data
- // -------------------------------------------------------------------------
bool m_recorded_first_timestamp;
uint64_t m_first_timestamp_seen;
bool m_is_enabled;