diff options
author | Jonas Devlieghere <jonas@devlieghere.com> | 2019-04-10 20:48:55 +0000 |
---|---|---|
committer | Jonas Devlieghere <jonas@devlieghere.com> | 2019-04-10 20:48:55 +0000 |
commit | 8b3af63b8993e45b1783853a3fcf6f36bfbed81b (patch) | |
tree | 41759d08361beda32b90e345d8033aecd2e15088 /lldb/tools/debugserver/source/MacOSX | |
parent | 66b6bb1766b3e5eea56b26fc91d03f1fccbe15e4 (diff) | |
download | bcm5719-llvm-8b3af63b8993e45b1783853a3fcf6f36bfbed81b.tar.gz bcm5719-llvm-8b3af63b8993e45b1783853a3fcf6f36bfbed81b.zip |
[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
llvm-svn: 358135
Diffstat (limited to 'lldb/tools/debugserver/source/MacOSX')
18 files changed, 0 insertions, 79 deletions
diff --git a/lldb/tools/debugserver/source/MacOSX/CFBundle.cpp b/lldb/tools/debugserver/source/MacOSX/CFBundle.cpp index 6825fb374da..6971c1f4c32 100644 --- a/lldb/tools/debugserver/source/MacOSX/CFBundle.cpp +++ b/lldb/tools/debugserver/source/MacOSX/CFBundle.cpp @@ -13,38 +13,28 @@ #include "CFBundle.h" #include "CFString.h" -//---------------------------------------------------------------------- // CFBundle constructor -//---------------------------------------------------------------------- CFBundle::CFBundle(const char *path) : CFReleaser<CFBundleRef>(), m_bundle_url() { if (path && path[0]) SetPath(path); } -//---------------------------------------------------------------------- // CFBundle copy constructor -//---------------------------------------------------------------------- CFBundle::CFBundle(const CFBundle &rhs) : CFReleaser<CFBundleRef>(rhs), m_bundle_url(rhs.m_bundle_url) {} -//---------------------------------------------------------------------- // CFBundle copy constructor -//---------------------------------------------------------------------- CFBundle &CFBundle::operator=(const CFBundle &rhs) { if (this != &rhs) *this = rhs; return *this; } -//---------------------------------------------------------------------- // Destructor -//---------------------------------------------------------------------- CFBundle::~CFBundle() {} -//---------------------------------------------------------------------- // Set the path for a bundle by supplying a -//---------------------------------------------------------------------- bool CFBundle::SetPath(const char *path) { CFAllocatorRef alloc = kCFAllocatorDefault; // Release our old bundle and ULR diff --git a/lldb/tools/debugserver/source/MacOSX/CFBundle.h b/lldb/tools/debugserver/source/MacOSX/CFBundle.h index c56edee7a03..f49dc30f1f8 100644 --- a/lldb/tools/debugserver/source/MacOSX/CFBundle.h +++ b/lldb/tools/debugserver/source/MacOSX/CFBundle.h @@ -17,9 +17,7 @@ class CFBundle : public CFReleaser<CFBundleRef> { public: - //------------------------------------------------------------------ // Constructors and Destructors - //------------------------------------------------------------------ CFBundle(const char *path = NULL); CFBundle(const CFBundle &rhs); CFBundle &operator=(const CFBundle &rhs); diff --git a/lldb/tools/debugserver/source/MacOSX/CFString.cpp b/lldb/tools/debugserver/source/MacOSX/CFString.cpp index 3061c429b9a..637ba65ae4d 100644 --- a/lldb/tools/debugserver/source/MacOSX/CFString.cpp +++ b/lldb/tools/debugserver/source/MacOSX/CFString.cpp @@ -14,19 +14,13 @@ #include <glob.h> #include <string> -//---------------------------------------------------------------------- // CFString constructor -//---------------------------------------------------------------------- CFString::CFString(CFStringRef s) : CFReleaser<CFStringRef>(s) {} -//---------------------------------------------------------------------- // CFString copy constructor -//---------------------------------------------------------------------- CFString::CFString(const CFString &rhs) : CFReleaser<CFStringRef>(rhs) {} -//---------------------------------------------------------------------- // CFString copy constructor -//---------------------------------------------------------------------- CFString &CFString::operator=(const CFString &rhs) { if (this != &rhs) *this = rhs; @@ -41,9 +35,7 @@ CFString::CFString(const char *cstr, CFStringEncoding cstr_encoding) } } -//---------------------------------------------------------------------- // Destructor -//---------------------------------------------------------------------- CFString::~CFString() {} const char *CFString::GetFileSystemRepresentation(std::string &s) { diff --git a/lldb/tools/debugserver/source/MacOSX/CFString.h b/lldb/tools/debugserver/source/MacOSX/CFString.h index 47db507ce38..d1bd5682689 100644 --- a/lldb/tools/debugserver/source/MacOSX/CFString.h +++ b/lldb/tools/debugserver/source/MacOSX/CFString.h @@ -18,9 +18,7 @@ class CFString : public CFReleaser<CFStringRef> { public: - //------------------------------------------------------------------ // Constructors and Destructors - //------------------------------------------------------------------ CFString(CFStringRef cf_str = NULL); CFString(const char *s, CFStringEncoding encoding = kCFStringEncodingUTF8); CFString(const CFString &rhs); diff --git a/lldb/tools/debugserver/source/MacOSX/CFUtils.h b/lldb/tools/debugserver/source/MacOSX/CFUtils.h index 9dae40670f3..b567524ce63 100644 --- a/lldb/tools/debugserver/source/MacOSX/CFUtils.h +++ b/lldb/tools/debugserver/source/MacOSX/CFUtils.h @@ -17,11 +17,9 @@ #ifdef __cplusplus -//---------------------------------------------------------------------- // Templatized CF helper class that can own any CF pointer and will // call CFRelease() on any valid pointer it owns unless that pointer is // explicitly released using the release() member function. -//---------------------------------------------------------------------- template <class T> class CFReleaser { public: // Type names for the avlue diff --git a/lldb/tools/debugserver/source/MacOSX/DarwinLog/DarwinLogCollector.h b/lldb/tools/debugserver/source/MacOSX/DarwinLog/DarwinLogCollector.h index 334953dcbaf..24ab4230e38 100644 --- a/lldb/tools/debugserver/source/MacOSX/DarwinLog/DarwinLogCollector.h +++ b/lldb/tools/debugserver/source/MacOSX/DarwinLog/DarwinLogCollector.h @@ -29,21 +29,17 @@ class DarwinLogCollector : public std::enable_shared_from_this<DarwinLogCollector>, public ActivityStore { public: - //------------------------------------------------------------------ /// Return whether the os_log and activity tracing SPI is available. /// /// \return \b true if the activity stream support is available, /// \b false otherwise. - //------------------------------------------------------------------ static bool IsSupported(); - //------------------------------------------------------------------ /// Return a log function suitable for DNBLog to use as the internal /// logging function. /// /// \return a DNBLog-style logging function if IsSupported() returns /// true; otherwise, returns nullptr. - //------------------------------------------------------------------ static DNBCallbackLog GetLogFunction(); static bool StartCollectingForProcess(nub_process_t pid, @@ -57,9 +53,7 @@ public: pid_t GetProcessID() const { return m_pid; } - //------------------------------------------------------------------ // ActivityStore API - //------------------------------------------------------------------ const char *GetActivityForID(os_activity_id_t activity_id) const override; std::string diff --git a/lldb/tools/debugserver/source/MacOSX/DarwinLog/LogFilterRegex.cpp b/lldb/tools/debugserver/source/MacOSX/DarwinLog/LogFilterRegex.cpp index 9a09e55edba..489c056fa81 100644 --- a/lldb/tools/debugserver/source/MacOSX/DarwinLog/LogFilterRegex.cpp +++ b/lldb/tools/debugserver/source/MacOSX/DarwinLog/LogFilterRegex.cpp @@ -11,11 +11,9 @@ #include "DNBLog.h" #include "LogMessage.h" -//---------------------------------------------------------------------- // Enable enhanced mode if it is available. This allows for things like // \d for digit, \s for space, and many more, but it isn't available // everywhere. -//---------------------------------------------------------------------- #if defined(REG_ENHANCED) #define DEFAULT_COMPILE_FLAGS (REG_ENHANCED | REG_EXTENDED) #else diff --git a/lldb/tools/debugserver/source/MacOSX/DarwinLog/LogMessageOsLog.h b/lldb/tools/debugserver/source/MacOSX/DarwinLog/LogMessageOsLog.h index 5f50e390aa6..39b6adccb1b 100644 --- a/lldb/tools/debugserver/source/MacOSX/DarwinLog/LogMessageOsLog.h +++ b/lldb/tools/debugserver/source/MacOSX/DarwinLog/LogMessageOsLog.h @@ -16,13 +16,11 @@ using ActivityStreamEntry = struct os_activity_stream_entry_s; -// ----------------------------------------------------------------------------- /// Provides a unified wrapper around os_log()-style log messages. /// /// The lifetime of this class is intended to be very short. The caller /// must ensure that the passed in ActivityStore and ActivityStreamEntry /// outlive this LogMessageOsLog entry. -// ----------------------------------------------------------------------------- class LogMessageOsLog : public LogMessage { public: diff --git a/lldb/tools/debugserver/source/MacOSX/Genealogy.cpp b/lldb/tools/debugserver/source/MacOSX/Genealogy.cpp index 803eb913832..4b664be5488 100644 --- a/lldb/tools/debugserver/source/MacOSX/Genealogy.cpp +++ b/lldb/tools/debugserver/source/MacOSX/Genealogy.cpp @@ -16,9 +16,7 @@ #include "GenealogySPI.h" #include "MachThreadList.h" -//--------------------------- /// Constructor -//--------------------------- Genealogy::Genealogy() : m_os_activity_diagnostic_for_pid(nullptr), diff --git a/lldb/tools/debugserver/source/MacOSX/MachProcess.h b/lldb/tools/debugserver/source/MacOSX/MachProcess.h index 644364be4c9..0b8e1f4d4a5 100644 --- a/lldb/tools/debugserver/source/MacOSX/MachProcess.h +++ b/lldb/tools/debugserver/source/MacOSX/MachProcess.h @@ -40,9 +40,7 @@ class DNBThreadResumeActions; class MachProcess { public: - //---------------------------------------------------------------------- // Constructors and Destructors - //---------------------------------------------------------------------- MachProcess(); ~MachProcess(); @@ -79,9 +77,7 @@ public: : filename(), load_address(INVALID_NUB_ADDRESS), mod_date(0) {} }; - //---------------------------------------------------------------------- // Child process control - //---------------------------------------------------------------------- pid_t AttachForDebug(pid_t pid, char *err_str, size_t err_len); pid_t LaunchForDebug(const char *path, char const *argv[], char const *envp[], const char *working_directory, const char *stdin_path, @@ -160,9 +156,7 @@ public: nub_size_t ReadMemory(nub_addr_t addr, nub_size_t size, void *buf); nub_size_t WriteMemory(nub_addr_t addr, nub_size_t size, const void *buf); - //---------------------------------------------------------------------- // Path and arg accessors - //---------------------------------------------------------------------- const char *Path() const { return m_path.c_str(); } size_t ArgumentCount() const { return m_args.size(); } const char *ArgumentAtIndex(size_t arg_idx) const { @@ -171,9 +165,7 @@ public: return NULL; } - //---------------------------------------------------------------------- // Breakpoint functions - //---------------------------------------------------------------------- DNBBreakpoint *CreateBreakpoint(nub_addr_t addr, nub_size_t length, bool hardware); bool DisableBreakpoint(nub_addr_t addr, bool remove); @@ -182,9 +174,7 @@ public: DNBBreakpointList &Breakpoints() { return m_breakpoints; } const DNBBreakpointList &Breakpoints() const { return m_breakpoints; } - //---------------------------------------------------------------------- // Watchpoint functions - //---------------------------------------------------------------------- DNBBreakpoint *CreateWatchpoint(nub_addr_t addr, nub_size_t length, uint32_t watch_type, bool hardware); bool DisableWatchpoint(nub_addr_t addr, bool remove); @@ -194,9 +184,7 @@ public: DNBBreakpointList &Watchpoints() { return m_watchpoints; } const DNBBreakpointList &Watchpoints() const { return m_watchpoints; } - //---------------------------------------------------------------------- // Exception thread functions - //---------------------------------------------------------------------- bool StartSTDIOThread(); static void *STDIOThread(void *arg); void ExceptionMessageReceived(const MachException::Message &exceptionMessage); @@ -205,9 +193,7 @@ public: nub_size_t CopyImageInfos(struct DNBExecutableImageInfo **image_infos, bool only_changed); - //---------------------------------------------------------------------- // Profile functions - //---------------------------------------------------------------------- void SetEnableAsyncProfiling(bool enable, uint64_t internal_usec, DNBProfileDataScanType scan_type); bool IsProfilingEnabled() { return m_profile_enabled; } @@ -217,9 +203,7 @@ public: void SignalAsyncProfileData(const char *info); size_t GetAsyncProfileData(char *buf, size_t buf_size); - //---------------------------------------------------------------------- // Accessors - //---------------------------------------------------------------------- pid_t ProcessID() const { return m_pid; } bool ProcessIDIsValid() const { return m_pid > 0; } pid_t SetProcessID(pid_t pid); diff --git a/lldb/tools/debugserver/source/MacOSX/MachTask.h b/lldb/tools/debugserver/source/MacOSX/MachTask.h index ad25f0e415f..a933bffc8a0 100644 --- a/lldb/tools/debugserver/source/MacOSX/MachTask.h +++ b/lldb/tools/debugserver/source/MacOSX/MachTask.h @@ -5,7 +5,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -//---------------------------------------------------------------------- // // MachTask.h // debugserver @@ -45,9 +44,7 @@ struct MachMallocEvent { class MachTask { public: - //------------------------------------------------------------------ // Constructors and Destructors - //------------------------------------------------------------------ MachTask(MachProcess *process); virtual ~MachTask(); diff --git a/lldb/tools/debugserver/source/MacOSX/MachThreadList.cpp b/lldb/tools/debugserver/source/MacOSX/MachThreadList.cpp index be59fb6a0cf..8d2165b0f24 100644 --- a/lldb/tools/debugserver/source/MacOSX/MachThreadList.cpp +++ b/lldb/tools/debugserver/source/MacOSX/MachThreadList.cpp @@ -451,7 +451,6 @@ uint32_t MachThreadList::ProcessDidStop(MachProcess *process) { return num_threads; } -//---------------------------------------------------------------------- // Check each thread in our thread list to see if we should notify our // client of the current halt in execution. // @@ -461,7 +460,6 @@ uint32_t MachThreadList::ProcessDidStop(MachProcess *process) { // RETURNS // true if we should stop and notify our clients // false if we should resume our child process and skip notification -//---------------------------------------------------------------------- bool MachThreadList::ShouldStop(bool &step_more) { PTHREAD_MUTEX_LOCKER(locker, m_threads_mutex); uint32_t should_stop = false; diff --git a/lldb/tools/debugserver/source/MacOSX/OsLogger.cpp b/lldb/tools/debugserver/source/MacOSX/OsLogger.cpp index 5e13819de87..a83afb62b36 100644 --- a/lldb/tools/debugserver/source/MacOSX/OsLogger.cpp +++ b/lldb/tools/debugserver/source/MacOSX/OsLogger.cpp @@ -19,10 +19,8 @@ #define LLDB_OS_LOG_MAX_BUFFER_LENGTH 256 namespace { -//---------------------------------------------------------------------- // Darwin os_log logging callback that can be registered with // DNBLogSetLogCallback -//---------------------------------------------------------------------- void DarwinLogCallback(void *baton, uint32_t flags, const char *format, va_list args) { if (format == nullptr) diff --git a/lldb/tools/debugserver/source/MacOSX/arm/DNBArchImpl.cpp b/lldb/tools/debugserver/source/MacOSX/arm/DNBArchImpl.cpp index 0d2455e123d..45d05d6e0bd 100644 --- a/lldb/tools/debugserver/source/MacOSX/arm/DNBArchImpl.cpp +++ b/lldb/tools/debugserver/source/MacOSX/arm/DNBArchImpl.cpp @@ -1423,9 +1423,7 @@ nub_addr_t DNBArchMachARM::GetWatchAddress(const DBG &debug_state, return bits(debug_state.__wvr[hw_index], 31, 0); } -//---------------------------------------------------------------------- // Register information definitions for 32 bit ARMV7. -//---------------------------------------------------------------------- enum gpr_regnums { gpr_r0 = 0, gpr_r1, @@ -1776,11 +1774,9 @@ const size_t DNBArchMachARM::k_num_exc_registers = const size_t DNBArchMachARM::k_num_all_registers = k_num_gpr_registers + k_num_vfp_registers + k_num_exc_registers; -//---------------------------------------------------------------------- // Register set definitions. The first definitions at register set index // of zero is for all registers, followed by other registers sets. The // register information for the all register set need not be filled in. -//---------------------------------------------------------------------- const DNBRegisterSetInfo DNBArchMachARM::g_reg_sets[] = { {"ARM Registers", NULL, k_num_all_registers}, {"General Purpose Registers", g_gpr_registers, k_num_gpr_registers}, diff --git a/lldb/tools/debugserver/source/MacOSX/arm64/DNBArchImplARM64.cpp b/lldb/tools/debugserver/source/MacOSX/arm64/DNBArchImplARM64.cpp index 8fedb984182..911cbe6b4b3 100644 --- a/lldb/tools/debugserver/source/MacOSX/arm64/DNBArchImplARM64.cpp +++ b/lldb/tools/debugserver/source/MacOSX/arm64/DNBArchImplARM64.cpp @@ -947,9 +947,7 @@ nub_addr_t DNBArchMachARM64::GetWatchAddress(const DBG &debug_state, return bits(debug_state.__wvr[hw_index], 63, 0); } -//---------------------------------------------------------------------- // Register information definitions for 64 bit ARMv8. -//---------------------------------------------------------------------- enum gpr_regnums { gpr_x0 = 0, gpr_x1, @@ -1689,11 +1687,9 @@ const size_t DNBArchMachARM64::k_num_exc_registers = const size_t DNBArchMachARM64::k_num_all_registers = k_num_gpr_registers + k_num_vfp_registers + k_num_exc_registers; -//---------------------------------------------------------------------- // Register set definitions. The first definitions at register set index // of zero is for all registers, followed by other registers sets. The // register information for the all register set need not be filled in. -//---------------------------------------------------------------------- const DNBRegisterSetInfo DNBArchMachARM64::g_reg_sets[] = { {"ARM64 Registers", NULL, k_num_all_registers}, {"General Purpose Registers", g_gpr_registers, k_num_gpr_registers}, diff --git a/lldb/tools/debugserver/source/MacOSX/i386/DNBArchImplI386.cpp b/lldb/tools/debugserver/source/MacOSX/i386/DNBArchImplI386.cpp index 1854a9c831e..7d2d0c2ef1b 100644 --- a/lldb/tools/debugserver/source/MacOSX/i386/DNBArchImplI386.cpp +++ b/lldb/tools/debugserver/source/MacOSX/i386/DNBArchImplI386.cpp @@ -1025,9 +1025,7 @@ kern_return_t DNBArchImplI386::EnableHardwareSingleStep(bool enable) { return m_state.GetError(e_regSetGPR, Read); } -//---------------------------------------------------------------------- // Register information definitions -//---------------------------------------------------------------------- #define DEFINE_GPR_PSEUDO_16(reg16, reg32) \ { \ @@ -1540,11 +1538,9 @@ const size_t DNBArchImplI386::k_num_all_registers_avx = const size_t DNBArchImplI386::k_num_all_registers_avx512f = k_num_gpr_registers + k_num_fpu_registers_avx512f + k_num_exc_registers; -//---------------------------------------------------------------------- // Register set definitions. The first definitions at register set index // of zero is for all registers, followed by other registers sets. The // register information for the all register set need not be filled in. -//---------------------------------------------------------------------- const DNBRegisterSetInfo DNBArchImplI386::g_reg_sets_no_avx[] = { {"i386 Registers", NULL, k_num_all_registers_no_avx}, {"General Purpose Registers", g_gpr_registers, k_num_gpr_registers}, diff --git a/lldb/tools/debugserver/source/MacOSX/ppc/DNBArchImpl.cpp b/lldb/tools/debugserver/source/MacOSX/ppc/DNBArchImpl.cpp index 141b6b72c2a..c6671b5066a 100644 --- a/lldb/tools/debugserver/source/MacOSX/ppc/DNBArchImpl.cpp +++ b/lldb/tools/debugserver/source/MacOSX/ppc/DNBArchImpl.cpp @@ -178,9 +178,7 @@ kern_return_t DNBArchMachPPC::EnableHardwareSingleStep(bool enable) { return m_state.GetError(e_regSetGPR, Read); } -//---------------------------------------------------------------------- // Register information definitions for 32 bit PowerPC. -//---------------------------------------------------------------------- enum gpr_regnums { e_regNumGPR_srr0, @@ -319,11 +317,9 @@ const size_t k_num_vec_registers = const size_t k_num_ppc_registers = k_num_gpr_registers + k_num_fpr_registers + k_num_exc_registers + k_num_vec_registers; -//---------------------------------------------------------------------- // Register set definitions. The first definitions at register set index // of zero is for all registers, followed by other registers sets. The // register information for the all register set need not be filled in. -//---------------------------------------------------------------------- static const DNBRegisterSetInfo g_reg_sets[] = { {"PowerPC Registers", NULL, k_num_ppc_registers}, {"General Purpose Registers", g_gpr_registers, k_num_gpr_registers}, diff --git a/lldb/tools/debugserver/source/MacOSX/x86_64/DNBArchImplX86_64.cpp b/lldb/tools/debugserver/source/MacOSX/x86_64/DNBArchImplX86_64.cpp index 4f32d44e69f..319215e8a7f 100644 --- a/lldb/tools/debugserver/source/MacOSX/x86_64/DNBArchImplX86_64.cpp +++ b/lldb/tools/debugserver/source/MacOSX/x86_64/DNBArchImplX86_64.cpp @@ -980,9 +980,7 @@ kern_return_t DNBArchImplX86_64::EnableHardwareSingleStep(bool enable) { return m_state.GetError(e_regSetGPR, Read); } -//---------------------------------------------------------------------- // Register information definitions -//---------------------------------------------------------------------- enum { gpr_rax = 0, @@ -2062,11 +2060,9 @@ const size_t DNBArchImplX86_64::k_num_fpu_registers_avx512f = const size_t DNBArchImplX86_64::k_num_all_registers_avx512f = k_num_gpr_registers + k_num_fpu_registers_avx512f + k_num_exc_registers; -//---------------------------------------------------------------------- // Register set definitions. The first definitions at register set index // of zero is for all registers, followed by other registers sets. The // register information for the all register set need not be filled in. -//---------------------------------------------------------------------- const DNBRegisterSetInfo DNBArchImplX86_64::g_reg_sets_no_avx[] = { {"x86_64 Registers", NULL, k_num_all_registers_no_avx}, {"General Purpose Registers", g_gpr_registers, k_num_gpr_registers}, |