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/source/Plugins/Process/elf-core | |
| 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/source/Plugins/Process/elf-core')
4 files changed, 0 insertions, 40 deletions
diff --git a/lldb/source/Plugins/Process/elf-core/ProcessElfCore.cpp b/lldb/source/Plugins/Process/elf-core/ProcessElfCore.cpp index 21c9be552cf..25074f85492 100644 --- a/lldb/source/Plugins/Process/elf-core/ProcessElfCore.cpp +++ b/lldb/source/Plugins/Process/elf-core/ProcessElfCore.cpp @@ -90,17 +90,13 @@ bool ProcessElfCore::CanDebug(lldb::TargetSP target_sp, return false; } -//---------------------------------------------------------------------- // ProcessElfCore constructor -//---------------------------------------------------------------------- ProcessElfCore::ProcessElfCore(lldb::TargetSP target_sp, lldb::ListenerSP listener_sp, const FileSpec &core_file) : Process(target_sp, listener_sp), m_core_file(core_file) {} -//---------------------------------------------------------------------- // Destructor -//---------------------------------------------------------------------- ProcessElfCore::~ProcessElfCore() { Clear(); // We need to call finalize on the process before destroying ourselves to @@ -110,9 +106,7 @@ ProcessElfCore::~ProcessElfCore() { Finalize(); } -//---------------------------------------------------------------------- // PluginInterface -//---------------------------------------------------------------------- ConstString ProcessElfCore::GetPluginName() { return GetPluginNameStatic(); } uint32_t ProcessElfCore::GetPluginVersion() { return 1; } @@ -146,9 +140,7 @@ lldb::addr_t ProcessElfCore::AddAddressRangeFromLoadSegment( return addr; } -//---------------------------------------------------------------------- // Process Control -//---------------------------------------------------------------------- Status ProcessElfCore::DoLoadCore() { Status error; if (!m_core_module_sp) { @@ -279,15 +271,11 @@ void ProcessElfCore::RefreshStateAfterStop() {} Status ProcessElfCore::DoDestroy() { return Status(); } -//------------------------------------------------------------------ // Process Queries -//------------------------------------------------------------------ bool ProcessElfCore::IsAlive() { return true; } -//------------------------------------------------------------------ // Process Memory -//------------------------------------------------------------------ size_t ProcessElfCore::ReadMemory(lldb::addr_t addr, void *buf, size_t size, Status &error) { // Don't allow the caching that lldb_private::Process::ReadMemory does since diff --git a/lldb/source/Plugins/Process/elf-core/ProcessElfCore.h b/lldb/source/Plugins/Process/elf-core/ProcessElfCore.h index 328474eb475..6828f5a42ff 100644 --- a/lldb/source/Plugins/Process/elf-core/ProcessElfCore.h +++ b/lldb/source/Plugins/Process/elf-core/ProcessElfCore.h @@ -30,9 +30,7 @@ struct ThreadData; class ProcessElfCore : public lldb_private::Process { public: - //------------------------------------------------------------------ // Constructors and Destructors - //------------------------------------------------------------------ static lldb::ProcessSP CreateInstance(lldb::TargetSP target_sp, lldb::ListenerSP listener_sp, const lldb_private::FileSpec *crash_file_path); @@ -45,37 +43,27 @@ public: static const char *GetPluginDescriptionStatic(); - //------------------------------------------------------------------ // Constructors and Destructors - //------------------------------------------------------------------ ProcessElfCore(lldb::TargetSP target_sp, lldb::ListenerSP listener_sp, const lldb_private::FileSpec &core_file); ~ProcessElfCore() override; - //------------------------------------------------------------------ // Check if a given Process - //------------------------------------------------------------------ bool CanDebug(lldb::TargetSP target_sp, bool plugin_specified_by_name) override; - //------------------------------------------------------------------ // Creating a new process, or attaching to an existing one - //------------------------------------------------------------------ lldb_private::Status DoLoadCore() override; lldb_private::DynamicLoader *GetDynamicLoader() override; - //------------------------------------------------------------------ // PluginInterface protocol - //------------------------------------------------------------------ lldb_private::ConstString GetPluginName() override; uint32_t GetPluginVersion() override; - //------------------------------------------------------------------ // Process Control - //------------------------------------------------------------------ lldb_private::Status DoDestroy() override; void RefreshStateAfterStop() override; @@ -88,16 +76,12 @@ public: return error; } - //------------------------------------------------------------------ // Process Queries - //------------------------------------------------------------------ bool IsAlive() override; bool WarnBeforeDetach() const override { return false; } - //------------------------------------------------------------------ // Process Memory - //------------------------------------------------------------------ size_t ReadMemory(lldb::addr_t addr, void *buf, size_t size, lldb_private::Status &error) override; @@ -131,9 +115,7 @@ private: lldb_private::ConstString path; }; - //------------------------------------------------------------------ // For ProcessElfCore only - //------------------------------------------------------------------ typedef lldb_private::Range<lldb::addr_t, lldb::addr_t> FileRange; typedef lldb_private::RangeDataVector<lldb::addr_t, lldb::addr_t, FileRange> VMRangeToFileOffset; diff --git a/lldb/source/Plugins/Process/elf-core/ThreadElfCore.cpp b/lldb/source/Plugins/Process/elf-core/ThreadElfCore.cpp index 948f52ca008..a5d1fc4a7bf 100644 --- a/lldb/source/Plugins/Process/elf-core/ThreadElfCore.cpp +++ b/lldb/source/Plugins/Process/elf-core/ThreadElfCore.cpp @@ -43,9 +43,7 @@ using namespace lldb; using namespace lldb_private; -//---------------------------------------------------------------------- // Construct a Thread object with given data -//---------------------------------------------------------------------- ThreadElfCore::ThreadElfCore(Process &process, const ThreadData &td) : Thread(process, td.tid), m_thread_name(td.name), m_thread_reg_ctx_sp(), m_signo(td.signo), m_gpregset_data(td.gpregset), m_notes(td.notes) {} @@ -248,9 +246,7 @@ bool ThreadElfCore::CalculateStopInfo() { return false; } -//---------------------------------------------------------------- // Parse PRSTATUS from NOTE entry -//---------------------------------------------------------------- ELFLinuxPrStatus::ELFLinuxPrStatus() { memset(this, 0, sizeof(ELFLinuxPrStatus)); } @@ -324,9 +320,7 @@ Status ELFLinuxPrStatus::Parse(const DataExtractor &data, return error; } -//---------------------------------------------------------------- // Parse PRPSINFO from NOTE entry -//---------------------------------------------------------------- ELFLinuxPrPsInfo::ELFLinuxPrPsInfo() { memset(this, 0, sizeof(ELFLinuxPrPsInfo)); } @@ -402,9 +396,7 @@ Status ELFLinuxPrPsInfo::Parse(const DataExtractor &data, return error; } -//---------------------------------------------------------------- // Parse SIGINFO from NOTE entry -//---------------------------------------------------------------- ELFLinuxSigInfo::ELFLinuxSigInfo() { memset(this, 0, sizeof(ELFLinuxSigInfo)); } size_t ELFLinuxSigInfo::GetSize(const lldb_private::ArchSpec &arch) { diff --git a/lldb/source/Plugins/Process/elf-core/ThreadElfCore.h b/lldb/source/Plugins/Process/elf-core/ThreadElfCore.h index f0cc4daba20..13291d56a0c 100644 --- a/lldb/source/Plugins/Process/elf-core/ThreadElfCore.h +++ b/lldb/source/Plugins/Process/elf-core/ThreadElfCore.h @@ -161,9 +161,7 @@ public: } protected: - //------------------------------------------------------------------ // Member variables. - //------------------------------------------------------------------ std::string m_thread_name; lldb::RegisterContextSP m_thread_reg_ctx_sp; |

