summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/MacOSX-Kernel
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
commit8b3af63b8993e45b1783853a3fcf6f36bfbed81b (patch)
tree41759d08361beda32b90e345d8033aecd2e15088 /lldb/source/Plugins/Process/MacOSX-Kernel
parent66b6bb1766b3e5eea56b26fc91d03f1fccbe15e4 (diff)
downloadbcm5719-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/MacOSX-Kernel')
-rw-r--r--lldb/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp4
-rw-r--r--lldb/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.h12
-rw-r--r--lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp12
-rw-r--r--lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.h26
-rw-r--r--lldb/source/Plugins/Process/MacOSX-Kernel/ThreadKDP.cpp2
-rw-r--r--lldb/source/Plugins/Process/MacOSX-Kernel/ThreadKDP.h4
6 files changed, 0 insertions, 60 deletions
diff --git a/lldb/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp b/lldb/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp
index 5da835d3525..ded0983fac7 100644
--- a/lldb/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp
+++ b/lldb/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp
@@ -28,9 +28,7 @@
using namespace lldb;
using namespace lldb_private;
-//----------------------------------------------------------------------
// CommunicationKDP constructor
-//----------------------------------------------------------------------
CommunicationKDP::CommunicationKDP(const char *comm_name)
: Communication(comm_name), m_addr_byte_size(4),
m_byte_order(eByteOrderLittle), m_packet_timeout(5), m_sequence_mutex(),
@@ -39,9 +37,7 @@ CommunicationKDP::CommunicationKDP(const char *comm_name)
m_kdp_version_feature(0u), m_kdp_hostinfo_cpu_mask(0u),
m_kdp_hostinfo_cpu_type(0u), m_kdp_hostinfo_cpu_subtype(0u) {}
-//----------------------------------------------------------------------
// Destructor
-//----------------------------------------------------------------------
CommunicationKDP::~CommunicationKDP() {
if (IsConnected()) {
Disconnect();
diff --git a/lldb/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.h b/lldb/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.h
index b5aa146ac39..fed6128c17f 100644
--- a/lldb/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.h
+++ b/lldb/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.h
@@ -76,9 +76,7 @@ public:
ePacketTypeMask = 0x80u,
eCommandTypeMask = 0x7fu
} PacketType;
- //------------------------------------------------------------------
// Constructors and Destructors
- //------------------------------------------------------------------
CommunicationKDP(const char *comm_name);
virtual ~CommunicationKDP();
@@ -96,14 +94,12 @@ public:
lldb_private::DataExtractor &packet);
bool IsRunning() const { return m_is_running.GetValue(); }
- //------------------------------------------------------------------
// Set the global packet timeout.
//
// For clients, this is the timeout that gets used when sending
// packets and waiting for responses. For servers, this might not
// get used, and if it doesn't this should be moved to the
// CommunicationKDPClient.
- //------------------------------------------------------------------
std::chrono::seconds SetPacketTimeout(std::chrono::seconds packet_timeout) {
const auto old_packet_timeout = m_packet_timeout;
m_packet_timeout = packet_timeout;
@@ -112,9 +108,7 @@ public:
std::chrono::seconds GetPacketTimeout() const { return m_packet_timeout; }
- //------------------------------------------------------------------
// Public Request Packets
- //------------------------------------------------------------------
bool SendRequestConnect(uint16_t reply_port, uint16_t exc_port,
const char *greeting);
@@ -188,10 +182,8 @@ protected:
PacketStreamType &request_packet,
uint16_t request_length);
- //------------------------------------------------------------------
// Protected Request Packets (use public accessors which will cache
// results.
- //------------------------------------------------------------------
bool SendRequestVersion();
bool SendRequestHostInfo();
@@ -228,9 +220,7 @@ protected:
bool SendRequestAndGetReply(const CommandType command,
const PacketStreamType &request_packet,
lldb_private::DataExtractor &reply_packet);
- //------------------------------------------------------------------
// Classes that inherit from CommunicationKDP can see and modify these
- //------------------------------------------------------------------
uint32_t m_addr_byte_size;
lldb::ByteOrder m_byte_order;
std::chrono::seconds m_packet_timeout;
@@ -250,9 +240,7 @@ protected:
// hang the KDP connection...
lldb::addr_t m_last_read_memory_addr; // Last memory read address for logging
private:
- //------------------------------------------------------------------
// For CommunicationKDP only
- //------------------------------------------------------------------
DISALLOW_COPY_AND_ASSIGN(CommunicationKDP);
};
diff --git a/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp b/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
index 605194d0726..c9e024fc498 100644
--- a/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
+++ b/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
@@ -143,9 +143,7 @@ bool ProcessKDP::CanDebug(TargetSP target_sp, bool plugin_specified_by_name) {
return false;
}
-//----------------------------------------------------------------------
// ProcessKDP constructor
-//----------------------------------------------------------------------
ProcessKDP::ProcessKDP(TargetSP target_sp, ListenerSP listener_sp)
: Process(target_sp, listener_sp),
m_comm("lldb.process.kdp-remote.communication"),
@@ -162,9 +160,7 @@ ProcessKDP::ProcessKDP(TargetSP target_sp, ListenerSP listener_sp)
m_comm.SetPacketTimeout(std::chrono::seconds(timeout_seconds));
}
-//----------------------------------------------------------------------
// Destructor
-//----------------------------------------------------------------------
ProcessKDP::~ProcessKDP() {
Clear();
// We need to call finalize on the process before destroying ourselves to
@@ -174,9 +170,7 @@ ProcessKDP::~ProcessKDP() {
Finalize();
}
-//----------------------------------------------------------------------
// PluginInterface
-//----------------------------------------------------------------------
lldb_private::ConstString ProcessKDP::GetPluginName() {
return GetPluginNameStatic();
}
@@ -369,9 +363,7 @@ Status ProcessKDP::DoConnectRemote(Stream *strm, llvm::StringRef remote_url) {
return error;
}
-//----------------------------------------------------------------------
// Process Control
-//----------------------------------------------------------------------
Status ProcessKDP::DoLaunch(Module *exe_module,
ProcessLaunchInfo &launch_info) {
Status error;
@@ -595,17 +587,13 @@ Status ProcessKDP::DoDestroy() {
return DoDetach(keep_stopped);
}
-//------------------------------------------------------------------
// Process Queries
-//------------------------------------------------------------------
bool ProcessKDP::IsAlive() {
return m_comm.IsConnected() && Process::IsAlive();
}
-//------------------------------------------------------------------
// Process Memory
-//------------------------------------------------------------------
size_t ProcessKDP::DoReadMemory(addr_t addr, void *buf, size_t size,
Status &error) {
uint8_t *data_buffer = (uint8_t *)buf;
diff --git a/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.h b/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.h
index 31de54c4665..a7f8466f984 100644
--- a/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.h
+++ b/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.h
@@ -30,9 +30,7 @@ class ThreadKDP;
class ProcessKDP : 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);
@@ -47,23 +45,17 @@ public:
static const char *GetPluginDescriptionStatic();
- //------------------------------------------------------------------
// Constructors and Destructors
- //------------------------------------------------------------------
ProcessKDP(lldb::TargetSP target_sp, lldb::ListenerSP listener);
~ProcessKDP() override;
- //------------------------------------------------------------------
// Check if a given Process
- //------------------------------------------------------------------
bool CanDebug(lldb::TargetSP target_sp,
bool plugin_specified_by_name) override;
lldb_private::CommandObject *GetPluginCommandObject() override;
- //------------------------------------------------------------------
// Creating a new process, or attaching to an existing one
- //------------------------------------------------------------------
lldb_private::Status WillLaunch(lldb_private::Module *module) override;
lldb_private::Status
@@ -93,16 +85,12 @@ public:
lldb_private::DynamicLoader *GetDynamicLoader() override;
- //------------------------------------------------------------------
// PluginInterface protocol
- //------------------------------------------------------------------
lldb_private::ConstString GetPluginName() override;
uint32_t GetPluginVersion() override;
- //------------------------------------------------------------------
// Process Control
- //------------------------------------------------------------------
lldb_private::Status WillResume() override;
lldb_private::Status DoResume() override;
@@ -117,14 +105,10 @@ public:
void RefreshStateAfterStop() override;
- //------------------------------------------------------------------
// Process Queries
- //------------------------------------------------------------------
bool IsAlive() override;
- //------------------------------------------------------------------
// Process Memory
- //------------------------------------------------------------------
size_t DoReadMemory(lldb::addr_t addr, void *buf, size_t size,
lldb_private::Status &error) override;
@@ -136,18 +120,14 @@ public:
lldb_private::Status DoDeallocateMemory(lldb::addr_t ptr) override;
- //----------------------------------------------------------------------
// Process Breakpoints
- //----------------------------------------------------------------------
lldb_private::Status
EnableBreakpointSite(lldb_private::BreakpointSite *bp_site) override;
lldb_private::Status
DisableBreakpointSite(lldb_private::BreakpointSite *bp_site) override;
- //----------------------------------------------------------------------
// Process Watchpoints
- //----------------------------------------------------------------------
lldb_private::Status EnableWatchpoint(lldb_private::Watchpoint *wp,
bool notify = true) override;
@@ -160,9 +140,7 @@ protected:
friend class ThreadKDP;
friend class CommunicationKDP;
- //----------------------------------------------------------------------
// Accessors
- //----------------------------------------------------------------------
bool IsRunning(lldb::StateType state) {
return state == lldb::eStateRunning || IsStepping(state);
}
@@ -191,9 +169,7 @@ protected:
lldb::ThreadSP GetKernelThread();
- //------------------------------------------------------------------
/// Broadcaster event bits definitions.
- //------------------------------------------------------------------
CommunicationKDP m_comm;
lldb_private::Broadcaster m_async_broadcaster;
lldb_private::HostThread m_async_thread;
@@ -209,9 +185,7 @@ protected:
static void *AsyncThread(void *arg);
private:
- //------------------------------------------------------------------
// For ProcessKDP only
- //------------------------------------------------------------------
DISALLOW_COPY_AND_ASSIGN(ProcessKDP);
};
diff --git a/lldb/source/Plugins/Process/MacOSX-Kernel/ThreadKDP.cpp b/lldb/source/Plugins/Process/MacOSX-Kernel/ThreadKDP.cpp
index 341c6329ad6..77361ef705f 100644
--- a/lldb/source/Plugins/Process/MacOSX-Kernel/ThreadKDP.cpp
+++ b/lldb/source/Plugins/Process/MacOSX-Kernel/ThreadKDP.cpp
@@ -34,9 +34,7 @@
using namespace lldb;
using namespace lldb_private;
-//----------------------------------------------------------------------
// Thread Registers
-//----------------------------------------------------------------------
ThreadKDP::ThreadKDP(Process &process, lldb::tid_t tid)
: Thread(process, tid), m_thread_name(), m_dispatch_queue_name(),
diff --git a/lldb/source/Plugins/Process/MacOSX-Kernel/ThreadKDP.h b/lldb/source/Plugins/Process/MacOSX-Kernel/ThreadKDP.h
index e7330f223ff..9971ea765a3 100644
--- a/lldb/source/Plugins/Process/MacOSX-Kernel/ThreadKDP.h
+++ b/lldb/source/Plugins/Process/MacOSX-Kernel/ThreadKDP.h
@@ -60,16 +60,12 @@ public:
protected:
friend class ProcessKDP;
- //------------------------------------------------------------------
// Member variables.
- //------------------------------------------------------------------
std::string m_thread_name;
std::string m_dispatch_queue_name;
lldb::addr_t m_thread_dispatch_qaddr;
lldb::StopInfoSP m_cached_stop_info_sp;
- //------------------------------------------------------------------
// Protected member functions.
- //------------------------------------------------------------------
virtual bool CalculateStopInfo();
};
OpenPOWER on IntegriCloud